samsonium fe5fcd7b96 feat: add compiler installation step
- Ref: add `-debug` suffix to debug targets
- Ref: remove `-release` suffix from release targets
- Feat: add `make install` command
- Feat: add cmake variables:
  - `FZL_TESTS` for enable testing
  - `FZL_SKIP_C` to not build the compiler
  - `FZL_SKIP_VM` to not build the vm
2026-10-29 18:18:35 +03:00
2026-10-21 02:29:27 +03:00
2026-10-28 21:43:56 +03:00
2026-10-29 03:25:48 +03:00
2026-10-11 08:51:05 +03:00
2026-10-28 17:57:18 +03:00
2026-10-29 03:25:48 +03:00
2026-10-29 18:18:35 +03:00
2026-10-29 03:25:48 +03:00

FromZero / Language

README in Russian · Documentation

FromZero/Language is a package consisting of a JIT compiler and a virtual machine for the FZL language.

Features

At the moment, the language has the following capabilities:

  • Builtin printline function for printing argument to stdout
  • String and numeric literals
  • Arithmetic operations: addition, subtraction, multiplication, division, modulo, power
  • Variables declaration with following types:
    • uint, int - for the machine-word size integers
    • i8..i64 - integers with specified size
    • u8..u64 - unsigned integers with specified size
    • str - strings
    • bool - boolean
  • Assignments
  • Functions
  • Classes and objects

Working examples of code can be found in exl/ directory.

Building

  1. Clone the repository: git clone https://git.samsonium.dev/samsonium/fz-lang.git
  2. Build: make build-release

After this, a "build" directory will appear in the project root. It will contain two executable files:

  • fzc - a compiler
  • fz - virtual machine

Both executables have usage help that can be displayed using --help flag (or -h).

Development guideline

You need a code editor with Clang LSP support because of .clang-format file in the project root. This file provides set up codestyle rules.

There is two targets in Makefile for debugging purposes: build-c for the compiler and build-vm for the VM. Each target can be called with FILE variable. For example:

$ make debug-c FILE=exl/hw.fzs

To test new features, use test make target and the tests, defined in CMakeLists.txt.

S
Description
Programming language with AoT compiler and VM
Readme
604 KiB
Languages
C 97.6%
CMake 2.2%
Makefile 0.2%