@ai-ecoverse/slicc-kernel 1.97.2 → 1.98.1
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 +2 -2
- package/dist/kernel-worker.js +22 -14
- package/dist/kernel-worker.js.map +3 -3
- package/dist/node-process-worker.js +27 -2
- package/dist/node-process-worker.js.map +3 -3
- package/dist/node.js +22 -14
- package/dist/node.js.map +3 -3
- package/dist/process-worker.js +40 -15
- package/dist/process-worker.js.map +4 -4
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -384,7 +384,7 @@ WASIX programs get `AF_INET`/`AF_INET6` `SOCK_DGRAM` sockets (`AF_UNIX` datagram
|
|
|
384
384
|
|
|
385
385
|
The kernel has one node name, `slicc` unless `createKernel({ hostname })` (or `createNodeKernel`) names another; it must be a valid host name, and not `localhost`, a `*.localhost` name, `host.slicc.internal`, `wasmer.sh` or an IPv4 address, or `createKernel` rejects. `no_proxy` lists it (and `emscripten`), so HTTP clients reach the kernel's own servers by it directly.
|
|
386
386
|
- **Where programs see it:** every process gets it in `HOSTNAME`, which the kernel sets on every start whatever the caller's environment says. Emscripten programs also see it in `/etc/hostname` (next to the synthetic `/etc/hosts` and `/etc/passwd`, which only they have; WASI programs resolve names through the kernel instead) and in `Module.sliccKernel.hostname`.
|
|
387
|
-
- **What `uname` says:** `uname -
|
|
387
|
+
- **What `uname` says:** for an Emscripten program built with homescoop's `__syscall_uname` import (wasm-coreutils 9.12.0-7 on), the kernel answers `uname(2)`: sysname `Linux`, nodename the node name, release `6.0.0-slicc` (as `/proc/sys/kernel/osrelease`), version `#1 SMP PREEMPT_DYNAMIC` (as `/proc/version`), machine `wasm32` and domainname `(none)`, so `uname -a` and musl's `gethostname()` see them. `uname -o` is coreutils' compiled-in `Emscripten`. Older Emscripten builds still report their C library's `Emscripten 4.0.23` and `emscripten`, and WASIX programs `wasmer.sh`; the kernel has nothing to answer there.
|
|
388
388
|
- **Resolving it:** `/etc/hosts` maps the node name and both of those names to `127.0.1.1` (Debian's convention), and name resolution answers them, and `localhost.localdomain`, itself, as `127.0.1.1` and `::1`. So a program that looks up its own host name, as git does for every commit, never asks the [uplink](#uplink), and `127.0.1.1` is the kernel's loopback.
|
|
389
389
|
- **The trade-off:** a raw connection to the real `wasmer.sh` resolves to loopback too. HTTP(S) to it still goes through the realm proxy and the transport, which resolve names themselves; `wasmer.sh` is deliberately not in `no_proxy`.
|
|
390
390
|
- **A real file wins:** a root that has its own `/etc/hostname` (or `/etc/hosts`, `/etc/passwd`) keeps it, and programs read that file rather than the synthetic one. The kernel's name still drives `HOSTNAME` and name resolution.
|
|
@@ -917,7 +917,7 @@ WASIX_SYSROOT_28=/path/to/wasix-sysroot ./build.sh
|
|
|
917
917
|
|
|
918
918
|
- `WASIX_SYSROOT_28` is the unpacked sysroot package.
|
|
919
919
|
- `wasixcc` (0.4.7, WASIX clang 21.1.2) comes from `PATH`, or is installed by `install-wasixcc.sh` as for `dlfork`.
|
|
920
|
-
- The build is reproducible: `bin/epolltest.wasm` is 78,
|
|
920
|
+
- The build is reproducible: `bin/epolltest.wasm` is 78,799 bytes, sha256 `9ff8d336a261ebb9076b5b9c760e9ba50fa17053b1d66ab89cfe05395c8e1deb`.
|
|
921
921
|
|
|
922
922
|
## License
|
|
923
923
|
|
package/dist/kernel-worker.js
CHANGED
|
@@ -12034,6 +12034,14 @@ var PATH_OPS = new Set(SYNC_FS_OPS);
|
|
|
12034
12034
|
// src/realm/live-vfs-fs.ts
|
|
12035
12035
|
var EARLY_WHOLE_FILE = 64 * 1024;
|
|
12036
12036
|
|
|
12037
|
+
// src/version.ts
|
|
12038
|
+
var KERNEL_VERSION = true ? "1.98.1" : "0.0.0-dev";
|
|
12039
|
+
var OS_RELEASE = "6.0.0-slicc";
|
|
12040
|
+
function procVersion() {
|
|
12041
|
+
return `Linux version ${OS_RELEASE} (slicc-kernel ${KERNEL_VERSION}) #1 SMP PREEMPT_DYNAMIC
|
|
12042
|
+
`;
|
|
12043
|
+
}
|
|
12044
|
+
|
|
12037
12045
|
// src/process/process-fds.ts
|
|
12038
12046
|
var field2 = (text) => (text || "none").replace(/[\s\\]/g, (c) => `\\${c.charCodeAt(0).toString(8).padStart(3, "0")}`);
|
|
12039
12047
|
var pinnedRoot;
|
|
@@ -12053,14 +12061,6 @@ function mountTable(mounts = []) {
|
|
|
12053
12061
|
`;
|
|
12054
12062
|
}
|
|
12055
12063
|
|
|
12056
|
-
// src/version.ts
|
|
12057
|
-
var KERNEL_VERSION = true ? "1.97.2" : "0.0.0-dev";
|
|
12058
|
-
var OS_RELEASE = "6.0.0-slicc";
|
|
12059
|
-
function procVersion() {
|
|
12060
|
-
return `Linux version ${OS_RELEASE} (slicc-kernel ${KERNEL_VERSION}) #1 SMP PREEMPT_DYNAMIC
|
|
12061
|
-
`;
|
|
12062
|
-
}
|
|
12063
|
-
|
|
12064
12064
|
// src/process/procfs.ts
|
|
12065
12065
|
var HZ = 100;
|
|
12066
12066
|
var KIB = 1024;
|
|
@@ -12628,15 +12628,19 @@ var EpollFile = class _EpollFile {
|
|
|
12628
12628
|
return out;
|
|
12629
12629
|
}
|
|
12630
12630
|
async wait(fds, max, timeoutMs, signal) {
|
|
12631
|
-
const deadline = timeoutMs < 0 ? Number.POSITIVE_INFINITY :
|
|
12631
|
+
const deadline = timeoutMs < 0 ? Number.POSITIVE_INFINITY : performance.now() + timeoutMs;
|
|
12632
12632
|
for (; ; ) {
|
|
12633
12633
|
const events = this.collect(fds, max);
|
|
12634
|
-
if (events.length > 0 ||
|
|
12634
|
+
if (events.length > 0 || performance.now() >= deadline) return events;
|
|
12635
12635
|
const round = new AbortController();
|
|
12636
12636
|
const woken = this.changes.wait(AbortSignal.any([round.signal, signal]));
|
|
12637
12637
|
woken.catch(() => void 0);
|
|
12638
12638
|
let timer;
|
|
12639
|
-
const expiry = deadline === Number.POSITIVE_INFINITY ? [] : [
|
|
12639
|
+
const expiry = deadline === Number.POSITIVE_INFINITY ? [] : [
|
|
12640
|
+
new Promise(
|
|
12641
|
+
(resolve2) => timer = setTimeout(resolve2, deadline - performance.now())
|
|
12642
|
+
)
|
|
12643
|
+
];
|
|
12640
12644
|
try {
|
|
12641
12645
|
await Promise.race([woken, ...expiry]);
|
|
12642
12646
|
} finally {
|
|
@@ -14431,7 +14435,7 @@ function interruption(signal) {
|
|
|
14431
14435
|
return { promise, done: () => signal.removeEventListener("abort", fail2) };
|
|
14432
14436
|
}
|
|
14433
14437
|
async function selectFds(fds, read, write, timeoutMs, interrupt) {
|
|
14434
|
-
const deadline = timeoutMs < 0 ? Number.POSITIVE_INFINITY :
|
|
14438
|
+
const deadline = timeoutMs < 0 ? Number.POSITIVE_INFINITY : performance.now() + timeoutMs;
|
|
14435
14439
|
const interrupted3 = interruption(interrupt);
|
|
14436
14440
|
interrupted3.promise.catch(() => {
|
|
14437
14441
|
});
|
|
@@ -14444,14 +14448,18 @@ async function selectFds(fds, read, write, timeoutMs, interrupt) {
|
|
|
14444
14448
|
async function waitReady(fds, read, write, deadline, interrupted3) {
|
|
14445
14449
|
for (; ; ) {
|
|
14446
14450
|
const now = ready(fds, read, write);
|
|
14447
|
-
if (now.read.length > 0 || now.write.length > 0 ||
|
|
14451
|
+
if (now.read.length > 0 || now.write.length > 0 || performance.now() >= deadline) return now;
|
|
14448
14452
|
const round = new AbortController();
|
|
14449
14453
|
const changes = [.../* @__PURE__ */ new Set([...read, ...write])].flatMap((fd) => {
|
|
14450
14454
|
const file = fds.get(fd).file;
|
|
14451
14455
|
return file.changed === void 0 ? [] : [file.changed(round.signal).catch(() => void 0)];
|
|
14452
14456
|
});
|
|
14453
14457
|
let timer;
|
|
14454
|
-
const expiry = deadline === Number.POSITIVE_INFINITY ? [] : [
|
|
14458
|
+
const expiry = deadline === Number.POSITIVE_INFINITY ? [] : [
|
|
14459
|
+
new Promise(
|
|
14460
|
+
(resolve2) => timer = setTimeout(resolve2, deadline - performance.now())
|
|
14461
|
+
)
|
|
14462
|
+
];
|
|
14455
14463
|
try {
|
|
14456
14464
|
await Promise.race([...changes, ...expiry, interrupted3]);
|
|
14457
14465
|
} finally {
|