@amritk/nish-aarch64-linux 0.37.0 → 0.39.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/INSTALL.md +28 -16
- package/bin/nish +0 -0
- package/docs/AI.md +380 -47
- package/package.json +1 -1
- package/runtime/core/arrays.d.ts +4 -0
- package/runtime/core/arrays.mjs +33 -0
- package/runtime/core/host.d.ts +11 -0
- package/runtime/core/host.mjs +35 -0
- package/runtime/nish.d.ts +645 -66
- package/runtime/nish.h +101 -15
- package/runtime/nish.mjs +69 -6
- package/runtime/node.mjs +117 -0
- package/runtime/runtime-aes.c +12 -4
- package/runtime/runtime-async.c +267 -51
- package/runtime/runtime-checksum.c +207 -15
- package/runtime/runtime-cross.c +2 -1
- package/runtime/runtime-net.c +32 -3
- package/runtime/runtime-os.c +174 -27
- package/runtime/runtime-region.c +170 -8
- package/runtime/runtime-sandbox.c +377 -17
- package/runtime/runtime-sha256.c +11 -4
- package/runtime/runtime-text.c +1068 -0
- package/runtime/runtime-wasm.c +18 -3
- package/runtime/runtime.c +55 -961
- package/runtime/vite.mjs +48 -11
- package/scripts/build.sh +113 -36
- package/std/LICENSE-fdlibm +8 -0
- package/std/README.md +7 -4
- package/std/array.ts +266 -0
- package/std/compress/checksum.ts +13 -0
- package/std/compress/deflate.ts +0 -2
- package/std/crypto/p256.ts +247 -74
- package/std/crypto/p384.ts +3 -1
- package/std/crypto/pki.ts +35 -9
- package/std/crypto/x25519.ts +153 -64
- package/std/crypto/x509.ts +113 -10
- package/std/host/text.ts +86 -0
- package/std/json-tokenizer.ts +20 -0
- package/std/json-typed.ts +217 -8
- package/std/math.ts +743 -41
- package/std/net/dns-resolver.ts +46 -6
- package/std/net/dns.ts +50 -13
- package/std/net/fetch.ts +691 -129
- package/std/net/handler.ts +142 -16
- package/std/net/http-compress.ts +17 -9
- package/std/net/http-fields.ts +19 -4
- package/std/net/http1-codec.ts +517 -154
- package/std/net/http1-server.ts +508 -25
- package/std/net/http2-cleartext.ts +526 -0
- package/std/net/http2-tls.ts +48 -0
- package/std/net/http2.ts +84 -0
- package/std/net/postgres-async.ts +2223 -0
- package/std/net/postgres-carrier.ts +343 -10
- package/std/net/postgres.ts +129 -11
- package/std/net/prefork.ts +195 -11
- package/std/net/quic-datagram.ts +30 -0
- package/std/net/quic-listener.ts +38 -12
- package/std/net/quic-packet.ts +19 -6
- package/std/net/quic-recovery.ts +134 -19
- package/std/net/quic-stream.ts +174 -36
- package/std/net/quic.ts +418 -18
- package/std/net/router.ts +39 -17
- package/std/net/serve.ts +867 -0
- package/std/net/tls/codec.ts +110 -32
- package/std/net/tls/record-server.ts +37 -7
- package/std/net/tls-tcp.ts +56 -1
- package/std/net/tls.ts +196 -50
- package/std/net/websocket.ts +55 -18
- package/std/net/webtransport.ts +179 -1
- package/std/regex.ts +69 -47
- package/std/region.ts +62 -11
- package/std/secret.ts +26 -59
- package/std/text.ts +464 -5
package/runtime/runtime-wasm.c
CHANGED
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
* pointers are 4 bytes, and the inlined fast path in every compiled function
|
|
11
11
|
* bumps the 64-bit `off` field directly. Panics are `unreachable` (a JS
|
|
12
12
|
* RuntimeError); there is no stderr to write a message to, so under
|
|
13
|
-
* wasm-host the page is told first (NISH_DIE). Strings
|
|
14
|
-
*
|
|
15
|
-
*
|
|
13
|
+
* wasm-host the page is told first (NISH_DIE). Strings are
|
|
14
|
+
* runtime-text.c's, which build.sh links beside this file when the IR builds
|
|
15
|
+
* one; I/O needs a WASI runtime and is not provided. */
|
|
16
16
|
#include <stddef.h>
|
|
17
17
|
#include <stdint.h>
|
|
18
18
|
|
|
@@ -182,6 +182,21 @@ void nish_exit(int32_t code) { (void)code; __builtin_trap(); }
|
|
|
182
182
|
* link; the loader throws a RangeError before the call reaches it. */
|
|
183
183
|
void nish_panic(const void *s) { (void)s; __builtin_trap(); }
|
|
184
184
|
#endif
|
|
185
|
+
/* ---- Streaming reads (WP44 §9 Q7): the checker refuses `fileOpen`,
|
|
186
|
+
* `fileReadAt`, `fileSize` and `fileClose` on a freestanding wasm32 target
|
|
187
|
+
* (NL2718), but `--profile wasm` links IR compiled for the host, which no
|
|
188
|
+
* check sees. There is no file system to read, so each answers -38 (`ENOSYS`)
|
|
189
|
+
* and the link never fails on their names. The path is `const void *`, as
|
|
190
|
+
* `nish_panic`'s string is: this file has no `nish_str`, and the ABI is the
|
|
191
|
+
* same pointer. tests/run.js's wasm profile section links all four. */
|
|
192
|
+
int32_t nish_file_open(const void *path) { (void)path; return -38; }
|
|
193
|
+
int32_t nish_file_read_at(int32_t fd, nish_array *buf, int64_t off, int64_t len, int64_t pos) {
|
|
194
|
+
(void)fd; (void)buf; (void)off; (void)len; (void)pos;
|
|
195
|
+
return -38;
|
|
196
|
+
}
|
|
197
|
+
int64_t nish_file_size(int32_t fd) { (void)fd; return -38; }
|
|
198
|
+
int32_t nish_file_close(int32_t fd) { (void)fd; return -38; }
|
|
199
|
+
|
|
185
200
|
/* Output has nowhere to go either. */
|
|
186
201
|
void nish_write(const void *s, int32_t fd, _Bool newline) { (void)s; (void)fd; (void)newline; }
|
|
187
202
|
|