Skip to content

burnup, the Burn version manager, written in Burn - #2

Merged
S42yt merged 2 commits into
masterfrom
feat/version-manager
Sep 30, 2026
Merged

S42yt merged 2 commits into
masterfrom
feat/version-manager

Conversation

@S42yt

@S42yt S42yt commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

burnup is now a rustup-style version manager, written in Burn, that compiles to a ~700 KB native binary.

Versions

  • Install:
    • burnup install [version...] accepts a release (26.1 means the newest 26.1.x; v26.1.0 and ^26.1 also work), latest, a branch like master, or a commit.
    • Releases are downloaded prebuilt from burn's GitHub releases.
    • Branches and commits are built from source with burn's scripts/package.sh, reusing one cached clone so later builds are incremental.
  • Switch and list: burnup default, burnup list, burnup list --remote, burnup uninstall.
  • Update: burnup update rebuilds branch versions whose commit moved, points out a newer release, and updates ash.
  • Local builds: burnup link <name> <dir> adds a local build as a version.

Shims and projects

  • Shims: ~/.burn/bin/{burn,burni,burnc,burnfmt,burn-lsp,bvm} are small shims that run burnup proxy <tool>, which picks the active version. Each command costs about 2–3 ms extra.
  • Choosing a version: the order is BURN_TOOLCHAIN, then the nearest burn.toml with burn = "…" in [package] or a .burn-version file, then the default. A pinned version that isn't installed yet is installed on first use.
  • Project commands:
    • burnup pin <version> writes the pin into burn.toml, or .burn-version outside a project.
    • burnup show and burnup which report which version applies.
    • burnup run <version> <cmd…> runs one command with another version.

Setup

  • Installer: install.sh is now a small bootstrap. It downloads a prebuilt burnup; otherwise it builds Burn once into toolchains/<ref> and compiles burnup with it (falling back to the interpreter when native compilation isn't available). Then it runs burnup setup.
  • burnup setup: picks or installs a default, writes the shims, builds ash into ~/.burn/tools/github.com/burnlang/ash (the same place ash install -g uses), and adds PATH lines to the shell profiles. It also replaces an installation made by the old installer.
  • Self-management:
    • burnup self update fetches a prebuilt burnup, or rebuilds it with the default Burn.
    • burnup self uninstall removes everything, including the PATH lines. It deletes all of ~/.burn only if burnup created it.

Tests and CI

  • Unit tests: tests/main.bn.
  • End-to-end tests: tests/e2e.sh builds a local Burn git repo with tags v1.0.0, v1.1.0 and v2.0.0-beta, plus file:// release archives made from the real toolchain. It covers:
    • setup and the shims;
    • latest resolving to the newest stable release, and prefix matching;
    • default switching and which;
    • pinning in burn.toml and in .burn-version, including subfolders;
    • BURN_TOOLCHAIN, run, and auto-install of a pinned version that was uninstalled;
    • the missing-version error, list --remote, link, and self uninstall.
  • Results: the end-to-end tests pass with native burnup and on the interpreter. A from-source bootstrap from GitHub also worked locally: Burn master built, burnup compiled, ash installed, ash init and ash build ran, and self uninstall left the home directory clean.
  • CI: runs the tests on native and interpreter, plus a from-source bootstrap job. The release workflow builds burnup-linux-x86_64 and burnup-macos-x86_64 on v* tags.
  • Lint: shellcheck and actionlint are clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01PCXUjgpGnka9y7AHKfnN3w


Generated by Claude Code

@S42yt
S42yt merged commit 93216eb into master Sep 30, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant