Documentation
  • Coverage
  • 80.85%
    76 out of 94 items documented1 out of 20 items with examples
  • Size
  • Source code size: 58.79 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 3s Average build duration of successful builds.
  • all releases: 3s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • dlharmon-rs

BSDL Parser

We make a few assumptions here: an INSTRUCTION_OPCODE will always be 64 bits or less

Example

# use std::path::PathBuf;
# let manifest_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
# let test_bsd = manifest_dir.join("tests").join("test_data").join("sample.bsd");
// test_bsd is a PathBuf pointing to tests/test_data/sample.bsd
let bsdl = bsdl::Entity::parse(&test_bsd, None).unwrap();
println!("opcodes = {:?}", bsdl.opcodes());
let idcode = &bsdl.idcode_register()[0];
println!("idcode = {} vendor = {:?}", idcode, idcode.vendor_string());
println!("generics = {:?}", bsdl.generics());
println!("use_statements = {:?}", bsdl.use_statements());