Skip to content

Commit

Permalink
Update documentation to mention the WASM feature
Browse files Browse the repository at this point in the history
  • Loading branch information
Shnatsel committed May 2, 2024
1 parent d2f75cd commit 0ef2dd0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
14 changes: 13 additions & 1 deletion auditable-extract/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//! **Note:** this is a low-level crate that only implements binary parsing. It rarely should be used directly.
//! You probably want the higher-level [`auditable-info`](https://docs.rs/auditable-info) crate instead.
//!
//! The following snippet demonstrates full extraction pipeline, including decompression
//! The following snippet demonstrates full extraction pipeline using this crate, including decompression
//! using the safe-Rust [`miniz_oxide`](http://docs.rs/miniz_oxide/) and optional JSON parsing
//! via [`auditable-serde`](http://docs.rs/auditable-serde/):
//!
Expand All @@ -42,6 +42,18 @@
//! Ok(())
//! }
//! ```
//!
//! ## WebAssembly support
//!
//! We use a third-party crate [`wasmparser`](https://crates.io/crates/wasmparser)
//! created by Bytecode Alliance for parsing WebAssembly.
//! It is a robust and high-quality parser, but its dependencies contain some `unsafe` code.
//! We have manually audited it and found it to be sound.
//!
//! Still, the security guarantees for it are not as ironclad as for other parsers.
//! Because of that WebAssembly support is gated behind the optional `wasm` feature.
//! Be sure to [enable](https://doc.rust-lang.org/cargo/reference/features.html#dependency-features)
//! the `wasm` feature if you want to parse WebAssembly.
#[cfg(feature = "wasm")]
mod wasm;
Expand Down
6 changes: 6 additions & 0 deletions auditable-info/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
//! ```
//! Functions to load the data from a `Read` instance or from `&[u8]` are also provided.
//!
//! The supported formats are [ELF](https://en.wikipedia.org/wiki/Executable_and_Linkable_Format),
//! [PE](https://en.wikipedia.org/wiki/Portable_Executable),
//! [Mach-O](https://en.wikipedia.org/wiki/Mach-O) and [WebAssembly](https://en.wikipedia.org/wiki/WebAssembly).
//! Make sure you [enable](https://doc.rust-lang.org/cargo/reference/features.html#dependency-features) the `wasm` feature
//! if you want to parse WebAssembly.
//!
//! If you need an even lower-level interface than the one provided by this crate,
//! use the [`auditable-extract`](http://docs.rs/auditable-extract/) and
//! [`auditable-serde`](http://docs.rs/auditable-serde/) crates.
Expand Down

0 comments on commit 0ef2dd0

Please sign in to comment.