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

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,20 @@ 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-21 terminals are per descriptor (slicc-kernel's `slicc_tty`,
45
+ slicc-kernel#289):
46
+ - `tcgetattr`/`tcsetattr` carry the whole termios, so `cfmakeraw` is really
47
+ raw;
48
+ - `ioctl(TIOCGWINSZ)`, `TCGETS`/`TCSETS*` and `isatty` answer for that fd
49
+ (ENOTTY on pipes and files);
50
+ - `ioctl(TIOCSWINSZ)` returns 0 on a terminal but changes nothing: the size
51
+ is the page's, and slicc-kernel has no set-window-size call (ENOTTY
52
+ elsewhere);
53
+ - `fstat`/`stat`/`lstat` take a file's type from slicc-kernel's `slicc_fs`
54
+ mode when it carries one, so a pipe is `S_ISFIFO` once the kernel reports
55
+ it (WASI has no FIFO filetype); otherwise the WASI filetype stays;
56
+ - older kernels keep the previous behaviour.
57
+
44
58
  Since 2025.9.30-20 user and group ids come from slicc-kernel's process
45
59
  credentials (`slicc.cred_get`/`cred_set`/`groups_get`/`groups_set`; slicc-kernel
46
60
  ≥ 1.44.0, which has users), and `getpw*`/`getgr*` read its `/etc/passwd` and `/etc/group`.
@@ -48,3 +62,30 @@ There is no fallback to uid 1000: on an older kernel `getuid()` returns -1,
48
62
  the set\*id calls fail with ENOSYS, and user lookups find nothing.
49
63
 
50
64
  Data only — no commands. Set `WASIXCC_SYSROOT_PREFIX` to this package directory.
65
+
66
+ ## File type bits (`S_IF*`) differ from Linux
67
+
68
+ WASIX libc compiles `st_mode` file types from `__mode_t.h`. The values are
69
+ part of the ABI of every package built on this sysroot, so they stay:
70
+
71
+ | | WASIX | Linux |
72
+ | --- | --- | --- |
73
+ | `S_IFREG`, `S_IFDIR`, `S_IFLNK`, `S_IFCHR`, `S_IFBLK` | same as Linux | 0o100000, 0o040000, 0o120000, 0o020000, 0o060000 |
74
+ | `S_IFIFO` | **0o140000** (Linux's `S_IFSOCK`) | 0o010000 |
75
+ | `S_IFSOCK` | **0o160000** | 0o140000 |
76
+ | `S_IFMT` | **0o160000** (the OR of the types; Linux's FIFO bit 0o010000 is masked away) | 0o170000 |
77
+
78
+ slicc-kernel's pipes are WASI sockets (filetype `SOCKET_STREAM`, since
79
+ slicc-kernel#280). So `fstat` on any pipe gives `0o160000 | perms`, and inside
80
+ a WASIX program `S_ISSOCK` is true and `S_ISFIFO` false, consistently.
81
+
82
+ Inside one program the macros agree with each other. The hazard is a raw
83
+ `st_mode` that crosses the wasm boundary: it carries WASIX numbers. Examples:
84
+ - cpio `newc` headers;
85
+ - tar entries for sockets and FIFOs;
86
+ - JSON stat dumps read by Node or bash;
87
+ - scripts comparing octal modes with Linux constants (a cert once saw
88
+ `S_ISSOCK False` this way).
89
+
90
+ Decode such values with the table above, or translate them before they leave
91
+ 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-21",
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