Skip to content

Implement module linking. #49

Merged
peterhuene merged 5 commits intobytecodealliance:mainfrom
peterhuene:module-linking
Jan 19, 2021
Merged

Implement module linking. #49
peterhuene merged 5 commits intobytecodealliance:mainfrom
peterhuene:module-linking

Conversation

@peterhuene
Copy link
Member

This PR implements the changes to support the module linking proposal.

Modules and instances are now supported import types for module instantiation.

Modules can now also be instantiated via Module.Instantiate and
ModuleExtern.Instantiate.

There is a breaking change to the API:

  • Instance.Externs has been removed in favor of individual properties that
    forward to the inner Externs instance. Thus Instance.Externs.Functions
    becomes Instance.Functions, etc.

Additionally, the examples and the test project have been migrated to .NET 5.

Closes #45.
Fixes #40.

This commit implements the changes to support the module linking proposal.

Modules and instances are now supported import types for module instantiation.

Modules can now also be instantiated via `Module.Instantiate` and
`ModuleExtern.Instantiate`.

There is a breaking change to the API:

* `Instance.Externs` has been removed in favor of individual properties that
  forward to the inner `Externs` instance.  Thus `Instance.Externs.Functions`
  becomes `Instance.Functions`, etc.

Additionally, the examples and the test project have been migrated to .NET 5.

Closes #45.
Fixes #40.
@peterhuene
Copy link
Member Author

CI is expected to fail for this PR as there's a breaking change upstream in Wasmtime which is what the CI is testing against.

Tests pass locally so I won't block this PR on CI.

The CI will be fixed once the 0.22.0 NuGet package is published.

@peterhuene
Copy link
Member Author

Merging as tests pass locally (see comment above).

@peterhuene peterhuene merged commit 11890fb into bytecodealliance:main Jan 19, 2021
@peterhuene peterhuene deleted the module-linking branch January 19, 2021 20:29
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.

Implement support for module linking No way to get access to exported memory outside of a Host callback

1 participant