L1VM logo

reliable - fast - secure - type safe - unique - multi platform

$ l1vm hello -q
Hello world! 

// hello.l1com
// Brackets - Hello world!
#include <intr-func.l1h>
(main func)
	(set int64 1 zero 0)
	(set string 13 hello "Hello world!")
	// print string
	(hello :print_s !)
	(:print_n !)
	(zero :exit !)

ko-fi sponsor link
ko-fi donate QR code
The L1VM is a fast, secure and reliable open source VM (GPL). It was built with security in mind. It can run bytecode generated by my Brackets compiler and assembler. Brackets is my own language, which is easy to learn. You can even write programs which are using my SDL/GUI module for graphics output. And you can run multiple threads very easy. The L1VM is truly multi platform OS supporting. The L1VM runs on Linux (x86_64, Arm), BSD OS: OpenBSD, FreeBSD, DragonFly BSD, Windows 10, 11 via WSL or native (MSYS2), macOS and Haiku OS. However on Haiku OS the multithreading can't be used. Maybe this works with later betas. The Brackets programs bytecode can run on all supported OS without changes on them! You can write programs which use my MPFR big numbers module. With this you can set a high precision of numbers in bits. This makes it possible to use thousands or more decimal places in numbers. So you can use my VM for scientific math problems too! See my circle math program. The VM has a preprocessor, assembler and compiler for my own language Brackets. On the Raspberry Pi the GPIO pins can be used with my GPIO module. Also the serial port can be used. The VM has a JIT-compiler which can speed up execution on x86_64 and AARCH 64. The source code is on my GitHub repository: github.com/koder77/l1vm.


1: Hello world, if, if+, else
2: switch
3: math
4: functions
5: input
6: strings
7: loops
8: arrays
9: logical operators
10: cli arguments
11: preprocessor
12: assembly VOL I
13: assembly VOL II
14: assembly VOL III
15: assembly VOL IV
16: assembly VOL V
17: multithreading

L1VM manual PDF
L1VM advanced PDF
L1VM code details PDF

Installation of L1VM

You can clone my GitHub repository with:
git clone http://github.com/koder77/l1vm.git
And then build it with one of the many build scripts. Or you can copy the binaries for Linux x64 or Windows x64 below into the source code repo.

Linux x86_64 binaries

I made static build binaries for Linux x86_64. They should run on any 64 bit Linux system. The current L1VM 3.1.7 builds are here: L1VM Linux binaries.
I did include all modules and their depedencies, so the binaries should run on any Linux system. Here is the sha256 sum of the archive:

d63b2c19fc123d69b70cda6f3e6b3b72e28711541a7928cdaa93fa4c84948308 l1vm-linux-x86-64.zip

Windows x86_64 binaries

I made a port to Windows MSYS2. You need to install MSYS2 to use this! So now the L1VM can run natively on Windows without the need to install the WSL. The 3.1.7 release is here: L1VM Windows MSYS2 binaries.
Here is the sha256 sum of the archive:

02e7d4c1dd20ae422b1ea9361258d5806a7c24cebf4991c2eb1b97f5f4c857ec l1vm-windows-x86-64.zip
Q, 1, zero
@, 0Q, 0
B, 13, hello
@, 8Q, "Hello world!"
Q, 1, helloaddr
@, 21Q, 8Q
loada zero, 0, 0
loada helloaddr, 0, 1
intr0 6, 1, 0, 0
intr0 7, 0, 0, 0
intr0 255, 0, 0, 0

The modules

The L1VM can be expanded by modules (shared libraries). A module has an own API to access the functions from the VM. Here is the list of modules:
Cells - linked neural networks with FANN library
ciphersaber - encrypt/decrypt functions
crypto - libsodium encrypt/decrypt functions
endianess - convert to big endian, or little endian functions
fann - FANN neural networks
file - file module - read/write files
filetools - file functions like copy, create directory, etc.
genann - neural networks module
gpio - Raspberry Pi GPIO module
math - some math functions
math-nofp - math module for use without FPU
math-vect - math on arrays functions
mem - memory allocating for arrays and vectors
mem-obj - memory functions to store different variables into one memory array
mem-vect - C++ vector memory library
mpfr-c++ - MPFR floating point big num library
nanoid - nano ID, create unique IDs
net - TCP/IP sockets module
pigpio - Raspberry Pi GPIO module
process - start a new shell process
rs232-libserialport - RS232 serial port using libserialport
rs232 - RS232 serial port module
sdl 2.0 - graphics primitves module, like pixels, lines..., and GUI with buttons, lists, etc.
string - some string functions
time - get time and date

L1VM - fractal

Here is a GUI example: pov-edit
The gadgets are drawn by my SDL graphics/GUI module.

L1VM - pov edit screenshot