Skip to content

Bytecode compiler and virtual machine for a programming language I designed and implemented from scratch

Notifications You must be signed in to change notification settings

JacksonO123/blitz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

255 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blitz

A bytecode compiler and interpreter written in zig.

Dev

Build debug

zig build

Will generate

  • blitzc-debug: compiler
  • blitz-debug: virtual machine
  • bzc-objdump-debug: bytecode disassembler
  • blitz-diff-debug: bytecode diff utility

Make prod

zig build -Dprod

Will generate

  • blitzc: compiler
  • blitz: virtual machine
  • bzc-objdump: bytecode disassembler
  • blitz-diff: bytecode diff utility

Run all test files

Runs from blitzc-debug exe. Expected to have been built already

./test

Compile debug and run all test files

Compiles with zig build in debug mode. Runs from blitzc-debug exe.

./test -c

Run specific test file

Runs from zig run ...

./test [file name]

Run a file that matches a pattern

Use the -p flag, runs from zig run ...

./test -p structs

If you clone to experiment, it might be helpful to source the env.sh file. It adds the bin directory to the path so you have easier access to the executables.

You must also set the environment variable BLITZ_DIR to the root directory of the blitz source

Example:

BLITZ_DIR = "/home/name/code/blitz"

By Jackson Otto

About

Bytecode compiler and virtual machine for a programming language I designed and implemented from scratch

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published