diff --git a/.gitignore b/.gitignore index 0499960c..a4e56640 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ test/golang/schema-from-schema.json test/elm/elm-stuff/ test/elm/elm.js test/elm/QuickType.elm +test/fixtures/rust/target *.log /test/elm/libsysconfcpus/ diff --git a/test/fixtures/rust/Cargo.toml b/test/fixtures/rust/Cargo.toml index 0b99c9ca..aaab40c0 100644 --- a/test/fixtures/rust/Cargo.toml +++ b/test/fixtures/rust/Cargo.toml @@ -11,4 +11,8 @@ doc = false [dependencies] serde_json = "1.0" serde = "1.0" -serde_derive = "1.0" \ No newline at end of file +serde_derive = "1.0" + +# The development profile, used for `cargo build` +[profile.dev] +codegen-units = 1 # Controls whether the compiler passes `-C codegen-units` \ No newline at end of file diff --git a/test/languages.ts b/test/languages.ts index 1d255fa1..326454c9 100644 --- a/test/languages.ts +++ b/test/languages.ts @@ -73,9 +73,10 @@ export const JavaLanguage: Language = { export const RustLanguage: Language = { name: "rust", base: "test/fixtures/rust", - compileCommand: "cargo build", + setupCommand: "cargo build || true", + compileCommand: "cargo build --jobs 1", runCommand(sample: string) { - return `./target/debug/quick_type_test "${sample}"`; + return `RUST_THREADS=1 ./target/debug/quick_type_test "${sample}"`; }, // FIXME: implement comparing multiple files diffViaSchema: false,