diff --git a/native/src/Cargo.toml b/native/src/Cargo.toml index bda714858..fbc493ac9 100644 --- a/native/src/Cargo.toml +++ b/native/src/Cargo.toml @@ -8,6 +8,9 @@ version = "0.0.0" edition = "2024" [workspace.dependencies] +base = { path = "base" } +derive = { path = "core/derive" } +magiskpolicy = { path = "sepolicy" } cxx = { path = "external/cxx-rs" } cxx-gen = { path = "external/cxx-rs/gen/lib" } libc = "0.2.176" diff --git a/native/src/boot/Cargo.toml b/native/src/boot/Cargo.toml index 96db95b7a..2a764c73d 100644 --- a/native/src/boot/Cargo.toml +++ b/native/src/boot/Cargo.toml @@ -12,7 +12,7 @@ cxx-gen = { workspace = true } pb-rs = { workspace = true } [dependencies] -base = { path = "../base" } +base = { workspace = true } cxx = { workspace = true } byteorder = { workspace = true } size = { workspace = true } diff --git a/native/src/core/Cargo.toml b/native/src/core/Cargo.toml index 590320985..98b728925 100644 --- a/native/src/core/Cargo.toml +++ b/native/src/core/Cargo.toml @@ -20,8 +20,8 @@ cxx-gen = { workspace = true } pb-rs = { workspace = true } [dependencies] -base = { path = "../base", features = ["selinux"] } -derive = { path = "derive" } +base = { workspace = true, features = ["selinux"] } +derive = { workspace = true } cxx = { workspace = true } num-traits = { workspace = true } num-derive = { workspace = true } diff --git a/native/src/init/Cargo.toml b/native/src/init/Cargo.toml index 2cb8023b4..fd1a4d9e2 100644 --- a/native/src/init/Cargo.toml +++ b/native/src/init/Cargo.toml @@ -11,7 +11,7 @@ path = "lib.rs" cxx-gen = { workspace = true } [dependencies] -base = { path = "../base" } -magiskpolicy = { path = "../sepolicy", default-features = false } +base = { workspace = true } +magiskpolicy = { workspace = true, features = ["no-main"] } cxx = { workspace = true } num-traits = { workspace = true } diff --git a/native/src/sepolicy/Cargo.toml b/native/src/sepolicy/Cargo.toml index d86de8619..08f36b5a9 100644 --- a/native/src/sepolicy/Cargo.toml +++ b/native/src/sepolicy/Cargo.toml @@ -11,10 +11,9 @@ path = "lib.rs" cxx-gen = { workspace = true } [features] -default = ["main"] -main = [] +no-main = [] [dependencies] -base = { path = "../base" } +base = { workspace = true } cxx = { workspace = true } argh = { workspace = true } diff --git a/native/src/sepolicy/lib.rs b/native/src/sepolicy/lib.rs index f44bd2a6c..586e36833 100644 --- a/native/src/sepolicy/lib.rs +++ b/native/src/sepolicy/lib.rs @@ -8,7 +8,7 @@ use crate::ffi::SePolicy; #[path = "../include/consts.rs"] mod consts; -#[cfg(feature = "main")] +#[cfg(not(feature = "no-main"))] mod cli; mod rules; mod statement;