The published v0.1.0 binaries need less than the page claimed: woc imports up to GLIBC_2.35, wovm up to GLIBC_2.34. The page said 2.38, which was measured on a dev workstation (glibc 2.39) before CI existed — and understating support turns working platforms away. - supported systems: glibc 2.35+, covering Ubuntu 22.04+, Debian 12+, Fedora 36+ - RHEL 9 (2.34) runs wovm but not woc: build elsewhere, copy the self-contained binary - say plainly that the floor is set by the machine that BUILT the release, which is why CI pins ubuntu-22.04 - site-accept follows the new string This is the pinned-runner decision paying off: 2.38 -> 2.35. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
110 lines
6.6 KiB
Text
110 lines
6.6 KiB
Text
-- install/view.wo — the VIEW for /install. Static copy: no fields, so
|
|
-- the component has none. It is still a component, and still renders
|
|
-- through the same interface as every other page.
|
|
use view
|
|
|
|
pub class InstallPage {
|
|
fn render() -> Text {
|
|
let head = `
|
|
<h1 class="text-3xl font-bold mb-4">Install writeonce</h1>
|
|
<p class="leading-relaxed mb-6">Two native binaries — <code>woc</code>,
|
|
the compiler, and <code>wovm</code>, the runtime VM. Both depend only on
|
|
the system C library. There is no package manager to install, no
|
|
language runtime to install on the machines you deploy to, and no
|
|
build toolchain beyond these two files.</p>`;
|
|
|
|
let sys = supported();
|
|
|
|
let s1 = section("1. Download",
|
|
`<p class="leading-relaxed mb-4">One tarball, two binaries. Take it from
|
|
the GitHub release, or from this site as a mirror — they are the same
|
|
bytes, and the checksum below proves it:</p>
|
|
<p class="mb-4">
|
|
<a class="btn no-underline" href="https://github.com/shoneyj/writeonce/releases/download/v0.1.0/writeonce-0.1.0-linux-amd64.tar.gz">Download 0.1.0 (linux-amd64)</a>
|
|
<a class="btn-outline no-underline" href="/dl/writeonce-0.1.0-linux-amd64.tar.gz">Mirror</a>
|
|
</p>
|
|
<p class="leading-relaxed mb-4">Verify it before you extract it. The
|
|
expected digest is served beside the archive at
|
|
<a href="/dl/writeonce-0.1.0-linux-amd64.tar.gz.sha256">.sha256</a>:</p>`,
|
|
code_block("curl -O https://writeonce.de/dl/writeonce-0.1.0-linux-amd64.tar.gz\ncurl -O https://writeonce.de/dl/writeonce-0.1.0-linux-amd64.tar.gz.sha256\nsha256sum -c writeonce-0.1.0-linux-amd64.tar.gz.sha256"));
|
|
|
|
let s2 = section("2. Extract it",
|
|
`<p class="leading-relaxed mb-4">Extract into <code>/usr/local</code>,
|
|
replacing any previous install. Run this as root, or through
|
|
<code>sudo</code>:</p>`,
|
|
code_block("rm -rf /usr/local/writeonce\ntar -C /usr/local -xzf writeonce-0.1.0-linux-amd64.tar.gz"));
|
|
|
|
let s3 = section("3. Put it on your PATH",
|
|
`<p class="leading-relaxed mb-4">Add one line to your
|
|
<code>$HOME/.profile</code> (or <code>/etc/profile</code> for every user
|
|
on the box), then restart your shell:</p>`,
|
|
code_block("export PATH=$PATH:/usr/local/writeonce/bin"));
|
|
|
|
let s4 = section("4. Check it",
|
|
`<p class="leading-relaxed mb-4">Both should print the same version.
|
|
<code>woc</code> finds <code>wovm</code> beside itself, so a tarball
|
|
install needs no further configuration.</p>`,
|
|
code_block("woc version # writeonce 0.1.0 linux/amd64\nwovm --version # wovm 0.1.0"));
|
|
|
|
let s5 = section("5. Your first project",
|
|
`<p class="leading-relaxed mb-4">A project is a directory with a
|
|
<code>wo.toml</code> manifest and one or more <code>.wo</code> files.
|
|
Nothing else — no lockfile to create by hand, no scaffolding step.</p>`,
|
|
code_block("mkdir hello && cd hello\n\ncat > wo.toml <<'EOF'\nname = \"hello\"\nversion = \"0.1.0\"\n\n[runtime]\nwo = \">= 0.1\"\nEOF\n\ncat > main.wo <<'EOF'\nfn main() -> Int {\n print(\"hello, writeonce\");\n return 0;\n}\nEOF"));
|
|
|
|
let s6 = section("6. Build and run",
|
|
`<p class="leading-relaxed mb-4"><code>woc <dir></code> emits ONE
|
|
standalone binary at <code>target/<name></code>. Copy that file to a
|
|
server and run it — the VM is inside it, and so is the database.</p>`,
|
|
code_block("woc .\n./target/hello # hello, writeonce"));
|
|
|
|
let s7 = section("7. Add a dependency",
|
|
`<p class="leading-relaxed mb-4">Dependencies are git repositories pinned
|
|
by revision. The <code>[deps]</code> KEY is the module name your code
|
|
<code>use</code>s. <code>woc</code> writes a <code>wo.lock</code> with the
|
|
exact revision, and a locked build works offline. See
|
|
<a href="/packages">Packages</a> for what is available.</p>`,
|
|
code_block("[deps]\nview = { git = \"https://github.com/shoneyj/writeonce-view\", rev = \"v0.1.0\" }"));
|
|
|
|
let note = el("div", "bg-white rounded-lg border shadow-sm p-6 mt-8",
|
|
el("h2", "text-lg font-bold mb-2", "Where things go") ..
|
|
`<p class="leading-relaxed">The tarball installs to
|
|
<code>/usr/local/writeonce</code>: <code>bin/woc</code>,
|
|
<code>bin/wovm</code>, and a <code>VERSION</code> file. To point
|
|
<code>woc</code> at a different VM, set <code>$WO_RUNTIME</code> or add a
|
|
<code>[build] runtime = "..."</code> key to <code>wo.toml</code>. A
|
|
manifest may also require a minimum toolchain with
|
|
<code>[runtime] wo = ">= 0.1"</code>; <code>woc</code> refuses to build
|
|
a project that needs a newer toolchain than itself.</p>`);
|
|
|
|
return head .. sys .. s1 .. s2 .. s3 .. s4 .. s5 .. s6 .. s7 .. note;
|
|
}
|
|
}
|
|
|
|
-- What the release actually runs on. Every claim here is read off the
|
|
-- shipped binaries (`file`, and the highest GLIBC_ symbol version they
|
|
-- import), not off a wish list — an install page that overstates its
|
|
-- support costs someone an afternoon.
|
|
fn supported() -> Text {
|
|
return `
|
|
<div class="bg-white rounded-lg border shadow-sm p-6 mb-8">
|
|
<h2 class="text-2xl font-bold mb-2">Supported systems</h2>
|
|
<ul class="list-disc pl-6 leading-relaxed">
|
|
<li class="mb-2"><b>Linux on x86-64</b> — the only target built today. There is no ARM, macOS or Windows build.</li>
|
|
<li class="mb-2"><b>glibc 2.35 or newer.</b> The binaries link the system C library dynamically: <code>woc</code> imports symbols up to <code>GLIBC_2.35</code> and <code>wovm</code> up to <code>GLIBC_2.34</code>, read off the published v0.1.0 release. That covers Ubuntu 22.04+, Debian 12+ and Fedora 36+. On RHEL 9 (2.34) the runtime works but the compiler does not — build elsewhere and copy the binary over, which is the point of a self-contained executable.</li>
|
|
<li class="mb-2"><b>Not musl.</b> Alpine needs a build against musl, which does not exist yet.</li>
|
|
<li class="mb-2"><b>Nothing else.</b> No JVM, no Node, no Python, no package manager. The two binaries and libc are the whole dependency list.</li>
|
|
</ul>
|
|
<p class="leading-relaxed mt-4 text-gray-700">Check yours with
|
|
<code>ldd --version</code>. If it is older than 2.35, build from source
|
|
until a wider-compatibility release exists. The floor is set by the
|
|
machine that BUILT the release, not by the language — the CI runner is
|
|
pinned to Ubuntu 22.04 to keep it this low.</p>
|
|
</div>`;
|
|
}
|
|
|
|
-- One numbered step: heading, prose, and the commands to run.
|
|
fn section(title: Text, prose: Text, code: Text) -> Text {
|
|
return el("div", "mb-8",
|
|
el("h2", "text-2xl font-bold mb-2", title) .. prose .. code);
|
|
}
|