diff --git a/Cargo.toml b/Cargo.toml index 80656d7..43ab14b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,10 +5,5 @@ version = "0.1.0" license = "MIT/Apache 2.0" edition = "2021" -[lib] -name = "pthread_3ds" -path = "src/lib.rs" -crate-type = ["staticlib", "lib"] - -[dependencies.libc] -git = "https://github.com/Meziu/libc.git" +[dependencies] +libc = { git = "https://github.com/Meziu/libc.git" } diff --git a/src/lib.rs b/src/lib.rs index f010f81..59864c2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,12 @@ #![feature(thread_local)] #![allow(non_camel_case_types)] +/// Call this somewhere to force Rust to link this module. +/// The call doesn't need to execute, just exist. +/// +/// See https://github.com/rust-lang/rust/issues/47384 +pub fn init() {} + // LIBCTRU THREADS pub type _LOCK_T = i32;