Close the 3 gaps between "builds in the repo" and "installs from a tarball
like Go", so writeonce can ship to other developers.
- VERSION file at repo root single-sources the toolchain version (0.1.0).
- `woc version` -> "writeonce 0.1.0 linux/amd64"; `wovm --version` -> "wovm
0.1.0" (stamped by the Makefile from VERSION; --version handled only in the
plain-wovm path so a built app never shadows its own `version` arg).
- wo.toml `[runtime] wo = ">= X.Y"` is now ENFORCED: woc refuses a project
requiring a newer toolchain than itself (>= and bare version parsed;
unknown operators accepted forward-compatibly). Was parsed-and-ignored.
- woc self-locates wovm: --runtime > [build] runtime > $WO_RUNTIME > a `wovm`
beside the woc binary (Sys.executable_name) > runtime/wovm rel CWD. An
installed woc in <prefix>/bin finds its sibling wovm from any cwd.
- `just dist` (scripts/mkdist.sh) packages writeonce-<ver>-linux-amd64.tar.gz,
Go-shaped (archive root writeonce/, bin/{woc,wovm}, README, VERSION), with a
drift guard asserting VERSION == woc == wovm. dist/ gitignored.
- `just install-accept` (scripts/install-accept.sh) is the gate: extract, PATH,
version, build+run a project from an unrelated cwd, constraint refusal — 6/0.
Verified: install-accept 6/0; woc-test 565/0; wovm suites + cli_smoke;
log-watcher 7/0. Linux-amd64 only (a cross matrix is future work).
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
42 lines
1.5 KiB
Markdown
42 lines
1.5 KiB
Markdown
# writeonce @VER@ (@TRIPLE@)
|
|
|
|
A single-binary compiled language with an embedded, WAL-durable database. This
|
|
archive is the toolchain: `woc` (the compiler) and `wovm` (the runtime VM).
|
|
Both are native binaries that depend only on the system C library — nothing
|
|
else to install.
|
|
|
|
## Install (Linux)
|
|
|
|
Remove any previous install and extract this archive into `/usr/local`,
|
|
creating a fresh `/usr/local/writeonce`:
|
|
|
|
rm -rf /usr/local/writeonce && tar -C /usr/local -xzf writeonce-@VER@-@TRIPLE@.tar.gz
|
|
|
|
(Run as root, or through `sudo`.)
|
|
|
|
Add `/usr/local/writeonce/bin` to your `PATH` by adding this line to your
|
|
`$HOME/.profile` (or `/etc/profile` for a system-wide install):
|
|
|
|
export PATH=$PATH:/usr/local/writeonce/bin
|
|
|
|
Restart your shell, or `source $HOME/.profile` to apply it now. Then verify:
|
|
|
|
woc version # writeonce @VER@ linux/amd64
|
|
wovm --version # wovm @VER@
|
|
|
|
## Use
|
|
|
|
woc <project-dir> # builds <project>/target/<name>, one standalone binary
|
|
./<project>/target/<name> # run it — no runtime to install on the target host
|
|
|
|
A writeonce project is a directory with a `wo.toml` manifest and one or more
|
|
`.wo` files. `woc` locates `wovm` beside itself, so a tarball install needs no
|
|
extra configuration; override with the `$WO_RUNTIME` environment variable or a
|
|
`[build] runtime = "..."` key in `wo.toml` if you ever need to.
|
|
|
|
A `wo.toml` may declare a minimum toolchain version:
|
|
|
|
[runtime]
|
|
wo = ">= @VER@"
|
|
|
|
`woc` refuses to build a project that requires a newer toolchain than itself.
|