Skip to content

Commit cd31084

Browse files
committed
feat(future): Add overhead problems with ideas
1 parent 93e8b1f commit cd31084

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

text/3502-cargo-script.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,6 +1113,31 @@ Ideally, this repl would also allow the equivalent of `python -i <file>`, not
11131113
to run existing code but to make a specific file's API items available for use
11141114
to do interactive whitebox testing of private code within a larger project.
11151115

1116+
## Make it easier to run cargo commands on scripts
1117+
1118+
Running
1119+
```consple
1120+
$ cargo update --manifest-path foo.rs
1121+
```
1122+
is a bit of a mouthful for a feature that is generally meant for low everhead when people are used to just running `cargo update`.
1123+
1124+
It would be good to explore ways of reducing the overhead here, for example
1125+
- A short flag for `--manifest-path`
1126+
1127+
We could allow scripts as a positional arguments but most commands already accept a positional argument and distinguishing it from a script could get messy.
1128+
1129+
## Make it easier to specify package fields
1130+
1131+
Specifying
1132+
```toml
1133+
package.edition = "2021"
1134+
```
1135+
Is a bit much for a low overhead syntax. Are there ways we could do better?
1136+
1137+
We could allow `package` fields at the top level but
1138+
- It could make workspace root package detection messier
1139+
- It limits us in our table / field selections
1140+
11161141
## Embedded or adjacent Lockfile
11171142

11181143
[Lockfiles](https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html)

0 commit comments

Comments
 (0)