Why not just use JSON? Infact, why not just use npm's package.json?
I think that's a good point. Why use .toml when we have better alternatives already? (I admit I have a bias against toml, but still...)
Cargo, Rust's Package Manager
11–20 of 127 posts
Re: Cargo, Rust's Package Manager
#12How do you pin a dependency to a particular version or git sha? I can't find anything in the FAQ or docs that implies that it's possible.
The next features we're planning on working on are: - Supporting refs other than `master` from git packages
Re: Cargo, Rust's Package Manager
#13Why 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.
Re: Cargo, Rust's Package Manager
#14It doesn't ship with Rust and the docs on GitHub and crates.io are not very enlightening.
Re: Cargo, Rust's Package Manager
#15I 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.
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)Re: Cargo, Rust's Package Manager
#16$ cargo cult
would build a new project/module from a template.
Re: Cargo, Rust's Package Manager
#17I 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)
DESTDIR=$HOME make installRe: Cargo, Rust's Package Manager
#18Why 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.
{
'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.
Re: Cargo, Rust's Package Manager
#19Why not just use JSON? Infact, why not just use npm's package.json?
cargo read-manifest --manifest-path .Re: Cargo, Rust's Package Manager
#20Earlier 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.
Your solution works fine for docstrings, but comments and docstrings are not the same thing (although many languages that don't support docstrings in the syntax hack them together using comments, admittedly).
But beyond that, what's the argument for switching to json? Is there some kind of intercompatibility with npm/Node.js to be gained?