-
Notifications
You must be signed in to change notification settings - Fork 973
Expand file tree
/
Copy pathCargo.toml
More file actions
213 lines (186 loc) · 6.86 KB
/
Cargo.toml
File metadata and controls
213 lines (186 loc) · 6.86 KB
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
[package]
name = "wasmer"
description = "High-performance WebAssembly runtime"
categories = ["wasm"]
keywords = ["wasm", "webassembly", "runtime", "vm"]
readme = "README.md"
authors.workspace = true
edition.workspace = true
homepage.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true
version.workspace = true
#####
# This crate comes in 3 major flavors:
#
# - `sys`, where `wasmer` will be compiled to a native executable
# which provides compilers, engines, a full VM etc.
# - `wamr`, where `wasmer` will be compiled to a native executable
# which provides an interpreter using WAMR as a backend.
# - `wasmi`, where `wasmer` will be compiled to a native executable
# which provides an interpreter using `wasmi` as a backend.
# - `v8`, where `wasmer` will be compiled to a native executable
# using `v8` as a backend.
# - `js`, where `wasmer` will be compiled to WebAssembly to run in a
# JavaScript host.
#####
# Shared dependencies.
[dependencies]
# - Mandatory shared dependencies.
indexmap = { workspace = true }
cfg-if = "1.0"
thiserror = "1.0"
more-asserts = "0.2"
bytes = "1"
tracing = { version = "0.1" }
# - Optional shared dependencies.
wat = { version = "1.216.0", optional = true }
rustc-demangle = "0.1"
shared-buffer = { workspace = true }
wasmi_c_api = { version = "0.40.0", package = "wasmi_c_api_impl", optional = true, features = [
"prefix-symbols",
] }
loupe = { workspace = true, optional = true, features = [
"indexmap",
"enable-indexmap",
] }
paste = "1.0.15"
derive_more = { version = "1.0.0", features = ["from", "debug"] }
# Dependencies and Development Dependencies for `sys`.
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
# - Mandatory dependencies for `sys`.
wasmer-vm = { path = "../vm", version = "=6.0.0-beta.1", optional = true }
wasmer-compiler = { path = "../compiler", version = "=6.0.0-beta.1", optional = true }
wasmer-derive = { path = "../derive", version = "=6.0.0-beta.1" }
wasmer-types = { path = "../types", version = "=6.0.0-beta.1" }
target-lexicon = { version = "0.12.2", default-features = false }
# - Optional dependencies for `sys`.
wasmer-compiler-singlepass = { path = "../compiler-singlepass", version = "=6.0.0-beta.1", optional = true }
wasmer-compiler-cranelift = { path = "../compiler-cranelift", version = "=6.0.0-beta.1", optional = true }
wasmer-compiler-llvm = { path = "../compiler-llvm", version = "=6.0.0-beta.1", optional = true }
wasm-bindgen = { version = "0.2.74", optional = true }
js-sys = { version = "0.3.51", optional = true }
rusty_jsc = { version = "0.1.0", optional = true }
wasmparser = { workspace = true, default-features = false, optional = true }
# - Mandatory dependencies for `sys` on Windows.
[target.'cfg(all(not(target_arch = "wasm32"), target_os = "windows"))'.dependencies]
windows-sys = "0.59"
# - Development Dependencies for `sys`.
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
wat = "1.0"
tempfile = "3.6.0"
anyhow = "1.0"
macro-wasmer-universal-test = { version = "6.0.0-beta.1", path = "./macro-wasmer-universal-test" }
# Dependencies and Develoment Dependencies for `js`.
[target.'cfg(target_arch = "wasm32")'.dependencies]
# - Mandatory dependencies for `js`.
wasmer-types = { path = "../types", version = "=6.0.0-beta.1", default-features = false, features = [
"std",
] }
wasm-bindgen = "0.2.74"
js-sys = "0.3.51"
wasmer-derive = { path = "../derive", version = "=6.0.0-beta.1" }
wasmer-compiler = { path = "../compiler", version = "=6.0.0-beta.1" }
# - Optional dependencies for `js`.
wasmparser = { workspace = true, default-features = false, optional = true }
hashbrown = { version = "0.11", optional = true }
serde-wasm-bindgen = { version = "0.4.5" }
serde = { version = "1.0", features = ["derive"] }
target-lexicon = { workspace = true }
# - Development Dependencies for `js`.
[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
wat = "1.0"
anyhow = "1.0"
wasm-bindgen-test = "0.3.0"
macro-wasmer-universal-test = { version = "6.0.0-beta.1", path = "./macro-wasmer-universal-test" }
# Specific to `js`.
#
# `wasm-opt` is on by default in for the release profile, but it can be
# disabled by setting it to `false`
[package.metadata.wasm-pack.profile.release]
wasm-opt = false
[badges]
maintenance = { status = "actively-developed" }
[features]
default = ["sys-default"]
std = []
core = ["hashbrown"]
artifact-size = [
"dep:loupe",
"wasmer-vm/artifact-size",
"wasmer-compiler/artifact-size",
]
# Features for `sys`.
sys = ["std", "dep:wasmer-vm"]
sys-default = ["sys", "wat", "cranelift"]
# - Compilers.
compiler = [
"sys",
"dep:wasmer-compiler",
"wasmer-compiler/translator",
"wasmer-compiler/compiler",
]
singlepass = ["compiler", "wasmer-compiler-singlepass"]
cranelift = ["compiler", "wasmer-compiler-cranelift"]
llvm = ["compiler", "wasmer-compiler-llvm"]
# --- Enable the WAMR backend and use it as default backend.
wamr-default = ["wamr", "wat"]
# --- Enable the WAMR backend and use it as defaul backend only if it is the only one enabled.
wamr = ["wasm-c-api", "std", "dep:which", "dep:zip"]
# --- Enable the wasmi backend and use it as default backend.
wasmi = ["wasm-c-api", "std", "dep:wasmi_c_api"]
# --- Enable the wasmi backend and use it as defaul backend only if it is the only one enabled.
wasmi-default = ["wasmi", "wat"]
# --- Enable the v8 backend and use it as default backend.
v8 = ["wasm-c-api", "std", "dep:which", "dep:xz"]
# --- Enable the v8 backend and use it as defaul backend only if it is the only one enabled.
v8-default = ["v8", "wat"]
wasm-c-api = ["wasm-types-polyfill"]
# Features for `js`.
js = ["wasm-bindgen", "js-sys"]
js-default = ["js", "std", "wasm-types-polyfill"]
wasm-types-polyfill = ["wasmparser"]
wat = ["dep:wat", "wasmparser"]
jsc = ["rusty_jsc", "wasm-types-polyfill", "wasmparser"]
jsc-default = ["jsc"]
js-serializable-module = []
# Optional
enable-serde = [
"wasmer-vm/enable-serde",
"wasmer-compiler/enable-serde",
"wasmer-types/enable-serde",
]
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"]
[build-dependencies]
cmake = "0.1.50"
tar = "0.4.42"
ureq = "2.10.1"
which = { version = "7.0.0", optional = true }
xz = { version = "0.1.0", optional = true }
zip = { version = "2.2.0", optional = true }
[target.'cfg(target_env = "musl")'.build-dependencies]
bindgen = { version = "0.70.1", default-features = false, features = [
"static",
"logging",
"prettyplease",
] }
[target.'cfg(not(target_env = "musl"))'.build-dependencies]
bindgen = { version = "0.70.1" }
[package.metadata.docs.rs]
features = [
"compiler",
"core",
"cranelift",
"singlepass",
"static-artifact-create",
"static-artifact-load",
"sys",
"sys-default",
"wasmer-artifact-create",
"wasmer-artifact-load",
]
rustc-args = ["--cfg", "docsrs"]