stadiamaps / ferrostar

A FOSS navigation SDK built from the ground up for the future
https://stadiamaps.github.io/ferrostar/
Other
81 stars 9 forks source link

Document the WASM build process for the core #100

Open ianthetechie opened 2 weeks ago

ianthetechie commented 2 weeks ago

This task covers the bare minimum to get a wasm module. I think this is pretty straightforward, but we need to decide what looks like the best option + document our choices.

ianthetechie commented 2 weeks ago

I think GitHub's anti-spam is kicking in so I can't assign you yet @CatMe0w, but this is here for your reference. Maybe if you leave a comment on the issue I can assign it?

CatMe0w commented 2 weeks ago

Looks like I can assign myself. But I'll have to check the tasks later.

CatMe0w commented 4 days ago

Will we use WASI? Ferrostar Rust core is more like a "pure computation" library in my opinion and doesn't interact with system interfaces by itself. A basic, minimal wasm32-unknown-unknown target should be enough.

ianthetechie commented 4 days ago

Yes, excellent point :) I think wasm32-unknown-unknown is probably enough, and WASI probably isn't needed.

ianthetechie commented 4 days ago

Just tried this out myself @CatMe0w and remembered why I suggested WASI ;) We would need to support no-std environments first. See #26 which tracks this. We can compile the core today with WASI though.

ianthetechie commented 2 days ago

I've been mulling this over a bit. Might actually need to go ahead and make the core not require WASI as that is possible but not easy to run in a web browser right now. I'll give that a bit of thought. Let me know if you've turned up anything as well @CatMe0w.