We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 71330dc commit ee2bb48Copy full SHA for ee2bb48
crates/c/src/lib.rs
@@ -316,6 +316,7 @@ impl WorldGenerator for C {
316
self.src.c_adapters,
317
"
318
extern void {linking_symbol}(void);
319
+ __attribute__((used))
320
void {linking_symbol}_public_use_in_this_compilation_unit(void) {{
321
{linking_symbol}();
322
}}
crates/cpp/src/lib.rs
@@ -654,7 +654,8 @@ impl WorldGenerator for Cpp {
654
uwrite!(
655
c_str.src,
656
"#ifdef __wasm32__
657
- extern void {linking_symbol}(void);
+ extern \"C\" void {linking_symbol}(void);
658
659
660
661
0 commit comments