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

println! and panic! support #2

Open
BrandonDyer64 opened this issue Dec 10, 2022 · 1 comment
Open

println! and panic! support #2

BrandonDyer64 opened this issue Dec 10, 2022 · 1 comment
Labels
C-bevy_wasm_sys The bevy_wasm_sys crate

Comments

@BrandonDyer64
Copy link
Owner

Currently, mods made using target wasm32-unknown-unknown cannot call println!. We could use wasm32-wasi instead, but this drastically increases binary size.

Perhaps some kind of #![no_std] support could be added, or a trick for making wasi binaries smaller.

@togetherwithasteria
Copy link

togetherwithasteria commented Dec 15, 2022

Currently, mods made using target wasm32-unknown-unknown cannot call println!. We could use wasm32-wasi instead, but this drastically increases binary size.

Perhaps some kind of #![no_std] support could be added, or a trick for making wasi binaries smaller.

Hiii!

Yes, I think we could make a simple stream API (something that for the client side interface/mod interface implements Write trait) and reimplement println!() and print!()

Then on the host the user could log them to something like bevy-console or stdout instead!

@BrandonDyer64 BrandonDyer64 added the C-bevy_wasm_sys The bevy_wasm_sys crate label Feb 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bevy_wasm_sys The bevy_wasm_sys crate
Projects
None yet
Development

No branches or pull requests

2 participants