Coder Social home page Coder Social logo

golddranks / binary_macros Goto Github PK

View Code? Open in Web Editor NEW
18.0 2.0 2.0 23 KB

Rust macros for decoding base64 and hexadecimal -like encodings to [u8] literals.

License: MIT License

Rust 99.11% Shell 0.89%
rust macros base64 hexadecimal literals hacktoberfest

binary_macros's People

Contributors

golddranks avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

lohann petoknm

binary_macros's Issues

Compilation fails

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)

#![no_std] support

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.