-
Notifications
You must be signed in to change notification settings - Fork 11
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
Use Wasm for plugin mechanism #40
Comments
I'm curious to know what's the use case. I'm not sure I get why a webassembly plugin makes sense here. Most of the rust-atelier features are in libraries already, and the plugin model as described in some of those links above are more applicable to servers or cli tools. |
I second what stevelr says here. When I first saw the call for WASM plugins I was confused. I'm all for that in the right place, which is an application which wants to support loading foreign code in order to serve additional use cases without recompilation. For that, WASM is promising. However rust-atelier is a library meant to do one thing well, parse smithy and operate on the resulting models. WASM has no place here.
…On Sun, Dec 5, 2021, at 15:25, stevelr wrote:
I'm curious to know what's the use case. I'm not sure I get why a webassembly plugin makes sense here. Most of the rust-atelier features are in libraries already, and the plugin model as described in some of those links above are more applicable to servers or cli tools.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#40 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAABRNBCAGDATAAZDIPCPY3UPPREBANCNFSM5JMAXJRQ>.
|
I wouldn't say it has no place, if there was a clear need to support polyglot plugins where anything that can compile to WASM works, it would be an interesting approach. Currently the intent is to support the Rust community with Rust-native tooling. |
That's fair. "No place" is indeed strong. But still feels foreign to me.
…On Mon, Dec 6, 2021, at 07:36, Simon Johnston wrote:
I wouldn't say it has no place, if there was a clear need to support polyglot plugins where anything that can compile to WASM works, it would be an interesting approach. Currently the intent is to support the Rust community with Rust-native tooling.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#40 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAABRNDOAF64V2UFT3TTJRDUPTC6TANCNFSM5JMAXJRQ>.
|
My intention here was to bring this up in the core Smithy repository (smithy-lang/smithy#1001), but it makes more sense if using Rust than in Java where you would have the overhead of introducing another VM. From my personal perspective, I would like to use Smithy but I have limited knowledge of both Rust and Java (the same applies in the company I work for). So, if the AWS intention is to make the Smithy ecosystem broader, then Wasm should at least be considered as a viable approach. |
In case it's useful to anybody here, I wrote a rust library weld-codegen that uses rust-atelier to build models from To be clear, weld-codegen (and rust-atelier that it's built on) is only invoked from cli tools, and there is no rust-atelier code being used from within the generated code or from WebAssembly. rust-atelier has dependencies on file io and other libraries that don't work in wasm. so porting it to wasm would take some non-trivial work. The code generator is part of the open source wasmcloud ecosystem, but there aren't dependencies on wasmcloud and I hope that it can be generally useful to others for other purposes. Please let me know if you're interested in collaborating on it. |
Is your feature request related to a problem?
Currently, plugins for Smithy can only be developed in Rust, but I would like to use TypeScript (AssemblyScript) instead.
Describe the solution you'd like
By using a different plugin system based on Wasm [1], any language that can target WebAssembly (which includes Rust) can be used to extend Smithy. It is important to note that Rust provides first class support for WebAssembly [2] and that others have used that same mechanism successfully [3] [4].
Describe alternatives you've considered
You can find a few alternatives with explanations in this blog post [4].
Additional context
[1] https://webassembly.org/
[2] https://sendilkumarn.com/blog/rustwasm-introduction/
[3] https://istio.io/latest/docs/concepts/wasm/
[4] https://nullderef.com/blog/plugin-tech/#wasm
The text was updated successfully, but these errors were encountered: