DanielKeep / cargo-script

Cargo script subcommand
Other
729 stars 37 forks source link

full toml header #44

Closed vitiral closed 7 years ago

vitiral commented 7 years ago

I love the idea of this!

One thing that I think would be very useful is a full toml header. I propose the following syntax -- which must be followed EXACTLY:

# CARGO SCRIPT
`` `
[dependencies]
toml = "4.2.3"
# ... etc
`` `
*/

Basically we will just do a regex for

# CARGO SCRIPT\n\`\`\`(.*)\`\`\`

(also enable multi-line mode) and we will allow the user to specify the full Cargo.toml!

This will automatically fill in required non-dependency details (package.name and package.version), unless they are specified in which case it won't touch them.

vitiral commented 7 years ago

I can work on this if you agree. Would like to know your thoughts on the format too.

DanielKeep commented 7 years ago

I'm confused; how is this functionally different to the existing support for manifests?

vitiral commented 7 years ago

sorry, I just didn't see it in the docs. Thanks!