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

Document the WASM build process for the core #100

Closed
3 of 4 tasks
ianthetechie opened this issue May 2, 2024 · 7 comments
Closed
3 of 4 tasks

Document the WASM build process for the core #100

ianthetechie opened this issue May 2, 2024 · 7 comments
Assignees

Comments

@ianthetechie
Copy link
Contributor

ianthetechie commented May 2, 2024

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.

  • Do developers doing WASM builds need to have a target installed? If so, consider adding the target tuple to rust-toolchain.toml in the project root.
  • Do you need to have any other tools installed?
  • Do we use a tool to make it easier? I'd look at cargo-wasi; seems to make things easier?
  • Document findings in the guide (mdbook in the repository: https://github.com/stadiamaps/ferrostar/tree/main/guide)
@ianthetechie ianthetechie converted this from a draft issue May 2, 2024
@ianthetechie
Copy link
Contributor Author

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 CatMe0w self-assigned this May 2, 2024
@CatMe0w
Copy link
Collaborator

CatMe0w commented May 2, 2024

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

@CatMe0w
Copy link
Collaborator

CatMe0w commented May 13, 2024

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
Copy link
Contributor Author

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

@ianthetechie
Copy link
Contributor Author

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
Copy link
Contributor Author

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.

@ianthetechie ianthetechie moved this from Todo to In Progress in Ferrostar on the Web (GSoC '24) Jun 14, 2024
@ianthetechie
Copy link
Contributor Author

I think this will be closed by #120. There shouldn't be much else needed to get going this summer; building is a single command, and if you use rustup, it should automatically install the needed toolchains.

@ianthetechie ianthetechie moved this from In Progress to Done in Ferrostar on the Web (GSoC '24) Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

2 participants