Skip to content

Colorize section types in dump output #1020

Open

Description

@maekawatoshiki

Thank you for developing great tools.

I found that wasm-tools dump is really useful, but coloring the output, especially the section entries such as type section, would make it more readable.

However, I'm not sure if it is acceptable for the output to contain escape codes for coloring.
What do you think?

image

Activity

  1. changed the title [-]Color section type for `dump` command[/-] [+]Colorize section types in `dump` output[/+] on May 10, 2023
  2. alexcrichton commented on May 10, 2023

    @alexcrichton
    Member

    I think it'd be great to add color! This is a central structure which could grow a --color argument and the output_writer method could perhaps return a WriteColor trait object instead of a Write trait object to allow callers to customize colors.

    Personally I find colors make it much easier to explore lots of output, so I'm all for this. Would you be up for prototyping this in a PR?

  3. maekawatoshiki commented on May 10, 2023

    @maekawatoshiki
    ContributorAuthor

    Glad to hear that. I'll try to create a PR for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions