@ai-ecoverse/wasix-ruby 3.4.11-10 → 3.4.11-12

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/PRESTAGE.md CHANGED
@@ -1,6 +1,6 @@
1
- # wasix-ruby 3.4.11-10
1
+ # wasix-ruby 3.4.11-12
2
2
 
3
- Built against wasix-sysroot **2025.9.30-20**. **No epoll**: SLICC returns ENOSYS (52)
3
+ Built against wasix-sysroot **2025.9.30-27**. **No epoll**: SLICC returns ENOSYS (52)
4
4
  for `epoll_create`; MRI is compiled with `USE_MN_THREADS=0` and
5
5
  `HAVE_SYS_EPOLL_H=0` (also kqueue/eventfd/timerfd off) so it uses poll()/timer-thread.
6
6
 
package/README.md CHANGED
@@ -2,10 +2,53 @@
2
2
 
3
3
  MRI Ruby for slicc WASIX. No epoll (poll fallback). See PRESTAGE.md.
4
4
 
5
- Since 3.4.11-8, single-fd waits (`IO#wait_readable`, blocking `TCPSocket.new`, `Net::HTTP`, blocking `SSLSocket#connect`/`#accept`) use poll(): WASIX's select() rejects an exception set with ENOSYS, so `IO.select` with a third array still fails. `io/console` is built, so `irb` and reline work.
5
+ Built on wasix-sysroot 2025.9.30-27 or later (the WASIX libc and headers; see
6
+ PRESTAGE.md).
7
+
8
+ ## The interpreter path (3.4.11-12)
9
+
10
+ `Gem.ruby` and `RbConfig.ruby` are the first `ruby` on PATH outside the
11
+ package, which is slicc-kernel's `/usr/bin/ruby` command. Run through it,
12
+ ruby gets the command's `RUBYLIB`, `GEM_HOME` and `GEM_PATH` defaults, so
13
+ `system(Gem.ruby, "-e", "exit 3")` exits 3 from any process, and RubyGems
14
+ writes `#!/usr/bin/ruby` into the gem executables it installs. Without a
15
+ `ruby` on PATH they fall back to the package's `bin/ruby`.
16
+
17
+ `bin/ruby` (`RbConfig::CONFIG["bindir"]`) is the wasm module itself, so the
18
+ kernel can exec it by path and use it in a shebang. It doesn't get the
19
+ command's environment: started from ruby (which passes its own `RUBYLIB` and
20
+ `GEM_*` on) it works fully, but started from a shell without them ruby can't
21
+ find RubyGems (`RubyGems were not loaded`). Use `ruby` or `/usr/bin/ruby` from a
22
+ shell. The package's `gem`, `bundle`, `rake`, `irb` and `erb` scripts start
23
+ with `#!/usr/bin/env ruby`, so they also run by path.
24
+
25
+ Up to 3.4.11-11 `bin/ruby` was a 7-byte `#!wasm` marker that the kernel
26
+ can't exec: `system(Gem.ruby, …)` gave 127, and the executables RubyGems
27
+ installed (shebang `#!…/wasix-ruby/bin/ruby`) gave "bad interpreter". Those
28
+ executables now run when started from ruby; to make them run from a shell
29
+ too, rewrite their shebangs with `gem pristine --only-executables <gem>…`
30
+ for the gems you installed (`--all` would also rewrite the package's own
31
+ gems).
32
+
33
+ Since 3.4.11-8, single-fd waits (`IO#wait_readable`, blocking `TCPSocket.new`,
34
+ `Net::HTTP`, blocking `SSLSocket#connect`/`#accept`) use poll(): WASIX's select()
35
+ rejects an exception set with ENOSYS, so `IO.select` with a third array still
36
+ fails. `io/console` is built, so `irb` and reline work.
6
37
 
7
38
  `TZ` is ignored: wasix-libc's localtime is UTC only (homescoop#193).
8
39
 
40
+ ## 3.4.11-11: wasix-sysroot 2025.9.30-27
41
+
42
+ - `File.utime(nil, nil, f)` and `FileUtils.touch(f)` set the times to now;
43
+ up to 3.4.11-10 they set them to 0 (1970), from wasix-sysroot's broken
44
+ `utimensat(NULL)` (homescoop#294).
45
+ - `Process.times` reports the process CPU time slicc-kernel keeps; system and
46
+ children's times are 0.
47
+ - An empty path is ENOENT (`File.exist?("")` is false), as on Linux.
48
+ - Files have owners on slicc-kernel ≥ 1.59.0 with users on: `File.chown`,
49
+ `File::Stat#uid`/`#gid` and `File.owned?` are the kernel's, and
50
+ `File.readable?`/`writable?`/`executable?` ask it (slicc-kernel ≥ 1.63.0).
51
+
9
52
  ## Gem executables on PATH
10
53
 
11
54
  Command env puts user gem bins ahead of the package:
@@ -14,7 +57,9 @@ Command env puts user gem bins ahead of the package:
14
57
  ${HOME}/.local/share/gem/ruby/3.4.0/bin:${package}/bin:${PATH}
15
58
  ```
16
59
 
17
- That covers Ruby child processes (`system`, `spawn`, `bundle exec`, …). To run those gems **by name from your shell**, add the same user gem bin directory to the host PATH, e.g. in `~/.bashrc`:
60
+ Those are defaults: a `PATH` the caller already has wins, as it does when you
61
+ start `ruby` from bash. To run gem executables **by name**, add the user gem
62
+ bin directory to your PATH, e.g. in `~/.bashrc`:
18
63
 
19
64
  ```bash
20
65
  export PATH="$HOME/.local/share/gem/ruby/3.4.0/bin:$PATH"
@@ -1,6 +1,6 @@
1
1
  # Third-party notices
2
2
 
3
- ruby.wasm statically links the following (ext/openssl, ext/zlib, ext/psych, and wasix-libc).
3
+ bin/ruby statically links the following (ext/openssl, ext/zlib, ext/psych, and wasix-libc).
4
4
 
5
5
  ## OpenSSL 3.5.9 (@ai-ecoverse/wasix-openssl 3.5.9-3), Apache-2.0
6
6
 
@@ -236,7 +236,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
236
236
  SOFTWARE.
237
237
  ```
238
238
 
239
- ## wasix-libc (@ai-ecoverse/wasix-sysroot 2025.9.30-20; files from tag v2025-09-02.1)
239
+ ## wasix-libc (@ai-ecoverse/wasix-sysroot 2025.9.30-27; files from tag v2025-09-02.1)
240
240
 
241
241
  ```text
242
242
  wasi-libc as a whole is multi-licensed under the
package/bin/bundle CHANGED
@@ -1,4 +1,4 @@
1
- #!/nonexistent-ruby-prefix/bin/ruby
1
+ #!/usr/bin/env ruby
2
2
  #
3
3
  # This file was generated by RubyGems.
4
4
  #
package/bin/bundler CHANGED
@@ -1,4 +1,4 @@
1
- #!/nonexistent-ruby-prefix/bin/ruby
1
+ #!/usr/bin/env ruby
2
2
  #
3
3
  # This file was generated by RubyGems.
4
4
  #
package/bin/erb CHANGED
@@ -1,4 +1,4 @@
1
- #!/nonexistent-ruby-prefix/bin/ruby
1
+ #!/usr/bin/env ruby
2
2
  #
3
3
  # This file was generated by RubyGems.
4
4
  #
package/bin/gem CHANGED
@@ -1,4 +1,4 @@
1
- #!/nonexistent-ruby-prefix/bin/ruby
1
+ #!/usr/bin/env ruby
2
2
  # frozen_string_literal: true
3
3
 
4
4
  #--
package/bin/irb CHANGED
@@ -1,4 +1,4 @@
1
- #!/nonexistent-ruby-prefix/bin/ruby
1
+ #!/usr/bin/env ruby
2
2
  #
3
3
  # This file was generated by RubyGems.
4
4
  #
package/bin/rake CHANGED
@@ -1,4 +1,4 @@
1
- #!/nonexistent-ruby-prefix/bin/ruby
1
+ #!/usr/bin/env ruby
2
2
  #
3
3
  # This file was generated by RubyGems.
4
4
  #
package/bin/ruby CHANGED
Binary file
@@ -357,10 +357,14 @@ module RbConfig
357
357
  #
358
358
  # returns the absolute pathname of the ruby command.
359
359
  def RbConfig.ruby
360
- File.join(
361
- RbConfig::CONFIG["bindir"],
362
- RbConfig::CONFIG["ruby_install_name"] + RbConfig::CONFIG["EXEEXT"]
363
- )
360
+ name = RbConfig::CONFIG["ruby_install_name"] + RbConfig::CONFIG["EXEEXT"]
361
+ own = File.join(RbConfig::CONFIG["bindir"], name)
362
+ ENV.fetch("PATH", "").split(File::PATH_SEPARATOR).each do |dir|
363
+ next unless dir.start_with?("/")
364
+ path = File.join(dir, name)
365
+ return path if path != own && File.file?(path)
366
+ end
367
+ own
364
368
  end
365
369
  end
366
370
  CROSS_COMPILING = nil unless defined? CROSS_COMPILING
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/wasix-ruby",
3
- "version": "3.4.11-10",
4
- "description": "MRI Ruby for slicc WASIX (no epoll; asyncify spill 65536; date_core; wasix-sysroot -20: user ids and traps from slicc-kernel)",
3
+ "version": "3.4.11-12",
4
+ "description": "MRI Ruby for slicc WASIX (no epoll; asyncify spill 65536; date_core; wasix-sysroot 2025.9.30-27: user ids, traps and times from slicc-kernel)",
5
5
  "engines": {
6
6
  "slicc-kernel": ">=1.44.0"
7
7
  },
@@ -31,7 +31,7 @@
31
31
  "abi": "wasi",
32
32
  "commands": {
33
33
  "ruby": {
34
- "wasm": "bin/ruby.wasm",
34
+ "wasm": "bin/ruby",
35
35
  "env": {
36
36
  "PATH": "${HOME}/.local/share/gem/ruby/3.4.0/bin:${package}/bin:${PATH}",
37
37
  "RUBYLIB": "${package}/lib/ruby/site_ruby/3.4.0:${package}/lib/ruby/site_ruby/3.4.0/wasm32-wasi:${package}/lib/ruby/vendor_ruby/3.4.0:${package}/lib/ruby/vendor_ruby/3.4.0/wasm32-wasi:${package}/lib/ruby/3.4.0:${package}/lib/ruby/3.4.0/wasm32-wasi",
@@ -40,7 +40,7 @@
40
40
  }
41
41
  },
42
42
  "gem": {
43
- "wasm": "bin/ruby.wasm",
43
+ "wasm": "bin/ruby",
44
44
  "args": [
45
45
  "${package}/bin/gem"
46
46
  ],
@@ -52,7 +52,7 @@
52
52
  }
53
53
  },
54
54
  "bundle": {
55
- "wasm": "bin/ruby.wasm",
55
+ "wasm": "bin/ruby",
56
56
  "args": [
57
57
  "${package}/bin/bundle"
58
58
  ],
@@ -64,7 +64,7 @@
64
64
  }
65
65
  },
66
66
  "rake": {
67
- "wasm": "bin/ruby.wasm",
67
+ "wasm": "bin/ruby",
68
68
  "args": [
69
69
  "${package}/bin/rake"
70
70
  ],
@@ -76,7 +76,7 @@
76
76
  }
77
77
  },
78
78
  "irb": {
79
- "wasm": "bin/ruby.wasm",
79
+ "wasm": "bin/ruby",
80
80
  "args": [
81
81
  "${package}/bin/irb"
82
82
  ],
@@ -88,7 +88,7 @@
88
88
  }
89
89
  },
90
90
  "erb": {
91
- "wasm": "bin/ruby.wasm",
91
+ "wasm": "bin/ruby",
92
92
  "args": [
93
93
  "${package}/bin/erb"
94
94
  ],
package/bin/ruby.wasm DELETED
Binary file