Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 5 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,11 @@ jobs:
- run: cargo test -p wit-bindgen --all-features
- run: cargo test -p wit-bindgen-rust
- run: cargo test --workspace --exclude 'wit-bindgen*'
- run: rustup update nightly --no-self-update
- run: rustup component add miri --toolchain nightly
- run: rustup component add rust-src --toolchain nightly
- run: cargo +nightly miri test -p wit-bindgen --all-features
- run: rustup update nightly-2025-11-10 --no-self-update
- run: rustup default nightly-2025-11-10
- run: rustup component add miri
- run: rustup component add rust-src
- run: cargo miri test -p wit-bindgen --all-features

check:
name: Check
Expand Down
2 changes: 1 addition & 1 deletion crates/c/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ The importing component's responsibility for dropping borrows of imported resour
- If the borrow was passed as an argument to one of the importing component's exports:
- If the bindings were generated with `--autodrop-borrows=yes`, then borrowed handles will be automatically dropped when the exported function returns; no additional action is required by importing component
- If the bindings were generated with `--autodrop-borrow=no`, or this command line option was not supplied, then the importing component must drop the borrowed handle by calling the generated `*_drop_borrow` function.
- If the component obtained the borrow by calling `*_borrow*_` on an owned resource, it must not call `*_drop_borrow`
- If the component obtained the borrow by calling `*_borrow*_` on an owned resource, it must **not** call `*_drop_borrow`

Here is a potential implementation of the `run` export that correctly handles the lifetime of the owned cat resource retrieved from `get-cat-by-name`:

Expand Down
Loading