wuffs icon indicating copy to clipboard operation
wuffs copied to clipboard

Compilation target: WASM

Open mainrs opened this issue 2 years ago • 1 comments

I am not entirely sure if this is an actualy use-case that makes sense, as I do have limited experience with WASM. I mostly write in Rust.

Pointer dereference safety is probably something that shouldn't be a concern inside of WASM. And I am not sure how much value the buffer overflow safety has in WASM, as it's not affected by DEP and SSP attacks.

It's worth noting that the C code can also be transpiled into WASM using toolchains.

I just wanted to throw the idea out :)

mainrs avatar Jan 17 '22 19:01 mainrs

Sure, it's an idea worth throwing out. In the very long term, we might compile Wuffs directly to WASM bytecode.

As you said, though, we can already compile Wuffs to C and existing C-to-Wasm compilers already do a good job generating optimized code. I think it'd be quite a bit of work for a Wuffs-directly-to-WASM-bytecode tool to be equally good. All together, I'm not sure it'd be high on the priority list of things to work on.

nigeltao avatar Jan 18 '22 01:01 nigeltao