-
Notifications
You must be signed in to change notification settings - Fork 35
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
Initial wasm component support #367
Conversation
Co-authored-by: Rainy Sinclair <844493+itsrainy@users.noreply.github.com> Co-authored-by: L. Pereira <l.pereira@fastly.com>
Integrate with changes from the upstream witx api, and changes introduced to enable the use of the component adapter.
@@ -0,0 +1,18 @@ | |||
interface environment { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥳
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, most of the comments are either just happy noises, or small suggestions. There were a couple things that I think should be fixed before merge, though. Specifically, there's a wrong implementation in the secret store, and there's an if let ...
that should be a match
. I also think some guidance on profiling and components might be nice, but I don't think those rise to the level of the first two.
This is awesome stuff!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for the changes!
This is an initial step towards support for Wasm Components on viceroy 🎉
There are some restrictions to start with:
fastly:api/compute
world that this branch expectsrun
commandAdditionally, if you run a component with viceroy, you will be greeted with a large warning that indicates that this path is currently unsupported.
Reviewing Advice
For the most part, I tried to keep the modifications to additions, though the files that handle linking and execution of wasm/components did require some modification. The additions in
lib/src/component
should mostly reflect the current state of the core wasm abi, but componentized via thelib/wit/deps/fastly/compute.wit
world.I would appreciate heavy scrutiny on the following files:
lib/src/lib.rs
lib/src/execute.rs
lib/src/linking.rs
Everything in the
lib/src/component
tree would definitely benefit from additional eyes, but the plan is to consider that execution path unstable for now, and bugs/changes are expected.