Open webbiscuit opened 1 year ago
Oops! I'll try and get that fixed, probably tomorrow. It looks like I missed a type alias.
Oops! I'll try and get that fixed, probably tomorrow. It looks like I missed a type alias.
Hi, at least could you please point out which was the prior version of bracket lib that was working to generate the wasm files following the instructions from you website?
You can change your dependency in Cargo.toml
to read bracket-lib = "=0.8.1"
and it should work. I'm working on a fix for this version now.
I have a few other fixes to roll up before I release 0.8.8. In the interim, you can use the latest version with WASM by using the following as your dependency:
bracket-lib = { git = "https://github.com/amethyst/bracket-lib.git" }
It compiles now; when I've had some more coffee, I'll do a full integration test.
Thanks! I can confirm the latest unreleased version works. @jimmykiang - the last released version that works is 0.8.5
just confirming that my hello world example fails for me in the way described in this ticket on 0.8.7, (when following the wasm guide in the rust roguelike tutorial) but still works for me when I pin brackets-lib to master.
If you want to pin the most recent buildable commit (according to git's CI), you can do this :
bracket-lib = { git = "https://github.com/amethyst/bracket-lib.git", rev = "851f6f08675444fb6fa088b9e67bee9fd75554c6", features = ["serde"] }
In case you came here trying to compile Chapter 1 from "Roguelike Tutorial" you need to add
rltk = { git = "https://github.com/amethyst/bracket-lib" }
(not bracket-lib) as described here https://github.com/amethyst/rustrogueliketutorial/issues/201#issuecomment-1427829960
Thanks for posting the solution to the wasm build!
I was following the directions on running wasm on https://hands-on-rust.com/2021/11/06/run-your-rust-games-in-a-browser-hands-on-rust-bonus-content/ after finishing Hands-on Rust (Fantastic book, btw!) and luckily found this github issue with a fix.
Putting bracket-lib = { git = "https://github.com/amethyst/bracket-lib.git" }
in my .toml worked for me to compile. There was a little confusion as the output files were going in to .wasm_help
instead of wasm_help
and slash vs backslash on the copied commands, but after I sorted that out, the Dungeon Crawler was running in my browser with a local python web server I ran using python3 -m http.server
. I'm very excited about the possibility to self-host little proof of concept games.
Edit: got it working and hosted it on GitHub Pages. I published it to my website, and wrote a blog post about it. Thanks again for this wonderful tutorial!
@thebracket is there any plans to release a newer version (at least the patch for wasm) so that people dont have to rely on a link to the GH repo and instead can use cargo add as you would expect. If not could you add a warning to readme / docs to state the last version that compiles wasm correctly?
I hope so. I've had a really nasty combination of being ill, overworked, a crazy toddler and a bit of burnout. So I'm trying to get this into my schedule and ease back into things.
On Mon, Feb 5, 2024 at 7:43 AM NaughtyDog6000 @.***> wrote:
@thebracket https://github.com/thebracket is there any plans to release a newer version (at least the patch for wasm) so that people dont have to rely on a link to the GH repo and instead can use cargo add as you would expect. If not could you add a warning to readme / docs to state the last version that compiles wasm correctly?
— Reply to this email directly, view it on GitHub https://github.com/amethyst/bracket-lib/issues/301#issuecomment-1927043066, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADRU435TLHRECSKA7STS65TYSDOZBAVCNFSM6AAAAAAQ5ZO2ICVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRXGA2DGMBWGY . You are receiving this because you were mentioned.Message ID: @.***>
I'm pulling bracket-terminal into my project as a dependency and compiling for wasm:
I'm seeing the new errors: