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:
Guilherme Werner 2025-06-11 12:49:31 -03:00 committed by GitHub
parent 738f9c947b
commit a392dbb119
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
39 changed files with 1213 additions and 24 deletions

38
include/tribufu/native.h Normal file
View 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);