toiljs 0.0.31 → 0.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/ci.yml +1 -1
- package/CHANGELOG.md +22 -0
- package/README.md +68 -34
- package/build/cli/.tsbuildinfo +1 -1
- package/build/cli/index.js +208 -2
- package/package.json +1 -1
- package/src/cli/index.ts +9 -0
- package/src/cli/notify.ts +125 -0
- package/src/cli/ui.ts +62 -3
- package/src/cli/update.ts +2 -2
- package/src/cli/version-check.ts +121 -0
- package/test/ui.test.ts +40 -0
- package/test/version-check.test.ts +130 -0
package/.github/workflows/ci.yml
CHANGED
|
@@ -180,7 +180,7 @@ jobs:
|
|
|
180
180
|
git push origin HEAD:main || echo "No changes to push or push failed"
|
|
181
181
|
|
|
182
182
|
- name: Create GitHub Release
|
|
183
|
-
uses: softprops/action-gh-release@
|
|
183
|
+
uses: softprops/action-gh-release@v3
|
|
184
184
|
with:
|
|
185
185
|
tag_name: ${{ github.ref_name }}
|
|
186
186
|
name: Release ${{ github.ref_name }}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [v0.0.32] - 2026-06-12
|
|
4
|
+
|
|
5
|
+
### Other Changes
|
|
6
|
+
|
|
7
|
+
- feat(cli): warn on every command when a newer toiljs is available ([#139](https://github.com/dacely-cloud/toiljs/pull/139)) by @BlobMaster41
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## [v0.0.31] - 2026-06-12
|
|
13
|
+
|
|
14
|
+
### Other Changes
|
|
15
|
+
|
|
16
|
+
- v0.0.30: Web Crypto demo, oversized envelope handling, lazy uWS loading ([#136](https://github.com/dacely-cloud/toiljs/pull/136)) by @BlobMaster41
|
|
17
|
+
- ⬆️(deps-dev): Bump @microsoft/api-extractor from 7.58.7 to 7.58.8 in the dev-deps group ([#134](https://github.com/dacely-cloud/toiljs/pull/134)) by @dependabot[bot]
|
|
18
|
+
- ⬆️(deps): Bump sharp from 0.34.5 to 0.35.0 in the production-deps group ([#135](https://github.com/dacely-cloud/toiljs/pull/135)) by @dependabot[bot]
|
|
19
|
+
- deps: switch hyper-express to @dacely/hyper-express@6.17.4 ([#137](https://github.com/dacely-cloud/toiljs/pull/137)) by @BlobMaster41
|
|
20
|
+
- release 0.0.31: @dacely/hyper-express + @dacely/toilscript-loader, drop @btc-vision direct deps ([#138](https://github.com/dacely-cloud/toiljs/pull/138)) by @BlobMaster41
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
3
25
|
## [v0.0.29] - 2026-06-08
|
|
4
26
|
|
|
5
27
|
### Other Changes
|
package/README.md
CHANGED
|
@@ -4,14 +4,18 @@
|
|
|
4
4
|
|
|
5
5
|
# ToilJS
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### Build better. Ship faster.
|
|
8
8
|
|
|
9
|
-
#### The first
|
|
9
|
+
#### The first fullstack React framework for a globally distributed application delivery network.
|
|
10
|
+
|
|
11
|
+
<sub>React on the client. Your server compiled to WebAssembly, built to run on an edge runtime measured at <b>8 million requests/s on a single modern box</b>.</sub>
|
|
10
12
|
|
|
11
13
|
<sub>Nothing to configure: routing, data, SEO, top-tier tooling, and full AI support, all built in.</sub>
|
|
12
14
|
|
|
13
15
|
<br/>
|
|
14
16
|
|
|
17
|
+
**⚡ Dynamic as fast as static.** On the Toil edge runtime, running your server code is measured as fast as serving a static file.
|
|
18
|
+
|
|
15
19
|
**⚡ First-class WebTransport over HTTP/3**, with automatic WebSocket fallback.
|
|
16
20
|
|
|
17
21
|
<br/>
|
|
@@ -35,9 +39,32 @@
|
|
|
35
39
|
|
|
36
40
|
---
|
|
37
41
|
|
|
38
|
-
|
|
42
|
+
<details>
|
|
43
|
+
<summary><b>Table of contents</b></summary>
|
|
44
|
+
<br/>
|
|
45
|
+
|
|
46
|
+
1. [Built for scale](#built-for-scale)
|
|
47
|
+
2. [Everything, at a glance](#everything-at-a-glance)
|
|
48
|
+
3. [Routing](#routing)
|
|
49
|
+
4. [Data and caching](#data-and-caching)
|
|
50
|
+
5. [Rendering and SEO](#rendering-and-seo)
|
|
51
|
+
6. [Assets and the Vite build](#assets-and-the-vite-build)
|
|
52
|
+
7. [Components](#components)
|
|
53
|
+
8. [Realtime](#realtime)
|
|
54
|
+
9. [The server: ToilScript + WebAssembly](#the-server-toilscript--webassembly)
|
|
55
|
+
10. [Agentic tooling](#agentic-tooling)
|
|
56
|
+
11. [Configuration](#configuration)
|
|
57
|
+
12. [CLI](#cli)
|
|
58
|
+
13. [Architecture](#architecture)
|
|
59
|
+
14. [The road to hyperscale](#the-road-to-hyperscale)
|
|
39
60
|
|
|
40
|
-
|
|
61
|
+
</details>
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
**ToilJS is the first fullstack React framework built for a globally distributed application delivery network.** That is the whole point. Most React frameworks are built for convenience and start to buckle the moment real traffic arrives. Toil is built the other way around: for scale that serves the millionth request as easily as the first. Your client ships as a static bundle to the edge, and your server compiles to a single portable module designed to run at line rate, so the app you write on your laptop is shaped from day one to take serious load instead of folding under it. On the Toil edge runtime that is not a slogan but a measurement: a request that runs your code is served as fast as a static file, so dynamic costs you nothing. The edge is not limited to CPU either: GPU hardware acceleration is coming, projected to take a single box from 8 million requests/s today to 50-200 million.
|
|
66
|
+
|
|
67
|
+
It is also the entire stack, already wired and configured: routing, data, caching, SEO, site search, an image and font pipeline, realtime, a dev toolbar with AI, and a strict toolchain. One command scaffolds it, then you build your app, not your stack. Nothing to assemble, nothing to glue, nothing to configure.
|
|
41
68
|
|
|
42
69
|
```bash
|
|
43
70
|
npx toiljs create my-app
|
|
@@ -51,19 +78,20 @@ Drop a `.tsx` file in `client/routes/` and it is a route: typed, code-split, pre
|
|
|
51
78
|
|
|
52
79
|
```
|
|
53
80
|
your app
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
81
|
+
┌──────────────────────┬──────────────────────┐
|
|
82
|
+
│ client/ │ server/ │
|
|
83
|
+
│ React + TSX │ ToilScript (.ts) │
|
|
84
|
+
│ static SPA bundle │ ──▶ WebAssembly │
|
|
85
|
+
└──────────┬───────────┴──────────┬───────────┘
|
|
86
|
+
│ │
|
|
87
|
+
▼ ▼
|
|
88
|
+
CDN / static host WASM edge runtime
|
|
89
|
+
└───── typed RPC ──────┘
|
|
62
90
|
```
|
|
63
91
|
|
|
64
92
|
</div>
|
|
65
93
|
|
|
66
|
-
The client is fully static (host it anywhere). The server is a portable compiled module. The two are separated by design and joined by a typed contract, so the frontend
|
|
94
|
+
The client is fully static (host it anywhere). The server is a portable compiled module. The two are separated by design and joined by a typed contract, so the frontend ships to any CDN while the backend runs wherever it is deployed. That split is what makes the delivery network global: static files replicate everywhere for free, and one small module is trivial to run in many places at once.
|
|
67
95
|
|
|
68
96
|
## Built for scale
|
|
69
97
|
|
|
@@ -74,12 +102,14 @@ Toil's architecture is the scaling story. There is no monolith to keep warm and
|
|
|
74
102
|
- **Client and server are decoupled.** They are separate artifacts joined only by a typed contract, so the frontend scales as static files while the backend scales as stateless compute. Neither one bottlenecks the other.
|
|
75
103
|
- **Shaped for the edge.** That compiled module is exactly the unit a hyperscale edge runtime is built to serve: isolated per tenant, replicated across regions, run at line rate.
|
|
76
104
|
|
|
77
|
-
That
|
|
105
|
+
That platform is not hypothetical. The Toil edge runtime is built and measured; this is the stack that runs your app at planetary scale:
|
|
78
106
|
|
|
79
|
-
- **
|
|
80
|
-
- **
|
|
81
|
-
- **
|
|
82
|
-
- **
|
|
107
|
+
- **A purpose-built edge runtime** *(built, measured)*: engineered from scratch to serve compiled apps at line rate, not adapted from a general-purpose web server. Your compiled server runs as a long-lived, isolated, per-tenant WebAssembly instance, with static assets served at wire speed alongside it. Measured at **8 million requests/s with sub-ms p50** on a single modern box, and the dynamic WebAssembly path runs at the same network-bound ceiling as serving a static file.
|
|
108
|
+
- **First-class WebTransport** *(endpoint live, client API landing)*: the runtime already terminates QUIC + TLS 1.3 and speaks HTTP/3 and WebTransport (multiplexed bidirectional streams and datagrams, no head-of-line blocking), wired into the same per-tenant instances as HTTP. The framework's channel API falls back to WebSocket automatically, so the same `useChannel` simply runs on the fastest transport available. WebSocket channels work today.
|
|
109
|
+
- **Hyperscale security built in** *(built)*: every tenant is validated at deploy time and runs under a hard per-request CPU cap and a per-tenant memory budget, isolation is enforced below your code so nothing survives between requests or tenants, and a built-in firewall screens traffic before it ever reaches an app. Overload sheds gracefully instead of melting.
|
|
110
|
+
- **ToilDB, edge-replicated typed data** *(next)*: typed collections where the method name tells you the cost, local-fast reads, CRDT writes that merge everywhere, owner-routed writes, and rare global claims that are explicitly slow. The async foundation it needs is already live in the runtime; the data layer itself is the next step.
|
|
111
|
+
- **GPU hardware acceleration** *(coming)*: the Toil server will be able to tap GPU acceleration on the edge, so compute-heavy work (media, crypto, AI inference) runs on the hardware built for it instead of burning CPU, with a single box projected to reach **50-200 million requests/s** (moderate estimate).
|
|
112
|
+
- **Post-quantum-ready transport** *(coming)*: forward-looking encryption on the QUIC layer that is already terminating TLS 1.3.
|
|
83
113
|
- **Dacely Cloud** *(coming)*: managed hosting for the whole stack, push the app and the client goes to the edge while the server runs on the runtime.
|
|
84
114
|
|
|
85
115
|
The same app runs on your laptop and is shaped, from the first commit, to fan out across the edge without a rewrite. Full architecture and status in [The road to hyperscale](#the-road-to-hyperscale).
|
|
@@ -233,7 +263,7 @@ One typed channel API for live data in both directions.
|
|
|
233
263
|
const messages = Toil.useChannel<Message>('/chat');
|
|
234
264
|
```
|
|
235
265
|
|
|
236
|
-
`connectChannel` / `useChannel` / `resolveChannelUrl` handle connection, reconnection, and message decoding, text or binary frames. Today the channel runs over WebSocket. Next it rides **WebTransport** over HTTP/3: multiplexed bidirectional streams and datagrams over QUIC with no head-of-line blocking. Toil is built to be the **first framework to ship first-class WebTransport**, with automatic WebSocket fallback, so the same `useChannel` quietly upgrades to the fastest transport the client and network support, with no code change.
|
|
266
|
+
`connectChannel` / `useChannel` / `resolveChannelUrl` handle connection, reconnection, and message decoding, text or binary frames. Today the channel runs over WebSocket. Next it rides **WebTransport** over HTTP/3: multiplexed bidirectional streams and datagrams over QUIC with no head-of-line blocking. The server side already exists: the Toil edge runtime terminates QUIC + TLS 1.3 and hands WebTransport sessions to the same per-tenant WebAssembly instance that serves your HTTP requests. Toil is built to be the **first framework to ship first-class WebTransport**, with automatic WebSocket fallback, so the same `useChannel` quietly upgrades to the fastest transport the client and network support, with no code change.
|
|
237
267
|
|
|
238
268
|
## The server: ToilScript + WebAssembly
|
|
239
269
|
|
|
@@ -253,7 +283,7 @@ export class HelloHandler extends ToilHandler {
|
|
|
253
283
|
- **Binary IO on both sides**: `DataWriter`, `DataReader`, `FastMap`, and `FastSet` are shared client and server globals (and `toiljs/io`), so you can move structured bytes instead of paying the JSON tax.
|
|
254
284
|
- **Typed RPC (preview)**: tag a server function and the compiler generates a typed `Server.*` surface on the client, end to end, no hand-written glue. The typed pipeline is in place today; the network transport is landing next.
|
|
255
285
|
|
|
256
|
-
`toiljs start` self-hosts the built client and a WebSocket channel on [hyper-express](https://github.com/kartikk221/hyper-express) (backed by uWebSockets.js) for local and small deployments.
|
|
286
|
+
`toiljs start` self-hosts the built client and a WebSocket channel on [hyper-express](https://github.com/kartikk221/hyper-express) (backed by uWebSockets.js) for local and small deployments. At scale, that same `.wasm` is exactly what the Toil edge runtime serves: one hot instance per tenant, called directly with your request and wiped clean between requests, so there is no cold start and isolation is enforced below your code rather than by trust. See [The road to hyperscale](#the-road-to-hyperscale).
|
|
257
287
|
|
|
258
288
|
## Agentic tooling
|
|
259
289
|
|
|
@@ -277,7 +307,7 @@ export default defineConfig({
|
|
|
277
307
|
});
|
|
278
308
|
```
|
|
279
309
|
|
|
280
|
-
|
|
310
|
+
The `toiljs create` wizard also scaffolds assistant files (CLAUDE.md, AGENTS.md, Cursor, and Copilot configs) so your repo is ready for coding agents on day one.
|
|
281
311
|
|
|
282
312
|
## The toolkit is the standard
|
|
283
313
|
|
|
@@ -333,6 +363,8 @@ toiljs update check for and apply dependency updates
|
|
|
333
363
|
- **`doctor`** runs read-only checks across environment, routing, config, assets, and the server build, with a fix hint on each. `--json` for CI; it exits non-zero when a check fails.
|
|
334
364
|
- **`update`** checks the registry and groups available updates by major / minor / patch; pick what to apply or pass `-y` for all (`--target` sets the strategy).
|
|
335
365
|
|
|
366
|
+
Every command also verifies you are on the latest toiljs, both the project install and the global CLI, and prints a boxed warning with the exact update command when one is behind. The registry answer is cached for an hour and the check never slows down or fails your build; opt out with `TOILJS_NO_UPDATE_CHECK=1`.
|
|
367
|
+
|
|
336
368
|
## One file does a lot
|
|
337
369
|
|
|
338
370
|
```tsx
|
|
@@ -363,7 +395,7 @@ No imports. `Toil` is a fully-typed global, tree-shaken at build. The page rende
|
|
|
363
395
|
|
|
364
396
|
## Architecture
|
|
365
397
|
|
|
366
|
-
One pipeline, from your editor to planetary scale. The build pipeline and the React client ship today; the edge runtime, the ToilDB data layer
|
|
398
|
+
One pipeline, from your editor to planetary scale. The build pipeline and the React client ship today; the edge runtime is built and measured (purple = not yet GA), and the ToilDB data layer and Dacely Cloud are the roadmap.
|
|
367
399
|
|
|
368
400
|
```mermaid
|
|
369
401
|
flowchart TB
|
|
@@ -379,10 +411,10 @@ flowchart TB
|
|
|
379
411
|
|
|
380
412
|
CLIENTS["CLIENTS<br/>browsers, mobile, API clients, AI crawlers / LLMs"]
|
|
381
413
|
|
|
382
|
-
subgraph EDGE["EDGE, anycast, multi-region POPs, scale-out,
|
|
414
|
+
subgraph EDGE["EDGE, anycast, multi-region POPs, scale-out, built + measured, pre-GA"]
|
|
383
415
|
direction LR
|
|
384
416
|
SC["STATIC CLIENT<br/>React SPA + baked HTML<br/>images, fonts, css<br/>served from CDN / edge"]
|
|
385
|
-
RT["WASM EDGE RUNTIME<br/>your ToilScript server as one .wasm<br/>isolated per-core tenant at line rate<br/>Request to handler to Response<br/>realtime channels, binary IO<br/>x many tenants x many POPs"]
|
|
417
|
+
RT["WASM EDGE RUNTIME<br/>your ToilScript server as one .wasm<br/>isolated per-core tenant at line rate<br/>8M req/s measured, sub-ms p50<br/>Request to handler to Response<br/>realtime channels, binary IO<br/>x many tenants x many POPs"]
|
|
386
418
|
SC <-->|"typed RPC Server.*"| RT
|
|
387
419
|
end
|
|
388
420
|
|
|
@@ -433,7 +465,7 @@ flowchart TB
|
|
|
433
465
|
TLS [today] │ post-quantum transport [soon]
|
|
434
466
|
▼
|
|
435
467
|
╔══════════════════════════════════════════════════════════════════════════╗
|
|
436
|
-
║ EDGE anycast multi-region POPs scale-out
|
|
468
|
+
║ EDGE anycast multi-region POPs scale-out [built] ║
|
|
437
469
|
║ ║
|
|
438
470
|
║ ┌─────────────────────────┐ ┌─────────────────────────────────┐ ║
|
|
439
471
|
║ │ STATIC CLIENT │ │ WASM EDGE RUNTIME │ ║
|
|
@@ -465,7 +497,7 @@ flowchart TB
|
|
|
465
497
|
║ push your app ─▶ client to the edge, .wasm to the runtime, data replicated ║
|
|
466
498
|
╚══════════════════════════════════════════════════════════════════════════╝
|
|
467
499
|
|
|
468
|
-
[today] shipping now
|
|
500
|
+
[today] shipping now [built] running + measured, not yet GA [soon] roadmap
|
|
469
501
|
```
|
|
470
502
|
|
|
471
503
|
</details>
|
|
@@ -474,9 +506,9 @@ flowchart TB
|
|
|
474
506
|
|
|
475
507
|
## The road to hyperscale
|
|
476
508
|
|
|
477
|
-
> **Architecture and
|
|
509
|
+
> **Architecture and status.** The framework above is what ships in the box today. The edge runtime below is built and measured, not yet generally available. ToilDB and Dacely Cloud are the roadmap.
|
|
478
510
|
|
|
479
|
-
The reason the client is static and the server is WebAssembly is that the WebAssembly runs on a runtime engineered from scratch for the edge. Toil's backend treats your compiled server as an isolated tenant and
|
|
511
|
+
The reason the client is static and the server is WebAssembly is that the WebAssembly runs on a runtime engineered from scratch for the edge. Toil's backend treats your compiled server as an isolated tenant and serves it at line rate, so the same app that runs on your laptop scales out across the edge without a rewrite.
|
|
480
512
|
|
|
481
513
|
<div align="center">
|
|
482
514
|
|
|
@@ -487,13 +519,15 @@ The reason the client is static and the server is WebAssembly is that the WebAss
|
|
|
487
519
|
|
|
488
520
|
</div>
|
|
489
521
|
|
|
490
|
-
- **A purpose-built WebAssembly edge runtime
|
|
491
|
-
- **HTTP/3 and WebTransport
|
|
492
|
-
- **
|
|
493
|
-
- **
|
|
494
|
-
- **
|
|
522
|
+
- **A purpose-built WebAssembly edge runtime** *(built, measured)*. Your server runs as an isolated WebAssembly tenant on a runtime engineered for line-rate, multi-gigabit throughput and per-tenant isolation, not on a general-purpose Node process. On a single modern box it sustains **8 million requests/s at sub-millisecond p50** across thousands of concurrent connections, the dynamic WebAssembly path runs as fast as serving a static file, deploys hot-swap with no restart, and there are no cold starts.
|
|
523
|
+
- **HTTP/3 and WebTransport** *(endpoint live)*. The runtime terminates QUIC + TLS 1.3 and speaks HTTP/3 and WebTransport: bidirectional streams and datagrams for interactive, multiplexed realtime, beyond the WebSocket channel that ships today.
|
|
524
|
+
- **Hardened multi-tenancy** *(built)*. Tenants are validated at deploy time, every request runs under a hard CPU cap and memory budget, nothing survives between requests or tenants, traffic is screened before it reaches an app, and overload sheds gracefully. The isolation model is security-audited and soak-tested.
|
|
525
|
+
- **ToilDB, an edge-replicated data layer** *(next)*. Typed collections declared in ToilScript, where the method name tells you the cost: local reads are fast, appends and CRDT counters/sets merge everywhere, owned writes are fast at the owner, and rare global claims are explicitly slow. Hyperscale data, without a per-query consistency knob to get wrong. The async foundation it needs is already live in the runtime.
|
|
526
|
+
- **GPU hardware acceleration** *(coming)*. Compute-heavy workloads in your server (media, crypto, AI inference) will offload to GPU hardware on the edge, scaling past what CPU cores alone can do, a single box is projected to reach **50-200 million requests/s** (moderate estimate).
|
|
527
|
+
- **Post-quantum-ready transport** *(coming)*. Forward-looking encryption on the QUIC layer that already terminates TLS 1.3.
|
|
528
|
+
- **Dacely Cloud** *(coming)*. Managed hosting for the whole stack: push your app, the static client goes to the edge and your WebAssembly server runs on the runtime above.
|
|
495
529
|
|
|
496
|
-
This is the spine the framework was shaped around. Today you write a typed, file-based React app with a WebAssembly server; the
|
|
530
|
+
This is the spine the framework was shaped around. Today you write a typed, file-based React app with a WebAssembly server; the platform that runs it at planetary scale is already standing in the lab.
|
|
497
531
|
|
|
498
532
|
## Tech
|
|
499
533
|
|