mirror of
https://github.com/Tribufu/TribufuRust
synced 2026-08-08 12:21:07 +00:00
Merge Rust, C and C++ SDKs (#4)
* Generate native bindings from rust crate * Add native instance and runtime statics * Update README.md
This commit is contained in:
parent
738f9c947b
commit
a392dbb119
39 changed files with 1213 additions and 24 deletions
19
src/native/models.rs
Normal file
19
src/native/models.rs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
// Copyright (c) Tribufu. All Rights Reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
use libc::c_void;
|
||||
|
||||
pub struct TribufuApiCallbackContext(pub(crate) *mut c_void);
|
||||
|
||||
impl TribufuApiCallbackContext {
|
||||
pub(crate) fn as_ptr(&self) -> *mut c_void {
|
||||
self.0
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl Send for TribufuApiCallbackContext {}
|
||||
unsafe impl Sync for TribufuApiCallbackContext {}
|
||||
|
||||
pub type TribufuApiGetUserInfoCallbackData = c_void;
|
||||
pub type TribufuApiGetUserInfoCallback =
|
||||
extern "C" fn(*mut c_void, *const TribufuApiGetUserInfoCallbackData);
|
||||
Loading…
Add table
Add a link
Reference in a new issue