| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470 |
- <!doctype html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <title>Userland | NebOS Architecture</title>
- <meta name="description" content="NebOS userland: ring-3 address space, ELF loading, the syscall ABI, the shell and PATH dispatch, the 47-command pack, GUI applications and the browser.">
- <link rel="icon" href="favicon.svg" type="image/svg+xml">
- <link rel="stylesheet" href="style.css">
- </head>
- <body>
- <a class="skip" href="#main">Skip to content</a>
- <header class="site-header">
- <a class="brand" href="index.html">
- <span class="brand-mark" aria-hidden="true"></span>
- <span>NebOS <span class="brand-sub">Architecture</span></span>
- </a>
- <nav class="site-nav" aria-label="Architecture sections">
- <a href="index.html">Overview</a>
- <a href="boot.html">Boot</a>
- <a href="memory.html">Memory</a>
- <a href="cpu.html">CPU</a>
- <a href="drivers.html">Drivers</a>
- <a href="filesystems.html">Filesystems</a>
- <a href="graphics.html">Graphics</a>
- <a href="network.html">Network</a>
- <a href="userland.html" aria-current="page">Userland</a>
- <a href="development.html">Development</a>
- </nav>
- </header>
- <main id="main" class="page">
- <div class="page-head">
- <p class="kicker">Userland</p>
- <h1>Commands are ELFs. The shell is a dispatcher.</h1>
- <p class="lede">
- Ring-3 programs are static ELFs linked at <code>0x40000000</code>.
- The shell resolves a command name against builtins, the per-terminal
- PATH and the kernel command registry, then spawns it with one
- argument string. The command pack supplies 47 PATH commands by default.
- </p>
- <div class="meta">
- <span class="pill">int 0x80</span>
- <span class="pill">one string argument</span>
- <span class="pill">47 PATH commands</span>
- <span class="pill">8 TTYs · 8 windows</span>
- </div>
- </div>
- <nav class="toc" aria-label="On this page">
- <h2>On this page</h2>
- <ul>
- <li><a href="#model">Ring-3 model</a></li>
- <li><a href="#libc">Ring-3 libc</a></li>
- <li><a href="#spawn">Spawn path</a></li>
- <li><a href="#syscalls">Syscall ABI</a></li>
- <li><a href="#shell">Shell & PATH</a></li>
- <li><a href="#registry">Kernel commands</a></li>
- <li><a href="#pack">Command pack</a></li>
- <li><a href="#apps">GUI applications</a></li>
- <li><a href="#browser">Browser</a></li>
- <li><a href="#sources">Source map</a></li>
- </ul>
- </nav>
- <section id="model">
- <h2>Ring-3 model</h2>
- <p>
- A user process gets a page directory cloned from the kernel identity
- map, a 4 MB image/stack window at <code>0x40000000</code>, an optional
- 4 MB canvas at <code>0x50000000</code> and a growable heap at
- <code>0x60000000</code>. Program, stack and heap frames come from
- highmem (above 1 GB) when the machine has it. The kernel remains mapped because paging is
- identity-mapped; this is isolation in privilege level only, not a
- separate address space.
- </p>
- <ul>
- <li><strong>Optional libc.</strong> Commands include <span class="file">ucmd_lib.h</span> for syscall wrappers; commands that need allocation or standard string/stdlib functions link the in-tree <span class="file">libc.a</span>.</li>
- <li><strong>One argument.</strong> The shell passes the raw remainder of the line as a C string at the top of the user stack; <code>_start(const char *arg)</code> needs no crt0.</li>
- <li><strong>Inherited context.</strong> Each process inherits the spawning terminal's cwd and TTY id; the file syscalls resolve relative paths against the PCB cwd.</li>
- <li><strong>Page-fault policy.</strong> A ring-3 fault kills the process and prints a short message; it does not halt the kernel.</li>
- </ul>
- <div class="note">
- <p><strong>Not a sandbox.</strong> Because physical and virtual addresses
- are identical and the kernel is mapped, a ring-3 bug can read or write
- any mapped kernel page. The privilege boundary protects against
- accidental corruption from ordinary code, not against malicious code.</p>
- </div>
- </section>
- <section id="libc">
- <h2>Ring-3 libc</h2>
- <p>
- <span class="file">libc.a</span> is optional: the Makefile links it
- only into commands that reference it, and the archive plus
- <code>--gc-sections</code> keeps unused members and functions out of
- the legacy command pack. The headers live in
- <span class="file">libc/include/</span> and cover
- <code>stddef</code>, <code>stdint</code>, <code>stdarg</code>,
- <code>stdlib</code>, <code>string</code>, <code>ctype</code>,
- <code>assert</code>, <code>setjmp</code>, <code>errno</code>,
- <code>stdio</code>, <code>math</code>, <code>time</code>,
- <code>sys/time</code>, <code>sys/types</code>, <code>float</code>,
- <code>limits</code>, <code>inttypes</code>, <code>alloca</code>
- and the OS-specific <code>ucmd_heap.h</code>.
- </p>
- <ul>
- <li><strong>malloc.</strong> Boundary-tag blocks, first-fit free
- list, immediate coalescing, 16-byte alignment. The heap maps 64 KB
- on first use and grows in page-rounded steps with 64 KB slack up to
- the 64 MB <code>SYS_MEM_*</code> arena cap; <code>calloc</code>
- zeroes and <code>realloc</code> grows in place when the next block
- is free.</li>
- <li><strong>heap_reset.</strong> Discards every allocation and
- unmaps the whole arena. Page-scoped programs such as the browser
- use it on navigation instead of tracking individual frees.</li>
- <li><strong>Ownership.</strong> Commands allocate through libc
- <code>malloc</code>; the <code>SYS_MEM_ALLOC/GROW/FREE</code>
- syscalls are the backend in <span class="file">libc/ucmd_mem.c</span>
- and are not called by application code.</li>
- <li><strong>stdio.</strong> <code>printf</code>,
- <code>snprintf</code>, <code>sprintf</code> and
- <code>vfprintf</code> share an exact decimal float formatter
- (<code>%f/%e/%g</code>, width/precision), and
- <code>fopen("rb")</code> provides read-only whole-file
- <code>FILE</code> objects with <code>fread</code>/<code>fseek</code>/
- <code>ftell</code>/<code>fclose</code>. stdout and stderr are
- console streams; stdin is EOF. There is no kernel fd layer yet: the
- <code>stdio_file.c</code> TODO records the future
- <code>SYS_OPEN/READ/WRITE/LSEEK/CLOSE</code> replacement.</li>
- <li><strong>time.</strong> <code>time</code>, <code>gmtime</code>,
- <code>localtime</code>, <code>mktime</code>, <code>strftime</code>,
- <code>gettimeofday</code>/<code>settimeofday</code> and
- <code>clock_gettime</code> use <code>SYS_RTC_GET</code>/<code>SET</code>.
- <code>time_t</code> is 64-bit, local time is UTC-only, and the RTC's
- 1970-2069 range is enforced.</li>
- <li><strong>math.</strong> The set QuickJS needs is provided with x87
- double arithmetic: <code>sqrt</code>, <code>pow</code>,
- <code>exp</code>/<code>log</code>, trig, <code>floor</code>/<code>ceil</code>/
- <code>round</code>, <code>fmod</code>, <code>ldexp</code>/
- <code>frexp</code> and the IEEE predicates. It is a compact
- double-rounding implementation, not a full fdlibm.</li>
- <li><strong>Limits.</strong> No threads or locking, no
- <code>free()</code>-to-page unmap, and requests near 64 MB fail
- because headers are charged against the same arena. The file layer
- is read-only and whole-file (4 MB cap); writable files and streaming
- need the kernel fd layer. There is no timezone database and no
- <code>long double</code>/<code>%a</code> support.</li>
- <li><strong>Tests.</strong> <code>make test-libc</code> covers the
- malloc arena, format/dtoa, math, 64-bit division helpers and
- <code>setjmp</code>/<code>longjmp</code> on the host.</li>
- </ul>
- </section>
- <section id="spawn">
- <h2>Spawn path</h2>
- <figure class="figure">
- <svg viewBox="0 0 920 232" role="img" aria-labelledby="spawn-title spawn-desc">
- <title id="spawn-title">Command spawn path</title>
- <desc id="spawn-desc">A shell line is matched against builtins, then the PATH, then the kernel registry. A PATH hit loads the ELF through the VFS and creates a ring-3 process; a kernel registry hit spawns a kernel thread.</desc>
- <rect class="svg-box" x="20" y="24" width="160" height="58" rx="9"/>
- <text class="svg-text" x="38" y="49">shell line</text>
- <text class="svg-sub" x="38" y="69">word + remainder</text>
- <rect class="svg-box blue" x="216" y="24" width="160" height="58" rx="9"/>
- <text class="svg-text" x="234" y="49">builtins</text>
- <text class="svg-sub" x="234" y="69">cd · path · help · clear</text>
- <rect class="svg-box accent" x="412" y="24" width="180" height="58" rx="9"/>
- <text class="svg-text" x="430" y="49">PATH lookup</text>
- <text class="svg-sub" x="430" y="69">/ramfs/bin by default</text>
- <rect class="svg-box" x="628" y="24" width="270" height="58" rx="9"/>
- <text class="svg-text" x="646" y="49">kernel registry</text>
- <text class="svg-sub" x="646" y="69">privileged / inline commands</text>
- <path class="svg-line" d="M180 53h24"/>
- <path class="svg-line" d="M196 47l7 6-7 6"/>
- <path class="svg-line" d="M376 53h24"/>
- <path class="svg-line" d="M392 47l7 6-7 6"/>
- <path class="svg-line" d="M592 53h24"/>
- <path class="svg-line" d="M608 47l7 6-7 6"/>
- <rect class="svg-box green" x="216" y="146" width="376" height="58" rx="9"/>
- <text class="svg-text" x="236" y="171">VFS load → process_create_user</text>
- <text class="svg-sub" x="236" y="191">ELF segments · page directory · 8-page stack · arg</text>
- <rect class="svg-box amber" x="628" y="146" width="270" height="58" rx="9"/>
- <text class="svg-text" x="646" y="171">kernel process</text>
- <text class="svg-sub" x="646" y="191">ring 0 · pinned to the BSP</text>
- <path class="svg-line accent" d="M502 82v54"/>
- <path class="svg-line accent" d="M496 128l6 7 6-7"/>
- <path class="svg-line" d="M763 82v54"/>
- <path class="svg-line" d="M757 128l6 7 6-7"/>
- </svg>
- <figcaption>
- <strong>A packed command can shadow a kernel command.</strong>
- The PATH is searched before the kernel registry, so a new
- <code>bin/<name></code> changes behaviour without editing the
- kernel. Builtins are handled inline, before either lookup.
- </figcaption>
- </figure>
- </section>
- <section id="syscalls">
- <h2>Syscall ABI</h2>
- <p>
- The gate is <code>int 0x80</code>. <code>eax</code> carries the
- number, <code>ebx</code>/<code>ecx</code>/<code>edx</code> the first
- three arguments, and the negative <code>SYS_E*</code> codes are
- stable. The wrappers in <span class="file">ucmd_lib.h</span> cover
- zero to three arguments.
- </p>
- <div class="table-wrap">
- <table>
- <thead>
- <tr><th>Group</th><th>Numbers</th><th>Purpose</th></tr>
- </thead>
- <tbody>
- <tr><td>Console & time</td><td>1–4, 56, 69, 104–105</td><td>putstr, ticks, sleep, exit, RTC time/date get/set</td></tr>
- <tr><td>Files</td><td>5–11, 48, 98</td><td>whole-file read/write, list, unlink, mkdir/rmdir, mounts, cwd, stat</td></tr>
- <tr><td>System info</td><td>12–16, 49–51, 91–92, 102–103, 107</td><td>memory, E820, mouse, storage, blkdev, procinfo, cursor, CPU temp, sensors, EC sensors, Chrome EC sensors, AC/battery</td></tr>
- <tr><td>Network</td><td>17–47, 106</td><td>NIC config/acquire, raw frames, DHCP/DNS/NTP, TCP client, ARP, cwd</td></tr>
- <tr><td>Window & WM</td><td>55, 57–72, 80, 83–87, 109</td><td>key poll, WM attach/info/map/present/create_term, window create/present/input/resize/scroll</td></tr>
- <tr><td>Process & memory</td><td>73–79, 81, 88–90, 108</td><td>TTY, spawn, getpid, alive, kill, chdir, scheduler info, heap alloc/grow/free</td></tr>
- <tr><td>TCP server</td><td>93–97, 99–101</td><td>listen, accept, server recv/send/close, peer, speed, MAC set</td></tr>
- <tr><td>WiFi</td><td>110</td><td><code>SYS_WIFI(op, a2, a3)</code>: up, status, scan/results, connect/disconnect, EAPOL RX/TX, set key, authorize, set/get PTK for the rekey helper (<span class="file">wifi.c</span>)</td></tr>
- <tr><td>NIC menu</td><td>111–112</td><td><code>SYS_NET_DEVLIST</code> (present drivers with kind/active/link) and <code>SYS_NET_SELECT</code> (make a named netdev active)</td></tr>
- <tr><td>Hardware settings</td><td>113–114</td><td><code>SYS_BACKLIGHT(op, value)</code> get/set/step the panel PWM, <code>SYS_CPUFREQ(mode)</code> get/set the P-state mode (control panel sliders/tiles)</td></tr>
- <tr><td>Popover layout</td><td>115–116</td><td><code>SYS_WIN_RESIZE_SELF(w, h)</code> resizes the caller's canvas, <code>SYS_SCREEN_INFO(out)</code> returns the framebuffer dimensions (the control panel collapses/grows)</td></tr>
- <tr><td>Boot log</td><td>122</td><td><code>SYS_BOOTLOG(STAT|READ, ...)</code> returns the ring counters or one 1 KB chunk of the <code>bootscan</code> thread's captured COM1 output (the <code>bootscan</code> window)</td></tr>
- <tr><td>Storage</td><td>119–120</td><td><code>SYS_BLK_READ(index, lba, buf)</code> reads one raw sector, <code>SYS_MOUNT_CTL(op, ...)</code> sets/gets a mount policy (name, read-only, no automount); used by <code>disks</code></td></tr>
- <tr><td>Mouse cursor</td><td>117–118, 121</td><td><code>SYS_WIN_SET_CURSOR(shape)</code> sets the caller's content cursor, <code>SYS_WM_SET_CURSOR(shape | -1)</code> is the WM's override for its chrome, and <code>SYS_WM_MOUSE_CAPTURE(on)</code> takes/releases the pointer while the WM drags or resizes a window (shapes in <span class="file">cursor_abi.h</span>)</td></tr>
- </tbody>
- </table>
- </div>
- <p>
- The file service is whole-file, not stream-oriented. The network
- service has a per-process TCP client table (up to twelve connections)
- and a separate raw NIC lease for packet-level commands. There is no
- <code>fork</code>, <code>exec</code> or shared memory: a command
- either runs as its own process from an ELF or calls a kernel command.
- </p>
- </section>
- <section id="shell">
- <h2>Shell & PATH</h2>
- <p>
- The windowed shell is <span class="file">ucmd_term.c</span>; the
- kernel-side <span class="file">terminal.c</span> holds the privileged
- command registry used through <code>SYS_SPAWN_KCMD</code>. There is
- no kernel terminal fallback; the WM spawns the <code>bootscan</code>
- log window first and the first terminal after it (the newest
- window, so it keeps the keyboard focus). Each terminal has a
- current working directory and a PATH (default
- <code>/ramfs/bin</code>). Pressing Tab completes builtin and PATH
- names; <code>help</code> lists both.
- </p>
- <ul>
- <li><strong>Dispatch order.</strong> Builtins → PATH file → kernel command. A PATH hit loads the ELF through the VFS and spawns it as ring 3.</li>
- <li><strong>Builtins.</strong> <code>cd</code>, <code>path</code>, <code>help</code>, <code>clear</code>; the ring-3 shell also handles <code>ps</code> and <code>kill</code> inline. <code>bootlog</code> is a kernel command that dumps the early boot console; <code>bootscan</code> is the ring-3 live scan window.</li>
- <li><strong>Arguments.</strong> The raw remainder of the line is passed verbatim; commands parse their own flags.</li>
- <li><strong>Working directory.</strong> The prompt shows <code>[dir] ></code>; <code>cd</code> changes only the current terminal's cwd, and spawned commands inherit it.</li>
- <li><strong>Windows.</strong> A window receives keys through its window key queue (<code>SYS_WIN_KEY_WAIT</code>) or the generic <code>SYS_KEY_POLL</code>; closing the window kills its owner process.</li>
- </ul>
- </section>
- <section id="registry">
- <h2>Kernel commands</h2>
- <p>
- These commands must run in ring 0 or inline in the shell; they are not
- files in the pack. The split keeps privileged hardware access out of
- ring 3 while most user-facing tools remain replaceable ELFs.
- </p>
- <div class="table-wrap">
- <table>
- <thead>
- <tr><th>Group</th><th>Commands</th></tr>
- </thead>
- <tbody>
- <tr><td>Shell</td><td><code>cd</code> <code>path</code> <code>help</code> <code>clear</code> <code>bootlog</code></td></tr>
- <tr><td>Process / scheduler</td><td><code>ps</code> <code>sched</code> <code>renice</code> <code>kill</code> <code>idle</code> <code>cpufreq</code> <code>power</code></td></tr>
- <tr><td>Hardware / debug</td><td><code>display</code> <code>gfxbench</code> <code>lsusb</code> <code>lspci</code> <code>peek</code> <code>poke</code> <code>backlight</code> <code>keytest</code> <code>format</code> <code>install</code> <code>dbg</code> <code>serial</code></td></tr>
- <tr><td>Network control</td><td><code>netdev</code></td></tr>
- <tr><td>Boot / power</td><td><code>reboot</code> <code>poweroff</code> <code>kexec</code></td></tr>
- </tbody>
- </table>
- </div>
- <p>
- <code>format <device> [size]</code> creates a FAT filesystem.
- <code>install <target> [source|self]</code> installs NebOS.
- Both take a leading <code>-y</code> that skips the y/n prompt; the
- <code>disks</code> app confirms in its own dialog and passes it.
- With a source it auto-detects a disk whose MBR and LBA-63 boot
- sector carry the NebOS signature (preferring <code>usb0</code>),
- reads P1..P3 into RAM, creates or keeps the <code>NEBOSDATA</code>
- partition at LBA 34816, writes the target from RAM, merges the data
- entry into the MBR, writes the MBR last and verifies the result. A
- source-read failure leaves the target untouched. <code>self</code>
- writes the running gzip pack and its bundled kernel without a USB
- stick; <code>auto</code> picks the only non-USB NebOS disk. The
- data partition survives both forms, while the P1..P3 OS image and
- the app pack are replaced. Both the BIOS and UEFI paths are cloned
- on a full install; a later self-update leaves the ESP alone.
- </p>
- </section>
- <section id="pack">
- <h2>Command pack</h2>
- <p>
- The pack is built from the <code>UCMDS</code> list in the Makefile
- (one <code>user/apps/<name>/</code> directory each) as
- <code>bin/<name></code>, plus <code>hello</code> and the real
- <code>browser.app</code> (full pack only) and <code>gallery.app</code>. It is mounted
- read-only at <code>/ramfs</code>; the shell's default PATH points at
- <code>/ramfs/bin</code>.
- </p>
- <div class="grid">
- <div class="card">
- <h3>Files & text</h3>
- <p><code>ls</code> <code>cat</code> <code>save</code> <code>rm</code> <code>mkdir</code> <code>rmdir</code> <code>edit</code> <code>files</code> <code>view</code></p>
- </div>
- <div class="card">
- <h3>System</h3>
- <p><code>cpuinfo</code> <code>meminfo</code> <code>storage</code> <code>top</code> <code>process</code> <code>mouseinfo</code> <code>touchpad</code> <code>sensors</code> <code>powerinfo</code> <code>date</code> <code>spin</code> <code>membench</code> <code>clock</code> <code>colors</code></p>
- </div>
- <div class="card">
- <h3>Network</h3>
- <p><code>netinfo</code> <code>netip</code> <code>netdns</code> <code>host</code> <code>dhcp</code> <code>ping</code> <code>pong</code> <code>netsend</code> <code>netrecv</code> <code>netlog</code> <code>netconsole</code> <code>netregs</code> <code>netloop</code> <code>netreset</code> <code>net100</code> <code>netmac</code> <code>curl</code> <code>websrv</code> <code>wifi</code> <code>netmenu</code></p>
- </div>
- <div class="card">
- <h3>GUI</h3>
- <p><code>wm</code> <code>term</code> <code>bootscan</code> <code>files</code> <code>disks</code> <code>view</code> <code>mines</code> <code>solitaire</code> <code>process</code> <code>gallery</code> <code>browser</code> <code>chat</code> <code>clock</code> <code>colors</code> <code>settime</code></p>
- </div>
- </div>
- <p>
- The launchers <code>bin/browser</code> and <code>bin/gallery</code>
- forward their argument and cwd, and prefer a development copy under
- <code>/share</code> (<code>BROWSER</code> or <code>GALLERY</code>)
- before the pack copy and the FAT fallback on <code>root.img</code>.
- This lets <code>make browser-dev</code> and <code>make gallery-dev</code>
- update an app without rebuilding the pack.
- </p>
- </section>
- <section id="apps">
- <h2>GUI applications</h2>
- <ul>
- <li><strong>files</strong> — browser for the VFS; opens text in <code>edit</code>, images in <code>view</code>, HTML in <code>browser</code>. First user of ngui.</li>
- <li><strong>bootscan</strong> — live tail of the boot storage-scan kernel thread's output (the WM opens it before the terminal, flush right under the top bar). The kernel captures the thread's COM1 trail (mounts, probes, boot traces) into a ring exposed by <code>SYS_BOOTLOG</code>; the window follows the tail while the scan runs, keeps the scrollback afterwards, pauses the follow when scrolled up, and closes with Esc. The deferred USB mount pass runs after the window's ring closes, so its lines appear on COM1/netmon but not in the bootscan scrollback. Also startable from the shell.</li>
- <li><strong>process</strong> — graphical task manager (start menu <em>Tasks</em> entry or <code>process</code>), the ngui counterpart of <code>top</code>. It samples once per second into 60 s histories of CPU busy (<code>SYS_SCHEDINFO</code> idle ticks summed over all CPUs), physical memory in use (<code>SYS_MEMINFO</code>) and NIC throughput (<code>SYS_NET_INFO.rx_bytes</code>/<code>tx_bytes</code> from the netdev frame counters), then draws the three graphs with ngui rectangles and lines. The table lists PID, state, CPU%, memory, total CPU time and name; clicking a header sorts by PID, state, CPU, memory, time or name, and PgUp/PgDn or the wheel scrolls. Selecting a row shows its details; <em>End task</em> asks for a second click and then calls <code>SYS_KILL</code>, while kernel threads (<code>kernel_thread</code> in the process snapshot) and the monitor itself are protected. Esc closes it.</li>
- <li><strong>disks</strong> — storage manager (start menu <em>Disks</em> entry, or the <em>Disks</em> button in <code>files</code>): devices, MBR partitions and mounts; per-volume mount name, read-only and automount saved to <code>/data/MOUNTS.CFG</code>; Format and Install NebOS dialogs that run <code>format -y</code>/<code>install -y</code> on a private tty and show the log. See <a href="filesystems.html#disks">Filesystems → Storage manager</a>.</li>
- <li><strong>gallery</strong> — live widget and primitive showcase; the real app ships in the pack.</li>
- <li><strong>chat</strong> — native Cloudron Chat client (start menu <em>Chat</em> entry, or <code>chat [config-path]</code>): username/password/TOTP login through the Cloudron OIDC API or a pasted session cookie, channels and DMs with unread badges and presence, history with older paging, inline image attachments, link-preview cards (click one to open it in the browser) and profile-picture avatars, sending, REST polling, read markers, browse/join and new DM. The session cookie (never the password) is saved in <code>/data/CHAT.CFG</code> when the persistent volume is mounted, or in the RAM-only <code>/share/chat.cfg</code> otherwise. Keys: Enter sends, PgUp/PgDn scroll, Home at the top pages in older history, Ctrl+B browse, Ctrl+N new DM, Ctrl+R refresh, and with the composer unfocused (Esc) Up/Down switch conversations. See <a href="network.html#chat">Network → Chat client</a>.</li>
- <li><strong>solitaire</strong> — Klondike with drag-and-drop, scoring and a win animation.</li>
- <li><strong>mines</strong> — second ngui canvas app; shares the toolkit and event model.</li>
- <li><strong>view</strong> — fit/1:1/zoom/pan image viewer, animated GIF playback.</li>
- <li><strong>edit</strong> — text editor that draws its own text with the 8x16 font.</li>
- <li><strong>clock</strong> / <strong>colors</strong> — small window canvas demos.</li>
- <li><strong>settime</strong> — the standalone Date & Time editor (the control panel has an inline editor on its Date & Time tile). It reads and writes the CMOS RTC through <code>SYS_RTC_GET</code>/<code>SYS_RTC_SET</code>; the <em>Sync NTP</em> button asks the kernel's SNTP client (<code>SYS_NTP_SYNC</code>, 106) for UTC and writes the result to the RTC. The two-digit RTC year is expanded over 1970–2069 so dead-battery defaults such as 1980/1990 can be corrected.</li>
- <li><strong>netmenu</strong> — the top-bar control panel, opened by clicking anywhere in the right top-bar status area (temperature, date/time, network and AC/battery items). It is a chromeless <code>WIN_F_POPOVER</code> canvas window, anchored flush under the bar at the right screen edge, dismissed by a click outside or <code>Esc</code>, and has no title bar, shadow or rounded outer corners. It opens collapsed: the battery/AC and clock summary, a brightness slider when the panel PWM is present, and Quick settings pills for Network, the P-state power mode (<code>SYS_CPUFREQ</code>) and Date & Time. Clicking a pill expands that section in place and grows the window with <code>SYS_WIN_RESIZE_SELF</code>; the network section has the connection status card and NIC/WiFi lists, the power section has the three modes, and the date section has an inline editor (Set/Now/Sync NTP) instead of opening <code>settime</code>. It lists the present NICs from <code>SYS_NET_DEVLIST</code> (Ethernet, USB Ethernet, RNDIS tethering), selects one with <code>SYS_NET_SELECT</code> and runs DHCP. Its WiFi section scans through <code>SYS_WIFI_SCAN</code>/<code>RESULTS</code>, asks for a WPA2 passphrase when the network is not saved and starts the <code>wifi</code> helper through a <code>/share/netmenu.wifi</code> request, because the 64-byte <code>SYS_SPAWN</code> argument cannot hold a long SSID plus passphrase. Networks in <code>/data/WIFI.CFG</code> are marked <em>saved</em> and join with the stored passphrase; a <em>Saved</em> view lists them with a <em>Forget</em> button each. A Connection section shows IP, gateway, DNS and MAC. On success the helper moves the SSID/passphrase to the front of the saved list; the next boot's <code>wifi autoconnect</code> helper joins any saved network found. Duplicate BSSIDs for one SSID are collapsed to the strongest entry (or the active one), and hidden networks are omitted.</li>
- <li><strong>wm</strong> / <strong>term</strong> — the ring-3 window manager and terminal launcher used by the desktop.</li>
- </ul>
- <p>
- The WM chrome, ngui labels and the browser use the fixed-point
- TrueType engine in <span class="file">ufont.c</span> with the Arimo
- and Liberation Mono subsets in the pack. CSS and ngui can select
- regular/bold/italic/mono faces at 8–48 px; missing faces fall back to
- the 8×16 bitmap. UTF-8 text APIs additionally fall back to the
- monochrome Noto Emoji subset for common emoji (format-12 cmap);
- the browser still uses the Latin-1 byte path. Terminal contents and
- the editor stay bitmap;
- ngui text fields use the proportional face for text, caret,
- selection and horizontal scrolling. The browser detaches the font
- arena before <code>heap_reset()</code> and reattaches after the page
- heap is mapped.
- </p>
- </section>
- <section id="browser">
- <h2>Browser</h2>
- <p>
- The real browser is <code>bin/browser.app</code> in the full pack; the
- floppy lite pack omits it and the <code>bin/browser</code> launcher runs
- <code>BROWSER</code> from <code>root.img</code> instead. It links
- ngui, the image library, inflate, TLS, uhttp and the vendored QuickJS
- engine. It opens at 1100×700 (960×640 and 780×540 fallbacks on
- smaller screens), with a URL bar, history, a status bar, inline
- images and inline/external scripts. Network work runs in up to four
- headless <code>curl __serve</code> workers, each with its own files
- under <code>/share</code>, so the UI keeps drawing and scrolling
- while several TCP/TLS connections are in flight. Images are
- decoded at their CSS/attribute box in the fetch helper (a JPEG
- gets a reduced IDCT) and cached at display size, so a repaint is
- a 1:1 blit; image repaints are coalesced and
- <code>/share/IMGSTAT</code> records where a load spent its time.
- </p>
- <ul>
- <li><strong>HTML/CSS subset.</strong> External and inline stylesheets; one selector engine for the cascade, <code>querySelector(All)</code> and <code>matches</code> (type/class/id, attribute values with <code>= ~= |= ^= $= *=</code> and the <code>i</code> flag, descendant/<code>></code>/<code>+</code>/<code>~</code> combinators, <code>:root</code>, <code>:link</code>, first/last/only child and of-type, <code>:nth-child</code>/<code>:nth-last-child</code>/<code>:nth-of-type</code>/<code>:nth-last-of-type</code>, <code>:empty</code>, <code>:checked</code>, <code>:disabled</code>/<code>:enabled</code>, <code>:required</code>/<code>:optional</code>, <code>:not</code>/<code>:is</code>/<code>:where</code> with selector lists and <code>:has</code>); <code>::before</code>/<code>::after</code> generated text (strings, <code>attr()</code>, quotes) emitted as literal runs that scripts never see; colours (including legacy <code>bgcolor</code> attributes), backgrounds (solid and <code>background-image</code> with repeat/position/size and the <code>background</code> shorthand URL), real <code>font-size</code> (8–48 px), the <code>font</code> shorthand, bold/italic faces, <code>font-family: monospace</code> and <code>@font-face</code> web fonts (local or HTTP TTF/OTF or WOFF 1.0, picked from the <code>src</code> list by <code>format()</code>; one face per weight/style of a family, matched at layout; non-Latin <code>unicode-range</code> subsets skipped; only families the page names are downloaded, and cached in <code>/share</code> for the boot), margins/padding (percentage sizes use the containing width; <code>em</code> uses the element font), per-side borders, alignment, explicit/percentage block widths with <code>min-width</code>/<code>max-width</code>/<code>min-height</code>/<code>max-height</code>, <code>box-sizing: border-box</code>, <code>aspect-ratio</code>, <code>margin: 0 auto</code>, nested <code>em</code>/<code>rem</code> sizes, basic floats, <code>position: relative</code>/<code>absolute</code>/<code>fixed</code>/<code>sticky</code> (top/bottom, containing-block clamp), <code>right</code>/<code>bottom</code>, <code>z-index</code> (including relative boxes), <code>overflow: hidden</code> clipping, <code>transform: translate</code>/<code>scale</code>/<code>rotate</code> with <code>transform-origin</code> (paint-time box and image transforms), flex rows with grow/wrap/justify (including <code>space-evenly</code>)/align, two-column grids, table rowspan/colspan and percentage columns, <code>calc(percent ± px)</code> in widths, margins/padding, heights and min/max, <code>white-space: nowrap</code> and <code>@media</code> blocks (including the <code>(width >= 997px)</code> range form) evaluated at the browser canvas width when the page is parsed, with <code>matchMedia()</code> giving scripts the same answers (environment features answer for a normal-contrast mouse screen: <code>forced-colors: none</code>, <code>hover: hover</code>, <code>pointer: fine</code>, no reduced motion). <code>@layer</code> blocks cascade in layer order (unlayered rules above every layer, <code>!important</code> reversed) and <code>@supports</code> blocks apply unless negated; Docusaurus ships its whole stylesheet in layers. After <code>var()</code> expansion each <code>calc()</code> is folded (<code>*</code>, <code>/</code>, nesting, %, px, rem/em, vw) into a length or <code>calc(P% + Npx)</code>, and <code>var()</code> keeps token boundaries in minified shorthands. A definite <code>flex-basis</code> sets a flex item's width and items honour <code>min-width</code>/<code>max-width</code>. A single-line flex row fills its container's definite height and stretches items without a height to the line (<code>align-items: stretch</code>); <code>flex-direction: column</code> distributes the free height with <code>justify-content</code> and shrinks <code>start</code>/<code>center</code>/<code>end</code> items to their content; absolute children of a flex container are out of flow. A box placed by <code>bottom</code> without a height uses its measured height, and a fixed box without <code>left</code>/<code>right</code> keeps its static x. The page has no gutter of its own: <code>body</code> carries the usual 8 px UA margin, so <code>body { margin: 0 }</code> starts at the canvas edge. The Cloudron login page (a full-height logo panel beside a centred form) lays out like in a desktop browser. A page whose markup starts <code><!doctype html><html></code> keeps the root element's cascade (colour, font, line-height) for the whole page; <code><svg></code> is inline by default; weight 500 uses the regular face. Inline <code><style></code> text is collected up to 256 KB and URLs may be 4 KB long. Scripting is always on, so <code><noscript></code> content is inert raw text. Form controls with author CSS (background, border or radius) are painted and sized from the page's style, so google.com's search buttons and transparent search field look like the page intends; unstyled controls keep the theme look. Text is Latin-1; there is no shaping, bidi, WOFF2/CFF font or full-Unicode fallback.</li>
- <li><strong>JavaScript.</strong> Inline and external <code><script src></code> blocks run on the vendored QuickJS engine (2026-06-04, ES2025: classes and private fields, arrow functions, <code>let</code>/<code>const</code>, template literals, destructuring, spread, async/await, Promise, Map/Set, BigInt, optional chaining) in document order. <code>js_mu.c</code> keeps the MuJS-style value-stack API the DOM layer was written against, runs outermost engine entries on a private 1 MB stack (the ring-3 stack is 128 KB) and drains Promise jobs after each script, timer and event. External scripts use the same local/network fetch path as pages and CSS (2 MB cap) and are cached under <code>/share/bjs-*</code> for the current boot; the parsed page is painted before scripts run. <code><script type="module"></code> runs as an ES module: QuickJS resolves every import to an absolute URL and loads it synchronously through the browser (script cache first, then one helper fetch), <code>import()</code> and <code>import.meta.url</code> work, and the page's <code><link rel="modulepreload"></code> chunks are fetched on all helpers in parallel before the first script runs. Unhandled promise rejections are reported like uncaught exceptions, at the end of the job run, so a rejection whose handler is attached later in the same turn is not reported. Classic scripts are sloppy by default. Math, Date and JSON are the engine's; each page gets one state, and a 20 s wall-clock budget per script, timer or event turns a runaway loop into an <code>InternalError: interrupted</code> instead of freezing the browser. The Cloudron app store (AngularJS 1.3, a 666 KB inline catalogue and an ES2015 controller) renders its hero carousel, 26 sections and 308 cards.</li>
- <li><strong>Web APIs.</strong> <span class="file">js_prelude.js</span> (embedded by <span class="file">js_prelude.S</span>) runs before each page's scripts and builds the platform in JavaScript on three C primitives: <code>fetch</code>/<code>Request</code>/<code>Response</code>/<code>Headers</code> and <code>XMLHttpRequest</code> (synchronous helper requests of any method, delivered through a Promise; the status and body come back for 4xx/5xx too), <code>URL</code>/<code>URLSearchParams</code>, <code>TextEncoder</code>/<code>TextDecoder</code>, <code>btoa</code>/<code>atob</code>, <code>Blob</code>/<code>FormData</code>, <code>AbortController</code>, <code>localStorage</code>/<code>sessionStorage</code> (kept in <code>/share</code> per origin, so they survive the page-heap reset of a navigation; with <code>/data</code> mounted, localStorage and the cookie jar are also saved to <code>/data/BSTORE.DAT</code> and <code>/data/BCOOKIES.BIN</code> at most every 3 s and restored after a reboot), <code>crypto.getRandomValues</code>/<code>subtle.digest("SHA-256")</code>, inert observers, <code>performance</code> (page-relative <code>now()</code>, <code>timing</code>, User Timing marks and measures), the <code>CSS</code> namespace (<code>escape</code>, <code>supports</code>), <code>NodeFilter</code>/<code>document.createNodeIterator</code>, prototype accessors for the node members DOMPurify reads through <code>Object.getOwnPropertyDescriptor</code>, <code>instanceof</code>-able DOM classes and the common Element methods (<code>closest</code>, <code>append</code>, <code>before</code>/<code>after</code>, <code>insertAdjacentHTML</code>, ...). Custom Elements (<code>customElements.define</code>, upgrades with <code>connectedCallback</code>) run web-component sites such as heise.de, whose <code><a-img></code> picks a scaled CDN image once visible. <code>document.currentScript</code>, the <code>document.scripts</code>/<code>images</code>/<code>forms</code>/<code>links</code> collections, inert <code><template></code> elements with a <code>content</code> fragment, and an inert detached document for <code>DOMParser</code>/<code>createHTMLDocument</code> (a parsed document is split at its head and body, and the page document's lookups called on it answer for it, so DOMPurify sanitizes the parsed copy and not the page) let jQuery 3 and Alpine.js boot arstechnica.com (a Tailwind page served over TLS 1.2): before, jQuery's support probe wrote two <code><form></code>s over the real body. A <code>#fragment</code>-only navigation (<code>location.hash</code>, <code>#...</code> links, back/forward) updates the URL in place and fires <code>hashchange</code> instead of reloading, which hash-routed apps rely on. With them the Cloudron dashboard (a Vite/Vue 3 app of 12 modules, 3.5 MB) boots, starts its PKCE login and renders the OIDC login form, which submits through <code>fetch()</code>.</li>
- <li><strong>DOM.</strong> Nodes are interned userdata wrappers that inherit from <code>Object.prototype</code>, so <code>===</code> and library expando caches behave. Elements support <code>getAttribute</code>/<code>setAttribute</code>/<code>hasAttribute</code>, <code>appendChild</code>/<code>insertBefore</code>/<code>removeChild</code>/<code>replaceChild</code>/<code>cloneNode</code>/<code>remove</code>, <code>querySelector(All)</code>, <code>getElementsByTagName</code>, <code>getElementsByClassName</code>, <code>classList</code>, <code>dataset</code>, inline <code>style</code> (<code>cssText</code>, property get/set, <code>getPropertyValue</code>/<code>setProperty</code>/<code>removeProperty</code>), <code>innerHTML</code> (fragment parser), <code>textContent</code>/<code>nodeValue</code>, traversal, <code>matches</code> and <code>getBoundingClientRect</code> (real block/table/absolute/image boxes; an inline span, or an inline-block that stays in the text line, reports the union of its placed line runs, one line box tall per line). Form controls expose live <code>value</code>/<code>checked</code>/<code>selectedIndex</code> properties backed by the browser's control state; forms expose <code>elements</code>, <code>submit()</code> and <code>reset()</code>, and elements dispatch real <code>addEventListener</code>/<code>dispatchEvent</code> events with capture, bubbling and <code>preventDefault()</code>. <code><a></code> elements expose <code>href</code>/<code>protocol</code>/<code>host</code>/<code>hostname</code>/<code>port</code>/<code>pathname</code>/<code>search</code>/<code>hash</code>/<code>origin</code> resolved against the page URL. <code>document</code> has <code>createElement</code>, <code>createTextNode</code>, <code>createComment</code>, <code>createDocumentFragment</code>, <code>createAttribute</code>, <code>documentElement</code>/<code>body</code>/<code>head</code> and <code>readyState</code>; <code>navigator</code>, <code>history</code>, <code>matchMedia</code>, <code>getComputedStyle</code>, <code>setTimeout</code>/<code>setInterval</code>/<code>clearTimeout</code> and <code>requestAnimationFrame</code> exist, and due timers are pumped from the browser loop. jQuery 1.11, Bootstrap 3.2 tooltips and AngularJS 1.3 (with ngRoute/ngSanitize) initialize on a local test page. A geometry read after a DOM change runs a synchronous layout first (a forced reflow, budgeted to 40 ms per 100 ms), and <code>documentElement.clientWidth</code>/<code>clientHeight</code> are the viewport. Moving the pointer dispatches <code>mouseover</code>/<code>mouseout</code> (bubbling, with <code>relatedTarget</code>) and <code>mouseenter</code>/<code>mouseleave</code> on the ancestors entered or left, so jQuery hover handlers and Bootstrap tooltips work; there is no <code>mousemove</code>. A transparent or <code>visibility: hidden</code> absolute/fixed box keeps a measurable box but is not painted or hit-tested.</li>
- <li><strong>Not supported.</strong> Inline event attributes (<code>onclick=</code>), <code>MouseEvent</code>/<code>CustomEvent</code> and <code>once</code>/<code>passive</code> listener options, <code>defer</code>/<code>async</code> ordering, Mutation/Resize observers that fire (the IntersectionObserver reports every target visible), streaming/binary/multipart <code>fetch</code> bodies and request headers other than <code>Content-Type</code>, an XML <code>DOMParser</code>, canvas/2D contexts, user-state pseudo-classes (<code>:hover</code>, <code>:focus</code>; their rules are dropped at parse time) and pseudo-elements other than <code>::before</code>/<code>::after</code>. Basic controls render, focus, edit, toggle, select, submit GET queries and POST <code>application/x-www-form-urlencoded</code> bodies (see the compatibility ladder); <code>getComputedStyle</code> covers the engine's properties. <code>innerHTML</code>/<code>outerHTML</code> serialize the live tree.</li>
- <li><strong>CSS gaps.</strong> Multiple background layers and <code>background-attachment</code> (a non-uniform <code>background-size</code> uses the width scale), 3D/perspective transforms and transformed text/descendants (scale/rotate paint the box and inline images), generated-content boxes beyond icons (<code>::before</code>/<code>::after</code> are text, or an empty box with a background colour and a <code>data:</code> background image such as Docusaurus' sidebar chevrons: no borders, counters, <code>content: url()</code> or remote images, and none inside flex/grid containers), <code>bottom</code>/percentage <code>left</code> placement of nested absolute boxes, border-radius clipping of descendants, gradients/box-shadow/transitions and <code>color-mix</code>. Flex rows, card grids, tables with rowspan/colspan, inline SVG and CSS variables are supported. Custom properties live in one document-wide table: <code>:root</code>/<code>html</code>/<code>body</code> definitions always apply, a component-level one only while no other rule disagrees (then <code>var()</code> falls back); a rule that uses such a name is re-expanded per element against that element's own matched rules (Infima's <code>.col--3</code> sets the column width another rule reads), but values set on ancestors are not inherited. Percentage heights resolve against the containing block's definite height (the viewport for <code>html</code>/<code>body</code>) and act as a minimum, because inner boxes do not scroll. A centred icon no longer centres the text that follows it, and <code>align-items: center</code> centres the lines of a flex column.</li>
- <li><strong>Inline SVG.</strong> <span class="file">svg_raster.c</span> flattens every path command (curves and arcs included), rects, circles, ellipses, lines, polylines and polygons through <code>transform</code> lists and the viewBox mapping, then fills (nonzero or even-odd) and strokes them with antialiased coverage into an RGB565 + alpha layer cached per node and size. <code><g></code>, nested <code><svg></code>, <code><use></code> of a <code><symbol></code>, opacity, <code>currentColor</code> and inherited <code>fill</code>/<code>stroke</code> work; a gradient paints the average of its stops, and patterns, clip paths, masks, filters and markers are not rendered. SVG paint has its own style state, so CSS <code>fill</code> on an HTML element no longer paints its background.</li>
- <li><strong>Caps.</strong> 2 MB page body, 832 KB CSS, 6144 DOM nodes, 4608 rules, 16 images. Each image gets an <code>img_estimate()</code>-sized decode arena that is freed after the scaled bitmap is made; navigation calls <code>heap_reset()</code> and unmaps the page heap.</li>
- <li><strong>Fetching.</strong> Up to four worker processes prefetch images in parallel within the viewport plus 160 px; each worker keeps its own TCP/TLS connection and its own request/body/meta files (keyed by browser pid and worker slot, so multiple windows do not collide). Completed images are decoded as jobs finish. Stylesheet and external-script bodies are downloaded in parallel but parsed/executed in document order, and one image starts before the script phase so it overlaps script loading. Idle helpers stay warm for same-origin navigations (they exit after ten idle seconds, and losing window focus stops them), while a cross-origin navigation closes them first so the old page's connections cannot stall the new fetch. A DNS failure is retried once. While loading, the status bar reports the page fetch's header and first-byte times; when the load is done it shows <code>Loaded in N ms: page P (headers H), parse, css, paint, js</code> for 12 s. On the Cloudron store under QEMU/TCG with e1000 that is 2572 ms, of which the scripts take 1911 ms; QuickJS is built <code>-O1</code>, which beat <code>-Os</code> and <code>-O2</code> there.</li>
- <li><strong>URL entry.</strong> A dotted name without a scheme that is not a known local file extension is treated as a hostname, so <code>cloudron.io</code> does not hit the local-file stat. A typed hostname is tried as <code>https://</code> first, skipping the common <code>http://host</code> → <code>https://host</code> hop; if the https connection is refused, reset, times out or fails the TLS handshake, the browser retries once over <code>http://</code> and replaces the history entry. Origin-level redirects (such as <code>https://host</code> → <code>https://www.host</code>) are cached per process and in <code>/share/borigins</code>; the first visit still follows them, later visits go straight to the canonical origin. Remote stylesheets are cached under <code>/share/bcss-*</code> for the current boot, so a reload or a fresh browser launch skips the CSS downloads.</li>
- <li><strong>History and autocomplete.</strong> Every page that finishes loading is recorded in a 128-entry table (URL, title, visit count and a stamp counter that orders visits across windows and reboots without a clock). Browser windows of one boot share <code>/share/bhist</code>, merged and rewritten on each visit, and it is saved to <code>/data/BHIST.DAT</code> at most every 3 s. While the address bar has the focus a dropdown lists up to six matches: an empty bar shows the most visited and recent sites; typing ranks URL prefixes (with or without the scheme and <code>www.</code>) above URL and title substrings. Typing at the end completes inline to the next <code>/</code> of the best match (<code>clo</code> → <code>cloudron.io/</code>, the added part selected), and Enter opens the history URL it came from. Up/Down preview a row, Delete forgets it, Esc closes the list and a click opens a row.</li>
- </ul>
- <p>
- The browser's default canvas is dark, matching the ngui theme, but an
- <code>html</code>/<code>body</code> background fills the whole page
- canvas. Pages without one that set dark text can be hard to read;
- pages with their own background and colour rules are unaffected. See <a href="graphics.html#images">Graphics → Image
- library</a> for the decoder limits.
- </p>
- <p>
- <code>testdata/browser/compat/</code> is the browser compatibility
- ladder: numbered, self-contained pages with an A/B pair for each
- behaviour. Run <code>make compat-serve</code> and open
- <code>http://<host>:8000/</code> on the board (or
- <code>http://10.0.2.2:8000/</code> in QEMU's user network). The
- index records the current pass/fail status; pages 010–074 and 030a pass
- (036a needs the POST echo server), while
- the README lists the remaining gaps.
- </p>
- </section>
- <section id="sources">
- <h2>Source map</h2>
- <ul class="filelist">
- <li><code>kernel/syscall.c</code>, <code>kernel/syscall_stub.S</code>, <code>include/syscall.h</code></li>
- <li><code>kernel/sys_info.c</code> — kernel-state snapshots (memory, sensors, power)</li>
- <li><code>kernel/rtc.c</code> — CMOS RTC read/write, format decoding and the 1970–2069 year window</li>
- <li><code>kernel/process.c</code> — ELF load and spawn</li>
- <li><code>kernel/elf.c</code> — ELF parser</li>
- <li><code>user/apps/term/ucmd_term.c</code> — windowed shell, scrollback, PATH</li>
- <li><code>kernel/terminal.c</code> — privileged kernel command registry</li>
- <li><code>kernel/install.c</code> — privileged live-image clone installer</li>
- <li><code>user/ucmd_lib.h</code> — user shim</li>
- <li><code>user/lib/libc/</code> — headers, malloc, string/stdlib, setjmp/errno, stdio/dtoa, math, time and the <code>SYS_MEM_*</code> backend</li>
- <li><code>libc.a</code> — optional static ring-3 libc</li>
- <li><code>user/ucmd.ld</code> — ring-3 link address</li>
- <li><code>Makefile</code> — <code>UCMDS</code> and pack rules</li>
- <li><code>user/apps/<name>/ucmd_<name>.c</code> — commands, one directory each</li>
- <li><code>user/lib/ufont/ufont.c</code>, <code>user/lib/ufont/ufont_ttf.c</code>, <code>user/lib/ufont/ufont_woff.c</code> — fixed-point TrueType text, WOFF 1.0 unwrapping</li>
- <li><code>user/lib/ngui/ngui.c</code> — GUI toolkit; <code>fonts/*.ttf</code> — UI and emoji subsets</li>
- <li><code>user/apps/browser/browser.c</code>, <code>user/apps/browser/browser_html.c</code>, <code>user/apps/browser/svg_raster.c/h</code> (+ <code>user/apps/browser/svg_test.c</code>), <code>user/apps/browser/js_browser.c/h</code>, <code>user/apps/browser/js_prelude.js</code> + <code>user/apps/browser/js_prelude.S</code>, <code>user/apps/browser/js_mu.c/h</code>, <code>third_party/quickjs/</code>, <code>user/apps/gallery/gallery.c</code></li>
- <li><code>user/apps/chat/ucmd_chat.c</code>, <code>user/apps/chat/chat_login.c</code>, <code>user/lib/ujson/ujson.c</code>, <code>user/lib/uhttp/uhttp_cookie.c</code> — chat client</li>
- <li><code>user/apps/wifi/ucmd_wifi.c</code>, <code>user/lib/wifi/wpa.c</code>, <code>user/lib/tls/wpa_crypto.c</code> — <code>wifi</code> command and the WPA2-PSK supplicant</li>
- <li><code>user/apps/disks/ucmd_disks.c</code> — storage manager</li>
- <li><code>user/apps/process/ucmd_process.c</code> — graphical task manager and its history graphs</li>
- <li><code>user/apps/bootscan/ucmd_bootscan.c</code> — live boot-scan log window (<code>SYS_BOOTLOG</code>, <code>kernel/bootcon.c</code>)</li>
- <li><code>user/apps/netmenu/ucmd_netmenu.c</code>, <code>include/wifi_cfg.h</code>, <code>user/lib/wifi/wifi_store.c/h</code> — top-bar control panel, staged WiFi connect record and saved-network list</li>
- </ul>
- </section>
- </main>
- <footer class="site-footer">
- <div class="inner">
- <p><strong>NebOS 0.2.0</strong> · Architecture documentation · <a href="index.html">overview</a></p>
- <p>Maintain alongside <code>AGENTS.md</code> and the source files listed on each page.</p>
- </div>
- </footer>
- </body>
- </html>
|