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
39 changed files with 1213 additions and 24 deletions

3
scripts/cbindgen.ps1 Normal file
View File

@ -0,0 +1,3 @@
#!/usr/bin/env sh
cbindgen --config ./config/cbindgen.toml --crate tribufu-sdk --output ./include/tribufu/native.h

10
scripts/unix/premake.sh Normal file
View File

@ -0,0 +1,10 @@
#!/usr/bin/env sh
if [ "$(expr substr $(uname -s) 1 5)" = "Linux" ]
then
./vendor/premake-core/linux/premake5 gmake2
elif [ "$(uname)" = "Darwin" ]
then
./vendor/premake-core/mac/premake5 xcode4
fi

12
scripts/windows/build.ps1 Normal file
View File

@ -0,0 +1,12 @@
#!/usr/bin/env pwsh
echo "Building for win-x64"
cargo build --workspace
New-Item "bin/win-x64" -ItemType Directory -Force
Remove-Item -Path "bin/win-x64/*" -Force -Recurse
Copy-Item -Path "target/debug/tribufu_sdk.dll.lib" -Destination "bin/win-x64/tribufu_sdk.lib"
Copy-Item -Path "target/debug/tribufu_sdk.dll" -Destination "bin/win-x64/tribufu_sdk.dll"
msbuild /p:Configuration="debug" /p:Platform="win-x64"

View File

@ -0,0 +1,3 @@
@echo off
call .\vendor\premake-core\windows\premake5.exe vs2022