Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Update existing bindings

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 submodules

See Managing external libraries and forks for detailed explanations of each command.

Typical workflow

1. Check what’s new upstream

just libs_check_upstream

Example output:

Unchanged libraries: imgui, glfw, hello_imgui, ImCoolBar, ...
Libraries with new changes in official repo: imgui_test_engine

Inspect the new commits:

just libs_log imgui_test_engine

2. 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_engine

This 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_engine

Or call the generation script directly:

python external/imgui_test_engine/bindings/generate_imgui_test_engine.py

Examine 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 . -j

Fix any compilation errors due to breaking changes in the upstream API.

Test in C++:

./demo_imgui_bundle    # Global demo exercising most libraries

Test in Python:

python bindings/imgui_bundle/demos_python/demos_immapp/demo_hello_world.py

Run the test suite:

just test_pytest   # or: pytest
just test_mypy     # or: cd bindings && ./mypy_bindings.sh

See 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_engine

2. Rebase forks on upstream

just libs_rebase imgui
just libs_rebase imgui_test_engine

Or 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 imgui

This runs external/imgui/bindings/generate_imgui.py, which generates bindings for imgui, imgui_internal, and imgui_test_engine.

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 -