-
Notifications
You must be signed in to change notification settings - Fork 824
/
Cargo.toml
381 lines (332 loc) · 9.89 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
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
[package]
name = "wasmer-workspace"
description = "Wasmer workspace"
publish = false
autoexamples = false
authors.workspace = true
edition.workspace = true
homepage.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true
version.workspace = true
[dependencies]
wasmer = { version = "=5.0.4", path = "lib/api", default-features = false }
wasmer-compiler = { version = "=5.0.4", path = "lib/compiler", features = [
"compiler",
], optional = true }
wasmer-compiler-cranelift = { version = "=5.0.4", path = "lib/compiler-cranelift", optional = true }
wasmer-compiler-singlepass = { version = "=5.0.4", path = "lib/compiler-singlepass", optional = true }
wasmer-compiler-llvm = { version = "=5.0.4", path = "lib/compiler-llvm", optional = true }
wasmer-wasix = { path = "lib/wasix", optional = true }
wasmer-wast = { version = "=5.0.4", path = "tests/lib/wast", optional = true }
wasi-test-generator = { version = "=5.0.4", path = "tests/wasi-wast", optional = true }
wasmer-cache = { version = "=5.0.4", path = "lib/cache", optional = true }
wasmer-types = { version = "=5.0.4", path = "lib/types" }
wasmer-middlewares = { version = "=5.0.4", path = "lib/middlewares", optional = true }
# Third party dependencies
cfg-if = "1.0"
tokio = { version = "1.39", features = [
"rt",
"rt-multi-thread",
"macros",
], optional = true }
crossbeam-queue = "0.3.8"
[workspace]
members = [
"fuzz",
"lib/api",
"lib/api/macro-wasmer-universal-test",
"lib/backend-api",
"lib/c-api",
"lib/c-api/examples/wasmer-capi-examples-runner",
"lib/c-api/tests/wasmer-c-api-test-runner",
"lib/cache",
"lib/cli-compiler",
"lib/cli",
"lib/compiler-cranelift",
"lib/compiler-llvm",
"lib/compiler-singlepass",
"lib/compiler",
"lib/config",
"lib/derive",
"lib/sys-utils",
"lib/types",
"lib/virtual-io",
"lib/virtual-fs",
"lib/virtual-net",
"lib/vm",
"lib/wai-bindgen-wasmer",
"lib/wasi-types",
"lib/wasix",
"lib/journal",
"lib/swift",
"lib/package",
"tests/integration/cli",
"tests/integration/ios",
"tests/lib/compiler-test-derive",
"tests/lib/wast",
"tests/wasi-wast",
"tests/wasmer-argus",
]
exclude = ["./lib/cli/tests/packages/axum"]
resolver = "2"
[workspace.package]
authors = ["Wasmer Engineering Team <[email protected]>"]
edition = "2021"
homepage = "https://wasmer.io/"
license = "MIT"
repository = "https://github.com/wasmerio/wasmer"
rust-version = "1.81"
version = "5.0.4"
[workspace.dependencies]
# Repo-local crates
wasmer-package = { version = "0.4.0", path = "lib/package" }
wasmer-config = { path = "./lib/config" }
wasmer-wasix = { path = "./lib/wasix" }
# Wasmer-owned crates
webc = { version = "7.0.0-rc.2" }
shared-buffer = "0.1.4"
# Third-party crates
dashmap = "6.0.1"
http = "1.0.0"
hyper = "1"
reqwest = { version = "0.12.0", default-features = false }
enumset = "1.1.0"
memoffset = "0.9.0"
wasmparser = { version = "0.216.0", default-features = false, features = [
"validate",
] }
rkyv = { version = "0.8.8", features = ["indexmap-2", "bytes-1"] }
memmap2 = { version = "0.6.2" }
toml = { version = "0.5.9", features = ["preserve_order"] }
indexmap = "2"
serde_yaml = { package = "serde_yml", version = "0.0.12" }
libc = { version = "^0.2", default-features = false }
gimli = { version = "0.28.1" }
futures-util = { version = "0.3.31" }
mio = "1"
# MIO 1.0 starts at tokio version 1.39, hence the minimum requirement.
tokio = { version = "1.39.0", default-features = false }
socket2 = "0.5.7"
pretty_assertions = "1.4.0"
base64 = "0.22.0"
time = "0.3.36"
target-lexicon = { version = "0.12.2", default-features = false }
object = "0.32.0"
derive_more = { version = "1", features = ["debug"] }
[build-dependencies]
test-generator = { path = "tests/lib/test-generator" }
build-deps = "0.1.4"
anyhow = "1.0"
glob = "0.3"
rustc_version = "0.4"
[dev-dependencies]
wasmer = { version = "=5.0.4", path = "lib/api", features = [
"compiler",
"singlepass",
"sys",
] }
anyhow = "1.0"
criterion = { version = "0.5", features = ["csv_output"] }
clap = { version = "=4.4.11" }
clap_builder = { version = "=4.4.11" }
clap_derive = { version = "=4.4.7" }
clap_lex = { version = "=0.6.0" }
lazy_static = "1.4"
serial_test = { version = "2.0", default-features = false }
compiler-test-derive = { path = "tests/lib/compiler-test-derive" }
tempfile = "3.6.0"
ureq = "2.6"
# For logging tests using the `RUST_LOG=debug` when testing
test-log = { version = "0.2", default-features = false, features = ["trace"] }
tracing = { version = "0.1", default-features = false, features = ["log"] }
tracing-subscriber = { version = "0.3", default-features = false, features = [
"env-filter",
"fmt",
] }
reqwest = {workspace = true, features = ["blocking", "rustls-tls"]}
[features]
# Don't add the compiler features in default, please add them on the Makefile
# since we might want to autoconfigure them depending on the availability on the host.
default = ["wat", "wast", "cache", "wasi", "engine", "middlewares"]
# backend means that the `wasmer` crate will be compiled with the `wasmer-compiler` or the `jsc`.
# That means: that is able to execute modules
backend = []
jsc = ["wasmer/jsc", "backend", "wat", "wasmer/std"]
wamr = ["wasmer/wamr"]
v8 = ["wasmer/v8"]
wasmi = ["wasmer/wasmi"]
engine = ["universal"]
universal = []
cache = ["wasmer-cache"]
wast = ["wasmer-wast"]
wasi = ["wasmer-wasix"]
wat = ["wasmer/wat"]
compiler = ["wasmer/compiler", "backend", "wasmer-compiler/translator"]
singlepass = ["compiler", "wasmer-compiler-singlepass", "wasmer/singlepass"]
cranelift = ["compiler", "wasmer-compiler-cranelift", "wasmer/cranelift"]
llvm = ["compiler", "wasmer-compiler-llvm", "wasmer/llvm"]
middlewares = ["wasmer-middlewares"]
wasmer-artifact-load = ["wasmer-compiler/wasmer-artifact-load"]
wasmer-artifact-create = ["wasmer-compiler/wasmer-artifact-create"]
static-artifact-load = ["wasmer-compiler/static-artifact-load"]
static-artifact-create = ["wasmer-compiler/static-artifact-create"]
# Testing features
test-singlepass = ["singlepass"]
test-cranelift = ["cranelift"]
test-llvm = ["llvm"]
test-universal = ["test-generator/test-universal"]
# Specifies that we're running in coverage testing mode. This disables tests
# that raise signals because that interferes with tarpaulin.
coverage = []
#[profile.release]
#debug = true
# Enable optimizations for a few crates, even for debug builds.
# This greatly speeds up using debug builds, because these crates are extremely
# slow without optimizations.
[profile.dev.package.cranelift-codegen]
opt-level = 3
[profile.dev.package.regalloc2]
opt-level = 3
[profile.dev.package.wasmparser]
opt-level = 3
[profile.dev.package.rkyv]
opt-level = 3
[profile.dev.package.wasmer-types]
opt-level = 3
[profile.dev.package.weezl]
opt-level = 3
[profile.dev.package.sha2]
opt-level = 3
[profile.dev.package.xxhash-rust]
opt-level = 3
[profile.dev.package.digest]
opt-level = 3
[[bench]]
name = "run"
harness = false
[[bench]]
name = "compile"
harness = false
[[bench]]
name = "deserialize_modules"
harness = false
[[bench]]
name = "static_and_dynamic_functions"
harness = false
[[bench]]
name = "import_functions"
harness = false
[[example]]
name = "early-exit"
path = "examples/early_exit.rs"
required-features = ["backend"]
[[example]]
name = "engine"
path = "examples/engine.rs"
required-features = ["cranelift"]
[[example]]
name = "engine-headless"
path = "examples/engine_headless.rs"
required-features = ["cranelift"]
[[example]]
name = "platform-headless-ios"
path = "examples/platform_ios_headless.rs"
required-features = ["cranelift"]
[[example]]
name = "cross-compilation"
path = "examples/engine_cross_compilation.rs"
required-features = ["cranelift"]
[[example]]
name = "compiler-singlepass"
path = "examples/compiler_singlepass.rs"
required-features = ["singlepass"]
[[example]]
name = "compiler-cranelift"
path = "examples/compiler_cranelift.rs"
required-features = ["cranelift"]
[[example]]
name = "compiler-llvm"
path = "examples/compiler_llvm.rs"
required-features = ["llvm"]
[[example]]
name = "exported-function"
path = "examples/exports_function.rs"
required-features = ["backend"]
[[example]]
name = "exported-global"
path = "examples/exports_global.rs"
required-features = ["backend"]
[[example]]
name = "exported-memory"
path = "examples/exports_memory.rs"
required-features = ["backend"]
[[example]]
name = "imported-function"
path = "examples/imports_function.rs"
required-features = ["backend"]
[[example]]
name = "imported-global"
path = "examples/imports_global.rs"
required-features = ["backend"]
[[example]]
name = "tunables-limit-memory"
path = "examples/tunables_limit_memory.rs"
required-features = ["cranelift"]
[[example]]
name = "wasi"
path = "examples/wasi.rs"
required-features = ["wasi"]
[[example]]
name = "wasi-manual-setup"
path = "examples/wasi_manual_setup.rs"
required-features = ["tokio", "backend", "wasi"]
[[example]]
name = "wasi-pipes"
path = "examples/wasi_pipes.rs"
required-features = ["tokio", "backend", "wasi"]
[[example]]
name = "table"
path = "examples/table.rs"
required-features = ["backend"]
[[example]]
name = "memory"
path = "examples/memory.rs"
required-features = ["backend"]
[[example]]
name = "instance"
path = "examples/instance.rs"
required-features = ["backend"]
[[example]]
name = "errors"
path = "examples/errors.rs"
required-features = ["backend"]
[[example]]
name = "imported-function-env"
path = "examples/imports_function_env.rs"
required-features = ["backend"]
[[example]]
name = "imported-function-env-global"
path = "examples/imports_function_env_global.rs"
required-features = ["backend"]
[[example]]
name = "hello-world"
path = "examples/hello_world.rs"
required-features = ["backend"]
[[example]]
name = "metering"
path = "examples/metering.rs"
required-features = ["cranelift"]
[[example]]
name = "imports-exports"
path = "examples/imports_exports.rs"
required-features = ["backend"]
[[example]]
name = "features"
path = "examples/features.rs"
required-features = ["cranelift"]
[[example]]
name = "http-dynamic-size"
path = "examples/http_dynamic_size.rs"
required-features = ["cranelift"]