Issue #2744: html and http1 become official packages, taken in by use html / use http1, and leave std (ADR-338)

Open and answer this issue on GitHub.

ready, html · opened 2026-11-22 · updated 2026-11-22 · 0 comments

Part of #539

Goal. html and http1 are official packages under packages/, not modules of std: a program writes use html / use http1, and the toolchain takes them in by that first use as it does json and db today.

Governing decision. ADR-338 D2 (a format or protocol is an official package), D3 (std lists them, a use takes one in), section 5 (std::html, std::http1 and std::db become the packages html, http1 and db). ADR-017 (escaping) and ADR-289 name them under std:: and are read as these packages.

Where it stands (read in the code).

Done when. use html and use http1 in a project without a [dependencies] entry build offline from packages/html and packages/http1, std no longer holds either module, and every example’s output is unchanged. The last code step carries Fixes #N; the report gives a Found: line per finding.

To build

  1. packages/html: the escaping API of html.rs (Html, escape, escaped) written in Nikaia, with its tests in packages/html/tests/ (escape of <, >, &, ", '; an Html value is not escaped twice). The Rust in html.rs it replaces is named in the commit.
  2. html joins project_members_official(); test in tests/compiler/tests/: a project with use html and no manifest entry builds and prints an escaped line.
  3. The same for http1: packages/http1 from runtime/http1.nika and the Nikaia-expressible half of http1.rs; what is a platform call stays a primitive in std.contracts (ADR-platform-layer-v1), named in the report.
  4. Callers move to use html / use http1: the examples above, the dsl html lowering, examples/http. Outputs byte-identical (nikaia test of each example).
  5. std::html and std::http1 removed from std; use std::html is refused with the message that names use html.

Files and limits. crates/nikaia-std/src/html.rs, http1.rs, runtime/http1.nika, compiler/project_members.nika, the dsl html sites, the examples named, new packages/html/, packages/http1/. Not: packages/json, packages/db (their lanes).

Back to Open Issues