refraction-networking / water

WebAssembly Transport Executables Runtime
Apache License 2.0
27 stars 1 forks source link

devplan: pure Go implementation #15

Closed gaukas closed 10 months ago

gaukas commented 11 months ago

Current implementation heavily relies on CGO and Rust FFI which are assumed to be problematic in terms of portability and performance.

To eliminate such issues, we plan to switch to a pure Go implementation using a pure Go WebAssembly runtime with WASI support (current candidate: wazero).

gaukas commented 11 months ago

Requiring progress on gaukas/wazero before this issue could be pushed on.

erikziyunchi commented 11 months ago

Anything I can help with?

gaukas commented 11 months ago

Anything I can help with?

I am trying to putting up a TO-DO list on gaukas/wazero to follow through, I will update you if once I figure something out.

gaukas commented 10 months ago

Current progress: rewriting is complete. Now debugging an error which does not occur in wasmtime version.

thread '<unnamed>' panicked at 'unexpected error when polling the I/O driver: Os { code: 58, kind: Uncategorized, message: "Not supported" }', /path/to/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.33.0/src/runtime/io/driver.rs:164:23
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

ref: https://github.com/tokio-rs/tokio/blob/0457690d010349172fe7d5972d343cdcaffec635/tokio/src/runtime/io/driver.rs#L164