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

rust: ErrorContext ownership isn't modeled in APIs #1189

Open
alexcrichton opened this issue Mar 3, 2025 · 0 comments
Open

rust: ErrorContext ownership isn't modeled in APIs #1189

alexcrichton opened this issue Mar 3, 2025 · 0 comments
Labels
async Related to async/streams in the component model. gen-rust Related to bindings for Rust-compiled-to-WebAssembly

Comments

@alexcrichton
Copy link
Member

alexcrichton commented Mar 3, 2025

This input:

package test:foo;

world the-world {
  import x: func(x: list<error-context>);
}

generates:

pub fn x(x: &[wit_bindgen::rt::async_support::ErrorContext]) -> () {

but I believe that error-context values are passed by ownership, so this semantically isn't the right signature for Rust.

@alexcrichton alexcrichton added async Related to async/streams in the component model. gen-rust Related to bindings for Rust-compiled-to-WebAssembly labels Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
async Related to async/streams in the component model. gen-rust Related to bindings for Rust-compiled-to-WebAssembly
Projects
None yet
Development

No branches or pull requests

1 participant