Re:Rust Programming Language Book
by AlleyTrotter on Monday May 25, 2015 @12:01PM
(#9600513)
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`
[ Parent
| on HN ]
Re:Rust Programming Language Book
by steveklabnik on Monday May 25, 2015 @01:32PM
(#9600891)
Do you have a Cargo.toml? The text explains how running 'cargo new' generates one for you.
Re:Rust Programming Language Book
by AlleyTrotter on Monday May 25, 2015 @02:38PM
(#9601139)
yes 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.
Re:Rust Programming Language Book
by steveklabnik on Monday May 25, 2015 @02:42PM
(#9601152)
You're inside the `src` directory. Try it from the top level (~/data/projects/rust/hello) instead.
What'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?
Re:Rust Programming Language Book
by AlleyTrotter on Monday May 25, 2015 @02:59PM
(#9601221)
Thanks I just figured that out. I does work from there.
Thank You much
Re:Rust Programming Language Book
by steveklabnik on Monday May 25, 2015 @03:02PM
(#9601236)
Any time. Sorry it was a problem :/