nish 0.42.0 → 0.44.0
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/README.md +10 -4
- package/docs/AI.md +282 -126
- package/package.json +9 -9
- package/runtime/core.d.ts +16 -0
- package/runtime/core.mjs +5 -0
- package/runtime/nish.d.ts +120 -19
- package/runtime/nish.mjs +3 -1
- package/runtime/runtime-cross.c +9 -0
- package/runtime/runtime-net.c +51 -13
- package/runtime/runtime-region.c +13 -0
- package/runtime/runtime-text.c +11 -0
- package/runtime/runtime-uring.c +83 -25
- package/runtime/runtime-wasm.c +3 -0
- package/runtime/runtime.c +329 -6
- package/runtime/sqlite/README.md +16 -3
- package/runtime/sqlite/nish-sqlite.c +940 -29
- package/scripts/build.sh +111 -29
- package/skills/writing-nish/SKILL.md +12 -4
- package/std/README.md +3 -3
- package/std/crypto/base64url.ts +102 -1
- package/std/crypto/scram.ts +142 -0
- package/std/crypto/sha1.ts +99 -41
- package/std/host/ring.ts +1 -1
- package/std/host/text.ts +1 -1
- package/std/net/handler.ts +1 -1
- package/std/net/http-server.ts +2 -3
- package/std/net/http1-server.ts +281 -51
- package/std/net/http3-server.ts +26 -15
- package/std/net/http3.ts +2 -2
- package/std/net/postgres-async.ts +64 -33
- package/std/net/postgres.ts +65 -76
- package/std/net/quic-conn-ack.ts +57 -7
- package/std/net/quic-frame.ts +104 -2
- package/std/net/quic-listener.ts +9 -2
- package/std/net/quic.ts +16 -1
- package/std/net/serve.ts +10 -8
- package/std/net/websocket.ts +188 -49
- package/std/sqlite.ts +325 -0
- package/std/text.ts +80 -11
package/README.md
CHANGED
|
@@ -71,7 +71,10 @@ for (const side of sides) {
|
|
|
71
71
|
|
|
72
72
|
The IR is readable. `examples/add.ts`, `a + b` on two `number`s (32-bit
|
|
73
73
|
integers by default), compiles to a checked add: an overflow panics instead
|
|
74
|
-
of wrapping, and a sum the compiler proves fits is a plain `add nsw`.
|
|
74
|
+
of wrapping, and a sum the compiler proves fits is a plain `add nsw`. That
|
|
75
|
+
check is a panic site, so the compiler's default, which holds a package to no
|
|
76
|
+
panic, refuses the file on purpose and `nish --allow-panics` builds it; each
|
|
77
|
+
example that keeps a panic site says why in its first lines.
|
|
75
78
|
|
|
76
79
|
```llvm
|
|
77
80
|
define noundef i32 @add(i32 noundef %a, i32 noundef %b) #0 {
|
|
@@ -238,6 +241,11 @@ module can be a few hundred bytes. The benchmark suite runs the same
|
|
|
238
241
|
algorithms in Nish, C and Rust and records wall time, size and memory in
|
|
239
242
|
[docs/BENCHMARKS.md](docs/BENCHMARKS.md).
|
|
240
243
|
|
|
244
|
+
On public leaderboards, a Nish entry placed second in the
|
|
245
|
+
[multicore server challenge](https://github.com/arjaythedev/multicore-server-challenge),
|
|
246
|
+
holding 220,000 users on 8 cores: the result and how it got there are in
|
|
247
|
+
[docs/LEADERBOARDS.md](docs/LEADERBOARDS.md).
|
|
248
|
+
|
|
241
249
|
## Interop
|
|
242
250
|
|
|
243
251
|
Nish never embeds a JavaScript engine; JavaScript calls Nish. A program
|
|
@@ -267,15 +275,13 @@ files below are its sources.
|
|
|
267
275
|
| [`std/` README](std/README.md) | Every standard library module |
|
|
268
276
|
| [FAQ](docs/FAQ.md) | Why the design is the way it is |
|
|
269
277
|
| [IR cookbook](docs/IR_COOKBOOK.md) | The exact IR of every construct |
|
|
270
|
-
| [Roadmap](docs/roadmap/index.md) | What is built and what is next |
|
|
271
278
|
| [Changelog](CHANGELOG.md) | What changed in each release |
|
|
272
279
|
|
|
273
280
|
## Project status
|
|
274
281
|
|
|
275
282
|
Pre-alpha and on 0.x, with no compatibility promise: a construct's spelling,
|
|
276
283
|
a flag's name and the IR either lowers to can change between minor releases.
|
|
277
|
-
Every commit compiles, tests and rebuilds the compiler with itself.
|
|
278
|
-
[roadmap](docs/roadmap/index.md) has what is built and what is next.
|
|
284
|
+
Every commit compiles, tests and rebuilds the compiler with itself.
|
|
279
285
|
|
|
280
286
|
## Contributing, security and license
|
|
281
287
|
|