From a593829a8113b287ff40887bb5b2e6d426e974a8 Mon Sep 17 00:00:00 2001 From: Leo dev Date: Tue, 19 Nov 2024 17:47:40 +0100 Subject: [PATCH] better build.rs --- Cargo.toml | 3 +++ build.rs | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 4e0e1aa..00ebf1d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,6 +14,9 @@ path = "src/lib.rs" name = "osui" path = "src/main.rs" +[build-dependencies] +cc = "1.0" + [dependencies] crossterm = "0.28.1" regex = "1.11.1" diff --git a/build.rs b/build.rs index 32d1e0f..5806a52 100644 --- a/build.rs +++ b/build.rs @@ -1,4 +1,4 @@ fn main() { - println!("cargo:rustc-link-search=native=lib"); - println!("cargo:rustc-link-lib=static=app"); + cc::Build::new() + .file("src/app.c").compile("app"); } \ No newline at end of file