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

Wasi compile version? #2

Open
jadbox opened this issue Jan 7, 2020 · 3 comments
Open

Wasi compile version? #2

jadbox opened this issue Jan 7, 2020 · 3 comments

Comments

@jadbox
Copy link

jadbox commented Jan 7, 2020

Was wondering if it's possible to compile this project with support for wasi for things like file io?

@extrawurst
Copy link
Owner

@jadbox hi nice to meet you again (remember you from my dang times). to be honest I did not try that yet. any chance you wanna have a got with it? :)

@jadbox
Copy link
Author

jadbox commented Jan 8, 2020

Small world!! Alas my heart is still there in the Dlang community :)
I can try to give it a go as it would also be a good learning experience... especially since I'm a venturing a bit far outside my current knowledge domain here (still just learning Rust->wasm basics). xD

@jadbox
Copy link
Author

jadbox commented Jan 9, 2020

@extrawurst So I don't think it's possible as I'd originally imagined. This project uses cargo-web which compiles the project to a wasm file and then we run it within the context of a browser. At best, we can use the WASI polyfill (https://github.com/bytecodealliance/wasmtime/tree/master/crates/wasi-c/js-polyfill) but it's seems very experimental and brittle.

Ideally I'm looking for this kind of solution: I'd like to be able to develop "Electron-like" apps that are built into two sections: UI and backend. Both system use wasm, but the backend supports WASI via Wasmer. However, perhaps I'm thinking too small, and the ideal path is just to use webview wasm for everything and just polyfill WASI until web-view's OS targets natively supports WASI (which would be years from now). Hmmm...

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