Skip to content

Commit

Permalink
Added an external hack function
Browse files Browse the repository at this point in the history
  • Loading branch information
bendk committed Feb 23, 2022
1 parent 9340620 commit db2f6e4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions uniffi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,16 @@ where
}
}

// This function is not intended to be called, but can be used as for the to workaround
// https://github.com/rust-lang/rust/issues/50007
//
// Basically, if another library adds uniffi as an external crate, then builds into a dylib, that
// library normally won't have the symbols from uniffi. However, if that library calls an extern
// function from function, then it *will* have the symbols. So this is a dummy function that the
// other library can use to call to work around 50007.
#[no_mangle]
pub extern "C" fn extern_symbol_hack() {}

#[cfg(test)]
mod test {
use super::*;
Expand Down

0 comments on commit db2f6e4

Please sign in to comment.