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

Feature: WASI Preview 2 Support #1646

Open
nickchomey opened this issue May 31, 2024 · 8 comments
Open

Feature: WASI Preview 2 Support #1646

nickchomey opened this issue May 31, 2024 · 8 comments
Labels
feature New feature or request triage Needs to be triaged

Comments

@nickchomey
Copy link

Feature description

As best as I can tell, WASI Preview 2 is now the official version of WASI, while Preview 1 was moved to the legacy directory in their repo.

They marked the first official release (0.2.0) of WASI on April 24, 2024, which corresponds with Preview 2.

It has APIs defined for HTTP, filesystem and more - which would be very useful in general, and for a Benthos processor in particular (which we discussed here).

So, it would be great if Conduit Processor SDK could move to support the Preview 2 APIs.

@nickchomey nickchomey changed the title Feature: WASI Preview 2 Feature: WASI Preview 2 Support May 31, 2024
@hariso
Copy link
Contributor

hariso commented May 31, 2024

Thanks for the issue @nickchomey ! It seems to me that we need to wait for the support in Go first: golang/go#65333.

@nickchomey
Copy link
Author

Ah, I wasn't aware. Well, at least this issue can serve as a reminder/tracker for progress there.

@hariso
Copy link
Contributor

hariso commented May 31, 2024

Yup, definitely good to have a tracker issue!

@lovromazgon lovromazgon transferred this issue from ConduitIO/conduit-processor-sdk Jun 10, 2024
@lovromazgon lovromazgon added the feature New feature or request label Jun 10, 2024
@lovromazgon
Copy link
Member

I moved this issue to the main Conduit repo, as the WASI Preview 2 support needs to be added on the host (i.e. Conduit).

@nickchomey
Copy link
Author

nickchomey commented Jul 11, 2024

This seems to be very promising progress. Could it be used to make a tinygo wasm component out of, say, Benthos and then include as a processor in conduit somehow?

https://wasmcloud.com/blog/compile-go-directly-to-webassembly-components-with-tinygo-and-wasi-p2

@nickchomey
Copy link
Author

nickchomey commented Jul 16, 2024

I looked a bit more into this and, of course, while this is progress you still need a wasm implementation that handles wasi preview 2. According to WASI, only wasmtime and jco do.

https://github.com/WebAssembly/WASI/blob/main/preview2/README.md#wasi-preview-2-implementations

I've created an issue at wazero to add support for wasip2 tetratelabs/wazero#2289

An alternative would be using wasmtime-go, but i assume you're not interested as it isn't pure Go, like wazero https://github.com/bytecodealliance/wasmtime-go

@nickchomey
Copy link
Author

Well, Wazero made it extremely clear there that they have no intention to support any further WASI previews until it reaches 1.0 and is in W3C spec. Not sure if/how that affects Conduit's plans

@hariso
Copy link
Contributor

hariso commented Jul 17, 2024

Well, some of the features that are introduced in Preview 2 are really handy, such as HTTP. We're currently focusing on schema support in Conduit, but the team will discuss this when we are done with it. Thanks for looking into this and brining this up @nickchomey !

@hariso hariso added the triage Needs to be triaged label Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request triage Needs to be triaged
Projects
None yet
Development

No branches or pull requests

3 participants