acid-store icon indicating copy to clipboard operation
acid-store copied to clipboard

wasm wasi?

Open dzmitry-lahoda opened this issue 3 years ago • 1 comments

dzmitry-lahoda avatar Sep 27 '21 19:09 dzmitry-lahoda

donation button?

dzmitry-lahoda avatar Sep 27 '21 19:09 dzmitry-lahoda

Sorry for the exceedingly late reply.

WASM/WASI support isn't something I have planned, mostly because I have zero experience with WASM.

And no donation button either; donations really aren't necessary. 🙂

lostatc avatar Jan 06 '23 15:01 lostatc

you can do 2 things.

  1. compile to wasm-xxx-yyy target with no_std enabled. you will see compilation failures. read the docs about core and alloc crates and this https://docs.rust-embedded.org/embedonomicon/smallest-no-std.html . example of no_std and wasm https://github.com/CosmWasm/cw-storage-plus/pull/26/files . make feature gate for all std stuff (std FG). In-Memory release compiled to wasm would be awesome.

  2. i am not expert in wasi, BUT https://github.com/bytecodealliance/cap-std
    2.1 it is from people behind WASM standard 2.2. And, cap-std is a foundation for the WASI implementation in Wasmtime, providing sandboxing and support for Linux, macOS, Windows, and more. 2.3 cap-std also has another role, within WASI, because cap-std's filesystem APIs closely follow WASI's sandboxing APIs. In WASI, cap-std becomes a very thin layer, thinner than libstd's filesystem APIs because it doesn't need extra code to handle absolute path 2.4. so if you use that lib, likely compile to WASI flag will work out of box

WASM/WASI grows very fast, it outpased as i see other trends and it lacks DB stuff.

right now there are many non WASI hosts for WASM (blockchains, etc), but seems WASI will will win (see https://wasmcloud.com/docs/reference/host-runtime/capabilities#wasi-based-capability-providers- - they plan for WASI)

dzmitry-lahoda avatar Jan 06 '23 21:01 dzmitry-lahoda

Thanks for the advice! I might look into it when I have some time.

lostatc avatar Jan 06 '23 21:01 lostatc