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

Use enum for directory/file permissions to make generated bindings easier to use #9598

Merged
merged 2 commits into from
Nov 14, 2024

Conversation

jder
Copy link
Contributor

@jder jder commented Nov 12, 2024

As part of bytecodealliance/wasmtime-py#251, I want to use the File/Directory permission constants from the C API in Python. As defines, this is a bit tricky. Rather than hard-code them on the Python side, this PR makes them into an enum, and the existing C-to-Python logic is able to see & emit them. I have some work in progress which does this, see the resulting generated code and the nicer wrappers around them.

@jder jder requested a review from a team as a code owner November 12, 2024 18:31
@jder jder requested review from alexcrichton and removed request for a team November 12, 2024 18:31
@github-actions github-actions bot added the wasmtime:c-api Issues pertaining to the C API. label Nov 12, 2024
Copy link
Member

@alexcrichton alexcrichton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this!

@alexcrichton alexcrichton added this pull request to the merge queue Nov 14, 2024
Merged via the queue into bytecodealliance:main with commit 5e5ad78 Nov 14, 2024
42 checks passed
alexcrichton pushed a commit to alexcrichton/wasmtime that referenced this pull request Nov 14, 2024
…sier to use (bytecodealliance#9598)

* Use enum for directory/file permissions to make generated bindings easier to use

* Clarify names to emphasize these are or-able flags
alexcrichton added a commit that referenced this pull request Nov 15, 2024
* Expose wasmparser from environ for use in wasmtime-py (#9599)

* Use enum for directory/file permissions to make generated bindings easier to use (#9598)

* Use enum for directory/file permissions to make generated bindings easier to use

* Clarify names to emphasize these are or-able flags

---------

Co-authored-by: Jesse Rusak <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wasmtime:c-api Issues pertaining to the C API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants