Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Replace hex-literal crate with hexlit in order to support "0x" prefix in the address!() macro #764

Open
gsnoff opened this issue Oct 8, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@gsnoff
Copy link

gsnoff commented Oct 8, 2024

Component

primitives

Describe the feature you would like

The primitives library defines the fixed_bytes_macros! {} internal utility macro, which in turn is used to define exported macros such as address!() for compile-time values. The latter takes in a hex-encoded string literal, which is then represented as an Address value.

Currently the hex-literal crate is responsible for translating hex-encoded string literals into byte arrays in compile time. It is not feature-complete though, notably it lacks the support for "0x" prefix.

There exists an alternative hexlit crate which seems to be a more recent drop-in replacement for hex-literal, and which does support additional features such as "0x" prefix, as well as some extra kinds of formatting characters, such as hyphen '-' and underscore '_'.

Additional context

No response

@gsnoff gsnoff added the enhancement New feature or request label Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants
@gsnoff and others