bronze

module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2026 License: MIT

README

bronze

Bronze is a statically typed, garbage-collected programming language for backend work, built to be enjoyable to program in. Files end in .brz.

func main() -> Int
{
    print("hello, world")
    return 0
}

Documentation: https://axelgard.github.io/bronze/

It is early days: the language design lives in doc/, programs you can run in examples/, and the implementation is a tree-walking interpreter written in Go. See the milestones for what each version adds.

Install

On macOS or Linux, download the latest release into ~/.local/bin:

curl -fsSL https://raw.githubusercontent.com/AxelGard/bronze/master/scripts/get-bronze.sh | sh

Set BRONZE_VERSION=v0.1.0 for a specific version, or BRONZE_BIN=... for another directory. The archives are also on the releases page. On macOS, a binary downloaded with a browser is blocked until you run xattr -d com.apple.quarantine bronze; the script doesn't need that.

With Go 1.21 or later, you can also build it yourself:

go install github.com/AxelGard/bronze/cmd/bronze@latest

Then try it:

bronze run examples/projects/bank.brz
bronze check my_program.brz

For editor support (highlighting and the language server), see editors/nvim.

Working on Bronze

make build              # builds bin/bronze
make test               # go test ./...
make install            # bronze into ~/.local/bin, and the Neovim parser
bin/bronze run examples/core.brz

Directories

Path Synopsis
cmd
bronze command
Command bronze is the Bronze language tool: it checks and runs .brz files.
Command bronze is the Bronze language tool: it checks and runs .brz files.
internal
ast
Package ast defines the Bronze syntax tree.
Package ast defines the Bronze syntax tree.
check
Package check resolves names and checks types.
Package check resolves names and checks types.
cli
Package cli implements the bronze command: run, check and version.
Package cli implements the bronze command: run, check and version.
diag
Package diag holds source positions and diagnostics (errors, warnings, hints) and formats them for the terminal:
Package diag holds source positions and diagnostics (errors, warnings, hints) and formats them for the terminal:
interp
Package interp is a tree-walking interpreter for checked Bronze programs.
Package interp is a tree-walking interpreter for checked Bronze programs.
lexer
Package lexer turns Bronze source text into tokens.
Package lexer turns Bronze source text into tokens.
lsp
Package lsp is the Bronze language server: `bronze lsp` talks the Language Server Protocol over stdin and stdout.
Package lsp is the Bronze language server: `bronze lsp` talks the Language Server Protocol over stdin and stdout.
parser
Package parser builds an ast from tokens.
Package parser builds an ast from tokens.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL