Linux
Generated from docs/linux.md when the site was built at 7aa23e2.
Every check in tests/check.sh runs on Linux x86_64 except the Go timer app
when Go isn’t installed (the script skips it) and the iOS and Android device
runs. tests/check.sh --iced also renders tests/screens/cases.txt with the
iced host (hosts/iced), offscreen, and compares each page with Chrome, which
CHROME names here too. It stops at its first page for now: the iced host
doesn’t report the stock text field style (fieldStyle in its probe) that
tests/screens/compare.mjs has filled into the controls sheet since text
fields took their CSS fill and border (73eb4eb). Tested on Arch Linux with user-level toolchains and no system packages
beyond a C compiler, git, curl and fontconfig.
Toolchains
Section titled “Toolchains”- Rust (rustup’s stable) and a C compiler (
cc) for QuickJS-ng and the C timer app. - Node and pnpm, for the examples and the Svelte fixture. Without root, pnpm
installs into
~/.localwithnpm i -g --prefix ~/.local pnpm; npm 12 skips pnpm’s install scripts, and pnpm works without them. - Zig 0.17, for the Zig timer app.
- A JDK 17 in
JAVA_HOME, for the JVM binding, the Java timer app and ihatemyphone’s pages. The scripts put$JAVA_HOME/binon thePATH, so it needn’t be there already. The Android build (hosts/android/native.sh) takes thejavacon thePATHwhenJAVA_HOMEis unset, and stops unless it is a JDK 17. - For Android builds, an x86_64 machine:
native.shuses the NDK’slinux-x86_64(ordarwin-x86_64) prebuilt toolchain, the only Linux one the NDK ships, so arm64 Linux can’t build the Android host. - Go, optionally, for the Go timer app.
- Chrome or Chromium, for the Acid layout reference. Playwright’s Chromium
works:
CHROMEnames the binary.
Running the checks
Section titled “Running the checks”export JAVA_HOME=$HOME/.local/opt/jdk17 # wherever the JDK isexport CHROME=$(ls -d ~/.cache/ms-playwright/chromium-*/chrome-linux*/chrome | sort -V | tail -1)git submodule update --inittests/wpt/fetch.sh # niso-wpt's own tests in cargo test read the checkoutcargo test --workspaceexamples/lang/c/build.sh # and zig/, java/ (go/ with Go)examples/ihatemyphone/test/run.shtests/svelte/run.shcargo run --release -p niso-wpttests/acid/fetch.shnode tests/acid/run.mjsor tests/check.sh for all of them. tests/wpt/fetch.sh needs the network
only the first time, and when the pinned revision or its directories change.
A cold cargo test --workspace (no target/) took 55 s on a 20-core Core
Ultra 7 265K, of which about 40 s is compiling; tests/check.sh after it
takes about 3 minutes more.
The hailgauge example builds against a hailgauge checkout beside niso
(../hailgauge) through node_modules, and is skipped without one.
NISO_LINK_HAILGAUGE names a checkout anywhere else
(NISO_LINK_HAILGAUGE=~/hailgauge examples/ihatemyphone/test/run.sh);
HAILGAUGE still works for now.
Platform differences
Section titled “Platform differences”- Fonts. The generic families come from fontconfig: on a GNOME-style system
serif is Noto Serif, sans-serif Noto Sans, and system-ui Adwaita Sans, whose
opszaxis runs from 14 to 32 (SF’s runs from 17 to 96). The render tests derive the baseline from the font’s own ascent and line gap, and the optical size from the font’s own axis range, so they hold for any font. - Acid. Chrome is given fontconfig’s families too (
tests/acid/run.mjs), so both lay out the same fonts, and Linux has only the differences every platform has. macOS’s extra Acid2 differences are underacid2 darwinintests/acid/expectations.json. - WPT. No subtest fails on Linux for a platform reason. One depends on
timing:
FileAPI/file/File-lastModified.htmlfails now and then (12 runs of 40 under 20 jobs), becausestep_waitpolls on virtual-time timers forDate.now(), which is the real clock, to move on, so it passes only when a real millisecond goes by during the polls.Date.now()follows niso’s clock (niso_dom_wall_clock) only once the engine lets the binding set it: QuickJS-ng needsJS_SetDateNowFunc(repros/quickjs-date-now-hook, enabled byniso-quickjs’sdate-now-hookfeature; with it the test passes 40 runs of 40 andhr-time/basic.any.jspasses its fifth subtest too), and Porffor has no hook yet (repros/porffor-date-now-hook). The worker variants ofWebCryptoAPI/derive_bits_keysused to time out under 20 jobs too; since the runner gives a test with variants its timeouts once per variant (it runs them all in one page), they pass.
macOS assumptions in the scripts
Section titled “macOS assumptions in the scripts”hosts/android/native.shasked/usr/libexec/java_homefor a JDK; on Linux it takes thejavacon thePATHwhenJAVA_HOMEis unset.- The Android SDK defaulted to
~/Library/Android/sdk; on Linux it defaults to Android Studio’s~/Android/Sdk(native.sh,apk.sh,tests/screens/compare.mjs).ANDROID_HOMEoverrides both. tests/check.shadded only macOS’s pnpm home (~/Library/pnpm/bin) to thePATH; it adds Linux’s (~/.local/share/pnpm) too.tests/porffor/run.mjsmeasured memory with GNU time (/usr/bin/time -f 'maxrss %M'), which Arch doesn’t install by default and macOS’s BSDtimedoesn’t support.niso-run --timenow prints its own peak RSS (getrusage), which the script reads instead.- The iOS host and
--iosdevice runs need Xcode, so macOS.
Follow-ups
Section titled “Follow-ups”tests/check.sh --iced: the iced host doesn’t report the stock text field style (fieldStylein its probe) thattests/screens/compare.mjsfills into the controls sheet, so the comparison stops at its first page.- Porffor: two
modules::binding tests fail besides the fourdocs/engines/porffor.mdlists (see there).