mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-18 17:14:20 +01:00
Merge 'core: Don't run build.rs in debug mode' from Pedro Muniz
Hopefully this will help a bit with compile times when developing and with `cargo check` Closes #3744
This commit is contained in:
@@ -1,7 +1,13 @@
|
|||||||
use std::fs;
|
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
use std::{env, fs};
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
let profile = env::var("PROFILE").unwrap_or_else(|_| "debug".to_string());
|
||||||
|
|
||||||
|
if profile == "debug" {
|
||||||
|
println!("cargo::rerun-if-changed=build.rs");
|
||||||
|
}
|
||||||
|
|
||||||
let out_dir = PathBuf::from(std::env::var("OUT_DIR").unwrap());
|
let out_dir = PathBuf::from(std::env::var("OUT_DIR").unwrap());
|
||||||
let built_file = out_dir.join("built.rs");
|
let built_file = out_dir.join("built.rs");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user