Skip to content

Conversation

@rvolosatovs
Copy link
Member

@rvolosatovs rvolosatovs commented Sep 26, 2024

The project mistakenly inherited MIT and ASL licenses from wit-bindgen,
but since Wasmtime uses ASL with LLVM exception, we must choose that
license

alexcrichton and others added 18 commits August 13, 2024 00:55
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 bytecodealliance#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 bytecodealliance#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 bytecodealliance#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 bytecodealliance#1039

Signed-off-by: Joel Dice <joel.dice@fermyon.com>

* remove finalizers per PR feedback

Signed-off-by: Joel Dice <joel.dice@fermyon.com>

---------

Signed-off-by: Joel Dice <joel.dice@fermyon.com>
* 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
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 <auto-release-process@users.noreply.github.com>
* 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 <auto-release-process@users.noreply.github.com>
The project mistakenly inherited MIT and ASL licenses from wit-bindgen,
but since Wasmtime uses ASL with LLVM exception, we must choose that
license
@rvolosatovs rvolosatovs merged commit 16d47d6 into bytecodealliance:main Sep 27, 2024
@rvolosatovs rvolosatovs deleted the merge/wit-bindgen branch September 27, 2024 12:08
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.

7 participants