Skip to content

Commit 6d8782c

Browse files
committed
fix: Include design principle from 3502
1 parent 0b56c98 commit 6d8782c

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

text/3503-frontmatter.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,24 @@ As for the hard-coded infostring used by cargo, that is a decision for [RFC 3502
111111

112112
## Syntax
113113

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
115125
- How obvious it is for new users when they see it
116126
- How easy it is for newer users to remember it and type it out
117127
- How machine editable it is for `cargo add` and friends
118128
- 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
119132
- Leave the door open in case we want to reuse the syntax for embedded lockfiles
120133
- Leave the door open for single-file `lib`s
121134

0 commit comments

Comments
 (0)