Thanks to visit codestin.com
Credit goes to github.com

Skip to content

wcampbell0x2a/deku-display

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bintex

github crates.io docs.rs build status

Create LaTeX bytefield diagrams with the use of rust proc-macros and the deku library.

docs

run $ cargo doc --open

See bintex::attribute for Attribute details and examples.

example

Run $ cargo run && pdflatex sample.tex to create the following illustration from code:

use bintex::{BinTex, BinTexOutput};
use deku::prelude::*;

#[derive(BinTex)]
#[bintex(bit_width = 32)]
struct Ipv6 {
    #[deku(bits = "4")]
    version: u8,
    #[deku(bits = "6")]
    ds: u8,
    #[deku(bits = "2")]
    ecn: u8,
    #[deku(bits = "20")]
    label: u32,
    length: u16,
    next_header: u8,
    hop_limit: u8,
    src: u32,
    dst: u32,
}

Result

About

Create bytefield latex digrams with the use of rust proc-macros and deku

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

 
 
 

Contributors