From e29cc8de72c577eca28f20a4b4eb32debdc374d1 Mon Sep 17 00:00:00 2001 From: danielrab Date: Tue, 20 Sep 2022 10:02:36 +0300 Subject: [PATCH] change command for Rust to `cargo run` Cargo is part of the default toolchain. Using rustc directly will fail if there's any external packages used. Files other than main in a Rust project are usually not meant to be executed directly. Because of all of the above, running `cargo run` has a much higher chance to produce the desired result. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 583f7a1..de8f24c 100644 --- a/package.json +++ b/package.json @@ -163,7 +163,7 @@ "applescript": "osascript", "clojure": "lein exec", "haxe": "haxe --cwd $dirWithoutTrailingSlash --run $fileNameWithoutExt", - "rust": "cd $dir && rustc $fileName && $dir$fileNameWithoutExt", + "rust": "cargo run", "racket": "racket", "scheme": "csi -script", "ahk": "autohotkey",