Quick reference: justfile commands¶
The justfile provides shortcuts for the most common library management tasks:
just libs_info # Show all libraries with their remotes (fork / official)
just libs_check_upstream # Check which forks have new upstream changes
just libs_log <name> # Show new upstream commits for a library
just libs_rebase <name> # Tag current state, then rebase fork on upstream
just libs_tag <name> # Push a date tag to a fork
just libs_bindings <name> # Regenerate bindings for one library
just libs_bindings_all # Regenerate all bindings
just libs_reattach # Reattach all submodules to their branches
just libs_fetch # Fetch all remotes
just libs_pull # Pull all submodulesSee Managing external libraries and forks for detailed explanations of each command.
Typical workflow¶
1. Check what’s new upstream¶
just libs_check_upstreamExample output:
Unchanged libraries: imgui, glfw, hello_imgui, ImCoolBar, ...
Libraries with new changes in official repo: imgui_test_engineInspect the new commits:
just libs_log imgui_test_engine2. Update the library¶
For a non-forked library (e.g. immvision, glfw):
cd external/immvision/immvision
git pull
cd -For a forked library (e.g. imgui_test_engine): tag the current state, then rebase on upstream:
just libs_rebase imgui_test_engineThis is equivalent to:
cd external/imgui_test_engine/imgui_test_engine
git tag "bundle_$(date +%Y%m%d)"
git push fork --tags
git rebase official/main
cd -3. Regenerate bindings¶
just libs_bindings imgui_test_engineOr call the generation script directly:
python external/imgui_test_engine/bindings/generate_imgui_test_engine.pyExamine the changes in the generated .cpp and .pyi files with git diff.
4. Compile & test¶
If you don’t have a build directory yet, see Getting Started or Build Guide.
Build:
cd builds/my_build
cmake --build . -jFix any compilation errors due to breaking changes in the upstream API.
Test in C++:
./demo_imgui_bundle # Global demo exercising most librariesTest in Python:
python bindings/imgui_bundle/demos_python/demos_immapp/demo_hello_world.pyRun the test suite:
just test_pytest # or: pytest
just test_mypy # or: cd bindings && ./mypy_bindings.shSee Testing for more details.
5. Push fork changes (if applicable)¶
If the fork submodule was modified during rebase or to fix binding compatibility:
cd external/imgui_test_engine/imgui_test_engine
git push fork
cd -6. Commit¶
git add -A
git commit -m "Update imgui_test_engine and regenerate bindings"Example: update imgui & bindings (detailed)¶
imgui and imgui_test_engine use forks. The full update process:
1. Tag current fork state
just libs_tag imgui
just libs_tag imgui_test_engine2. Rebase forks on upstream
just libs_rebase imgui
just libs_rebase imgui_test_engineOr manually:
cd external/imgui/imgui
git rebase official/docking
cd -
cd external/imgui_test_engine/imgui_test_engine
git rebase official/main
cd -3. Regenerate bindings
just libs_bindings imguiThis runs external
4. Examine, build, and test (see steps 3-4 above)
5. Push updated forks
cd external/imgui/imgui && git push fork && cd -
cd external/imgui_test_engine/imgui_test_engine && git push fork && cd -