Skip to content

Commit e1af37a

Browse files
committed
Exec the file instead of using cargo run
1 parent 3a301de commit e1af37a

12 files changed

+195
-167
lines changed

docs/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ Useful command-line arguments:
100100

101101
- `--bench`: Compile and run benchmarks. Requires a nightly toolchain.
102102
- `--debug`: Build a debug executable, not an optimised one.
103-
- `--features <features>`: Cargo features to pass when building and running.
104103
- `--force`: Force the script to be rebuilt. Useful if you want to force a recompile with a different toolchain.
105104
- `--gen-pkg-only`: Generate the Cargo package, but don't compile or run it. Effectively "unpacks" the script into a Cargo package.
106105
- `--test`: Compile and run tests.

src/arguments.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ use crate::build_kind::BuildKind;
44
pub struct Args {
55
pub script: Option<String>,
66
pub script_args: Vec<String>,
7-
pub features: Option<String>,
87

98
pub expr: bool,
109
pub loop_: bool,
@@ -108,11 +107,6 @@ impl Args {
108107
.multiple_occurrences(true)
109108
.requires("expr_or_loop")
110109
)
111-
.arg(Arg::new("features")
112-
.help("Cargo features to pass when building and running.")
113-
.long("features")
114-
.takes_value(true)
115-
)
116110
.arg(Arg::new("unstable_features")
117111
.help("Add a #![feature] declaration to the crate.")
118112
.long("unstable-feature")
@@ -214,7 +208,6 @@ impl Args {
214208
Args {
215209
script,
216210
script_args,
217-
features: m.value_of("features").map(Into::into),
218211

219212
expr: m.is_present("expr"),
220213
loop_: m.is_present("loop"),

src/build_kind.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ pub enum BuildKind {
88
impl BuildKind {
99
pub fn exec_command(&self) -> &'static str {
1010
match *self {
11-
Self::Normal => "run",
11+
Self::Normal => "build",
1212
Self::Test => "test",
1313
Self::Bench => "bench",
1414
}

src/consts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ edition = "2021"
150150
151151
[[bin]]
152152
name = "#{bin_name}"
153-
path = "#{file}.rs"
153+
path = "#{file}"
154154
155155
[profile.release]
156156
strip = true

0 commit comments

Comments
 (0)