4 ms·
the Cargo example fails to build. Simply highlite copied to a src dir and it fails with: failed to parse manifest at `/home/john/data/projects/rust/hello/src/Ca
by AlleyTrotter 11y ago
the Cargo example fails to build.
Simply highlite copied to a src dir and it fails with:
failed to parse manifest at `/home/john/data/projects/rust/hello/src/Cargo.toml`
- steveklabnik 11y agoDo you have a Cargo.toml? The text explains how running 'cargo new' generates one for you.
- AlleyTrotter 11y agoyes I just pasted everything from the book and [CODE] $ ~/data/projects/rust/hello/src$ cargo build failed to parse manifest at `/home/john/data/projects/rust/hello/src/Cargo.toml` Caused by: either a [lib] or [[bin]] section must be present [/CODE] Not a real good start for a introduction.
- steveklabnik 11y agoYou're inside the `src` directory. Try it from the top level (~/data/projects/rust/hello) instead.
- FreeFull 11y agoWhat's odd is that for me, even if I am in a `src` directory, cargo will keep going up the path until it finds a Cargo.toml. Maybe in this case, there is an extra Cargo.toml inside the `src` directory itself?
- AlleyTrotter 11y agoThanks I just figured that out. I does work from there. Thank You much
- steveklabnik 11y agoAny time. Sorry it was a problem :/