@@ -111,11 +111,24 @@ As for the hard-coded infostring used by cargo, that is a decision for [RFC 3502
111
111
112
112
## Syntax
113
113
114
- When choosing a syntax for embedding manifests in source files, our care-abouts are
114
+ [ RFC 3502] lays out some design principles, including
115
+ - Single-file packages should have a first-class experience
116
+ - Provides a higher quality of experience (doesn't feel like a hack or tacked on)
117
+ - Transferable knowledge, whether experience, stackoverflow answers, etc
118
+ - Easier unassisted migration between single-file and multi-file packages
119
+ - The more the workflows deviate, the higher the maintenance and support costs for the cargo team
120
+
121
+ This led us to wanting to re-use the existing manifest format inside of Rust code.
122
+ The question is what that syntax for embedding should be.
123
+
124
+ When choosing the syntax, our care-abouts are
115
125
- How obvious it is for new users when they see it
116
126
- How easy it is for newer users to remember it and type it out
117
127
- How machine editable it is for ` cargo add ` and friends
118
128
- Needs to be valid Rust code for quality of error messages, etc
129
+ - Simple enough syntax for tools to parse without a full Rust parser
130
+ - Leave Rust syntax errors to rustc, rather than masking them with lower quality ones
131
+ - Ideally we allows random IDE tools (e.g. [ ` crates.nvim ` ] ( https://github.com/Saecki/crates.nvim ) to still have easy access to the manifest
119
132
- Leave the door open in case we want to reuse the syntax for embedded lockfiles
120
133
- Leave the door open for single-file ` lib ` s
121
134
0 commit comments