Use stable rust. Fix `build.rs` bugs

data-structures
Leni Aniva 2024-03-05 16:39:33 -08:00
parent c79205252e
commit c0f00af744
Signed by: aniva
GPG Key ID: 4D9B1C8D10EA4C50
3 changed files with 7 additions and 6 deletions

View File

@ -47,8 +47,6 @@ fn main()
.write_to_file(out_path.join("lean.rs")) .write_to_file(out_path.join("lean.rs"))
.expect("Couldn't write bindings!"); .expect("Couldn't write bindings!");
// This is the path to the object file.
let obj_path = output_path.join("extern.o");
// This is the path to the static library file. // This is the path to the static library file.
let lib_path = output_path.join("libextern.a"); let lib_path = output_path.join("libextern.a");
@ -57,8 +55,8 @@ fn main()
.arg("-O") .arg("-O")
.arg("-c") .arg("-c")
.arg("-o") .arg("-o")
.arg(extern_obj_path) .arg(&extern_obj_path)
.arg(extern_src_path) .arg(&extern_src_path)
.arg("-include") .arg("-include")
.arg(&input) .arg(&input)
.output() .output()
@ -75,7 +73,7 @@ fn main()
let lib_output = std::process::Command::new("ar") let lib_output = std::process::Command::new("ar")
.arg("rcs") .arg("rcs")
.arg(output_path.join(&lib_path)) .arg(output_path.join(&lib_path))
.arg(obj_path) .arg(&extern_obj_path)
.output() .output()
.unwrap(); .unwrap();
#[cfg(target_os = "windows")] #[cfg(target_os = "windows")]

View File

@ -1,2 +1,2 @@
[toolchain] [toolchain]
channel = "nightly" channel = "stable"

3
rustfmt.toml 100644
View File

@ -0,0 +1,3 @@
edition = "2021"
hard_tabs = true
tab_spaces = 3