-
Notifications
You must be signed in to change notification settings - Fork 824
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
doc(c-api) Remove inline documentation in wasmer_wasm.h
, clarification about stability…
#2083
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hywan
changed the title
Doc c api clarify
doc(c-api) Remove inline documentation in Feb 1, 2021
wasmer_wasm
, clarification about stability…
Hywan
changed the title
doc(c-api) Remove inline documentation in
doc(c-api) Remove inline documentation in Feb 1, 2021
wasmer_wasm
, clarification about stability…wasmer_wasm.h
, clarification about stability…
1 task
jubianchi
suggested changes
Feb 1, 2021
Co-authored-by: Julien BIANCHI <[email protected]>
jubianchi
approved these changes
Feb 1, 2021
bors r+ |
MarkMcCaskey
approved these changes
Feb 1, 2021
bors bot
added a commit
that referenced
this pull request
Feb 1, 2021
2074: feat(package) Be consistent on Windows regarding `libwasmer` name. r=jubianchi a=Hywan # Description Windows package libraries aren't named consistently regarding other platforms. This patch fixes that. # Review - [ ] Add a short description of the the change to the CHANGELOG.md file 2083: doc(c-api) Remove inline documentation in `wasmer_wasm.h`, clarification about stability… r=Hywan a=Hywan # Description As suggested in #2053 (comment), this PR removes the automatically generated documentation when building `wasmer_wasm.h`. It also clarifies our position regarding stability, and add a section about the documentation. This PR takes also the opportunity to mark `wasi_env_set_(instance|memory)` as deprecated functions. # Review - [x] Add a short description of the the change to the CHANGELOG.md file Co-authored-by: Ivan Enderlin <[email protected]>
Build failed (retrying...): |
bors bot
added a commit
that referenced
this pull request
Feb 1, 2021
2053: feat(c-api) Implement `wasi_get_unordered_imports` r=Hywan a=Hywan Depend on #2083. # Description The problem I've with the C API for WASI is the following: ```c // At some point, we write this: bool success = wasi_get_imports(store, module, wasi_env, &imports_to_collect); ``` This function iterates over the module imports, and for each entry, it looks inside the (inner generated) WASI import object if a matching entry exists. If it doesn't, it fails. See: https://github.com/wasmerio/wasmer/blob/6b028410c23da088d62a6b6919e2c086931ad101/lib/c-api/src/wasm_c_api/wasi/mod.rs#L333-L356 So… if a module requires WASI and WASI only, it works like a charm of course. But, if a module requires WASI + other imports, it will fail. And I think it's a common pattern to use WASI + some other imports (like `math.random` or anything related to I/O etc etc.). What we need is an API to collect all the WASI imports, in no particular order, by module/namespace and name, so that we can implement an API like `ImportObject` to re-order the imports when needed (i.e. when passing a vec of externs to `wasm_instance_new` for example). # Review - [x] Add a short description of the the change to the CHANGELOG.md file Co-authored-by: Ivan Enderlin <[email protected]>
bors bot
added a commit
that referenced
this pull request
Feb 1, 2021
2083: doc(c-api) Remove inline documentation in `wasmer_wasm.h`, clarification about stability… r=Hywan a=Hywan # Description As suggested in #2053 (comment), this PR removes the automatically generated documentation when building `wasmer_wasm.h`. It also clarifies our position regarding stability, and add a section about the documentation. This PR takes also the opportunity to mark `wasi_env_set_(instance|memory)` as deprecated functions. # Review - [x] Add a short description of the the change to the CHANGELOG.md file Co-authored-by: Ivan Enderlin <[email protected]>
Build failed: |
bors r+ |
bors bot
added a commit
that referenced
this pull request
Feb 2, 2021
2083: doc(c-api) Remove inline documentation in `wasmer_wasm.h`, clarification about stability… r=Hywan a=Hywan # Description As suggested in #2053 (comment), this PR removes the automatically generated documentation when building `wasmer_wasm.h`. It also clarifies our position regarding stability, and add a section about the documentation. This PR takes also the opportunity to mark `wasi_env_set_(instance|memory)` as deprecated functions. # Review - [x] Add a short description of the the change to the CHANGELOG.md file Co-authored-by: Ivan Enderlin <[email protected]>
Build failed: |
bors r+ |
bors bot
added a commit
that referenced
this pull request
Feb 2, 2021
2083: doc(c-api) Remove inline documentation in `wasmer_wasm.h`, clarification about stability… r=Hywan a=Hywan # Description As suggested in #2053 (comment), this PR removes the automatically generated documentation when building `wasmer_wasm.h`. It also clarifies our position regarding stability, and add a section about the documentation. This PR takes also the opportunity to mark `wasi_env_set_(instance|memory)` as deprecated functions. # Review - [x] Add a short description of the the change to the CHANGELOG.md file Co-authored-by: Ivan Enderlin <[email protected]>
1 task
Build failed: |
bors r+ |
bors bot
added a commit
that referenced
this pull request
Feb 2, 2021
2053: feat(c-api) Implement `wasi_get_unordered_imports` r=Hywan a=Hywan Depend on #2083. # Description The problem I've with the C API for WASI is the following: ```c // At some point, we write this: bool success = wasi_get_imports(store, module, wasi_env, &imports_to_collect); ``` This function iterates over the module imports, and for each entry, it looks inside the (inner generated) WASI import object if a matching entry exists. If it doesn't, it fails. See: https://github.com/wasmerio/wasmer/blob/6b028410c23da088d62a6b6919e2c086931ad101/lib/c-api/src/wasm_c_api/wasi/mod.rs#L333-L356 So… if a module requires WASI and WASI only, it works like a charm of course. But, if a module requires WASI + other imports, it will fail. And I think it's a common pattern to use WASI + some other imports (like `math.random` or anything related to I/O etc etc.). What we need is an API to collect all the WASI imports, in no particular order, by module/namespace and name, so that we can implement an API like `ImportObject` to re-order the imports when needed (i.e. when passing a vec of externs to `wasm_instance_new` for example). # Review - [x] Add a short description of the the change to the CHANGELOG.md file Co-authored-by: Ivan Enderlin <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
As suggested in #2053 (comment), this PR removes the automatically generated documentation when building
wasmer_wasm.h
.It also clarifies our position regarding stability, and add a section about the documentation.
This PR takes also the opportunity to mark
wasi_env_set_(instance|memory)
as deprecated functions.Review