Skip to content

Does getopts actually need to depend on unicode-width? #132

@bjorn3

Description

@bjorn3

Currently the unicode-width crate is used to determine where to wrap help text. The standard library libtest crate doesn't use this functionality and is unlikely to ever do I think given the code size overhead that adding translation support to libtest would imply for all test executables. And rustc and rustdoc don't currently use this functionality either. At the same time the unicode-width crate takes up 1.5MB of source code given the huge table with widths of each character. This is a non-trivial part of the size vendored standard library sources would take.

Another option would be to vendor the getopts crate into the rust repo and strip it down as necessary. Using the same crate inside both the library and compiler workspace is non-trivial however.

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