msvc_def
msvc_def
A no_std (with optional alloc and std features) compatible library for reading
Microsoft Module-Definition (.Def) Files.
const CONTENTS: &str = "
LIBRARY \"mylib\"
EXPORTS
myfunc = inner_func @1
";
// Available both as no_std, no_alloc references only
let file = parse_ref?;
assert_eq!;
assert_eq!;
// With iterator based variable length items
let mut export = file.exports;
assert_eq!;
assert_eq!;
// And as no_std, alloc owned types
let file = parse?;
assert_eq!;
assert_eq!;
// With Vec based variable length items
let mut export = file.exports;
assert_eq!;
assert_eq!;
assert_eq!;
Usage
Add the following to Cargo.toml:
[]
= "0.1.0"
Or add with cargo:
cargo add msvc_def
Features
alloc: Adds [ModuleDefinitionFile].std: AddsErrorsupport for [ParseError]. Enablesallocfeature.
Notes
Documentation items in code highlighting are taken directly from the Microsoft Reference.