diff options
Diffstat (limited to '.cargo')
| -rw-r--r-- | .cargo/config-nightly-fast-compile.toml | 23 | ||||
| -rw-r--r-- | .cargo/config.toml | 16 |
2 files changed, 39 insertions, 0 deletions
diff --git a/.cargo/config-nightly-fast-compile.toml b/.cargo/config-nightly-fast-compile.toml new file mode 100644 index 0000000..f63e319 --- /dev/null +++ b/.cargo/config-nightly-fast-compile.toml @@ -0,0 +1,23 @@ +include = ["config.toml"] + +[unstable] +codegen-backend = true + +[profile.dev] +debug = "line-tables-only" +codegen-backend = "cranelift" + +[build] +rustc-wrapper = "sccache" + +[target.'cfg(unix)'] +linker = "clang" +rustflags = [ + "-Clink-arg=--ld-path=wild", + "-Zthreads=8", + + # Because Polonius is currently only enabled in nightly Rust, it is disabled here so + # that certain borrowing related compilation errors does not only occur when this + # config is not used + "-Zpolonius=off", +] diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 0000000..eed713a --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,16 @@ +[alias] +fcheck = "run -p xtask -- execute cargo +nightly check --config .cargo/config-nightly-fast-compile.toml" +fbuild = "run -p xtask -- execute cargo +nightly build --config .cargo/config-nightly-fast-compile.toml" +frun = "run -p xtask -- execute cargo +nightly run --config .cargo/config-nightly-fast-compile.toml" + +[env] +SLANG_USE_PREBUILT = "1" + +# This makes unix-like operating systems behave like Windows in that it will search for +# dynamic libraries in the same directory as the executable. This is needed by the engine +# crate to be able to load the shader-slang dynamic libraries. +[target.'cfg(unix)'] +rustflags = ["-Clink-arg=-Wl,-rpath,$ORIGIN"] + +[target.'cfg(target_arch = "x86_64")'] +rustflags = ["-C", "target-cpu=x86-64-v2"] |
