forked from bytecodealliance/wasm-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cargo.toml
253 lines (226 loc) · 8.44 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
[package]
name = "wasm-tools"
version = "1.221.2"
authors = ["The Wasmtime Project Developers"]
edition.workspace = true
description = "CLI tools for interoperating with WebAssembly files"
license.workspace = true
documentation = "https://github.com/bytecodealliance/wasm-tools"
categories = ["wasm"]
keywords = ["webassembly", "wasm"]
repository = "https://github.com/bytecodealliance/wasm-tools"
readme = "README.md"
exclude = ['tests/wabt', 'tests/testsuite', 'tests/snapshots', 'ci']
rust-version.workspace = true
[package.metadata.binstall]
pkg-url = "{repo}/releases/download/v{version}/{name}-{version}-{target-arch}-{target-family}{archive-suffix}"
bin-dir = "{name}-{version}-{target-arch}-{target-family}/{bin}{binary-ext}"
pkg-fmt = "tgz"
[package.metadata.binstall.overrides.x86_64-apple-darwin]
pkg-url = "{repo}/releases/download/v{version}/{name}-{version}-{target-arch}-macos{archive-suffix}"
bin-dir = "{name}-{version}-{target-arch}-macos/{bin}{binary-ext}"
[package.metadata.binstall.overrides.aarch64-apple-darwin]
pkg-url = "{repo}/releases/download/v{version}/{name}-{version}-{target-arch}-macos{archive-suffix}"
bin-dir = "{name}-{version}-{target-arch}-macos/{bin}{binary-ext}"
[package.metadata.binstall.overrides.x86_64-pc-windows-msvc]
pkg-fmt = "zip"
[package.metadata.binstall.overrides.x86_64-pc-windows-gnu]
pkg-fmt = "zip"
[lints]
workspace = true
[workspace]
members = [
'crates/c-api',
'crates/fuzz-stats',
'crates/wasm-mutate-stats',
'crates/wasm-wave',
'fuzz',
'crates/wit-encoder',
'crates/wit-parser/fuzz',
'crates/wit-component/dl',
'playground/component',
]
[workspace.lints.rust]
unsafe_code = "deny"
[workspace.lints.clippy]
# The default set of lints in Clippy is viewed as "too noisy" right now so
# they're all turned off by default. Selective lints are then enabled below as
# necessary.
all = { level = 'allow', priority = -1 }
clone_on_copy = 'warn'
map_clone = 'warn'
unnecessary_to_owned = 'warn'
manual_strip = 'warn'
[workspace.package]
edition = '2021'
license = "Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT"
version = "0.221.2"
# Current policy for wasm-tools is the same as Wasmtime which is that this
# number can be no larger than the current stable release of Rust minus 2.
#
# NB: if this number increases to 1.81-or-later delete
# `crates/wasmparser/build.rs` and `crates/wasm-encoder/build.rs` scripts
# as they are no longer necessary.
rust-version = "1.76.0"
[workspace.dependencies]
anyhow = "1.0.58"
arbitrary = "1.1.0"
clap = { version = "4.0.0", features = ["derive"] }
clap_complete = "4.4.7"
comfy-table = { version = "7.1.3", default-features = false }
criterion = { version = "0.5.1", default-features = false }
env_logger = "0.11"
indexmap = { version = "2.0.0", default-features = false }
leb128 = "0.2.4"
libfuzzer-sys = "0.4.0"
log = "0.4.17"
num_cpus = "1.13"
rand = { version = "0.8.4", features = ["small_rng"] }
rayon = "1.3"
serde = { version = "1.0.166", default-features = false, features = ['alloc'] }
serde_derive = "1.0.166"
serde_json = { version = "1" }
spdx = "0.10.1"
wasmtime = { version = "25.0.0", default-features = false, features = ['cranelift', 'component-model', 'runtime', 'gc'] }
url = "2.0.0"
pretty_assertions = "1.3.0"
semver = { version = "1.0.0", default-features = false }
smallvec = "1.11.1"
libtest-mimic = "0.7.0"
bitflags = "2.5.0"
hashbrown = { version = "0.15.1", default-features = false, features = ['default-hasher'] }
ahash = { version = "0.8.11", default-features = false }
termcolor = "1.2.0"
indoc = "2.0.5"
gimli = "0.30.0"
id-arena = "2"
wasm-compose = { version = "0.221.2", path = "crates/wasm-compose" }
wasm-encoder = { version = "0.221.2", path = "crates/wasm-encoder", default-features = false, features = ["std"] }
wasm-metadata = { version = "0.221.2", path = "crates/wasm-metadata" }
wasm-mutate = { version = "0.221.2", path = "crates/wasm-mutate" }
wasm-shrink = { version = "0.221.2", path = "crates/wasm-shrink" }
wasm-smith = { version = "0.221.2", path = "crates/wasm-smith" }
wasmparser = { version = "0.221.2", path = "crates/wasmparser", default-features = false, features = ['std', 'simd'] }
wasmprinter = { version = "0.221.2", path = "crates/wasmprinter", default-features = false }
wast = { version = "221.0.2", path = "crates/wast", default-features = false }
wat = { version = "1.221.2", path = "crates/wat", default-features = false }
wit-component = { version = "0.221.2", path = "crates/wit-component" }
wit-encoder = { version = "0.221.2", path = "crates/wit-encoder" }
wit-parser = { version = "0.221.2", path = "crates/wit-parser" }
wit-smith = { version = "0.221.2", path = "crates/wit-smith" }
[dependencies]
anyhow = { workspace = true }
env_logger = { workspace = true }
log = { workspace = true }
clap = { workspace = true, features = ['wrap_help'] }
clap_complete = { workspace = true, optional = true }
comfy-table = { workspace = true }
tempfile = "3.2.0"
wat = { workspace = true, features = ['dwarf', 'component-model'] }
termcolor = { workspace = true }
# Dependencies of `validate`
wasmparser = { workspace = true, optional = true, features = ['component-model', 'simd'] }
rayon = { workspace = true, optional = true }
bitflags = { workspace = true, optional = true }
# Dependencies of `print`
wasmprinter = { workspace = true, features = ['component-model'] }
# Dependencies of `smith`
arbitrary = { workspace = true, optional = true }
serde = { workspace = true, optional = true }
serde_derive = { workspace = true, optional = true }
serde_json = { workspace = true, optional = true }
wasm-smith = { workspace = true, features = ["_internal_cli", "wasmparser"], optional = true }
# Dependencies of `shrink`
wasm-shrink = { workspace = true, features = ["clap"], optional = true }
# Dependencies of `mutate`
wasm-mutate = { workspace = true, features = ["clap"], optional = true }
# Dependencies of `strip`
wasm-encoder = { workspace = true, optional = true }
regex = { version = "1.6.0", optional = true }
# Dependencies of `compose`
wasm-compose = { workspace = true, optional = true }
# Dependencies of `demangle`
rustc-demangle = { version = "0.1.21", optional = true }
cpp_demangle = { version = "0.4.0", optional = true }
# Dependencies of `component`
wit-component = { workspace = true, optional = true, features = ['dummy-module', 'wat', 'semver-check'] }
wit-encoder = { workspace = true, optional = true }
wit-parser = { workspace = true, optional = true, features = ['decoding', 'wat', 'serde'] }
wast = { workspace = true, optional = true }
# Dependencies of `metadata`
wasm-metadata = { workspace = true, features = ["clap"], optional = true }
# Dependencies of `wit-smith`
wit-smith = { workspace = true, features = ["clap"], optional = true }
# Dependencies of `addr2line`
addr2line = { version = "0.23.0", optional = true }
gimli = { workspace = true, optional = true }
[target.'cfg(not(target_family = "wasm"))'.dependencies]
is_executable = { version = "1.0.1", optional = true }
[dev-dependencies]
serde_json = "1.0"
tempfile = "3.1"
wast = { workspace = true }
pretty_assertions = { workspace = true }
libtest-mimic = { workspace = true }
indexmap = { workspace = true }
[[test]]
name = "cli"
harness = false
[[test]]
name = "roundtrip"
harness = false
[features]
# By default, all subcommands are built
default = [
'shrink',
'smith',
'mutate',
'validate',
'print',
'parse',
'dump',
'objdump',
'strip',
'compose',
'demangle',
'component',
'metadata',
'wit-smith',
'addr2line',
'completion',
'json-from-wast',
]
# Each subcommand is gated behind a feature and lists the dependencies it needs
validate = [
'dep:wasmparser',
'rayon',
'dep:addr2line',
'dep:gimli',
'dep:bitflags',
'wasmparser/validate',
'wasmparser/features',
]
print = []
parse = []
smith = ['wasm-smith', 'arbitrary', 'dep:serde', 'dep:serde_derive', 'dep:serde_json']
shrink = ['wasm-shrink', 'is_executable']
mutate = ['wasm-mutate']
dump = ['dep:wasmparser']
objdump = ['dep:wasmparser']
strip = ['wasm-encoder', 'dep:wasmparser', 'regex']
compose = ['wasm-compose', 'dep:wasmparser']
demangle = ['rustc-demangle', 'cpp_demangle', 'dep:wasmparser', 'wasm-encoder']
component = [
'wit-component',
'wit-encoder',
'wit-parser',
'dep:wast',
'wasm-encoder',
'dep:wasmparser',
'dep:serde_json',
]
metadata = ['dep:wasmparser', 'wasm-metadata', 'dep:serde_json']
wit-smith = ['dep:wit-smith', 'arbitrary']
addr2line = ['dep:addr2line', 'dep:gimli', 'dep:wasmparser']
completion = ['dep:clap_complete']
json-from-wast = ['dep:serde_derive', 'dep:serde_json', 'dep:wast', 'dep:serde']