Skip to content

Import packages as bytecode for mixins - #18

Merged
S42yt merged 2 commits into
masterfrom
feat/app-packages
Sep 30, 2026
Merged

S42yt merged 2 commits into
masterfrom
feat/app-packages

Conversation

@S42yt

@S42yt S42yt commented Sep 30, 2026

Copy link
Copy Markdown
Collaborator

Apps can now be used by other projects: imported as source, or as bytecode so they can be changed with mixins.

  • .bvmc imports: import "github.com/you/game.bvmc" compiles the package to a bytecode library in its build/ folder, rebuilding only when its sources change. The package's own package imports resolve through the project's burn.lock. A project importing its own bytecode, or a cycle of bytecode imports, is reported clearly.
  • Native startup: native executables now start every embedded bytecode library at startup, as bvm and .bar archives already did. Before, a program made only of mixins printed nothing natively, because libraries were only started on the first call into them.
  • Output folders: burn build -o path/to/file creates missing folders.
  • Docs: there's a new "Apps as packages, and mixins" section in Projects and packages.
  • Tests: a new suite test covers a game app changed by a mod through a mixin, on bvm and natively, including a rebuild after the game's source changes and the self-import error. cargo test --release passes and clippy is clean.

This branch is built on #17, so its diff includes #17's commit until #17 is merged. burnlang/ash#3 depends on this PR.

🤖 Generated with Claude Code

https://claude.ai/code/session_01PCXUjgpGnka9y7AHKfnN3w


Generated by Claude Code

… complete import paths

Programs stop with an out of memory error when they keep more than 3/4 of the
computer's memory alive (BURN_MAX_HEAP_MB), on bvm and in native executables.
burn lsp caps its own address space at 4 GiB on Linux (BURN_LSP_MEMORY_MB).
The language server completes import paths: standard modules, the project's
packages and their files, and local files. An ambiguous name no longer also
reports that it cannot be found. The VS Code extension finds burnup's
~/.burn/bin/burn and gives the server a PATH that contains it.
…ative executables

import "<package>.bvmc" compiles the package to a bytecode library in its
build/ folder, again only when its sources change, using the project's lock for
its own packages. Native executables now start every embedded bytecode library
at startup like bvm does, so a program made only of mixins runs the changed app.
burn build -o creates missing output folders.
@S42yt
S42yt merged commit 09bef17 into master Sep 30, 2026
1 check 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