Skip to content
Enoch-199811 edited this page Aug 9, 2026 · 6 revisions

BioLang

A stream-oriented programming language implemented in C — an interpreter plus a source-embedding compiler. Every operation is a request that may be refused (res / cause / ref); programs are built from composable streams.

  • Streams: Unistream, Comstream, Remstream, Objstream, Threadstream, Timestream, IOStream, ... — signature streams, forked implementations, classes-as-streams.
  • Typed smart references: 28 reference types (permissions r/w/m/ rw/rm/wm/rwm × follows u/f/a/t). Read with get p, write with p = v, move the pointer with p++.
  • need assumptions: on-demand provider bundling from src/ + utils/ + dependencies; project manifests (package.toml) with git/HTTP/local deps.
  • Annotations: @unfork (stream cannot be forked), @onlyread (no write methods may be called), @read / @write (declare a method read/write).
  • Packaging: .img (custom raw image, stores permissions) and .zip (native STORE writer — no external tools needed).
  • Cross-platform: Linux, macOS and Windows (experimental) binaries built with make bin via zig; cooperative threads (ucontext / Win32 fibers).

Quick start

make                        # build → bin/bio
make PROFILE=release        # optimized build

bin/bio examples/01-hello.bio   # run an example
bin/bio shell build examples/01-hello.bio   # compile to a standalone binary

Project build & package

bio init <name>             # create a project skeleton
bio build [dir] -s          # build → standalone executable
bio build [dir] -m          # build → .img package (app + platform CLI + libs)
bio build [dir] -m out.zip  # build → .zip package
bio run [dir]               # run a project

Packaging

bio pack <out.img|.zip> [--entry NAME] <files...>
bio unpack <pkg> [dir]
bio run pkg.img | pkg.zip   # run a packaged entry
  • .img — custom BIOIMG1 raw image: no compression, fully seekable, stores file permissions (executables keep their executable bit).
  • .zip — standard zip, written/read natively (STORE method); falls back to the system unzip for legacy deflate archives.

Platform support

Platform Status
Linux (x86-64, aarch64) ✅ Fully supported
macOS (Intel) ⚠️ Works (ucontext deprecation warnings)
macOS (Apple Silicon) ⚠️ Prebuilt binaries work; source builds hit Apple ucontext bugs
Windows (x86-32/64, arm64) ⚠️ Experimental (fiber backend + LoadLibrary shim)

Links

Clone this wiki locally