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

Need to implement may_enter and may_leave flags #23

Open
alexcrichton opened this issue Oct 13, 2022 · 1 comment
Open

Need to implement may_enter and may_leave flags #23

alexcrichton opened this issue Oct 13, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@alexcrichton
Copy link
Member

These have since been added to the spec and it'll ideally be more obvious where to implement these once bytecodealliance/wit-bindgen#314 is done. Once implemented this should also lead to the implementation of "lockdown semantics" where if a component traps it prevents the entire component from being reentered.

@alexcrichton alexcrichton transferred this issue from bytecodealliance/wit-bindgen Jan 26, 2023
@alexcrichton alexcrichton changed the title JS/Python hosts need to implement may_enter and may_leave flags Need to implement may_enter and may_leave flags Jan 26, 2023
@guybedford
Copy link
Collaborator

Now that instance flags are supported, the groundwork for this check is all in.

What remains is to implement setting and checking the flags, defined as:

pub const FLAG_MAY_LEAVE: i32 = 1 << 0;
pub const FLAG_MAY_ENTER: i32 = 1 << 1;

where the flags are set and checked per instance, verified per the canonical ABI within the correct function call positions.

@yoshuawuyts yoshuawuyts added the enhancement New feature or request label Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants