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

Building for the Web #218

Open
jish opened this issue Sep 21, 2024 · 1 comment
Open

Building for the Web #218

jish opened this issue Sep 21, 2024 · 1 comment

Comments

@jish
Copy link

jish commented Sep 21, 2024

I'm following along with the tutorial and I'm stuck on the first page "Building for the Web"

Here are the versions of the tools I have installed

Cargo:

$ cargo --version
cargo 1.81.0 (2dbb1af80 2024-08-20)

Rustup:

$ rustup --version
rustup 1.27.1 (2024-04-24)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.81.0 (eeb90cda1 2024-09-04)`

I can get as far as the section "Step 1: Compile the program for WASM"

And I receive the following error:

$ cargo build --release --target wasm32-unknown-unknown

error: could not find `Cargo.toml` in `/Users/josh/code/rust/roguelike` or any parent directory

Is there a step or a section I missed?

@alexandermccormick
Copy link

It doesn't look like it is mentioned, but you do need to create a project using the cargo new command.

e.g. cargo new --bin my-roguelike-learning

Honestly, I would start off going through section 2 until you have something you can display on screen, then following the "Building for the Web" section. If you are completely new to the rust language, I would recommend checking out The Rust Book before starting the roguelike tutorial, or at least having it open at the same time for reference.

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

No branches or pull requests

2 participants