From 29543620d44ea2572fe1bf744fdbac064ed00bd4 Mon Sep 17 00:00:00 2001 From: Benedikt Reinartz Date: Mon, 5 Aug 2024 21:53:29 +0200 Subject: [PATCH] Make all rustler_sys functions extern "C" --- rustler_sys/build.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rustler_sys/build.rs b/rustler_sys/build.rs index 224e62d8..f7720d08 100644 --- a/rustler_sys/build.rs +++ b/rustler_sys/build.rs @@ -139,7 +139,7 @@ impl<'a> ApiBuilder for WinForwardersApiBuilder<'a> { ) .unwrap(); writeln!(self.0, "#[inline]").unwrap(); - writeln!(self.0, "pub unsafe fn {}({})", name, args).unwrap(); + writeln!(self.0, "pub unsafe extern \"C\" fn {}({})", name, args).unwrap(); write_ret(self.0, ret); writeln!(self.0, "{{").unwrap(); writeln!(