Skip to content

Commit

Permalink
feat(wasi-http): define default feature called sync
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardomourar committed Aug 23, 2023
1 parent 9b6c1bf commit c9d4d8b
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 17 deletions.
8 changes: 5 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ wasmtime-cranelift = { workspace = true }
wasmtime-environ = { workspace = true }
wasmtime-explorer = { workspace = true }
wasmtime-wast = { workspace = true }
wasmtime-wasi = { workspace = true, features = ["exit"] }
wasmtime-wasi = { workspace = true, default-features = true, features = [
"exit",
] }
wasmtime-wasi-nn = { workspace = true, optional = true }
wasmtime-wasi-threads = { workspace = true, optional = true }
wasmtime-wasi-http = { workspace = true, optional = true }
Expand Down Expand Up @@ -150,8 +152,8 @@ wasmtime-jit = { path = "crates/jit", version = "=13.0.0" }
wasmtime-jit-debug = { path = "crates/jit-debug", version = "=13.0.0" }
wasmtime-runtime = { path = "crates/runtime", version = "=13.0.0" }
wasmtime-wast = { path = "crates/wast", version = "=13.0.0" }
wasmtime-wasi = { path = "crates/wasi", version = "13.0.0" }
wasmtime-wasi-http = { path = "crates/wasi-http", version = "=13.0.0" }
wasmtime-wasi = { path = "crates/wasi", version = "13.0.0", default-features = false }
wasmtime-wasi-http = { path = "crates/wasi-http", version = "=13.0.0", default-features = false }
wasmtime-wasi-nn = { path = "crates/wasi-nn", version = "13.0.0" }
wasmtime-wasi-threads = { path = "crates/wasi-threads", version = "13.0.0" }
wasmtime-component-util = { path = "crates/component-util", version = "=13.0.0" }
Expand Down
2 changes: 1 addition & 1 deletion crates/bench-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ shuffling-allocator = { version = "1.1.1", optional = true }
target-lexicon = { workspace = true }
wasmtime = { workspace = true }
wasmtime-cli-flags = { workspace = true, default-features = true }
wasmtime-wasi = { workspace = true }
wasmtime-wasi = { workspace = true, default-features = true }
wasmtime-wasi-nn = { workspace = true, optional = true }
wasi-cap-std-sync = { workspace = true }
cap-std = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/c-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ wat = { workspace = true, optional = true }

# Optional dependencies for the `wasi` feature
wasi-cap-std-sync = { workspace = true, optional = true }
wasmtime-wasi = { workspace = true, optional = true }
wasmtime-wasi = { workspace = true, default-features = true, optional = true }
cap-std = { workspace = true, optional = true }
wasi-common = { workspace = true, optional = true }

Expand Down
4 changes: 3 additions & 1 deletion crates/test-programs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ wasmtime = { workspace = true, features = ['cranelift', 'component-model'] }

wasi-common = { workspace = true }
wasi-cap-std-sync = { workspace = true }
wasmtime-wasi = { workspace = true, features = ["tokio"] }
wasmtime-wasi = { workspace = true, default-features = true, features = [
"tokio",
] }
cap-std = { workspace = true }
cap-rand = { workspace = true }
tokio = { workspace = true, features = ["rt-multi-thread", "macros"] }
Expand Down
8 changes: 7 additions & 1 deletion crates/wasi-http/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,17 @@ http-body = "1.0.0-rc.2"
http-body-util = "0.1.0-rc.2"
thiserror = { workspace = true }
tracing = { workspace = true }
wasmtime-wasi = { workspace = true }
wasmtime-wasi = { workspace = true, default-features = false, features = [
"preview2",
] }
wasmtime = { workspace = true, features = ['component-model'] }

# The `ring` crate, used to implement TLS, does not build on riscv64 or s390x
[target.'cfg(not(any(target_arch = "riscv64", target_arch = "s390x")))'.dependencies]
tokio-rustls = { version = "0.24.0" }
rustls = { version = "0.21.0" }
webpki-roots = { version = "0.23.0" }

[features]
default = ["sync"]
sync = ["wasmtime-wasi/sync"]
4 changes: 3 additions & 1 deletion crates/wasi-threads/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ log = { workspace = true }
rand = "0.8"
wasi-common = { workspace = true }
wasmtime = { workspace = true }
wasmtime-wasi = { workspace = true, features = ["exit"] }
wasmtime-wasi = { workspace = true, default-features = true, features = [
"exit",
] }
13 changes: 4 additions & 9 deletions crates/wasmtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,11 @@ fxprof-processed-profile = "0.6.0"

[target.'cfg(target_os = "windows")'.dependencies.windows-sys]
workspace = true
features = [
"Win32_System_Diagnostics_Debug",
]
features = ["Win32_System_Diagnostics_Debug"]

[dev-dependencies]
tempfile = "3.0"
wasmtime-wasi = { path = "../wasi" }
wasmtime-wasi = { path = "../wasi", default-features = true }
wasi-cap-std-sync = { path = "../wasi-common/cap-std-sync" }

[features]
Expand Down Expand Up @@ -113,10 +111,7 @@ pooling-allocator = ["wasmtime-runtime/pooling-allocator"]
# Enables support for all architectures in Cranelift, allowing
# cross-compilation using the `wasmtime` crate's API, notably the
# `Engine::precompile_module` function.
all-arch = [
"wasmtime-cranelift?/all-arch",
"wasmtime-winch?/all-arch",
]
all-arch = ["wasmtime-cranelift?/all-arch", "wasmtime-winch?/all-arch"]

# Enables in-progress support for the component model. Note that this feature is
# in-progress, buggy, and incomplete. This is primarily here for internal
Expand All @@ -131,4 +126,4 @@ component-model = [
"dep:encoding_rs",
]

wmemcheck = ["wasmtime-runtime/wmemcheck", "wasmtime-cranelift/wmemcheck"]
wmemcheck = ["wasmtime-runtime/wmemcheck", "wasmtime-cranelift/wmemcheck"]

0 comments on commit c9d4d8b

Please sign in to comment.