From 61a5b8633807eec51f1f4faf6608fb2e69ca4d0b Mon Sep 17 00:00:00 2001 From: Luis <42945842+ldiaz94@users.noreply.github.com> Date: Mon, 16 Nov 2026 11:36:54 +0000 Subject: [PATCH] raz.lucela.com: the site's new home; README for a public repository, CONTRIBUTING, banner - wrangler: custom domain raz.lucela.com, workers.dev kept for old links - every link, boot.sh's download and the pages' og:image move to it - README: banner, Learn it, status, Get it; release steps to site/README - CONTRIBUTING: defects and docs by issue only, DCO, AI as a tool only --- diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..f4b316a --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,56 @@ +# Contributing to raz + +raz is defined by its report, `doc/raz.md` and `doc/raz-lib.md`, and +the language is frozen: it changes only to mend a defect. What helps +most is finding where the compiler or the library does other than the +report says. + +## What is welcome + +- **Defect reports.** The compiler or the library doing other than the + report says, a crash of the compiler, wrong code, a wrong message. +- **Defect fixes**, for such a defect. +- **Documentation and tooling.** A mistake or an unclear passage in the + report, the manual pages or the guides; the editor support; the + examples. + +Language proposals and new features are unlikely to be accepted. That a +word is reserved, and that module names share one space with the +library's, are settled. + +## How + +Everything goes through GitHub issues. Pull requests are not taken. + +A report gives: + +- `raz --version`; +- the smallest program that shows the defect; +- what it does, and what the report says it should do, with the + section. + +A fix is offered only after the defect is agreed in its issue. It: + +- mends one thing, with a test: in `conform/` if the report alone fixes + the output, else in `test/` (`conform/check.sh` and `test/check.sh` + say how they are laid out); +- passes `make check` and `make fmt`; +- follows `STANDARDS.md` and keeps the compiler's style: plain code a + beginner can follow, a comment saying why, each rewrite explained + where it is done and in `doc/compiler.md`; +- keeps `src/` to what the release in `BOOT` can build; +- carries a `Signed-off-by:` line (`git commit -s`), certifying the + [Developer Certificate of Origin](https://developercertificate.org/). + +Every patch is reviewed before it is applied, and may be rewritten. + +## Tools, AI included + +A tool, an AI model among them, may help write a report or a patch. You +are its author: you must have read and understood every line, and be +able to answer for it in review. Reports and patches made by a tool on +its own are closed. + +## Licence + +raz is under the ISC licence (`LICENSE`), and so is every contribution. diff --git a/README.md b/README.md index 9427c4a..6defb7f 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +

raz: a small systems language in Wirth's tradition

+ # raz raz (Polish for *one*, as in counting) is a small systems language in Wirth's @@ -24,11 +26,36 @@ $ examples/Hello hello, world -The compiler is about 11,500 lines of raz, written in itself: one pass, no +The compiler is about 16,700 lines of raz, written in itself: one pass, no intermediate form, no optimizer. It writes x86-64 machine code and the ELF executable itself, with no assembler or linker, and compiles about 500,000 lines a second. +**Learn it:** the website, , has two tours, +[Raz, Set, Go](https://raz.lucela.com/tour/) and +[More Raz](https://raz.lucela.com/advanced/), and the report, the +language's definition, [as a page](https://raz.lucela.com/spec.html) and +as PDFs ([language](https://raz.lucela.com/raz.pdf), +[library](https://raz.lucela.com/raz-lib.pdf)). + +**Status:** before 1.0, and the language is frozen: it changes only +to mend a defect. Releases run on x86-64 Linux; a port to arm64 macOS +is under way, unreleased. Defect reports are welcome; +[CONTRIBUTING.md](CONTRIBUTING.md) says how. + +## Get it + +A release is one tarball holding the compiler, its library, its tools +and its manual pages. The compiler finds the library beside itself, so +it runs from wherever the tarball is unpacked: + + $ curl -fsSL https://raz.lucela.com/download/latest | tar xz + $ raz-*/raz --version + +Every release, each with its SHA-256, is on the +[releases page](https://raz.lucela.com/source/releases/) and on GitHub. +To build raz from source instead, read on. + ## What's here | Path | What | @@ -53,8 +80,7 @@ The compiler is written in raz, so building it takes a raz: the release `BOOT` names. `make` fetches that release's tarball into -`build/boot/` (by curl, or by `gh` where the repository is private), -checks its SHA-256 against `BOOT`'s, and has its `raz` build the +`build/boot/` by curl, checks its SHA-256 against `BOOT`'s, and has its `raz` build the compiler, `src/`, in the repository's root, against this `lib/`. On a machine with no network, put the tarball in `build/boot/` by hand. Each release is built by the one before it, back to v0.19.0, which the @@ -240,20 +266,6 @@ Two editors are written in raz, each in a repository of its own that pins the raz it is built with: rmacs, with emacs's keys, and ravite, with vim's. Both colour raz through `tools/Scan.raz`. - -## CI image - -`containers/ci/` builds an x86-64 Linux image with released raz 0.21.0, -its library and tools, pinned concha and robbie, and Debian build tools. -Its [README](containers/ci/README.md) gives the build and checks. -The image revision is `0.21.0-debian12-r1`. - -`registry/` prepares a separate Cloudflare Worker and R2 registry for -public Docker pulls and authenticated pushes. Its [README](registry/README.md) -gives deployment and publishing steps. The container workflow validates -the image and registry; publishing is an explicit manual option and -needs a deployed registry and its publisher secret. - ## Versions The compiler says its own version and that of the report it follows: @@ -263,61 +275,32 @@ The compiler's version is git's name for the commit it was built from: `0.25.3` at the tag `v0.25.3`, `0.25.3-5-g38d29a8` five commits past it. -To release, check `main` and tag it; the tag's message is what -`raz --version` will print: +A version of the report is named by its month and a count; the report's +last section says what each version changed. Every release since 0.7.1 +stays on the website at its own name and is never made again, so that +its SHA-256 holds: programs pin raz by it. - $ make check - $ git tag -a v0.25.3 -m 'raz 0.25.3, report 2026-10.38' - $ git push origin v0.25.3 +The website's [source browser](https://raz.lucela.com/source/) +has the files, history and [release pages](https://raz.lucela.com/source/releases/). +The same address is a git remote: -GitHub then builds and checks the tag, and makes a release of it with -a tarball of `raz`, its `lib/` and its manual pages, made by `make -dist`. A tag pushed before the workflow existed is released from the -Actions tab: run "ci" with its name. Then `make site` adds the new -tag's tarball to the website's `download/` (it builds it from the tag, -apart from the tree at hand); commit `site/public/` and push to publish -it. A release whose tag isn't pushed yet goes there too, by `make site -RELEASES="v0.25.3=COMMIT"`: `make dist REV=COMMIT VERSION=0.25.3` makes -the tarball the tag will, byte for byte. Every release since 0.7.1 stays there, at its own name, and is -never made again, so that its SHA-256 holds: programs pin raz by it. -From 0.15.0 on, `make dist` makes the same tarball, byte for byte, -wherever it runs, so GitHub's and the website's agree. Once a release -is out, `BOOT` may name it, and the next one is built by it: then -`src/` may use what it brought. - -The website's [source browser](https://raz.lucelad.workers.dev/source/) -has the files, history and [release pages](https://raz.lucelad.workers.dev/source/releases/). -Each supported version has its compiler archive, a separate source -archive and SHA-256s. The same address is a git remote: - - git clone https://raz.lucelad.workers.dev/source/ - -`site/releases` records existing website distributions whose tags -are not pushed yet, so a plain `make site` keeps offering them. Both -the home page and ladle's release pages use this list. Existing -`download/` URLs and compiler archives keep their exact bytes. -[Building the site](site/README.md) gives the complete procedure. -`make site` runs ladle after building the normal pages and merges its -headers under `/source/`. The source output stays ignored; Wrangler's -build hook regenerates it before `npx wrangler deploy` uploads the -site. Commit the main pages, scripts and pinned builder, then push -`main` for the existing Cloudflare deployment. + git clone https://raz.lucela.com/source/ -A version of the report is named by its month and a count; the report's -last section says what each version changed. - Since v0.5.0 the language is frozen, softly: it changes only to mend a defect, and the library grows only by what breaks no program. A library change that must break programs keeps the old form for one minor version -beside the new; the release notes list the old forms, and the next -version removes them. Thaws, by the owner's word, changed it since; -the last, for safety, was v0.24.0, and v0.25.0 the last change. It is -now frozen hard: no more thaws, the language mended only where it does -other than the report says. +beside the new; the release notes list the old forms. Thaws, by +the owner's word, changed it since; the last, for safety, was v0.24.0, +and v0.25.0 the last change. It is now frozen hard: no more thaws, the +language mended only where it does other than the report says. + +[Building the site](site/README.md) says how a release is made and +published. `containers/ci/` builds a CI image with a released raz, and +`registry/` serves it; their READMEs say how. ## Not here -Other systems and processors (Mach-O, PE, aarch64), an optimizer, +Systems and processors beyond these two (PE, Linux on arm64), an optimizer, separate compilation, records passed to C by value, thread-local variables, and type information for debuggers. diff --git a/doc/img/banner.svg b/doc/img/banner.svg new file mode 100644 index 0000000..b85b422 --- /dev/null +++ b/doc/img/banner.svg @@ -0,0 +1,28 @@ + + raz: a small systems language in Wirth's tradition + + + + + + + + + + + + + + raz + a small systems language in Wirth's tradition + + + x86-64 Linux + + self-hosting + + no assembler, no linker + + raz: one + + diff --git a/doc/img/logo.svg b/doc/img/logo.svg new file mode 100644 index 0000000..f0db880 --- /dev/null +++ b/doc/img/logo.svg @@ -0,0 +1,7 @@ + + raz + + + + + diff --git a/site/Build.raz b/site/Build.raz index 1266684..595d1a2 100644 --- a/site/Build.raz +++ b/site/Build.raz @@ -53,7 +53,7 @@ import Tars := Vec(Tarball); const - SiteUrl = "https://raz.lucelad.workers.dev"; (* where the pages live, for the preview image *) + SiteUrl = "https://raz.lucela.com"; (* where the pages live, for the preview image *) Usage = "usage: Build [vX.Y.Z=COMMIT ...]"; (* the head of every page: the arguments are the title (twice), the site's address, then the way up to the root (six times), the diff --git a/site/README.md b/site/README.md index da3c55c..095483e 100644 --- a/site/README.md +++ b/site/README.md @@ -37,7 +37,7 @@ output would publish a copy of the previous output on the next build. The result lives at `public/source/`, browsed and cloned at -. To build just this part, +. To build just this part, after the normal downloads exist: ```sh @@ -50,6 +50,30 @@ previewing the feeds and clone line. `source.theme` starts from ladle's paper theme, with raz's page and link colours; ladle checks its light and dark contrast when it runs. + +## Cutting a release + +To release, check `main` and tag it; the tag's message is what +`raz --version` will print: + + $ make check + $ git tag -a v0.25.3 -m 'raz 0.25.3, report 2026-10.38' + $ git push origin v0.25.3 + +GitHub then builds and checks the tag, and makes a release of it with +a tarball of `raz`, its `lib/` and its manual pages, made by `make +dist`. A tag pushed before the workflow existed is released from the +Actions tab: run "ci" with its name. Then `make site` adds the new +tag's tarball to the website's `download/` (it builds it from the tag, +apart from the tree at hand); commit `site/public/` and push to publish +it. A release whose tag isn't pushed yet goes there too, by `make site +RELEASES="v0.25.3=COMMIT"`: `make dist REV=COMMIT VERSION=0.25.3` makes +the tarball the tag will, byte for byte. Every release since 0.7.1 stays there, at its own name, and is +never made again, so that its SHA-256 holds: programs pin raz by it. +From 0.15.0 on, `make dist` makes the same tarball, byte for byte, +wherever it runs, so GitHub's and the website's agree. Once a release +is out, `BOOT` may name it, and the next one is built by it: then +`src/` may use what it brought. ## Releases and downloads diff --git a/site/Source.raz b/site/Source.raz index c862d5d..7cb8886 100644 --- a/site/Source.raz +++ b/site/Source.raz @@ -17,7 +17,7 @@ import Sizes := Vec(Sized); const - Url = "https://raz.lucelad.workers.dev/source/"; (* where the browser is, unless --url says *) + Url = "https://raz.lucela.com/source/"; (* where the browser is, unless --url says *) BeginHeaders = "# BEGIN ladle source\n"; (* the block of ladle's header rules in the root _headers *) EndHeaders = "# END ladle source\n"; MaxFiles = 20000; (* files the host takes *) diff --git a/site/content/home.html b/site/content/home.html index dacd21e..632c9bc 100644 --- a/site/content/home.html +++ b/site/content/home.html @@ -89,4 +89,4 @@

Release pages give each version's commit, notes, compiler and source archives, with checksums. Browse the source and history, or clone: -git clone https://raz.lucelad.workers.dev/source/.

+git clone https://raz.lucela.com/source/.

diff --git a/site/public/advanced/allocators.html b/site/public/advanced/allocators.html index 2165b4f..c0c66be 100644 --- a/site/public/advanced/allocators.html +++ b/site/public/advanced/allocators.html @@ -8,7 +8,7 @@ - + diff --git a/site/public/advanced/asm.html b/site/public/advanced/asm.html index 2db4b8f..b8b14fc 100644 --- a/site/public/advanced/asm.html +++ b/site/public/advanced/asm.html @@ -8,7 +8,7 @@ - + diff --git a/site/public/advanced/atomics.html b/site/public/advanced/atomics.html index 1426ced..2a55199 100644 --- a/site/public/advanced/atomics.html +++ b/site/public/advanced/atomics.html @@ -8,7 +8,7 @@ - + diff --git a/site/public/advanced/bytes.html b/site/public/advanced/bytes.html index 66a66d4..a122fa6 100644 --- a/site/public/advanced/bytes.html +++ b/site/public/advanced/bytes.html @@ -8,7 +8,7 @@ - + diff --git a/site/public/advanced/collections.html b/site/public/advanced/collections.html index 91daa0f..cf3eaec 100644 --- a/site/public/advanced/collections.html +++ b/site/public/advanced/collections.html @@ -8,7 +8,7 @@ - + diff --git a/site/public/advanced/files.html b/site/public/advanced/files.html index df78490..42c336a 100644 --- a/site/public/advanced/files.html +++ b/site/public/advanced/files.html @@ -8,7 +8,7 @@ - + diff --git a/site/public/advanced/fmt.html b/site/public/advanced/fmt.html index 54d16d7..263095c 100644 --- a/site/public/advanced/fmt.html +++ b/site/public/advanced/fmt.html @@ -8,7 +8,7 @@ - + diff --git a/site/public/advanced/index.html b/site/public/advanced/index.html index 956f9e8..3333e78 100644 --- a/site/public/advanced/index.html +++ b/site/public/advanced/index.html @@ -8,7 +8,7 @@ - + diff --git a/site/public/advanced/lifecycle.html b/site/public/advanced/lifecycle.html index 617f33c..37f0b0a 100644 --- a/site/public/advanced/lifecycle.html +++ b/site/public/advanced/lifecycle.html @@ -8,7 +8,7 @@ - + diff --git a/site/public/advanced/linkstatic.html b/site/public/advanced/linkstatic.html index 9b87e83..2b68e77 100644 --- a/site/public/advanced/linkstatic.html +++ b/site/public/advanced/linkstatic.html @@ -8,7 +8,7 @@ - + diff --git a/site/public/advanced/listing.html b/site/public/advanced/listing.html index a83adb4..a33b91c 100644 --- a/site/public/advanced/listing.html +++ b/site/public/advanced/listing.html @@ -8,7 +8,7 @@ - + diff --git a/site/public/advanced/lockfree.html b/site/public/advanced/lockfree.html index fb3dae0..3e42578 100644 --- a/site/public/advanced/lockfree.html +++ b/site/public/advanced/lockfree.html @@ -8,7 +8,7 @@ - + diff --git a/site/public/advanced/ordering.html b/site/public/advanced/ordering.html index a512f9a..ea6a825 100644 --- a/site/public/advanced/ordering.html +++ b/site/public/advanced/ordering.html @@ -8,7 +8,7 @@ - + diff --git a/site/public/advanced/processes.html b/site/public/advanced/processes.html index aa84c78..a5c6399 100644 --- a/site/public/advanced/processes.html +++ b/site/public/advanced/processes.html @@ -8,7 +8,7 @@ - + diff --git a/site/public/advanced/ring.html b/site/public/advanced/ring.html index b36009a..4a31f5c 100644 --- a/site/public/advanced/ring.html +++ b/site/public/advanced/ring.html @@ -8,7 +8,7 @@ - + diff --git a/site/public/advanced/static.html b/site/public/advanced/static.html index 2aa6416..45e02ef 100644 --- a/site/public/advanced/static.html +++ b/site/public/advanced/static.html @@ -8,7 +8,7 @@ - + diff --git a/site/public/advanced/syscalls.html b/site/public/advanced/syscalls.html index 9e98864..9e9e3ab 100644 --- a/site/public/advanced/syscalls.html +++ b/site/public/advanced/syscalls.html @@ -8,7 +8,7 @@ - + diff --git a/site/public/advanced/targets.html b/site/public/advanced/targets.html index d474557..10abe67 100644 --- a/site/public/advanced/targets.html +++ b/site/public/advanced/targets.html @@ -8,7 +8,7 @@ - + diff --git a/site/public/advanced/volatile.html b/site/public/advanced/volatile.html index 04a52a9..0f4c339 100644 --- a/site/public/advanced/volatile.html +++ b/site/public/advanced/volatile.html @@ -8,7 +8,7 @@ - + diff --git a/site/public/index.html b/site/public/index.html index 7e086e2..f720374 100644 --- a/site/public/index.html +++ b/site/public/index.html @@ -8,7 +8,7 @@ - + @@ -135,7 +135,7 @@

Release pages give each version's commit, notes, compiler and source archives, with checksums. Browse the source and history, or clone: -git clone https://raz.lucelad.workers.dev/source/.

+git clone https://raz.lucela.com/source/.

raz is under the ISC license. Source
diff --git a/site/public/spec.html b/site/public/spec.html index 0976d93..ff2f5ae 100644 --- a/site/public/spec.html +++ b/site/public/spec.html @@ -8,7 +8,7 @@ - + diff --git a/site/public/tour/c.html b/site/public/tour/c.html index 0b5f128..4e88339 100644 --- a/site/public/tour/c.html +++ b/site/public/tour/c.html @@ -8,7 +8,7 @@ - + diff --git a/site/public/tour/checks.html b/site/public/tour/checks.html index a4bc4e8..30ee0b9 100644 --- a/site/public/tour/checks.html +++ b/site/public/tour/checks.html @@ -8,7 +8,7 @@ - + diff --git a/site/public/tour/defer.html b/site/public/tour/defer.html index 8eeeb15..5af2fbf 100644 --- a/site/public/tour/defer.html +++ b/site/public/tour/defer.html @@ -8,7 +8,7 @@ - + diff --git a/site/public/tour/errors.html b/site/public/tour/errors.html index 6dec729..e4b0dc3 100644 --- a/site/public/tour/errors.html +++ b/site/public/tour/errors.html @@ -8,7 +8,7 @@ - + diff --git a/site/public/tour/generics.html b/site/public/tour/generics.html index eff6e49..558336f 100644 --- a/site/public/tour/generics.html +++ b/site/public/tour/generics.html @@ -8,7 +8,7 @@ - + diff --git a/site/public/tour/hello.html b/site/public/tour/hello.html index c12291d..1735d78 100644 --- a/site/public/tour/hello.html +++ b/site/public/tour/hello.html @@ -8,7 +8,7 @@ - + diff --git a/site/public/tour/index.html b/site/public/tour/index.html index 2985c6b..9bba0eb 100644 --- a/site/public/tour/index.html +++ b/site/public/tour/index.html @@ -8,7 +8,7 @@ - + diff --git a/site/public/tour/integers.html b/site/public/tour/integers.html index 98dd4fa..ecaab37 100644 --- a/site/public/tour/integers.html +++ b/site/public/tour/integers.html @@ -8,7 +8,7 @@ - + diff --git a/site/public/tour/memory.html b/site/public/tour/memory.html index fa7778f..b04a597 100644 --- a/site/public/tour/memory.html +++ b/site/public/tour/memory.html @@ -8,7 +8,7 @@ - + diff --git a/site/public/tour/modules.html b/site/public/tour/modules.html index ceaf4c1..42db4dd 100644 --- a/site/public/tour/modules.html +++ b/site/public/tour/modules.html @@ -8,7 +8,7 @@ - + diff --git a/site/public/tour/procedures.html b/site/public/tour/procedures.html index bda2f3b..c07e766 100644 --- a/site/public/tour/procedures.html +++ b/site/public/tour/procedures.html @@ -8,7 +8,7 @@ - + diff --git a/site/public/tour/records.html b/site/public/tour/records.html index e4d208e..b9ec3a3 100644 --- a/site/public/tour/records.html +++ b/site/public/tour/records.html @@ -8,7 +8,7 @@ - + diff --git a/site/public/tour/slices.html b/site/public/tour/slices.html index 459c30d..27e9038 100644 --- a/site/public/tour/slices.html +++ b/site/public/tour/slices.html @@ -8,7 +8,7 @@ - + diff --git a/site/public/tour/threads.html b/site/public/tour/threads.html index 7704e12..f3997e1 100644 --- a/site/public/tour/threads.html +++ b/site/public/tour/threads.html @@ -8,7 +8,7 @@ - + diff --git a/site/public/tour/values.html b/site/public/tour/values.html index 99ae194..797e347 100644 --- a/site/public/tour/values.html +++ b/site/public/tour/values.html @@ -8,7 +8,7 @@ - + diff --git a/site/public/tour/variants.html b/site/public/tour/variants.html index 2c76540..4256499 100644 --- a/site/public/tour/variants.html +++ b/site/public/tour/variants.html @@ -8,7 +8,7 @@ - + diff --git a/src/boot.sh b/src/boot.sh index 8d4b918..8a1bc57 100755 --- a/src/boot.sh +++ b/src/boot.sh @@ -30,7 +30,7 @@ id=$(gh api repos/$repo/releases/tags/$tag --jq ".assets[] | select(.name == \"$t\") | .id" 2>/dev/null) && [ -n "$id" ] && gh api -H 'Accept: application/octet-stream' repos/$repo/releases/assets/$id >$d/$t 2>/dev/null || - curl -fsSL -o $d/$t https://raz.lucelad.workers.dev/download/$t 2>/dev/null || + curl -fsSL -o $d/$t https://raz.lucela.com/download/$t 2>/dev/null || { rm -f $d/$t; echo "boot: can't fetch $t; put it in $d" >&2; exit 1; } fi fi diff --git a/wrangler.jsonc b/wrangler.jsonc index bb647d2..892cd6f 100644 --- a/wrangler.jsonc +++ b/wrangler.jsonc @@ -5,5 +5,7 @@ "name": "raz", "compatibility_date": "2026-10-01", "build": { "command": "make site-source" }, - "assets": { "directory": "./site/public" } + "assets": { "directory": "./site/public" }, + "workers_dev": true, + "routes": [{ "pattern": "raz.lucela.com", "custom_domain": true }] }