You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rust bindings for [bddisasm](https://github.com/bitdefender/bddisasm).
3
+
`no_std`Rust bindings for [bddisasm](https://github.com/bitdefender/bddisasm).
4
4
5
5
See [bddisasm](https://crates.io/crates/bddisasm) if you're looking for a Rust wrapper for these bindings.
6
6
7
7
## Requirements
8
8
9
9
[bindgen](https://crates.io/crates/bindgen) is used to generate the bindings at build time. Because of this, users need to have `clang` installed. Check the [bindgen documentation](https://rust-lang.github.io/rust-bindgen/requirements.html) for more information.
10
+
11
+
## Notes
12
+
13
+
While this crate is `no_std`, the `bddisasm` library it links against depends on a C library because it needs `vsnprintf` and `memset`. It is possible to [work around this limitation](https://github.com/bitdefender/bddisasm#nd_vsnprintf_s-and-nd_memset), but this is not currently done for these bindings.
// Get the second operand which is the source (`[rcx+r15*2]`)
89
134
letsrc=operands[1];
90
135
@@ -117,8 +162,6 @@ match src.info {
117
162
},
118
163
_=>unreachable!(),
119
164
}
120
-
# Ok(())
121
-
# }
122
165
```
123
166
124
167
Will print:
@@ -131,6 +174,11 @@ Scale: 2
131
174
No displacement
132
175
```
133
176
134
-
## Requirements
177
+
## Accessing the raw bindings
178
+
179
+
The raw `bddisasm_sys` bindings are available via the `ffi` re-export.
180
+
181
+
## Feature Flags
135
182
136
-
Because [bddisasm-sys](https://crates.io/crates/bddisasm-sys) uses [bindgen](https://crates.io/crates/bindgen) to generate the bindings at build time, users need to have `clang` installed. Check the [bindgen documentation](https://rust-lang.github.io/rust-bindgen/requirements.html) for more information.
183
+
-`std` - adds a `std` dependency - the only visible difference when doing this is that [`DecodeError`] implements
0 commit comments