Skip to content

Docs: bring contrib READMEs up to date - #93

Merged
284km merged 5 commits into
mainfrom
docs-contrib-refresh-2026-11-28
Nov 28, 2026
Merged

284km merged 5 commits into
mainfrom
docs-contrib-refresh-2026-11-28

Conversation

@284km

@284km 284km commented Nov 28, 2026

Copy link
Copy Markdown
Collaborator

Brings contrib/README.md and the per-library READMEs in line with the code on main. Docs only; no source changes. Each README was compared with its library's exports (mere doc), its source and its git history. Usage snippets were compiled or run where that was practical.

Index (contrib/README.md)

  • The table now lists all 49 libraries under contrib/. It previously listed 21 and was missing async, auth, bignum, codegen, db, encoding, feed, gen, graphql, html, http2, kv, log, mlint, ordset, os, prop, proto, raster, softfloat, store, stream, typer, unicode, url, webhook, window and xml. Each row has a one-line description and the module name(s); rows link to the library's README where there is one.
  • Corrected stale rows: font is no longer rejected by Wasm/LLVM, time now runs on Wasm, eval is no longer "Stage 51a", and http is no longer Node-only.
  • "How to use" now mentions mere install / mere.toml (docs/packages.md) and drops the deleted contrib/json/writer.mere and the stale prefix examples.
  • Removed the pointers to internal design notes.

Self-hosted toolchain

  • parser: dropped "(Phase 50 in progress)". Added the entry points (tokenize, parse_decls, parse_program_ast), free_names.mere and the libraries that import it. The demo output now shows @ctor: names. "Deferred" items are split into "since landed" and "still deferred", each checked against the parser.
  • eval: the file entry now describes the current scope (everything except floats) and the entry points.
  • fmt: added the entry points; the demo output now matches a real run; the Wasm build command needs --enable-tail-call.
  • typer: corrected the line count. Stage 52g (browser type-checker page) is marked complete. The stale test-count claim is replaced by the actual tests (test/test_basic.ml, scripts/selfhost_check.sh).
  • codegen: added compile.mere (compile_source_to_wat) and named scripts/selfhost_check.sh as the end-to-end gate.
  • mlint: LLVM and Wasm now emit and run it.

Data formats and text

  • json: writer.mere was merged into module Json, so the file table, usage and copy instructions are rewritten. Removed the gotchas that no longer apply. Documented that escape_str escapes only " and \.
  • csv: added the step functions and CsvWriter.header. Linked the writer demo. New limitation: a field containing a newline is written unquoted.
  • toml: the snippet no longer fails with "trailing input". Noted that importing the file prints its self-test.
  • encoding: added the generated labels.mere (all 228 labels). label_of knows every label, but decode implements 4 encodings. The 0x00-on-LLVM section is history now: LLVM str carries its length. The usage example now type-checks.
  • unicode: added missing exports. Width counts grapheme clusters. Removed East Asian Width from "not here yet". The LLVM NUL claim is now in the past tense.
  • url: removed last_index_of, which no longer exists. Dropped the retired "Wasm fail does not unwind" reason. Percent.decode "%00" is 3 bytes on every backend. ?url_parts becomes url_parts option.
  • regex: engine.mere is described correctly (its own AST, with alternation).
  • html: added build.mere (the html tree, render / page / page_with, gate scripts/htmlbuild_check.sh). The tokenizer switches RCDATA/RAWTEXT/script state by itself.
  • proto: updated the file table (of_sources, new wire helpers). The lexer refuses out-of-range literals with a proper error. The gen gate covers 25 schemas.
  • graphql: "not here yet" now says which missing validation rules the corpus exercises (5 of 11). Field arguments reach GFn resolvers.

Web, browser, window

  • http: the README described only http.mere. It now lists all optional files (router, query, sessions, CSRF, CORS, metrics, static, SSE, WebSocket, client, TLS, serve_mt, serve_rd, …). Added http_get_header and a native C build/run section. Fixed the -w -o build command and the expected output. Rewrote the stale limitations.
  • http2: the handler type is str -> bytes list -> grpc_reply, and the example now uses H2Server.unary. Added h2conn / unary / apply_settings / apply_window_update. Three of the four "does not do" items have since been lifted.
  • dom: 35 externs, not 34. Documented the ABI check in attach, the setRom / setWorkerTransport setters, and worker_call.
  • site: corrected the line count. Added build_full.sh and playground/. Imports are now the mere-markdown package plus the full-path contrib/path. Added setup notes (mere install, run from the repo root). LLVM is supported. Replaced the stale limitations with the real ones.
  • state: added store_watcher_count.
  • window: added Window.width / height; the example also imports contrib/raster/path.mere and passes mere check.

Utilities

  • argparse: the usage example was not valid code. Listed the public helpers and linked the demo. New limitation: a trailing option with no value is ignored.
  • bignum: every backend's int is 64-bit; Wasm is no longer described as 32-bit.
  • option: corrected the line count. Removed the "bare None needs an annotation" gotcha, which no longer applies.
  • path: corrected the line count.
  • prop: the two "recorded rather than fixed" defects are fixed, and the files now read as regression cases.
  • test: corrected the line count. The example calls exit (Test.exit_status s). Removed "Mere has no threads".
  • time: Wasm is supported; corrected the line count.
  • stream: the snippet now parses; all four backends work.
  • font: Wasm and LLVM no longer reject it (byte-identical output on interp / C / LLVM / Wasm).
  • raster: added the missing exports. LLVM and Wasm match test/parity/raster.mere.
  • softfloat: arithmetic is no longer "not here yet". Added a table of every file and an arithmetic example. RV32I builds its float operators from it.

No change needed: gen, ordset, store.

Checks run

  • scripts/ctest.sh on the contrib files: C matches the interpreter.
  • Gates: selfhost_check.sh, encoding_parity.sh, html_tokenizer_conformance.sh, htmlbuild_check.sh, http2_parity.sh, hpack_parity.sh, graphql_parity.sh, graphql_validate_parity.sh, http_concurrency_check.sh, proto_parity.sh, proto_desc_parity.sh, proto_gen_parity.sh, url_parity.sh, linebreak_conformance.sh, window_check.sh, softfloat_check.sh.
  • Every relative link in the touched READMEs resolves.

Not run: the browser/headless DOM checks, the gRPC and GraphQL exec/introspection/server parity scripts, normalize_conformance.sh (did not finish within the time limit), and the http TLS / SSE / WebSocket / client paths.

🤖 Generated with Claude Code

@284km 284km left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed cdc1299 against main 4f2c660. No actionable issues found. The consolidated library index, corrected checked/unchecked self-host entry points, native HTTP instructions, and explicit remaining JSON/CSV/encoding limitations are useful improvements.

Validation: all relative file links in the 34 changed READMEs resolve, and every current contrib directory appears in the index. I checked the new HTML and softfloat examples and the TOML example by execution; type-checked the stream and test examples and the HTTP/2 adapter (supplying an identity reply_for for the application's placeholder); and compiled the documented native HTTP handler using the documented clang command. Six focused programs (HTML escaping, softfloat arithmetic, test-runner exit status, URL NUL preservation, grapheme-cluster width, and bare None) matched interpreter stdout AND exit status on C, LLVM, and Wasm: 18/18 comparisons. The test-runner example correctly exits 1 for its intentional failing assertion. Native comparison binaries used ordinary clang -O2. The compiler built for the sibling documentation PR was reused only after verifying every non-Markdown tracked input is identical between the two heads.

This is focused documentation validation, not a rerun of all library/conformance, browser, network, platform, or resource suites. Hosted CI is not claimed complete. No merge: the recorded hold_all_merges and new_failure_review_required flags remain active; the queue exception does not clear that hold.

@284km
284km merged commit 740737f into main Nov 28, 2026
17 checks passed
@284km
284km deleted the docs-contrib-refresh-2026-11-28 branch November 28, 2026 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant