| 1 |
[package] |
| •2 |
autobenches = false |
| 3 |
name = "wasmparser" |
| 4 |
version.workspace = true |
| 5 |
authors = ["Yury Delendik <[email protected]>"] |
| 6 |
license.workspace = true |
| 7 |
repository = "https://github.com/bytecodealliance/wasm-tools/tree/main/crates/wasmparser" |
| 8 |
homepage = "https://github.com/bytecodealliance/wasm-tools/tree/main/crates/wasmparser" |
| 9 |
keywords = ["parser", "WebAssembly", "wasm"] |
| 10 |
description = """ |
| 11 |
A simple event-driven library for parsing WebAssembly binary files. |
| 12 |
""" |
| 13 |
edition.workspace = true |
| 14 |
exclude = ["benches/*.wasm"] |
| 15 |
rust-version.workspace = true |
| 16 |
|
| 17 |
[lints] |
| 18 |
workspace = true |
| 19 |
|
| 20 |
[package.metadata.docs.rs] |
| 21 |
all-features = true |
| 22 |
|
| 23 |
[dependencies] |
| 24 |
bitflags = "2.4.1" |
| 25 |
hashbrown = { workspace = true, optional = true } |
| 26 |
indexmap = { workspace = true, optional = true } |
| 27 |
semver = { workspace = true, optional = true } |
| 28 |
serde = { workspace = true, optional = true } |
| 29 |
|
| 30 |
[dev-dependencies] |
| 31 |
anyhow = { workspace = true } |
| 32 |
env_logger.workspace = true |
| 33 |
log.workspace = true |
| 34 |
rayon = { workspace = true } |
| 35 |
wasm-encoder = { path = "../wasm-encoder" } |
| 36 |
wast = { path = "../wast" } |
| 37 |
wat = { path = "../wat" } |
| 38 |
|
| 39 |
[features] |
| 40 |
default = ['std', 'validate', 'serde', 'features', 'component-model', 'hash-collections', 'simd'] |
| 41 |
|
| 42 |
# A feature which enables implementations of `std::error::Error` as appropriate |
| 43 |
# along with other convenience APIs. This additionally uses the standard |
| 44 |
# library's source of randomness for seeding hash maps. |
| 45 |
std = ['indexmap?/std'] |
| 46 |
|
| 47 |
# Tells the `wasmparser` crate to provide (and use) hash-based collections internally. |
| 48 |
# |
| 49 |
# Disabling this crate feature allows to drop `hashbrown`, `indexmap` dependencies |
| 50 |
# entirely, reducing compilation times and shrink binary sizes. |
| 51 |
hash-collections = [ |
| 52 |
'dep:hashbrown', |
| 53 |
'dep:indexmap', |
| 54 |
] |
| 55 |
# Tells the `wasmparser` crate to prefer using its built-in btree-based collections |
| 56 |
# even if `hash-collections` is enabled. |
| 57 |
prefer-btree-collections = [] |
| 58 |
|
| 59 |
# A feature that enables validating WebAssembly files. This is enabled by |
| 60 |
# default but not required if you're only parsing a file, for example, as |
| 61 |
# opposed to validating all of its contents. |
| 62 |
validate = [] |
| 63 |
|
| 64 |
# Enable Serialize/Deserialize implementations for types in |
| 65 |
# `wasmparser::collections` |
| 66 |
serde = ['dep:serde', 'indexmap?/serde', 'hashbrown?/serde'] |
| 67 |
|
| 68 |
# A feature that enables the guts of the `WasmFeatures` type in this crate. |
| 69 |
# |
| 70 |
# This feature is enabled by default. When disabled this crate does not support |
| 71 |
# runtime configuration of WebAssembly features. Instead the set of WebAssembly |
| 72 |
# features/proposals support are fixed at compile time to `wasmparser`'s default |
| 73 |
# set of supported features. |
| 74 |
features = [] |
| 75 |
|
| 76 |
# A feature that enables parsing and validating the component-model proposal for |
| 77 |
# WebAssembly. This is enabled by default but if your use case is only |
| 78 |
# interested in working with core modules then this feature can be disabled. |
| 79 |
component-model = ['dep:semver'] |
| 80 |
|
| 81 |
# A feature that enables parsing and validating the `simd` and `relaxed-simd` |
| 82 |
# proposals for WebAssembly. This is enabled by default but if your use case is |
| 83 |
# only interested in working on non-SIMD code then this feature can be disabled. |
| 84 |
simd = [] |