Home

Awesome

<p align="center"> <img src="https://github.com/buzz-language/buzz/raw/main/logo.png" alt="buzz" width="204" height="204"> </p>

👨‍🚀 buzz

A small/lightweight statically typed scripting language written in Zig

<p align="center"> <img src="https://github.com/buzz-language/buzz/raw/main/example.png" alt="buzz code example"> </p> <p align="center"> <a href="https://buzz-lang.dev">Homepage</a> — <a href="https://discord.gg/VnMdNSdpNV">Discord</a> </p>

Features

How to build and install

Latest zig version supported: 0.14.0-dev.2162+3054486d1

Requirements

Build

  1. Clone the project: git clone https://github.com/buzz-language/buzz <buzz_dir>
  2. Checkout submodules: git submodule update --init
  3. Copy pcre2_chartables:
ln -s vendors/pcre2/src/pcre2_chartables.c.dist vendors/pcre2/src/pcre2_chartables.c
  1. Configure pcre2:
cd vendors/pcre2
./autogen.sh
./configure
cd ../..
  1. Have fun: zig build run -- <myscript.buzz> to run a script or zig build run to start the REPL

Install

# install locally at ~/.local
zig build -Doptimize=ReleaseSafe install -p ~/.local

# install globally at /usr/local
sudo zig build -Doptimize=ReleaseSafe install -p /usr/local

If you're usage if performance critical (game dev for example), you can build using -Doptimize=ReleaseFast.

Remember to modify PATH to include the bin directory where it is installed. For example, export PATH=PATH:/home/xxx/.local/bin. You can then run buzz with buzz <myscript.buzz>. Or you can simply run buzz to start the REPL.

Additionally, install the VS Code extension to get syntax highlighting. If you don't use VS Code but your editor supports TextMate grammar files, you can use that.