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

Add runner to Rust's ./.cargo/config.toml #575

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Cyborus04
Copy link

@Cyborus04 Cyborus04 commented Oct 5, 2022

This change allows cargo run to run the game in the native runtime automatically, instead of cargo build & w4 run-native ./target/wasm32-unknown-unknown/debug/cart.wasm (or --release equivalent)

@Cyborus04
Copy link
Author

Wait... I tested this on a crate that wasn't generated with w4 new --rust 😅
This would also need to change lib.rs to main.rs and add #![no_main]..

@aduros
Copy link
Owner

aduros commented Oct 10, 2022

I'd be fine with renaming lib.rs, although I don't fully understand if there would be any other impacts :)

Out of curiosity, would it be better to run with w4 run (web runtime with more features) instead of w4 run-native?

@Cyborus04
Copy link
Author

I'd be fine with renaming lib.rs, although I don't fully understand if there would be any other impacts :)

I can't think of any

Out of curiosity, would it be better to run with w4 run (web runtime with more features) instead of w4 run-native?

I chose w4 run-native simply because it, and in turn cargo run, exit immediately when the window is closed, which afaik can't be done with w4 run and has to be ctrl+c'd out of.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants