-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started
nick_tsaizer edited this page Apr 25, 2026
·
3 revisions
This page gets Tensor Planner built, tested, and packaged.
Core native build:
- CMake 3.20+
- C++20 compiler
Optional binding checks:
- .NET SDK for C# smoke tests and wrapper builds
- Unity 2019.4+ for the Unity package
- Jai compiler for the Jai module checks
-
x86_64-w64-mingw32-g++for Windows cross-builds from Linux
git clone https://github.com/NickTsaizer/tensor_planner.git
cd tensor_plannercmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --parallel
ctest --test-dir build --output-on-failureThe build creates the shared library and smoke-test executables:
tensor_plannertensor_planner_solver_smoketensor_planner_logistics_smoketensor_planner_crafting_smoketensor_planner_cpp_fluent_smoke
dotnet run --project csharp/TensorPlanner.Smoke/TensorPlanner.Smoke.csproj -c ReleaseThe C# wrapper uses DllImport("tensor_planner"), so the native library must be
discoverable by the runtime when used outside the repository's normal build/test
setup.
The Jai check expects native libraries in module-local locations.
cmake -S . -B build/Release-linux -DCMAKE_BUILD_TYPE=Release
cmake --build build/Release-linux --parallel
cp build/Release-linux/libtensor_planner.so modules/Tensor_Planner/generated/libtensor_planner.so
cp build/Release-linux/libtensor_planner.so modules/Tensor_Planner/libtensor_planner.so
jai modules/Tensor_Planner/tests/crafting.jai
modules/Tensor_Planner/tests/craftingExpected behavior: the check compiles, runs, and logs a solved plan.
Use the POSIX package script on Linux/macOS or shells that provide sh:
sh ./build.sh -release -target unity cpp sharp jai -o ./distUse the PowerShell package script on Windows:
pwsh ./build.ps1 -release -os windows -target unity cpp sharp jai -o ./distDefaults:
-
-releaseis the default if neither-releasenor-debugis passed. - target OS defaults to the host OS.
- build-process files are cleaned after packaging unless
-no-cleanis passed.
Useful variants:
sh ./build.sh -target unity cpp -os linux windows -o ./dist
sh ./build.sh -debug -target cpp sharp -o ./dist -no-cleanpwsh ./build.ps1 -target unity cpp -os windows -o ./dist
pwsh ./build.ps1 -debug -target cpp sharp -o ./dist -no-cleanDepending on selected targets, dist/ can contain:
dist/
├── cpp/ headers, native library, optional CMake config
├── sharp/ TensorPlanner.dll plus native runtime assets
├── unity/ dev.nick.tensor-planner Unity package
└── jai/ Tensor_Planner module staging
Continue to Core Concepts for the planning model.