Skip to content

Allow constructors to be fallible #550

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Allow constructors to be fallible #550

wants to merge 1 commit into from

Conversation

lukewagner
Copy link
Member

As discussed in #285, this PR relaxes the validation rules for [constructor]-annotated functions to additionally allow explicitly-declared result<r, ...> return types (e.g., resource r { constructor() -> result<r>; }).

badeend added a commit to badeend/wasm-tools that referenced this pull request Aug 21, 2025
badeend added a commit to badeend/wasm-tools that referenced this pull request Aug 21, 2025
badeend added a commit to badeend/wasm-tools that referenced this pull request Aug 21, 2025
badeend added a commit to badeend/wasm-tools that referenced this pull request Aug 21, 2025
github-merge-queue bot pushed a commit to bytecodealliance/wasm-tools that referenced this pull request Aug 21, 2025
badeend added a commit to badeend/wit-bindgen that referenced this pull request Aug 22, 2025
And C support came along for free.
See: WebAssembly/component-model#550

C++, C# & Moonbit are not supported yet.
badeend added a commit to badeend/wit-bindgen that referenced this pull request Aug 23, 2025
And C support came along for free.
See: WebAssembly/component-model#550

C++, C# & Moonbit are not supported yet.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants