Live data from Hacker News

Cargo, Rust's Package Manager

crates.io

21–30 of 127 posts

Re: Cargo, Rust's Package Manager

#22
I haven't been following the development of this package manager, but previous attempts at making a package manager for Rust have failed. Is this package manager supported officially now? I really hope it will stick around.

Re: Cargo, Rust's Package Manager

#23

I haven't been following the development of this package manager, but previous attempts at making a package manager for Rust have failed. Is this package manager supported officially now? I really hope it will stick around.

Yes, the developers are actually domain experts being paid by Mozilla. The release of this website also coincided with the move of the source repository into the rust-lang organisation: https://github.com/rust-lang/cargo .

Re: Cargo, Rust's Package Manager

#27
post #4

Why not just use JSON? Infact, why not just use npm's package.json?

I may not be a majority here, but I see JSON as a data transportation format, while I see TOML or YAML as configuration formats. You cannot write comments in JSON, for instance.

You're not alone. YAML or similars are the right formats for these things, not JSON. Less clutter, comments separated from data, easier to read (by humans).

Re: Cargo, Rust's Package Manager

#28
post #18
post #4

Earlier quoted context omitted.

I may not be a majority here, but I see JSON as a data transportation format, while I see TOML or YAML as configuration formats. You cannot write comments in JSON, for instance.

Example from the website in json { 'package': { 'name': 'hello-world', 'version': '0.1.0', 'authors': [ 'wycats@example.com' ] }, 'bin': { 'name': 'hello-world', 'comment': 'the name of the executable to generate' } } So where is the problem ? And you have the advantage, that other tools can use the complete file including the comment. In TOML you need an extra parser to grab the comment.

Comments aren't just used to put notes in the file. They're also used to comment out code.

Also, having to quote everything makes writing JSON by hand a pain. Why would you want to use it over a nicer format?

Re: Cargo, Rust's Package Manager

#30
post #15
post #14

I would really love to see some docs on how to actually install and get started with Cargo. It doesn't ship with Rust and the docs on GitHub and crates.io are not very enlightening.

This was how I installed it (Mac): 1) Install latest version of Rust found here: http://www.rust-lang.org 2) git clone --recursive git@github.com:rust-lang/cargo.git 3) make 4) make install (could be that sudo is needed for you)

There is no brew formula?
Post reply on HN