@ai-ecoverse/wasix-sysroot 2025.9.30-20 → 2025.9.30-22

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 CHANGED
@@ -41,6 +41,26 @@ Since 2025.9.30-18:
41
41
  `sleep` early with the seconds left.
42
42
  - `raise()` and `pthread_kill(pthread_self())` reach the handler.
43
43
 
44
+ Since 2025.9.30-22 every program linked against the sysroot carries a wasm
45
+ custom section `slicc.libc` = `wasix-sysroot <version>` (from `crt1*.o`), so
46
+ slicc-kernel can tell libc generations apart (`wasm-opt` and `llvm-strip` keep
47
+ it). Side modules carry none. `getitimer` moved into `setitimer.c`, so a
48
+ dynamic-main no longer exports the `__homescoop_itimer_real_left` helper.
49
+
50
+ Since 2025.9.30-21 terminals are per descriptor (slicc-kernel's `slicc_tty`,
51
+ slicc-kernel#289):
52
+ - `tcgetattr`/`tcsetattr` carry the whole termios, so `cfmakeraw` is really
53
+ raw;
54
+ - `ioctl(TIOCGWINSZ)`, `TCGETS`/`TCSETS*` and `isatty` answer for that fd
55
+ (ENOTTY on pipes and files);
56
+ - `ioctl(TIOCSWINSZ)` returns 0 on a terminal but changes nothing: the size
57
+ is the page's, and slicc-kernel has no set-window-size call (ENOTTY
58
+ elsewhere);
59
+ - `fstat`/`stat`/`lstat` take a file's type from slicc-kernel's `slicc_fs`
60
+ mode when it carries one, so a pipe is `S_ISFIFO` once the kernel reports
61
+ it (WASI has no FIFO filetype); otherwise the WASI filetype stays;
62
+ - older kernels keep the previous behaviour.
63
+
44
64
  Since 2025.9.30-20 user and group ids come from slicc-kernel's process
45
65
  credentials (`slicc.cred_get`/`cred_set`/`groups_get`/`groups_set`; slicc-kernel
46
66
  ≥ 1.44.0, which has users), and `getpw*`/`getgr*` read its `/etc/passwd` and `/etc/group`.
@@ -48,3 +68,30 @@ There is no fallback to uid 1000: on an older kernel `getuid()` returns -1,
48
68
  the set\*id calls fail with ENOSYS, and user lookups find nothing.
49
69
 
50
70
  Data only — no commands. Set `WASIXCC_SYSROOT_PREFIX` to this package directory.
71
+
72
+ ## File type bits (`S_IF*`) differ from Linux
73
+
74
+ WASIX libc compiles `st_mode` file types from `__mode_t.h`. The values are
75
+ part of the ABI of every package built on this sysroot, so they stay:
76
+
77
+ | | WASIX | Linux |
78
+ | --- | --- | --- |
79
+ | `S_IFREG`, `S_IFDIR`, `S_IFLNK`, `S_IFCHR`, `S_IFBLK` | same as Linux | 0o100000, 0o040000, 0o120000, 0o020000, 0o060000 |
80
+ | `S_IFIFO` | **0o140000** (Linux's `S_IFSOCK`) | 0o010000 |
81
+ | `S_IFSOCK` | **0o160000** | 0o140000 |
82
+ | `S_IFMT` | **0o160000** (the OR of the types; Linux's FIFO bit 0o010000 is masked away) | 0o170000 |
83
+
84
+ slicc-kernel's pipes are WASI sockets (filetype `SOCKET_STREAM`, since
85
+ slicc-kernel#280). So `fstat` on any pipe gives `0o160000 | perms`, and inside
86
+ a WASIX program `S_ISSOCK` is true and `S_ISFIFO` false, consistently.
87
+
88
+ Inside one program the macros agree with each other. The hazard is a raw
89
+ `st_mode` that crosses the wasm boundary: it carries WASIX numbers. Examples:
90
+ - cpio `newc` headers;
91
+ - tar entries for sockets and FIFOs;
92
+ - JSON stat dumps read by Node or bash;
93
+ - scripts comparing octal modes with Linux constants (a cert once saw
94
+ `S_ISSOCK False` this way).
95
+
96
+ Decode such values with the table above, or translate them before they leave
97
+ the program.
package/package.json CHANGED
@@ -1,8 +1,7 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/wasix-sysroot",
3
- "version": "2025.9.30-19",
4
- "description": "WASIX sysroots: st_uid/st_gid = getuid()/getgid(), file modes via slicc_fs, F_SETFD CLOEXEC fix, select exceptfds, physical chdir, POSIX TZ, socketpair flags, sigaction_set, alarm/setitimer/getitimer, EINTR sleeps, raise/pthread_kill, process credentials from slicc-kernel (no fixed uid 1000), wasip1, clang24 exnref",
5
- "version": "2025.9.30-20",
3
+ "version": "2025.9.30-22",
4
+ "description": "WASIX sysroots: st_uid/st_gid = getuid()/getgid(), file modes via slicc_fs, F_SETFD CLOEXEC fix, select exceptfds, physical chdir, POSIX TZ, socketpair flags, sigaction_set, alarm/setitimer/getitimer, EINTR sleeps, raise/pthread_kill, process credentials from slicc-kernel (no fixed uid 1000), per-fd termios/winsize from slicc-kernel, wasip1, clang24 exnref",
6
5
  "license": "Apache-2.0 WITH LLVM-exception",
7
6
  "repository": {
8
7
  "type": "git",
Binary file
Binary file
Binary file
Binary file