add logging to plugin example, improve swap, and add some consts

This commit is contained in:
Mark McCaskey
2019-07-31 12:51:55 +09:00
parent c099ed54e9
commit b407633366
5 changed files with 150 additions and 13 deletions

View File

@ -1,5 +1,6 @@
extern "C" {
fn it_works() -> i32;
fn initialize();
}
#[no_mangle]
@ -9,4 +10,6 @@ pub fn plugin_entrypoint(n: i32) -> i32 {
result + n
}
pub fn main() {}
pub fn main() {
unsafe { initialize() };
}