-
Notifications
You must be signed in to change notification settings - Fork 26
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
merge: wit-bindgen 0.32 #345
Merged
rvolosatovs
merged 19 commits into
bytecodealliance:main
from
rvolosatovs:merge/wit-bindgen
Sep 27, 2024
Merged
merge: wit-bindgen 0.32 #345
rvolosatovs
merged 19 commits into
bytecodealliance:main
from
rvolosatovs:merge/wit-bindgen
Sep 27, 2024
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
This adds in the package name in addition to the world name in the custom section for Rust code that has the component type information within it. This helps prevent clashes between worlds of the same name. Closes #975
Currently enumerations in the generated rust bindings are not ordered, and can only be compared by equality. This patch adds the `PartialOrd` and `Ord` derives to generated enums.
`size_t` is used in the generated C headers, but is not guaranteed by the standard to be defined in either the `stdint.h` or `stdbool.h` headers that are unconditionally generated. This patch adds an unconditional include to `stddef.h` to address compile issues on certain standard libraries.
* feat: initial commit for moonbit * feat(moonbit): use teavm-java as reference * feat(moonbit): convert some types * feat(moonbit): type enum/variant + cleanup result/tuple * feat(moonbit): type record * fix(moonbit): interface generation * feat(moonbit): clean up interface generator * feat(moonbit): add test and start bindgen * feat(moonbit): wip, bindgen * fix(moonbit): array api * feat(moonbit): adjust test output * feat(moonbit): partial support for lower/lift enum/variant * fix(moonbit): variant cases * misc(moonbit): small rewrites * feat(moonbit): add exportation * fix(moonbit): cleanup return area * feat(moonbit): reorganize generated directory structure fix(moonbit): char conversion and previous bug * feat(moonbit): lower / lift string * fix(moonbit): typo * feat(moonbit): fix qualifier and cleanup directory structure * fix(moonbit): attemp to fix qualifier issue * fix(moonbit): misimplemented instructions * refactor(moonbit): flag representation * fix(moonbit): variant and tuple and release all tests * feat(moonbit): add resource support * fix(moonbit): generation for Option and others * refactor(moonbit): improve generated code * fix(moonbit): add keywords * refactor(moonbit): merge contructor name and type name * fix(moonbit): forgotten import * fix(moonbit): forgotten keywords * refactor(moonbit): move exportations * refactor(moonbit): reorganize files and fix imports * refactor(moonbit): move exportations to gen * fix(moonbit): flag support * fix(moonbit): world type import/export * fix(moonbit): qualifier related issues * refactor(moonbit): cleanup to make logic clear and robust * fix(moonbit): configuration mistake * cleanup: remove warnings * fix(moonbit): configuration and local conflicts * fix(moonbit): separate export and import types * fix(moonbit): pass all tests * fix(moonbit): add resource-drop, cabi-realloc and order imports and docs * misc(moonbit): modify naming convention * feat(moonbit): add derive show option * misc(moonbit): update generated package name and generate doc * fix(moonbit): string length should be char number * misc(moonbit): naming convention * ci(moonbit): add test ci for moonbit * misc(moonbit): change representation for u16 * fix: abi change * misc(moonbit): moon-bit -> moonbit * feat(moonbit): derive eq * misc(moonbit): avoid builtin type names * feat(moonbit): lower and lift string * misc(moonbit): adjust heap start address * feat(moonbit): lower lift bytes * feat(moonbit): wip add core f32 support * fix(moonbit): keyword update * fix(moonbit): reserve space * misc(moonbit): replace inline wasm with builtin functions * feat(moonbit): lift/lower array * ci(moonbit): use powershell for windows installation * misc(moonbit): fix preamble * misc(moonbit): add todo for future work * refactor(moonbit): split stub file * fix(moonbit): allocate return area for exportation functions * misc(moonbit): add documentation * misc(moonbit): ignore stub file option * fix(moonbit): ci check * fix(moonbit): separate ffi
* fix(moonbit): incorrect wasm instructions * fix: signed conversion
* Update wasm-tools dependencies This notably updates to handle bytecodealliance/wasm-tools#1711 but this is done in a way that is not intended to replace #1035 but instead makes the update "as easy as possible" by just adding calls to `.{size,align}_wasm32()` where needed. Full support is expected to land in #1035. * More sizing updates
* C#: do not drop resource handles in finalizers As of this writing, we cannot safely drop a handle to an imported resource from a .NET finalizer because it may still have one or more open child resources. Once WIT has explicit syntax for indicating parent/child relationships, we should be able to use that information to keep track of child resources automatically in generated code, at which point we'll be able to drop them in the correct order from finalizers. Fixes #1039 Signed-off-by: Joel Dice <[email protected]> * remove finalizers per PR feedback Signed-off-by: Joel Dice <[email protected]> --------- Signed-off-by: Joel Dice <[email protected]>
* feat(moonbit): add export resource support (cherry picked from commit aa2f5e31233b5e52eb13d9d23e199f21741573fd) * feat(moonbit): auto derive error type (cherry picked from commit 6f8f73e411e5331f90cb53295a99ff6d390199fc) * fix(moonbit): update api following stdapi change * fix(moonbit): add missing preamble
This works around dotnet/runtime#80619. See also https://discord.com/channels/732297728826277939/1280906984765395017 Signed-off-by: Joel Dice <[email protected]>
Looks like releases won't work without this any more
This wasn't needed in the Wasmtime repository but it's needed here because a custom token is not used.
[automatically-tag-and-release-this-commit] Co-authored-by: Auto Release Process <[email protected]>
* Bump wasm-tools crates to 217 * Remove temporary `[patch]` * Remove tests using multi-return in WIT This is in the process of being phased out.
[automatically-tag-and-release-this-commit] Co-authored-by: Auto Release Process <[email protected]>
c25c95b
to
31dd76d
Compare
The project mistakenly inherited MIT and ASL licenses from wit-bindgen, but since Wasmtime uses ASL with LLVM exception, we must choose that license
31dd76d
to
16d47d6
Compare
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.
The project mistakenly inherited MIT and ASL licenses from wit-bindgen,
but since Wasmtime uses ASL with LLVM exception, we must choose that
license