]> git.puffer.fish Git - matthieu/nova.git/commitdiff
set public function as unsafe
authoricecodder <git@icecodder.me>
Wed, 4 Jan 2023 12:48:57 +0000 (13:48 +0100)
committerGitHub <noreply@github.com>
Wed, 4 Jan 2023 12:48:57 +0000 (13:48 +0100)
exes/all/src/lib.rs

index f6b527d6c0d2d679b5a4dab1f0de33d185385b0a..29dd6a0c292e19770fc19bbdd6ac678d162fff68 100644 (file)
@@ -98,7 +98,7 @@ pub unsafe extern "C" fn stop_instance(instance: *mut AllInOneInstance) {
 #[no_mangle]
 /// Initialized a new nova instance and an async runtime (tokio reactor)
 /// Dont forget to stop this instance using `stop_instance`
-pub extern "C" fn start_instance(config: *const libc::c_char) -> *mut AllInOneInstance {
+pub unsafe extern "C" fn start_instance(config: *const libc::c_char) -> *mut AllInOneInstance {
     let buf_name = unsafe { CStr::from_ptr(config).to_bytes() };
     let settings = String::from_utf8(buf_name.to_vec()).unwrap();
     let (stop, trigger_stop) = oneshot::channel();