golddranks / binary_macros Goto Github PK
View Code? Open in Web Editor NEWRust macros for decoding base64 and hexadecimal -like encodings to [u8] literals.
License: MIT License
Rust macros for decoding base64 and hexadecimal -like encodings to [u8] literals.
License: MIT License
Currently it will panic if use you write base16!("ff")
It would be nice if this crate were marked as #![no_std]
so it could be used in programs which do not include the Rust standard library. I can submit a PR to do so unless there's something surprising I should know about which would make it difficult.
Hi, I came across this crate today and realised that it doesn't compile on Rust 1.51.0
error: proc-macro derive panicked
--> signature_verifier/src/constants.rs:1:43
|
1 | pub const REPL_DEPLOY_PUBLIC_KEY: &[u8] = base64!(
| ___________________________________________^
2 | | "MIIECgKCBAEAswkDXZlAqW1UpGiLFBW1ohSvUIqqcwrOt1ubbWrltrYT+3SQV24C\
3 | | Su9j93+DX9tsFBuVDE3DSutddBmdWh0zFxDdSO+uA8JBJki9GfHNoynFcPLl3AxA\
4 | | 4iUh6nD6uSdXIGkJaJ+U8/Jix2AXS7Qk5Jfoktx88GtKoHAwznmfxdJwrFeiX8D8\
... |
23 | | yggLIsW8CUnOIhj0AKovh9OvyC//N/GRLQIDAQAB"
24 | | );
| |_^
|
= help: message: Parse error: DecodeError { position: 1424, kind: Length }
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: proc-macro derive panicked
--> signature_verifier/src/constants.rs:1:43
|
1 | pub const REPL_DEPLOY_PUBLIC_KEY: &[u8] = base64!(
| ___________________________________________^
2 | | "MIIECgKCBAEAswkDXZlAqW1UpGiLFBW1ohSvUIqqcwrOt1ubbWrltrYT+3SQV24C\
3 | | Su9j93+DX9tsFBuVDE3DSutddBmdWh0zFxDdSO+uA8JBJki9GfHNoynFcPLl3AxA\
4 | | 4iUh6nD6uSdXIGkJaJ+U8/Jix2AXS7Qk5Jfoktx88GtKoHAwznmfxdJwrFeiX8D8\
... |
23 | | yggLIsW8CUnOIhj0AKovh9OvyC//N/GRLQIDAQAB"
24 | | );
| |_^
|
= help: message: Parse error: DecodeError { position: 1424, kind: Length }
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: cannot find macro `proc_macro_call` in this scope
--> signature_verifier/src/constants.rs:1:43
|
1 | pub const REPL_DEPLOY_PUBLIC_KEY: &[u8] = base64!(
| ___________________________________________^
2 | | "MIIECgKCBAEAswkDXZlAqW1UpGiLFBW1ohSvUIqqcwrOt1ubbWrltrYT+3SQV24C\
3 | | Su9j93+DX9tsFBuVDE3DSutddBmdWh0zFxDdSO+uA8JBJki9GfHNoynFcPLl3AxA\
4 | | 4iUh6nD6uSdXIGkJaJ+U8/Jix2AXS7Qk5Jfoktx88GtKoHAwznmfxdJwrFeiX8D8\
... |
23 | | yggLIsW8CUnOIhj0AKovh9OvyC//N/GRLQIDAQAB"
24 | | );
| |_^
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: cannot find macro `proc_macro_call` in this scope
--> signature_verifier/src/constants.rs:1:43
|
1 | pub const REPL_DEPLOY_PUBLIC_KEY: &[u8] = base64!(
| ___________________________________________^
2 | | "MIIECgKCBAEAswkDXZlAqW1UpGiLFBW1ohSvUIqqcwrOt1ubbWrltrYT+3SQV24C\
3 | | Su9j93+DX9tsFBuVDE3DSutddBmdWh0zFxDdSO+uA8JBJki9GfHNoynFcPLl3AxA\
4 | | 4iUh6nD6uSdXIGkJaJ+U8/Jix2AXS7Qk5Jfoktx88GtKoHAwznmfxdJwrFeiX8D8\
... |
23 | | yggLIsW8CUnOIhj0AKovh9OvyC//N/GRLQIDAQAB"
24 | | );
| |_^
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.