mirror of
https://github.com/tribufu/sdk-rust
synced 2025-06-15 18:54:19 +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:
3
scripts/cbindgen.ps1
Normal file
3
scripts/cbindgen.ps1
Normal 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
10
scripts/unix/premake.sh
Normal 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
12
scripts/windows/build.ps1
Normal 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"
|
3
scripts/windows/premake.bat
Normal file
3
scripts/windows/premake.bat
Normal file
@ -0,0 +1,3 @@
|
||||
@echo off
|
||||
|
||||
call .\vendor\premake-core\windows\premake5.exe vs2022
|
Reference in New Issue
Block a user