@ai-ecoverse/slicc-kernel 1.99.0 → 1.99.2
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 +32 -1
- package/dist/kernel-worker.js +46 -16
- package/dist/kernel-worker.js.map +3 -3
- package/dist/node-process-worker.js +27 -5
- package/dist/node-process-worker.js.map +2 -2
- package/dist/node.js +46 -16
- package/dist/node.js.map +3 -3
- package/dist/process-worker.js +27 -5
- package/dist/process-worker.js.map +2 -2
- package/package.json +2 -2
package/dist/process-worker.js
CHANGED
|
@@ -2364,6 +2364,15 @@ var init_live_vfs_fs = __esm({
|
|
|
2364
2364
|
});
|
|
2365
2365
|
|
|
2366
2366
|
// src/realm/emscripten-vfs-hook.ts
|
|
2367
|
+
function kernelDevDirs(bridge) {
|
|
2368
|
+
return KERNEL_DEV_DIRS.filter((dir) => {
|
|
2369
|
+
try {
|
|
2370
|
+
return bridge.stat(dir).isDirectory;
|
|
2371
|
+
} catch {
|
|
2372
|
+
return false;
|
|
2373
|
+
}
|
|
2374
|
+
});
|
|
2375
|
+
}
|
|
2367
2376
|
function topLevelDirs(bridge, warn) {
|
|
2368
2377
|
let names;
|
|
2369
2378
|
try {
|
|
@@ -2402,7 +2411,12 @@ function linuxRmdir(Fs) {
|
|
|
2402
2411
|
function mountVfsIntoEmscripten(Fs, deps) {
|
|
2403
2412
|
const { bridge, warn } = deps;
|
|
2404
2413
|
const dirs = topLevelDirs(bridge, warn);
|
|
2405
|
-
const { plugin, mounted } = mountLiveVfsDirs(
|
|
2414
|
+
const { plugin, mounted } = mountLiveVfsDirs(
|
|
2415
|
+
Fs,
|
|
2416
|
+
bridge,
|
|
2417
|
+
[...dirs ?? [], ...kernelDevDirs(bridge)],
|
|
2418
|
+
warn
|
|
2419
|
+
);
|
|
2406
2420
|
if (dirs) liveRoot(Fs, bridge);
|
|
2407
2421
|
if (bridge.owners && Fs.lookupPath) useLiveChown(Fs);
|
|
2408
2422
|
if (bridge.links && Fs.lookupPath) readingLinks(Fs);
|
|
@@ -2420,18 +2434,23 @@ function mountVfsIntoEmscripten(Fs, deps) {
|
|
|
2420
2434
|
invalidate: () => invalidateLiveVfs(Fs, plugin)
|
|
2421
2435
|
};
|
|
2422
2436
|
}
|
|
2423
|
-
var MODULE_OWNED_DIRS, SYNTHETIC_DIRS;
|
|
2437
|
+
var MODULE_OWNED_DIRS, SYNTHETIC_DIRS, KERNEL_DEV_DIRS;
|
|
2424
2438
|
var init_emscripten_vfs_hook = __esm({
|
|
2425
2439
|
"src/realm/emscripten-vfs-hook.ts"() {
|
|
2426
2440
|
"use strict";
|
|
2427
2441
|
init_live_vfs_fs();
|
|
2428
2442
|
MODULE_OWNED_DIRS = /* @__PURE__ */ new Set(["dev", "proc"]);
|
|
2429
2443
|
SYNTHETIC_DIRS = ["/usr", "/bin"];
|
|
2444
|
+
KERNEL_DEV_DIRS = ["/dev/shm"];
|
|
2430
2445
|
}
|
|
2431
2446
|
});
|
|
2432
2447
|
|
|
2433
2448
|
// src/fs/dev-removal.ts
|
|
2449
|
+
function inShm(path) {
|
|
2450
|
+
return path === SHM || path.startsWith(`${SHM}/`);
|
|
2451
|
+
}
|
|
2434
2452
|
function inDevTree(path) {
|
|
2453
|
+
if (path.startsWith(`${SHM}/`)) return false;
|
|
2435
2454
|
return path === "/dev" || path.startsWith("/dev/");
|
|
2436
2455
|
}
|
|
2437
2456
|
function devRemoval(path, cred) {
|
|
@@ -2439,9 +2458,11 @@ function devRemoval(path, cred) {
|
|
|
2439
2458
|
if (cred && cred.euid !== 0) return "EACCES";
|
|
2440
2459
|
return path === "/dev" ? "EBUSY" : "EPERM";
|
|
2441
2460
|
}
|
|
2461
|
+
var SHM;
|
|
2442
2462
|
var init_dev_removal = __esm({
|
|
2443
2463
|
"src/fs/dev-removal.ts"() {
|
|
2444
2464
|
"use strict";
|
|
2465
|
+
SHM = "/dev/shm";
|
|
2445
2466
|
}
|
|
2446
2467
|
});
|
|
2447
2468
|
|
|
@@ -2454,7 +2475,7 @@ var KERNEL_VERSION, OS_RELEASE;
|
|
|
2454
2475
|
var init_version = __esm({
|
|
2455
2476
|
"src/version.ts"() {
|
|
2456
2477
|
"use strict";
|
|
2457
|
-
KERNEL_VERSION = true ? "1.99.
|
|
2478
|
+
KERNEL_VERSION = true ? "1.99.2" : "0.0.0-dev";
|
|
2458
2479
|
OS_RELEASE = "6.0.0-slicc";
|
|
2459
2480
|
}
|
|
2460
2481
|
});
|
|
@@ -13129,7 +13150,7 @@ var init_js_io = __esm({
|
|
|
13129
13150
|
|
|
13130
13151
|
// src/process/js/js-dev.ts
|
|
13131
13152
|
function inDev(abs) {
|
|
13132
|
-
return abs.startsWith("/dev") && (abs.length === 4 || abs[4] === "/");
|
|
13153
|
+
return abs.startsWith("/dev") && (abs.length === 4 || abs[4] === "/") && !inShm(abs);
|
|
13133
13154
|
}
|
|
13134
13155
|
function missing(path) {
|
|
13135
13156
|
throw new JsCallError("ENOENT", path);
|
|
@@ -13270,7 +13291,7 @@ function* devReaddir(abs) {
|
|
|
13270
13291
|
if (node.kind !== "dir") throw new JsCallError("ENOTDIR", abs);
|
|
13271
13292
|
const names = yield { op: "fd-tty-names" };
|
|
13272
13293
|
const ttys = names.filter((n) => /^\/dev\/tty\d+$/.test(n)).map((n) => n.slice(5));
|
|
13273
|
-
return [...DEVICES2, "clipboard", "sealed", "tty", "fd", "pts", ...STDIO3, ...ttys].sort();
|
|
13294
|
+
return [...DEVICES2, "clipboard", "sealed", "tty", "fd", "pts", "shm", ...STDIO3, ...ttys].sort();
|
|
13274
13295
|
}
|
|
13275
13296
|
function* aliasOf(fd, abs, o) {
|
|
13276
13297
|
const info = yield* fdInfo(fd, abs);
|
|
@@ -13481,6 +13502,7 @@ var DEV_READ_MAX, DEVICES2, STDIO3, SELF_FD, S_IFMT2, DIR, LINK, CHAR, BORN, CHA
|
|
|
13481
13502
|
var init_js_dev = __esm({
|
|
13482
13503
|
"src/process/js/js-dev.ts"() {
|
|
13483
13504
|
"use strict";
|
|
13505
|
+
init_dev_removal();
|
|
13484
13506
|
init_sync_fs_wire();
|
|
13485
13507
|
init_js_io();
|
|
13486
13508
|
init_js_kernel();
|