Debian Codegraph @

crates/wasmparser/Cargo.toml

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