Portability and supported platforms
TOKN tools run on Linux, macOS and Windows where the work needs no containers. This page says what has been checked, so nobody has to find out by failing.
| Area | Linux | macOS | Windows | Notes |
|---|---|---|---|---|
scripts/artifact-review.mjs (Node 20+) | tested | expected | expected | File modes are advisory on Windows; use --exit-code in scripts. |
scripts/board.py publication client (Python 3.12+) | tested | expected | untested | Falls back from fcntl to msvcrt.locking; covered by a unit test with a fake msvcrt. |
| Wallet, signing and agreement tools (Node) | tested | expected | untested | Private-key directories use mode checks that Windows does not enforce; keep keys in a directory only you can read. |
Participant containers (participant.sh, preflight.sh, pilot node, Tor, bridges) | tested | needs Docker | needs WSL 2 with Docker | The shell scripts are POSIX sh; run them inside WSL 2 on Windows. |
| Release, replica and Cloudflare tooling | tested | not supported | not supported | Maintainer tooling; needs a Linux host, SSH, rsync and Docker. |
"Tested" means run by the maintainer on Linux. "Expected" means the code uses only portable calls and a static check (tests/test_portability.py) enforces that the host tools do not use POSIX-only functions unguarded, but nobody has run them there. "Untested" means a fallback exists and has only been exercised with a fake. Nothing here has been run on a real Windows host. If you try it and something breaks, a short report with the exact error is a useful contribution.
Rules for new host tools
- Do not import
fcntl,pwd,grp,termiosorresourceat top level
without a try/except ImportError fallback.
- Guard
os.getuid,os.O_NOFOLLOW,os.O_DIRECTORYand similar with
hasattr(os, ...) or getattr(os, ..., 0); in Node use process.getuid?.().
- Do not assume
/tmp,/dev/nullor/bin/shoutside container code; use
tempfile, os.devnull and sys.executable.
- Code that runs only inside a Linux container may use Linux calls; list it in
the portability test with the reason.
- A tool that reports a verdict must say so in its exit status when asked:
artifact-review.mjs --exit-code exits 2 for a report that is not an all-pass, including unknown, because exit 0 only means a report was written.