Changelog

All versions and downloads Jump to Added | Changed | Fixed | Security

Unreleased [Not released yet]

Part 4 of 15. Previous part

Changed (73)

  • Pure routes on the edge. A sync +server.rs get that takes no Cx and no input, on a path with no param, can be pure (App::pure). It is pure when no hook, guard, CACHE, COMPRESS, CORS or TIMEOUT is on it. The bridges that answer through the host's fetch handler are Deno.serve, Bun.serve, Workers, Netlify and Vercel Edge. A GET of such a path with no query can send a 200 with only a static content-type. Then these bridges keep the path and host. Later GETs of them run the handler in one call, with no request bytes and no Cx. Any other result goes the whole way with that result, so the handler runs once. Other results are another status, a header, an error, a stream or changes not yet saved. An app with no pure route has no App::pure. A bridge that finds no pure call at startup does not use it. Raw sockets of Node, Bun and Deno do not use it. User instructions per request on / (Paris b86, base 7733f3e04): Deno.serve 19.37k -> 15.91k, Bun.serve 17.54k -> 15.77k, workerd 232.13k -> 205.57k.
  • Node's node:http handler (WISP_NODE_HTTP=1, Vercel's Node function, Firebase) uses pure routes too. The first GET of a path goes as a lazy request, as on Deno.serve. That request can make the path pure. Later GETs of a pure path run the handler in one call. Only a GET with no query, no body header, one host that is not empty and each header name once uses this path. Each value must be Latin-1 with no control byte but a tab. All other requests go whole, as before. A whole request has content-length: 0, and so has the lazy one.
  • Edge builds: a task poll uses one kept waker. It does not clone and drop the waker's Arc for each poll. A task that keeps a waker still wakes, and the next poll gets a new waker. A poll inside a poll gets its own waker. On Deno.serve / (Paris, median of 21) the change is inside the spread of the runs: no gain is measured. Native routes do not change.
  • Edge: the parser writes each request into a Cx on the heap in place. The request path does not copy the Cx from frame to frame. On Deno.serve / (Paris, Wisp d9d973b0 on 0e25654f, median of 11) it runs 930 fewer instructions per request (22.25k to 21.32k). Deno raw sockets and native routes do not change.
  • Edge: a bodiless request through serve of the edge bridge (Deno.serve) goes into its Cx with no parse when its head has the shape that the bridge writes: a request line and one host line. Wisp checks the same things as the parser: method, path bytes, host bytes and the 16 KiB head limit. Any other head goes to the parser as before. On Deno.serve / (Paris, Wisp 6d3a874c on d22cadb0, median of 11) it runs 290 fewer instructions per request (21.45k to 21.16k). Raw sockets and native routes do not change.
  • Edge builds: when a reply has only static headers at the same addresses as the last reply, send uses the last head and does not compare its bytes. The sent bytes do not change. On Deno.serve / (Paris, Wisp fdbb0af9 on 27803028, median of 11) it runs 550 fewer instructions per request (22.94k to 22.39k). Deno raw sockets do not change.
  • Edge build: a request uses the request buffers of an answered request. It does not allocate them again. On Deno.serve / (Paris, Wisp 7a9d0991, median of 11) it runs 160 fewer instructions per request (23.12k to 22.96k). Wisp raw does not change.
  • Edge builds: the request parser reads a header value eight bytes at a time and skips the scan of 16 bytes. Wasm has no vector compare, so that scan was a loop over each byte. A failed scan of 16 bytes also ran again after each next word. On Deno raw sockets / (Paris, Wisp c4597060 on 77624185, median of 11) it runs 170 fewer instructions per request (20.70k to 20.53k). Deno.serve and native routes do not change.
  • Edge builds: a reply with the same head as the reply before it skips the head write and the search in the sent heads. It sends the same head number. A byte-by-byte check of status, flag and headers decides. On Deno.serve / (Paris, Wisp 3038cd91, median of 11) it runs 390 fewer instructions per request (23.51k to 23.12k). With / and /json mixed (Paris, two oha runs at once, same code), the change (-0.21k) is below the run spread (3.9%): not resolved.
  • The edge wasm keeps wisp.js and live.js gzipped and unpacks each once, on the first request that sends it. The wasm is smaller, and the served bytes stay the same.
  • Deno raw sockets: a socket write is a plain promise chain, with no async function and no catch promise for each write.
  • The gate has a proofs step. It runs lake build in proofs/, which holds Lean 4 proofs of premises of the request path. With no lake, the step prints proofs: SKIPPED (no lake).
  • Response::with_header takes a value of impl Into<Cow<'static, str>>. A &'static str value is not copied, so .with_header("cache-control", "no-store") allocates nothing. Response::headers is Vec<(Cow<'static, str>, Cow<'static, str>)>. A borrowed &str that is not 'static needs .to_string().
  • A table keeps its rows in one Vec in the order of their adds, not in a BTreeMap. An index of ids in sorted chunks of at most 256 finds each row. An add with a new highest id is a push. An add at another id (a random-id table) moves at most one chunk of the index, and never a row. A load sorts the ids once. The edge wasm is smaller.
  • wisp build --target deno: a read on a connection adds one to a counter. The idle check reads the clock, not each read. The idle time starts at the first check that sees the new read or write, not at the read. So a quiet connection can stay open up to one check interval (a quarter of the idle limit) longer than before.
  • The edge answer keeps the check of a 'static header pair, as the native server does. A thread checks such a pair again only when it is not one of its last 4 pairs.
  • wisp openapi: a named action (?/send) is no longer a path key with a query, which OpenAPI 3.1 does not allow. It is an operation in the x-wisp-action-send field of the page's path item. fn default stays the post of the page.
  • The TFB bench runs wrk on 4 CPUs, because 2 CPUs limit it. A cell where the median busy share of the busiest client CPU is 95% or more gets no rank. Actix Web sets its workers to the CPUs it can use, because actix-server 2.2.0 ignores taskset. The numbers on the site are from a WSL2 VM on a Ryzen 7 7800X3D.
  • Benchmark validity is per cell. bench/quiet/summarize.mjs writes valid_cells, valid_fraction and publishable in place of the run-level valid. A run is publishable when the gates pass, no cell is unclassified and at least 90 % of the cells are valid (PUBLISH_FLOOR). Reports show only valid cells and show each other cell as "noisy, not shown". Before, one noisy cell blocked the whole run.
  • Release builds send a smaller browser runtime. Its minify step drops each ; before } and joins let statements (let a=1,b=2). The meaning of the code stays the same. Gzip bytes (gate js step): wisp.js 10_250 to 10_186, live.js 12_539 to 12_457, extra.js 6_291 to 6_242.
  • The offline queue of data-wisp-queue moved from wisp.js to /_app/c/queue.js. wisp.js imports it while online on a page with such a form, and when a page starts with posts that wait. Gzip bytes (gate js step): wisp.js 10_180 to 10_178, queue.js 386. After a failed import, the next try asks for queue.js#1, #2 and so on, because a browser may keep the failure for that URL. A static export writes queue.js beside wisp.js. The runtime serves queue.js to every app, also an app with scripts = false.
  • tweened, spring and crossfade moved from extra.js to /_app/c/motion.js, and the browser code of t('key') moved from live.js to /_app/c/i18n.js. Only a module that names one of the three loads motion.js. Only an app with src/locales loads i18n.js. Gzip bytes (gate js step): live.js 12_457 to 12_324, extra.js 6_242 to 5_305, wisp.js 10_186 to 10_180.
  • version of import { version } from 'wisp' is now the id of the build (the same as <meta name="wisp-build"> and /_app/version.json, an empty string in wisp dev). Before, it was the [package] version.
  • The generated Dockerfile builds with --locked. wisp deploy init docker stops with a message when Cargo.lock is missing. A missing wasm target error says to run rustup target add in the app folder, for the toolchain in rust-toolchain.toml.
  • Edge builds (Node, Bun, Deno, Cloudflare): the JSON writer writes a short string (8 bytes or fewer, nothing to escape) one byte at a time, with no memory.copy. /json-big uses 3.0% fewer user instructions a request on Deno and 5.6% fewer on Node (median of 7 reps, VPS). The wasm grows 570 bytes. Native code does not change.
  • Apps that use wisp::Table get a smaller wasm: the edge build has no store poll and no test::fresh code (14,523 B less in a test app with one saved table, 454,715 to 440,192 B, measured on one PC).
  • Apps that use wisp::Table with more than one row type get a smaller wasm: the check for two saved tables with one name is one shared function for all row types (3,525 B less in the test app, measured on one PC).
  • A release edge wasm build has no /_wisp/* dev endpoint. With WISP_DEV=on, the app's router answers those paths (its own 404 page when no route matches), not a plain 404. The wasm is smaller.
  • beforeNavigate: nav.to is now URL | null (null for leave).
  • A template hole that is one format!(..) call (${format!("Item <{i}> & co")}) writes into the page. It makes no String for the value. When the format string holds only text and captures ({name}, {name:spec}), the build escapes the text between the captures once. A {name} capture writes as ${name} does, so a number takes the integer path. Any other arguments (format!("{}", x)) format into the escaper. The text on the page is the same as before. When a Display impl returns Err, the page keeps the text written so far. Before, format! panicked.
  • The gate checks more. The ste step reads the comments, docs and messages of tests/, examples/, bench/ and editors/ too, with a baseline per file that can only fall. The audit step fails on two ledger lines for one file. The stamps step rejects a <Measured at="newest"> block that names a group such as rank and not one suite of bench/suites.tsv, because the hash binds only exact suite names. The test fast.rs fails in CI (CI is set) when node or the wasm32-unknown-unknown target is missing, and does not skip. The release workflow publishes the VS Code extension only after the binaries, the crates and the release job passed. The GitHub mirror of the workflows sets permissions: contents: read at the top.
  • The last line of the reference in the AGENTS.md of an app has no semicolon now: <!-- End of the Wisp reference. Notes for this app go below. wisp update-docs keeps them. -->. wisp update-docs looks for this exact line. An app made before this change has the old line, so wisp update-docs says that it finds no end line. Move your notes to another file, delete AGENTS.md, and run wisp update-docs again.
  • The site step of the gate counts a changelog version page without its release body (the <article> element) under the HTML budget. The body has its own ceilings, 29,800 bytes and 11,450 bytes gzipped. They come from the page of 1.0.0-pre.3. The pages of changelog/unreleased/ have the same ceilings. The gate has no exemption for them.
  • cargo run -q -p wisp-gate site --dist <dir> checks a site that is already built in <dir> against the speed budgets. It builds nothing and needs no docs checkout. Without --dist, site builds the reference site as before.
  • A WebSocket upgrade on WISP_LISTEN=unix: logs wisp: WebSocket on "<path>" refused: WebSockets need a TCP listener, not WISP_LISTEN=unix:. The server still writes the 101 and closes the connection. Before, it closed with no log.
  • The onion page gives the reason for no Secure cookie on a plain-http onion: Tor Browser treats a .onion address as a potentially trustworthy origin, and Wisp did not check which other clients refuse a Secure cookie there. Before, the page said that the browser may refuse it.
  • wisp::env_or panics on a set value that does not parse only before the app serves (in main or init). After prepare ends, it logs wisp: {key} is {v:?}, which is not a {type} once for each key and returns the default. Before, it panicked in a request too.

Fixed (612)

  • The 204 of a cors rule preflight keeps the headers of the before hook, the server and the headers rules. Before, it dropped every header. Now it drops only the headers of the answer that it replaces: allow, location, retry-after, www-authenticate, content-type, content-encoding, content-language, content-length, content-location, content-range, content-disposition, etag and last-modified.
  • #[validate(len = ..0)] and other ranges that no length fits (5..3, 3..3, 3..=2) fail the build. Before, len = ..0 let an empty value pass. A len = ..N with a const N of 0 now fails every value.
  • A Markdown page with a date that is not YYYY-MM-DD fails the build, as in a content collection. A time can follow. The error shows 40 characters of the value at most. Each updated of /feed.xml is RFC 3339 (2026-01-02 10:30 gives 2026-01-02T10:30:00Z), and the feed sorts by it. Before, the feed copied the date as written.
  • While the app's entries() runs to make a sitemap or a feed again, the server holds no lock. While one request makes it, the other requests get the old copy and do not wait. They wait only when there is no copy. A make that panics lets the next request make it.
  • A try that ends after its lease lapsed, and after its server read the claim of another server (WISP_STORE_POLL), does not change the job and writes a log line. Each claim writes a random token into the job row (claim). Store::save has no condition, so a late try whose server did not read the other claim yet can still change the job. Before, the failure of the old try set the lease of the new claim to 0, and its success deleted the job that the new claim ran.
  • A worker tries again at the next renewal (30 s later) when the store fails to renew the lease of a running job. After 2 failures in a row, it writes one log line. Before, one failed renewal stopped the renewals until the job ended, so another server could claim the job when its lease ended (60 s).
  • A host trigger (edge, serverless) runs at most as many jobs of a queue as were due at its start. Before, a job that pushed a new job due at once kept the trigger in a loop until the host stopped it.
  • wisp build refuses a wisp::cron schedule that wisp::cron refuses when the app starts. A schedule takes digits and * , - / only. A day name (MON-FRI) or ? gives src/hooks.rs:3: the schedule "0 9 * * MON-FRI" has characters that wisp::cron does not take. It takes digits and * , - /. A number out of range names its field: src/hooks.rs:3: wisp::cron: "60" is outside 0-59. Both use one rule (wisp_shared::cron::parse). The converters for the hosts no longer read day names or ?. Before, the build wrote the trigger of the host, and the app panicked in init.
  • wisp::cron refuses a field with a + sign (+5 * * * *). Before, it read +5 as 5.
  • A wisp::cron task that panics before it returns its future does not stop the schedule, and Wisp writes one log line. This holds for a host trigger (edge, Lambda) too. With panic = "abort", the panic stops the process. Before, that panic ended every later run.
  • #[validate(min)] and #[validate(max)] compare a u128 above i128::MAX exactly. Before, they compared it as an f64, so 2^127 passed max = 170141183460469231731687303715884105727 (i128::MAX).
  • The Lambda runtime reads at most 6 MB (6291456 bytes) of an event, the Lambda payload quota of a synchronous request. It answers a longer event with an error to the runtime API: the event is over Lambda's 6 MB payload. Before, it read the whole event with no limit.
  • wisp::cache drops an answer that it lets go (replaced, expired, evicted or forgotten by uncache or a tag) after the unlock. Before, a slow T::drop made the other calls wait.
  • The critical CSS of a page stays out when a function name in the sheet has a CSS escape, such as u\72l(x.png) for url(x.png). Before, such a relative address could go into the page, where it means another file.
  • WISP_SECRET and WISP_SECRET_OLD must have at least 32 characters, and the error counts characters: WISP_SECRET is 5 characters, too short to keep signed cookies safe. Before, Wisp counted bytes, so 16 characters of 2 bytes each passed.
  • The gate step site counts the HTML of a page with a fixed build id in <meta name="wisp-build">. Before, a new id of a changed build could change the count with no change to the page.
  • Saved tables on the edge (WISP_STORE=d1:BINDING or a libsql:// address) lost data when several instances (Cloudflare isolates) ran at once. Two instances gave the same id, and the second row replaced the first. An instance did not see a row that another instance added, so a redirect to it got a 404. An instance wrote its old copy of a row over a newer one, or back after a delete. Now the store keeps a version for each row. Before the handler of a request runs, the instance reads the rows that changed. That is 1 query, only in an app with a saved table. Wisp's own files and the app's static files skip it. Each instance takes its ids from its own block of 16. So ids are unique and grow in one instance, but are not in time order across instances. A client that pages a REST list forward with after does not see a row that another instance adds below that id. The changes of a request go to the store after the handler, in one batch, all or none. The response waits for it. The changes of a wisp::spawn task or of init go to the store each time the task waits, so they are not all or none. So do the changes of a WebSocket (of a request or a connection), and a WebSocket gets no 409. A request that the client cancels still saves the changes that it made before the cancel. Two requests of one instance share a batch only when they change the same row. When another instance changed one of those rows first, the request gets a 409 and none of its changes stays. Effects outside the store (an email, a fetch) are the job of the app. A batch that fails for another reason gives a 500 and no longer stops the instance. The instance reads those rows again. When the store cannot be read before the handler, the request gets a 503. A call of the store that gets no answer in 30 s fails: a read gives a 503 and a write a 500. The instance then reads those rows again, and that read can also take 30 s. So the 500 can come after 60 s. Each 500 of a batch now says The store may not have saved the changes. A change of a wisp::spawn task, of init or of a WebSocket that starts from a failed change fails alone, with a log line. The other changes of its batch go. A request stays all or none. A row that the instance read again no longer replaces a newer copy of it. Before, a late read could give the next change of the row a 409. When the store answers a write with no version, the log shows what it sent. A database of 1.0.0-pre.3 gets the new columns at the first start, with all its rows. In one instance, a request can keep a copy of a row across an .await. It can then write over a change of the same instance (see docs/known-issues.md). The tests are in tests/app/tests/store_race.mjs.
  • A post to ?/<name> with no such action, on a page whose forms post only to form commands (#[remote]), gets a 404 No action named <name> on this page , as on other pages. Before, it got a 405.
  • An import { ... } from 'wisp' of a name that wisp does not export (such as onMount, a helper that a <script> of a .wisp file has with no import) fails the build at the line of the import, in a script of a .wisp file and in a file of src/lib. Before, the browser stopped at the import with "does not provide an export named" and ran none of the module.

Next part (5 of 15)

Source: CHANGELOG.md