mirror of
https://github.com/Tribufu/TribufuRust
synced 2026-08-09 12:51:06 +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
38
include/tribufu/native.h
Normal file
38
include/tribufu/native.h
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
// Copyright (c) Tribufu. All Rights Reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <tribufu/prelude.h>
|
||||
|
||||
typedef void TribufuApiGetUserInfoCallbackData;
|
||||
|
||||
typedef void (*TribufuApiGetUserInfoCallback)(void*, const TribufuApiGetUserInfoCallbackData*);
|
||||
|
||||
/**
|
||||
* Gets the user agent string for the Tribufu API.
|
||||
*/
|
||||
TRIBUFU_API const char *tribufu_api_get_user_agent(void);
|
||||
|
||||
TRIBUFU_API void tribufu_api_get_user_info(void *context, TribufuApiGetUserInfoCallback callback);
|
||||
|
||||
/**
|
||||
* Gets the version of the Tribufu API.
|
||||
*/
|
||||
TRIBUFU_API const char *tribufu_api_get_version(void);
|
||||
|
||||
/**
|
||||
* Initialize the Tribufu API instance.
|
||||
*
|
||||
* This must be called before any other API functions.
|
||||
*/
|
||||
TRIBUFU_API bool tribufu_api_initialize(void);
|
||||
|
||||
/**
|
||||
* Shutdown the Tribufu API instance.
|
||||
*
|
||||
* This must be called when the API is no longer needed.
|
||||
*/
|
||||
TRIBUFU_API void tribufu_api_shutdown(void);
|
||||
|
||||
TRIBUFU_API void tribufu_free_string(char *ptr);
|
||||
Loading…
Add table
Add a link
Reference in a new issue