-
Notifications
You must be signed in to change notification settings - Fork 244
/
Cargo.toml
68 lines (60 loc) · 2.12 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
[package]
name = "wasmparser"
version.workspace = true
authors = ["Yury Delendik <ydelendik@mozilla.com>"]
license = "Apache-2.0 WITH LLVM-exception"
repository = "https://github.com/bytecodealliance/wasm-tools/tree/main/crates/wasmparser"
homepage = "https://github.com/bytecodealliance/wasm-tools/tree/main/crates/wasmparser"
keywords = ["parser", "WebAssembly", "wasm"]
description = """
A simple event-driven library for parsing WebAssembly binary files.
"""
edition.workspace = true
exclude = ["benches/*.wasm"]
rust-version.workspace = true
[lints]
workspace = true
[dependencies]
bitflags = "2.4.1"
indexmap = { workspace = true, optional = true }
semver = { workspace = true, optional = true }
hashbrown = { workspace = true, optional = true }
ahash = { workspace = true, optional = true }
serde = { workspace = true, optional = true }
[dev-dependencies]
anyhow = { workspace = true }
criterion = { workspace = true }
wat = { path = "../wat" }
wast = { path = "../wast" }
rayon = { workspace = true }
once_cell = "1.13.0"
wasm-encoder = { path = "../wasm-encoder" }
env_logger.workspace = true
log.workspace = true
[[bench]]
name = "benchmark"
harness = false
[features]
default = ['std', 'validate', 'serde']
# A feature which enables implementations of `std::error::Error` as appropriate
# along with other convenience APIs. This additionally uses the standard
# library's source of randomness for seeding hash maps.
std = ['indexmap/std']
# Tells the wasmparser crate to avoid using hash based maps and sets.
#
# Some embedded environments cannot provide a random source which is required
# to properly initialize hashmap based data structures for resilience against
# malious actors that control their inputs.
no-hash-maps = []
# A feature that enables validating WebAssembly files. This is enabled by
# default but not required if you're only parsing a file, for example, as
# opposed to validating all of its contents.
validate = [
'dep:indexmap',
'dep:semver',
'dep:hashbrown',
'dep:ahash',
]
# Enable Serialize/Deserialize implementations for types in
# `wasmparser::collections`
serde = ['dep:serde', 'indexmap/serde', 'hashbrown/serde']