#hex #literals #array #binary #macro #fixed #hb

nightly macro hexbytes

Macro for creating binary arrays from hex literals

1 unstable release

Uses old Rust 2015

0.1.0 Jan 6, 2018

#81 in #fixed

MIT license

6KB
111 lines

Byte array literals

This crate provides the hb! macro for creating fixed size byte arrays at compile time from hexadecimal byte literals.

#![feature(proc_macro)]

extern crate hexbytes;
use hexbytes::hb;

fn main() {
    let bytes = hb!("0bad abba cd");
}

lib.rs:

Byte array literals

This crate provides the hb! macro for creating fixed size byte arrays at compile time from hexadecimal byte literals.

#![feature(proc_macro)]

extern crate hexbytes;
use hexbytes::hb;

fn main() {
    let bytes = hb!("0bad abba cd");
}

No runtime deps