Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bytecodealliance
GitHub Repository: bytecodealliance/wasmtime
Path: blob/main/crates/wasi-common/Cargo.toml
3089 views
1
[package]
2
name = "wasi-common"
3
version.workspace = true
4
authors.workspace = true
5
description = "WASI implementation in Rust"
6
license = "Apache-2.0 WITH LLVM-exception"
7
categories = ["wasm"]
8
keywords = ["webassembly", "wasm"]
9
repository = "https://github.com/bytecodealliance/wasmtime"
10
readme = "README.md"
11
edition.workspace = true
12
rust-version.workspace = true
13
include = ["src/**/*", "tests/**/*", "witx", "README.md", "LICENSE", "build.rs"]
14
15
[lints]
16
workspace = true
17
18
[dependencies]
19
thiserror = { workspace = true }
20
wiggle = { workspace = true }
21
tracing = { workspace = true }
22
cap-std = { workspace = true }
23
cap-rand = { workspace = true }
24
bitflags = { workspace = true }
25
log = { workspace = true }
26
async-trait = { workspace = true }
27
wasmtime-environ = { workspace = true }
28
29
# Optional, enabled by wasmtime feature:
30
wasmtime = { workspace = true, optional = true, features = ['runtime'] }
31
# Optional, enabled by sync feature:
32
cap-fs-ext = { workspace = true, optional = true }
33
cap-time-ext = { workspace = true, optional = true }
34
fs-set-times = { workspace = true, optional = true }
35
system-interface = { workspace = true, features = ["cap_std_impls"], optional = true }
36
io-lifetimes = { workspace = true, optional = true }
37
# Optional, enabled by tokio feature:
38
tokio = { workspace = true, features = [ "rt", "fs", "time", "io-util", "net", "io-std", "rt-multi-thread"], optional = true }
39
40
# Optional, enabled by exit feature:
41
libc = { workspace = true, optional = true }
42
43
[target.'cfg(unix)'.dependencies]
44
rustix = { workspace = true, features = ["fs", "event"] }
45
46
[target.'cfg(windows)'.dependencies]
47
io-extras = { workspace = true }
48
rustix = { workspace = true, features = ["net"] }
49
50
[target.'cfg(windows)'.dependencies.windows-sys]
51
workspace = true
52
features = [
53
"Win32_Foundation",
54
"Win32_Networking_WinSock",
55
]
56
57
[dev-dependencies]
58
wasi-common = { path = '.', features = ['tokio'] }
59
tempfile = { workspace = true }
60
test-log = { workspace = true }
61
tracing-subscriber = { workspace = true }
62
wasmtime = { workspace = true, features = ['cranelift', 'async', 'runtime'] }
63
test-programs-artifacts = { workspace = true }
64
tokio = { workspace = true, features = ['macros', 'rt-multi-thread'] }
65
66
[features]
67
default = ["trace_log", "wasmtime", "sync"]
68
# This feature enables the `tracing` logs in the calls to target the `log`
69
# ecosystem of backends (e.g. `env_logger`. Disable this if you want to use
70
# `tracing-subscriber`.
71
trace_log = [ "wiggle/tracing_log", "tracing/log" ]
72
# Need to make the wiggle_metadata feature available to consumers of this
73
# crate if they want the snapshots to have metadata available.
74
wiggle_metadata = ["wiggle/wiggle_metadata"]
75
# This feature enables integration with wasmtime.
76
wasmtime = [
77
"dep:wasmtime",
78
"wiggle/wasmtime",
79
]
80
# This feature enables an implementation of the Wasi traits for a
81
# synchronous wasmtime embedding.
82
sync = [
83
"dep:cap-fs-ext",
84
"dep:cap-time-ext",
85
"dep:fs-set-times",
86
"dep:system-interface",
87
"dep:io-lifetimes",
88
]
89
tokio = [
90
"sync",
91
"wasmtime/async",
92
"wiggle/wasmtime_async",
93
"dep:tokio",
94
]
95
exit = [ "wasmtime", "dep:libc" ]
96
97
[package.metadata.docs.rs]
98
all-features = true
99
100
[[test]]
101
name = "all"
102
103