Skip to content

Releases: braamix/core

Braam 0.7

Choose a tag to compare

@sergev sergev released this 26 Aug 02:47

An operating system in a browser tab — kernel, filesystem, terminal, shell and
45 programs, written from scratch in freestanding C++20 and compiled to
WebAssembly. It deploys as a static site: no server, no special headers.
kernel.wasm is 182 KiB.

0.6 was about what a shell script can count on. 0.7 is about what a program
being ported here assumes is already underneath it, before it does anything of
its own.

What changed

  • /dev is a filesystem, with four devices in it. /dev/random hands out
    the host's own bytes for as long as anything reads; /dev/urandom is a
    ChaCha20 with fast key erasure, seeded once; /dev/null and /dev/zero are
    what they are everywhere else. cmd >/dev/null 2>/dev/null works, and so does
    either stage of a pipeline redirecting there.
  • A program can read a character. src/proc/file.h is a buffered stream —
    get() a codepoint, put(), getline(), a sticky error, a flush at exit —
    so while ((c = get()) ...) is finally an expressible loop. It costs no
    syscall, and ten programs stopped paying one per row of output.
  • $RANDOM, and it is a CSPRNG. Sys::Random is answered in the calling
    process's own worker, so it costs no round trip at all.
  • fstat on a descriptor. Sys::FStat, which is what /bin/unzip needed to
    stop sizing an archive by path and then reading it by descriptor.
  • An exclusive create. O_EXCL, and /bin/edit now writes beside the file
    and renames — a save that is killed leaves the old text, not an empty file.
  • No cell holds a codepoint the renderer can throw on. cat of a binary
    file used to kill the terminal; the UTF-8 decoder now validates what it had
    been letting through for eight milestones.
  • The browser's own menus reach the terminal. Edit → Select All, Copy,
    Cut and Paste work from the menu bar, and the right button raises the
    browser's text menu instead of the one it has for an image.
  • mount takes a special and a mount point — and refuses it, on purpose:
    there is nothing yet that turns a special into a filesystem, so it says so
    rather than being silently absent.

The process ABI moved

PROC_ABI is 19, up from 18. A program built against the 0.6 SDK is refused
at exec on a 0.7 kernel — a diagnostic, not a crash. Rebuild against the SDK
below, and re-sign any repository whose packages you rebuilt.

The archives

braam-0.7.201-af23af1.zip — the site. Unpack it in a web root and serve it.
braam-sdk-0.7.201-af23af1.zip — the SDK, for building a program against an
installed prefix.

Braam 0.6

Choose a tag to compare

@sergev sergev released this 24 Aug 07:33

An operating system in a browser tab — kernel, filesystem, terminal, shell and
45 programs, written from scratch in freestanding C++20 and compiled to
WebAssembly. It deploys as a static site: no server, no special headers.
kernel.wasm is 175 KiB.

0.5 was about what a program can count on once it is here. 0.6 is about what a
shell script can count on, which turned out to be less.

What changed

  • cp, basename, dirname and truncate. Four programs a script has
    always been entitled to assume. The copy behind cp was already written three
    times over in the tree and now lives once, in src/proc/io.h.
  • A descriptor can be told where to be. Sys::Seek, and an optional length
    on Sys::Read. The position had always existed below the process; nothing
    could name it.
  • A read is a span, not half a kilobyte. SYS_READ_MAX is 65,532 where the
    old chunk was 512.
  • Sys::Truncate, the operation /bin/truncate calls. It takes GNU's whole
    SIZE operand: +, -, <, >, /, %, and K/M/G/T against KB/MB/GB/TB.
  • pkg install and pkg upgrade take operands. install now moves what
    you name instead of reporting unchanged; upgrade accepts the names to
    upgrade, and an operand takes the pin off. install moves what you name,
    upgrade moves the lot.
  • ScreenClear checks the screen's owner — the last terminal operation with
    no authorisation on it. It now refuses while another process holds the
    alternate screen.
  • The package repository has an address of its own,
    https://braamix.github.io. The keys did not change, only the machine serving
    what they signed.

The process ABI moved

PROC_ABI is 18, up from 17. A program built against the 0.5 SDK is refused
at exec on a 0.6 kernel — a diagnostic, not a crash. Rebuild against the SDK
below, and re-sign any repository whose packages you rebuilt.

The archives

braam-0.6.182-92b91d6.zip — the site. Unpack it in a web root and serve it.
braam-sdk-0.6.182-92b91d6.zip — the SDK, for building a program against an
installed prefix.