From 04a89ae72cbd66aefa027750f21e265c390f2dcd Mon Sep 17 00:00:00 2001 From: AzureMarker Date: Mon, 3 Jan 2022 21:55:16 -0800 Subject: [PATCH] Add init method to force linking --- src/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) 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;