Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bytecodealliance
GitHub Repository: bytecodealliance/wasmtime
Path: blob/main/crates/wasi-common/Cargo.toml
1691 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
anyhow = { workspace = true, features = ['std'] }
20
thiserror = { workspace = true }
21
wiggle = { workspace = true }
22
tracing = { workspace = true }
23
cap-std = { workspace = true }
24
cap-rand = { workspace = true }
25
bitflags = { workspace = true }
26
log = { workspace = true }
27
28
# Optional, enabled by wasmtime feature:
29
wasmtime = { workspace = true, optional = true, features = ['runtime'] }
30
# Optional, enabled by sync feature:
31
cap-fs-ext = { workspace = true, optional = true }
32
cap-time-ext = { workspace = true, optional = true }
33
fs-set-times = { workspace = true, optional = true }
34
system-interface = { workspace = true, features = ["cap_std_impls"], optional = true }
35
io-lifetimes = { workspace = true, optional = true }
36
# Optional, enabled by tokio feature:
37
tokio = { workspace = true, features = [ "rt", "fs", "time", "io-util", "net", "io-std", "rt-multi-thread"], optional = true }
38
39
# Optional, enabled by exit feature:
40
libc = { workspace = true, optional = true }
41
42
[target.'cfg(unix)'.dependencies]
43
rustix = { workspace = true, features = ["fs", "event"] }
44
45
[target.'cfg(windows)'.dependencies]
46
io-extras = { workspace = true }
47
rustix = { workspace = true, features = ["net"] }
48
49
[target.'cfg(windows)'.dependencies.windows-sys]
50
workspace = true
51
features = [
52
"Win32_Foundation",
53
"Win32_Networking_WinSock",
54
]
55
56
[dev-dependencies]
57
wasi-common = { path = '.', features = ['tokio'] }
58
tempfile = { workspace = true }
59
test-log = { workspace = true }
60
tracing-subscriber = { workspace = true }
61
wasmtime = { workspace = true, features = ['cranelift', 'async', 'runtime'] }
62
test-programs-artifacts = { workspace = true }
63
tokio = { workspace = true, features = ['macros', 'rt-multi-thread'] }
64
65
[features]
66
default = ["trace_log", "wasmtime", "sync"]
67
# This feature enables the `tracing` logs in the calls to target the `log`
68
# ecosystem of backends (e.g. `env_logger`. Disable this if you want to use
69
# `tracing-subscriber`.
70
trace_log = [ "wiggle/tracing_log", "tracing/log" ]
71
# Need to make the wiggle_metadata feature available to consumers of this
72
# crate if they want the snapshots to have metadata available.
73
wiggle_metadata = ["wiggle/wiggle_metadata"]
74
# This feature enables integration with wasmtime.
75
wasmtime = [
76
"dep:wasmtime",
77
"wiggle/wasmtime",
78
]
79
# This feature enables an implementation of the Wasi traits for a
80
# synchronous wasmtime embedding.
81
sync = [
82
"dep:cap-fs-ext",
83
"dep:cap-time-ext",
84
"dep:fs-set-times",
85
"dep:system-interface",
86
"dep:io-lifetimes",
87
]
88
tokio = [
89
"sync",
90
"wasmtime/async",
91
"wiggle/wasmtime_async",
92
"dep:tokio",
93
]
94
exit = [ "wasmtime", "dep:libc" ]
95
96
[package.metadata.docs.rs]
97
all-features = true
98
99
[[test]]
100
name = "all"
101
102