Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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

Can we support cargo run for Ambient projects? #39

Open
FredrikNoren opened this issue Feb 10, 2023 · 1 comment
Open

Can we support cargo run for Ambient projects? #39

FredrikNoren opened this issue Feb 10, 2023 · 1 comment
Labels
topic:api API functionality, including both host and guest

Comments

@FredrikNoren
Copy link
Contributor

FredrikNoren commented Feb 10, 2023

We might be able to support cargo run in a Ambient project folder; we need to add this to Cargo.toml (for example in the examples):

[target.wasm32-wasi]
runner = "ambient"

To make this work we would also need to make the asset build part of the cargo build. Needs to be experimented with a bit though.

@FredrikNoren FredrikNoren changed the title Can we support cargo run? Can we support cargo run for Kiwi projects? Feb 12, 2023
@philpax philpax added the topic:api API functionality, including both host and guest label Feb 12, 2023
@philpax
Copy link
Contributor

philpax commented Feb 15, 2023

I've been thinking about this more and am starting to think that we should flip the compilation model around so that you can run any arbitrary WASM module, and we remove Rust compilation entirely from the asset pipeline. That is, cargo run builds your WASM, which is then passed as an input to ambient run, and you can do this with any compiler.

The thing that I haven't figured out is how this works with dependencies. When those dependencies have code of their own, what happens? Do we make the user go in and build those manually? Do we enforce that dependencies must have WASM pre-built? What if you don't have the relevant toolchain?

@FredrikNoren FredrikNoren changed the title Can we support cargo run for Kiwi projects? Can we support cargo run for Ambient projects? Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic:api API functionality, including both host and guest
Projects
None yet
Development

No branches or pull requests

2 participants