Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(wasmtime-cli): restore support for wasi http module #6878

Merged
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
783a9ad
feat(wasmtime-cli): add async support flag
eduardomourar Aug 22, 2023
c21a3b9
chore: refactor wasi http crate
eduardomourar Aug 23, 2023
869c2c0
feat(wasmtime-wasi): make in_tokio function public
eduardomourar Aug 23, 2023
d3c5ec4
feat(wasi-http): define default feature called sync
eduardomourar Aug 23, 2023
09a16ed
Revert "feat(wasmtime-cli): add async support flag"
eduardomourar Aug 25, 2023
61dec00
chore: improve flaky tests for wasi http
eduardomourar Aug 25, 2023
d9e3a44
feat(wasi-http): expose sync api for components
eduardomourar Aug 25, 2023
d1b8af2
chore: add tests for sync api of wasi http components
eduardomourar Aug 25, 2023
9401c72
feat(wasmtime-cli): restore support for wasi http module
eduardomourar Aug 26, 2023
9175a41
chore: revert change to outbound http request invalid test
eduardomourar Aug 26, 2023
d112b0a
chore: have extra tracing to help debugging
eduardomourar Aug 27, 2023
1eab683
feat(wasi-http): allow modules with sync functions in linker
eduardomourar Aug 27, 2023
b15b0a7
fix(wasi-http): missing response body in sync api
eduardomourar Aug 27, 2023
1e0137a
feat: include blocking for io streams
eduardomourar Aug 28, 2023
996e77e
chore: add tests for wasi http module in cli
eduardomourar Aug 28, 2023
1e925d6
chore: disable preview2 flag in wasi http test
eduardomourar Aug 28, 2023
584122d
chore: use preview2 flag in wasi http test
eduardomourar Aug 28, 2023
d1d8893
fix(wasi-http): missing stream output in sync api
eduardomourar Aug 28, 2023
a48beeb
chore: fix tests for wasi http
eduardomourar Aug 29, 2023
2fb5371
chore: add tracing for poll oneoff call
eduardomourar Aug 30, 2023
75f3da7
chore: send exit signal on wasi http test
eduardomourar Aug 30, 2023
eaae136
chore: swap println to tracing debug
eduardomourar Sep 1, 2023
bd7303a
chore: set http server timeout to 50 secs by default
eduardomourar Sep 1, 2023
222cb47
chore: add test posting large file
eduardomourar Sep 1, 2023
2b60ed1
Merge remote-tracking branch 'upstream/main' into feat/wasmtime-cli-a…
eduardomourar Sep 1, 2023
b4ea2cb
chore: revert formatting in cargo toml
eduardomourar Sep 1, 2023
725bb0c
Merge remote-tracking branch 'upstream/main' into feat/wasmtime-cli-a…
eduardomourar Sep 5, 2023
e56a4dd
chore: fix wasi-http feature and skip failing tests
eduardomourar Sep 5, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 1 addition & 16 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 35 additions & 11 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 All @@ -51,14 +53,24 @@ rustix = { workspace = true, features = ["mm", "param"] }

[dev-dependencies]
# depend again on wasmtime to activate its default features for tests
wasmtime = { workspace = true, features = ['component-model', 'async', 'default', 'winch'] }
wasmtime = { workspace = true, features = [
'component-model',
'async',
'default',
'winch',
] }
env_logger = { workspace = true }
log = { workspace = true }
filecheck = { workspace = true }
tempfile = { workspace = true }
test-programs = { path = "crates/test-programs" }
wasmtime-runtime = { workspace = true }
tokio = { version = "1.8.0", features = ["rt", "time", "macros", "rt-multi-thread"] }
tokio = { version = "1.8.0", features = [
"rt",
"time",
"macros",
"rt-multi-thread",
] }
wast = { workspace = true }
criterion = "0.5.0"
num_cpus = "1.13.0"
Expand Down Expand Up @@ -140,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 Expand Up @@ -188,7 +200,9 @@ byte-array-literals = { path = "crates/wasi-preview1-component-adapter/byte-arra
regalloc2 = "0.9.2"

# cap-std family:
target-lexicon = { version = "0.12.3", default-features = false, features = ["std"] }
target-lexicon = { version = "0.12.3", default-features = false, features = [
"std",
] }
cap-std = "2.0.0"
cap-rand = { version = "2.0.0", features = ["small_rng"] }
cap-fs-ext = "2.0.0"
Expand Down Expand Up @@ -217,8 +231,15 @@ wit-component = "0.13.2"

# Non-Bytecode Alliance maintained dependencies:
# --------------------------
object = { version = "0.32", default-features = false, features = ['read_core', 'elf', 'std'] }
gimli = { version = "0.28.0", default-features = false, features = ['read', 'std'] }
object = { version = "0.32", default-features = false, features = [
'read_core',
'elf',
'std',
] }
gimli = { version = "0.28.0", default-features = false, features = [
'read',
'std',
] }
anyhow = "1.0.22"
windows-sys = "0.48.0"
env_logger = "0.10"
Expand Down Expand Up @@ -267,13 +288,16 @@ jitdump = ["wasmtime/jitdump"]
vtune = ["wasmtime/vtune"]
wasi-nn = ["dep:wasmtime-wasi-nn"]
wasi-threads = ["dep:wasmtime-wasi-threads"]
wasi-http = ["dep:wasmtime-wasi-http"]
pooling-allocator = ["wasmtime/pooling-allocator", "wasmtime-cli-flags/pooling-allocator"]
wasi-http = ["dep:wasmtime-wasi-http", "wasmtime-wasi-http/sync"]
pooling-allocator = [
"wasmtime/pooling-allocator",
"wasmtime-cli-flags/pooling-allocator",
]
all-arch = ["wasmtime/all-arch"]
component-model = [
"wasmtime/component-model",
"wasmtime-wast/component-model",
"wasmtime-cli-flags/component-model"
"wasmtime-cli-flags/component-model",
]
winch = ["wasmtime/winch"]
wmemcheck = ["wasmtime/wmemcheck"]
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
7 changes: 5 additions & 2 deletions crates/test-programs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ http-body-util = "0.1.0-rc.2"
hyper = { version = "1.0.0-rc.3", features = ["full"] }
is-terminal = { workspace = true }
tokio = { workspace = true, features = ["net", "rt-multi-thread", "macros"] }
tracing = { workspace = true }

[dev-dependencies]
anyhow = { workspace = true }
Expand All @@ -36,12 +37,14 @@ 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"] }

wasmtime-wasi-http = { workspace = true }
wasmtime-wasi-http = { workspace = true, features = ["sync"] }

[features]
test_programs = []
Loading