Skip to content

Commit c662039

Browse files
authored
Async bindings generation for C (#1291)
* Extract Rust's parsing of `--async` to a shared library This should hopefully enable it to share the same parsing of this option amongst all bindings generators. * Implement async support in the C bindings generator Developed through tests in this repository for now. * Review comments
1 parent ce479c6 commit c662039

File tree

57 files changed

+2526
-295
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+2526
-295
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,11 @@ jobs:
132132
curl -L https://github.com/bytecodealliance/wasip3-prototyping/releases/download/dev/wasmtime-dev-x86_64-linux.tar.xz | tar xJvf -
133133
echo "WASMTIME=`pwd`/wasmtime-dev-x86_64-linux/wasmtime" >> $GITHUB_ENV
134134
- run: |
135-
cargo run test --languages rust tests/runtime-async \
135+
cargo run test --languages rust,c tests/runtime-async \
136136
--artifacts target/artifacts \
137137
--rust-wit-bindgen-path ./crates/guest-rust \
138138
--rust-target wasm32-wasip1 \
139+
--c-target wasm32-wasip1 \
139140
--runner "$WASMTIME -W component-model-async"
140141
141142
test_unit:

Cargo.lock

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/c/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,7 @@ wasm-metadata = { workspace = true }
2323
anyhow = { workspace = true }
2424
heck = { workspace = true }
2525
clap = { workspace = true, optional = true }
26+
indexmap = { workspace = true }
27+
28+
[features]
29+
clap = ['dep:clap', 'wit-bindgen-core/clap']

0 commit comments

Comments
 (0)