nosj 0.3.1 → 0.3.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7152dbc291ed6d291977555ba6a6b36f6d3d52dad57348a0baf8271212d1bb25
4
- data.tar.gz: '083bd8ca6fac180455b4847c1634f4ac28455db8e6e85def4e14393700e3008f'
3
+ metadata.gz: fad5b3acb2b252b61cf81404a272768c558aa84d68b0ae1ddccacda3b745fb51
4
+ data.tar.gz: ed97497088278d3a925017d05d090175323e53c4a8337f9a39943db165b85d37
5
5
  SHA512:
6
- metadata.gz: 254595b89839c50a48adedc03f8ec70498cc0cf6876390565f3dd188cc5dfca564c498443d0091c23bbf6562bb11b1724a25c073fa9e76986b8b1779cc91765d
7
- data.tar.gz: 4d321fb92d1199649dc10f84853aa3124e40cc642b3da680772f392c315374116f04d09882f4fd95f2c445941b384f15e23ab89fc3c735edebd8868855cb8582
6
+ metadata.gz: 4f96f9eef6dcd421071fdb88e92af5239265576b67ec7a4aab0b7306b704cd5a5c2274cea3dc7730a218216a28c385a2be67e03051bb1ed9ee54704e2e8ae448
7
+ data.tar.gz: c5985fbf726d9303b0e0e640fa91eaaf34e0e199839812a5e4790926c44eb952e4337661734c1b739b55a6874d42323fdf3eab903518519cc4717d1c48b06c8b
data/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [0.3.2] - 2026-07-19
2
+
3
+ - **IMPORTANT**—Fixed: the precompiled platform gems linked `libruby`
4
+ into the extension. The arm64-darwin binaries recorded the build runner's
5
+ absolute Ruby path, so `require "nosj"` failed with `Library not
6
+ loaded: /Users/runner/hostedtoolcache/...` on any machine with Ruby
7
+ installed elsewhere (#2), and the Linux binaries carried a
8
+ `libruby.so` runtime dependency that a statically built Ruby (the
9
+ ruby-build default) cannot satisfy. The cause was magnus's `embed`
10
+ feature—needed only by the fuzz harness, which now enables it
11
+ itself—pulling `rb-sys/link-ruby` into the gem build. Extension
12
+ symbols now resolve from the host process at load time, and the
13
+ release build refuses to stage a binary that links libruby.
14
+
1
15
  ## [0.3.1] - 2026-07-17
2
16
 
3
17
  - Fixed: `NOSJ.minify` / `NOSJ.reformat` produced unparseable output
data/Cargo.lock CHANGED
@@ -137,8 +137,9 @@ dependencies = [
137
137
 
138
138
  [[package]]
139
139
  name = "magnus"
140
- version = "0.9.0"
141
- source = "git+https://github.com/matsadler/magnus#4e46772050e47cd6cd988fa935263cc5c583e388"
140
+ version = "0.8.2"
141
+ source = "registry+https://github.com/rust-lang/crates.io-index"
142
+ checksum = "3b36a5b126bbe97eb0d02d07acfeb327036c6319fd816139a49824a83b7f9012"
142
143
  dependencies = [
143
144
  "magnus-macros",
144
145
  "rb-sys",
@@ -148,8 +149,9 @@ dependencies = [
148
149
 
149
150
  [[package]]
150
151
  name = "magnus-macros"
151
- version = "0.9.0"
152
- source = "git+https://github.com/matsadler/magnus#4e46772050e47cd6cd988fa935263cc5c583e388"
152
+ version = "0.8.0"
153
+ source = "registry+https://github.com/rust-lang/crates.io-index"
154
+ checksum = "47607461fd8e1513cb4f2076c197d8092d921a1ea75bd08af97398f593751892"
153
155
  dependencies = [
154
156
  "proc-macro2",
155
157
  "quote",
@@ -198,7 +200,7 @@ dependencies = [
198
200
 
199
201
  [[package]]
200
202
  name = "nosj_native"
201
- version = "0.3.1"
203
+ version = "0.3.2"
202
204
  dependencies = [
203
205
  "ahash",
204
206
  "magnus",
data/ext/nosj/Cargo.toml CHANGED
@@ -5,7 +5,7 @@
5
5
  # required by lib/nosj.rb as "nosj/nosj" (Init_nosj set explicitly in
6
6
  # lib.rs). Gem name, module, and API are plain nosj.
7
7
  name = "nosj_native"
8
- version = "0.3.1"
8
+ version = "0.3.2"
9
9
  edition = "2021"
10
10
  authors = ["Yaroslav Markin <yaroslav@markin.net>"]
11
11
  license = "MIT"
@@ -16,7 +16,7 @@ name = "nosj"
16
16
  crate-type = ["cdylib", "rlib"]
17
17
 
18
18
  [dependencies]
19
- magnus = { git = "https://github.com/matsadler/magnus", features = ["embed", "rb-sys"] }
19
+ magnus = { version = "0.8", features = ["rb-sys"] }
20
20
  rb-sys = { version = "0.9.124", default-features = false }
21
21
  ahash = "0.8.11"
22
22
  # Read-only file mapping for the file entry points (load_lazy_file,
@@ -9,9 +9,11 @@ cargo-fuzz = true
9
9
 
10
10
  [dependencies]
11
11
  libfuzzer-sys = "0.4"
12
- # Must match the extension's own magnus line so cargo unifies the
13
- # rb-sys link (one libruby, one VM).
14
- magnus = { git = "https://github.com/matsadler/magnus", features = ["embed", "rb-sys"] }
12
+ # Same magnus version as the extension so cargo unifies them into one
13
+ # crate. Only this harness enables "embed" (rb-sys/link-ruby): fuzz
14
+ # binaries host their own VM, while the extension must never link
15
+ # libruby (its symbols resolve from the host process at load time).
16
+ magnus = { version = "0.8", features = ["embed", "rb-sys"] }
15
17
  # The extension as an rlib; its lib target is named `nosj` (the bundle
16
18
  # name), so rename the dependency to keep fuzz code readable.
17
19
  nosj_ext = { path = "..", package = "nosj_native" }
@@ -83,7 +83,7 @@ pub(crate) fn ensure_marked_shadow(slot: &mut Option<&'static mut VStackShadow>)
83
83
  }));
84
84
  let ptr = std::ptr::from_mut::<VStackShadow>(shadow).cast_const();
85
85
  let handle: Obj<ShadowHandle> = ruby.obj_wrap(ShadowHandle(ptr));
86
- ruby.gc_register_mark_object(handle);
86
+ magnus::gc::register_mark_object(handle);
87
87
  *slot = Some(shadow);
88
88
  }
89
89
  }
data/lib/nosj/version.rb CHANGED
@@ -2,5 +2,5 @@
2
2
 
3
3
  module NOSJ
4
4
  # The gem version.
5
- VERSION = "0.3.1"
5
+ VERSION = "0.3.2"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nosj
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yaroslav Markin