Blink-based Low End VMs?

Not_OlesNot_Oles Hosting ProviderContent Writer
edited January 18 in Technical

Reference: https://github.com/jart/blink
See also: https://news.ycombinator.com/item?id=33675462

Is it too crazy to imagine that Low End VMs could be blink-based?

# Clone, compile, and test blink
tom@ultra:~ $ date
Sun Jan 18 20:43:13 UTC 2026
tom@ultra:~ $ uname -rs
FreeBSD 16.0-CURRENT
tom@ultra:~ $ git clone https://github.com/jart/blink.git
Cloning into 'blink'...
remote: Enumerating objects: 11448, done.
remote: Counting objects: 100% (2618/2618), done.
remote: Compressing objects: 100% (255/255), done.
remote: Total 11448 (delta 2471), reused 2363 (delta 2363), pack-reused 8830 (from 2)
Receiving objects: 100% (11448/11448), 19.77 MiB | 34.96 MiB/s, done.
Resolving deltas: 100% (6032/6032), done.
tom@ultra:~ $ tom@ultra:~ $ cd blink
tom@ultra:~/blink $ ./configure # Not yet using --enable-vfs (see note below)
  [ . . . ]
tom@ultra:~/blink $ gmake -j 4
  [ . . . ]
cc -pthread -Wl,-z,noseparate-code -Wl,-z,norelro -Wl,-z,common-page-size=65536,-z,max-page-size=65536 -pie  -Wl,--image-base=0x23000000  o//blink/blinkenlights.o o//blink/blink.a  -L/usr/local/lib -lunwind -L/lib -lz -lrt -lm  -o o//blink/blinkenlights
cc -pthread -Wl,-z,noseparate-code -Wl,-z,norelro -Wl,-z,common-page-size=65536,-z,max-page-size=65536 -pie  -Wl,--image-base=0x23000000  o//blink/blink.o o//blink/blink.a  -L/usr/local/lib -lunwind -L/lib -lz -lrt -lm  -o o//blink/blink
touch o/ok

Your Blink Virtual Machine successfully compiled:

  o//blink/blink
  o//blink/blinkenlights

You may also want to run:

  make check
  doas make install

tom@ultra:~/blink $ cd o/blink
tom@ultra:~/blink/o/blink $ ls -l blink blinkenlights
-rwxr-xr-x  1 tom tom 2767368 Jan 18 20:49 blink
-rwxr-xr-x  1 tom tom 3149200 Jan 18 20:49 blinkenlights
tom@ultra:~/blink/o/blink $ ./blink -v
Blink Virtual Machine 1.1.0 (Sun Jan 18 20:49:28 UTC 2026)
Copyright (c) 2023 Justine Alexandra Roberts Tunney
Blink comes with absolutely NO WARRANTY of any kind.
You may redistribute copies of Blink under the ISC License.
For more information, see the file named LICENSE.
Toolchain: FreeBSD clang version 19.1.7 (https://github.com/llvm/llvm-project.git llvmorg-19.1.7-0-gcd708029e0b2)
Revision: #621 f006a4fc6f9b8de9272504fdff0dbbe5ce5dc580
Config: ./configure MODE= 
tom@ultra:~/blink/o/blink $ ./blink /home/tom/blink/third_party/cosmo/tinyhello.elf
hello world
tom@ultra:~/blink/o/blink $ 

From the jart/blink README.md :

If you want to run a full chroot'd Linux distro and require correct handling of absolute symlinks, displaying of certain values in /proc, and so on, and you don't mind paying a small price in terms of size and performance, you can enable the emulated VFS feature by using the following configuration:

./configure --enable-vfs

I hope everyone gets the servers they want!

Thanked by (1)tmntwitw
Sign In or Register to comment.