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

wasm releases #2

Open
kjvalencik opened this issue Apr 1, 2020 · 2 comments
Open

wasm releases #2

kjvalencik opened this issue Apr 1, 2020 · 2 comments

Comments

@kjvalencik
Copy link
Owner

Compiling as wasm would allow more direct integration with Actions instead of needing to publish compiled binaries and download with a bootstrap wrapper.

However, most useful actions need to interact with the network and filesystem. This would require a number of node.js bindgen wrappers.

@kjvalencik
Copy link
Owner Author

kjvalencik commented Apr 30, 2020

Basic idea:

  • Create a node module that bootstraps the environment. Shims common APIs (e.g. node-fetch) and loads WASM (WASI?) from a known location (overridden with an input).
  • Rust action npm install the bootstrap module and checks it in from node_modules. This is the action endpoint.
  • Rust crate provides bindgen interfaces for the shims provided by the bootstrap code.
  • Rust action compiles to wasm and commits the built code just like a JS action.

Other thoughts:

  • The bootstrap code isn't rust specific. It works for any wasm action. Is there prior art?
  • Can the bootstrap code be simplified? Can you wrap an action instead of needing to vendor the module?

@svenstaro
Copy link

Just stumbled across this. Are you aware of https://github.com/peter-evans/rust-wasm-action?

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

No branches or pull requests

2 participants