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

feat(wasi) Support WasiGetVersion & other *ForVersion WASI API #92

Merged
merged 8 commits into from
Jan 15, 2020

Conversation

Hywan
Copy link
Contributor

@Hywan Hywan commented Dec 2, 2019

Fix #90.
Fix #77.

⚠️ Depends on wasmerio/wasmer#1028, wasmerio/wasmer#1029, and wasmerio/wasmer#1030. They must be merged before merging this PR! Marking this PR as a draft to be sure (the shared libraries must be updated too).

This patch updates bridge.go and wasmer.h to support the new wasmer_wasi_generate_import_object_for_version and wasmer_wasi_get_version functions.

After that, this patch updates wasi.go to implement the new NewDefaultWasiImportObjectForVersion, NewWasiImportObjectForVersion and the WasiGetVersion functions. In addition to that, we create a new WasiVersion type.

Finally, this patch updates the tests to test this new API. And it works like a charm 👌.

@Hywan
Copy link
Contributor Author

Hywan commented Dec 9, 2019

All PR on Wasmer has been merged. Waiting for a new release.

@Hywan Hywan marked this pull request as ready for review January 7, 2020 13:28
@Hywan
Copy link
Contributor Author

Hywan commented Jan 7, 2020

bors r+

bors bot added a commit that referenced this pull request Jan 7, 2020
92: feat(wasi) Support `WasiGetVersion` & other `*ForVersion` WASI API r=Hywan a=Hywan

Fix #90.
Fix #77.

⚠️ Depends on wasmerio/wasmer#1028, wasmerio/wasmer#1029, and wasmerio/wasmer#1030. They must be merged before merging this PR! Marking this PR as a draft to be sure (the shared libraries must be updated too).

This patch updates `bridge.go` and `wasmer.h` to support the new `wasmer_wasi_generate_import_object_for_version` and `wasmer_wasi_get_version` functions.

After that, this patch updates `wasi.go` to implement the new `NewDefaultWasiImportObjectForVersion`, `NewWasiImportObjectForVersion` and the `WasiGetVersion` functions. In addition to that, we create a new `WasiVersion` type.

Finally, this patch updates the tests to test this new API. And it works like a charm 👌.

Co-authored-by: Ivan Enderlin <[email protected]>
@bors
Copy link
Contributor

bors bot commented Jan 7, 2020

Build failed

  • Test (macos-latest)
  • Test (ubuntu-latest)

@Hywan
Copy link
Contributor Author

Hywan commented Jan 8, 2020

bors r+

bors bot added a commit that referenced this pull request Jan 8, 2020
92: feat(wasi) Support `WasiGetVersion` & other `*ForVersion` WASI API r=Hywan a=Hywan

Fix #90.
Fix #77.

⚠️ Depends on wasmerio/wasmer#1028, wasmerio/wasmer#1029, and wasmerio/wasmer#1030. They must be merged before merging this PR! Marking this PR as a draft to be sure (the shared libraries must be updated too).

This patch updates `bridge.go` and `wasmer.h` to support the new `wasmer_wasi_generate_import_object_for_version` and `wasmer_wasi_get_version` functions.

After that, this patch updates `wasi.go` to implement the new `NewDefaultWasiImportObjectForVersion`, `NewWasiImportObjectForVersion` and the `WasiGetVersion` functions. In addition to that, we create a new `WasiVersion` type.

Finally, this patch updates the tests to test this new API. And it works like a charm 👌.

Co-authored-by: Ivan Enderlin <[email protected]>
@bors
Copy link
Contributor

bors bot commented Jan 8, 2020

Build failed

  • Test (macos-latest)
  • Test (ubuntu-latest)

@Hywan
Copy link
Contributor Author

Hywan commented Jan 15, 2020

bors r+

bors bot added a commit that referenced this pull request Jan 15, 2020
92: feat(wasi) Support `WasiGetVersion` & other `*ForVersion` WASI API r=Hywan a=Hywan

Fix #90.
Fix #77.

⚠️ Depends on wasmerio/wasmer#1028, wasmerio/wasmer#1029, and wasmerio/wasmer#1030. They must be merged before merging this PR! Marking this PR as a draft to be sure (the shared libraries must be updated too).

This patch updates `bridge.go` and `wasmer.h` to support the new `wasmer_wasi_generate_import_object_for_version` and `wasmer_wasi_get_version` functions.

After that, this patch updates `wasi.go` to implement the new `NewDefaultWasiImportObjectForVersion`, `NewWasiImportObjectForVersion` and the `WasiGetVersion` functions. In addition to that, we create a new `WasiVersion` type.

Finally, this patch updates the tests to test this new API. And it works like a charm 👌.

Co-authored-by: Ivan Enderlin <[email protected]>
@bors
Copy link
Contributor

bors bot commented Jan 15, 2020

Build succeeded

  • Test (macos-latest)
  • Test (ubuntu-latest)

@bors bors bot merged commit b5e7809 into wasmerio:master Jan 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 component-extension About the Go extension 🎉 enhancement New feature or request 🧪 tests I love tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for both wasi_unstable and wasi_snapshot_preview1 import namespaces Is go-wasmer can handle C codes?
1 participant