beni 0.23.1 → 0.25.0
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 +4 -4
- data/CHANGELOG.md +105 -0
- data/README.md +5 -3
- data/lib/beni/builder.rb +4 -23
- data/lib/beni/version.rb +1 -1
- data/sig/beni/builder.rbs +0 -4
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e6a016874c88f351f3e16608a037dcf43764b1a6103a2343095a8309993ef3e6
|
|
4
|
+
data.tar.gz: 7dee2ba6bf749ca47d21c03c7ae8e13b088967ed066cdc1af7f65d3faa51c6c0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 003cb5fd98c9c85c2e3e50e8e491c1e013239910e0d7fd77acfa5758666814dcf28217e0bd46323e44cee26024025359ccc0675cb998c466c8d59975467f5f30
|
|
7
|
+
data.tar.gz: 6eed22fd23baf576f241c1d05d3120fbcb368387b4fe9df59ac3932b4a5f596a5ca775c141f47cbcfcb2d87dbe04744277b5416d8c273f38b2dbdba7b1c25620
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,110 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.25.0](https://github.com/elct9620/beni/compare/v0.24.0...v0.25.0) (2026-10-22)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### ⚠ BREAKING CHANGES
|
|
7
|
+
|
|
8
|
+
* **beni:** Symbol::to_str is removed; call to_r_string, which answers a Result.
|
|
9
|
+
* **beni:** the calls take an ArgList and name their result type. &[] becomes (), &[a, b] becomes [a, b] or (a, b), &vec becomes vec.as_slice(), and funcall::<_, _, Value> keeps the untyped result.
|
|
10
|
+
* **beni:** RArray::entry / pop / shift, RHash::delete, and Mrb::gv_get name their result type (entry::<Value> to keep the untyped read; entry and gv_get now return Result); Symbol::new takes AsRef<str> instead of &CStr.
|
|
11
|
+
* **beni:** Id::name / name_bytes / dump and Symbol::name / name_bytes / dump return Result instead of Option.
|
|
12
|
+
* **beni:** Mrb::load_string(bytes) is now Mrb::eval::<T>(str); name Value as T to keep the untyped result.
|
|
13
|
+
* **beni:** Mrb::sym_name(id), sym_name_len(id), and sym_dump(id) are now id.name(mrb), id.name_bytes(mrb), and id.dump(mrb).
|
|
14
|
+
* **beni:** Range::begin is now beg and Range::is_exclusive is now excl; beg and end take a TryConvert target and return a Result.
|
|
15
|
+
* **beni:** RString::cat_str is now RString::buf_append.
|
|
16
|
+
* **beni:** Module::alias_method is now Module::define_alias.
|
|
17
|
+
* **beni:** Mrb::str_new_capa is now Mrb::str_buf_new.
|
|
18
|
+
* **beni:** Mrb::full_gc is now Mrb::gc_start.
|
|
19
|
+
* **beni:** RHash::set, get, and fetch are now aset, aref, and lookup2; aref and lookup2 name their result type.
|
|
20
|
+
* **beni:** Mrb::object_class is now Mrb::class_object.
|
|
21
|
+
|
|
22
|
+
### Features
|
|
23
|
+
|
|
24
|
+
* **beni-sys:** publish whether the archive is a bigint archive ([661f79f](https://github.com/elct9620/beni/commit/661f79f819b00a6bbc8f7bab3c4148194578cf88))
|
|
25
|
+
* **beni:** alias a method through magnus's define_alias ([2d1711a](https://github.com/elct9620/beni/commit/2d1711ab5464b00e321990613f4041228216e752))
|
|
26
|
+
* **beni:** answer a typed payload as a raw pointer through as_ptr ([d79dc03](https://github.com/elct9620/beni/commit/d79dc03d5d1bbde8ca28d912c42a4423271beebf))
|
|
27
|
+
* **beni:** append one string to another through magnus's buf_append ([3cb74d0](https://github.com/elct9620/beni/commit/3cb74d078518bc8e689350f350bfdb82ab804082))
|
|
28
|
+
* **beni:** build a string with capacity through magnus's str_buf_new ([b2010ec](https://github.com/elct9620/beni/commit/b2010ecab203698dbd89ee40c12a2567b3fbac19))
|
|
29
|
+
* **beni:** build an Integer from every Rust integer a bigint archive holds ([9d99fee](https://github.com/elct9620/beni/commit/9d99fee2478daf754b4879e83788d2f9207b158a))
|
|
30
|
+
* **beni:** convert any Numeric through magnus's NumericValue ([de4d310](https://github.com/elct9620/beni/commit/de4d310ba51a9b565789ad27a7a665622a3df599))
|
|
31
|
+
* **beni:** convert nil, true, false, and Symbol handles into heap collections ([6b7cdd9](https://github.com/elct9620/beni/commit/6b7cdd9268711fae3368e2ffbc28907f3b891a68))
|
|
32
|
+
* **beni:** convert Rust text, paths, and collections into Ruby values ([de4a50c](https://github.com/elct9620/beni/commit/de4a50c29e925f4e9349144af007c1e951264a8b))
|
|
33
|
+
* **beni:** convert Time, IO, and Enumerator instances as magnus does ([550a918](https://github.com/elct9620/beni/commit/550a918592923a877255fd80a1c48de442dd23a2))
|
|
34
|
+
* **beni:** evaluate Ruby source through magnus's eval ([7b3c1ad](https://github.com/elct9620/beni/commit/7b3c1ad85e08abcb74f08f600c95c67733984946))
|
|
35
|
+
* **beni:** pass call arguments through magnus's ArgList ([cad0366](https://github.com/elct9620/beni/commit/cad0366b7655347b8bc50d22e571bede07467de1))
|
|
36
|
+
* **beni:** read a range's bounds through magnus's beg, end, and excl ([3a9d0d5](https://github.com/elct9620/beni/commit/3a9d0d5ed3fc738e178066127bfa5caa9c0ce53f))
|
|
37
|
+
* **beni:** read an id's name on the Id, as magnus places it ([17f02ce](https://github.com/elct9620/beni/commit/17f02cec134acf5faacd9e6f921fc763634cf626))
|
|
38
|
+
* **beni:** read an Integer into every Rust integer its range holds ([500aad5](https://github.com/elct9620/beni/commit/500aad51f09b4d31d05818bd49f996551b00819b))
|
|
39
|
+
* **beni:** read and assign hash entries through magnus's names ([f10988a](https://github.com/elct9620/beni/commit/f10988a24182b1dd750fb21b55d250ee4f35636f))
|
|
40
|
+
* **beni:** read symbol names fallibly, as magnus's Id::name does ([d518990](https://github.com/elct9620/beni/commit/d51899043bd09a42037579aef69345ca9054a7d2))
|
|
41
|
+
* **beni:** read the core classes and define global functions as magnus does ([ba02a08](https://github.com/elct9620/beni/commit/ba02a08391035f411ede26f65de0a006ed3790e5))
|
|
42
|
+
* **beni:** render a symbol's name through ReprValue::to_r_string ([657aa6e](https://github.com/elct9620/beni/commit/657aa6ec61de77a57de13344c757ed6c1bd55a68))
|
|
43
|
+
* **beni:** run a full collection through magnus's gc_start ([5fc51c9](https://github.com/elct9620/beni/commit/5fc51c9cc7d26a3c9ecdd1e650472a70d0aa6675))
|
|
44
|
+
* **beni:** tell a Fixnum from an RBignum, as magnus does ([ec6c247](https://github.com/elct9620/beni/commit/ec6c247bf1ac133e49bd7a9c6d81711e5a52e2d9))
|
|
45
|
+
* **beni:** tell a word-carried Float from an allocated one, as magnus does ([0008c9a](https://github.com/elct9620/beni/commit/0008c9a27b0d2adb9a389d14c9965c0c0b551cc2))
|
|
46
|
+
* **beni:** type container and global access through magnus's signatures ([c2f62fd](https://github.com/elct9620/beni/commit/c2f62fd9073720f546df0207780e8e3bec40a3e1))
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
### Bug Fixes
|
|
50
|
+
|
|
51
|
+
* **beni:** name a non-UTF-8 class lossily when refusing its redefinition ([534368e](https://github.com/elct9620/beni/commit/534368ee0fa4137f528fc05b2a9e154da4aa5ef7))
|
|
52
|
+
* **beni:** read a parsed integer through its tag ([320ee04](https://github.com/elct9620/beni/commit/320ee0443bf27dd0889e9b2b8042df7744b7d087))
|
|
53
|
+
* **beni:** read class names and renders lossily, as magnus does ([b73b4d5](https://github.com/elct9620/beni/commit/b73b4d50dd98fb4ef615a40df795636a3191cdd4))
|
|
54
|
+
|
|
55
|
+
## [0.24.0](https://github.com/elct9620/beni/compare/v0.23.1...v0.24.0) (2026-10-22)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
### ⚠ BREAKING CHANGES
|
|
59
|
+
|
|
60
|
+
* **beni:** an instance-variable key without `@` on a plain object now surfaces a NameError, its presence test answers false, and the iteration no longer visits it. Keep such state in a TypedData payload, or reach it through `beni::sys`.
|
|
61
|
+
* **beni:** a class-variable or constant key Ruby could not write there — no `@@`, a lowercase or `__x__` constant — now surfaces a NameError, and its predicate answers false. A global key without `$` now names the `$`-prefixed global; reach a `$`-less global through
|
|
62
|
+
* **beni:** `Mrb::gc_register_forever(v)` is now
|
|
63
|
+
* **beni:** `Value` and every typed handle are no longer `Send` or `Sync`; a handle held across threads, such as in user data or a `TypedData` payload, is stored as an `Opaque` and unwrapped with
|
|
64
|
+
|
|
65
|
+
### Features
|
|
66
|
+
|
|
67
|
+
* **beni-sys:** bind debug.h and publish whether the archive carries the debug hooks ([610384a](https://github.com/elct9620/beni/commit/610384a2c531ba95ff4731ca6c5ca55034295f8a))
|
|
68
|
+
* **beni-sys:** check the bindings' layouts behind bindgen-layout-tests ([a753565](https://github.com/elct9620/beni/commit/a7535658b53228fd0fb781193215a8844e10c847))
|
|
69
|
+
* **beni-sys:** make the all-zero mrb_value nil under either admitted boxing ([843da49](https://github.com/elct9620/beni/commit/843da49009091b92fb9a0e6d0039b400e69fcf8e))
|
|
70
|
+
* **beni-sys:** read the type tag and the integer through boxing-agnostic shims ([125ad6e](https://github.com/elct9620/beni/commit/125ad6e5f949cca76b720fd392878b107fb0f22a))
|
|
71
|
+
* **beni-sys:** refuse an archive boxed other than word or no boxing ([5590d33](https://github.com/elct9620/beni/commit/5590d33a8fc5da5f93c32321b93d6aba7e5ad477))
|
|
72
|
+
* **beni-sys:** step out of a proc's scope and read an environment's length ([4d07150](https://github.com/elct9620/beni/commit/4d07150822f09ed45f982c42e7ba9ae53d3a1e66))
|
|
73
|
+
* **beni:** add debug hooks a debugger drives breakpoints from ([0f05132](https://github.com/elct9620/beni/commit/0f05132d39d79b7038d5737c879e0dbc5cb40bec))
|
|
74
|
+
* **beni:** copy the hook's views and read them by value, as magnus does ([f948a5e](https://github.com/elct9620/beni/commit/f948a5e19082486f33f8691f6da302b8687ac93e))
|
|
75
|
+
* **beni:** keep handles on their thread and carry them in an Opaque ([13b1952](https://github.com/elct9620/beni/commit/13b19525e4d9f9824439127db3f76d7eea4c896f))
|
|
76
|
+
* **beni:** name the never-released root gc_register_mark_object ([7df23d6](https://github.com/elct9620/beni/commit/7df23d6d7d7b9b71f9880f74d848efa24bea7581))
|
|
77
|
+
* **beni:** read a frame's self and defining class, and inspect from Rust ([c9c945e](https://github.com/elct9620/beni/commit/c9c945e0b0d6af1fbbaa42774138a0c0e13803e4))
|
|
78
|
+
* **beni:** read values under no boxing as under word boxing ([38be9e6](https://github.com/elct9620/beni/commit/38be9e6384934c0dea817c8d6bec226fd6d77f57))
|
|
79
|
+
* **beni:** refuse class-variable and constant names Ruby cannot write ([fe8a34e](https://github.com/elct9620/beni/commit/fe8a34ea72927aa8cbac9b3b79f5c7b602986513))
|
|
80
|
+
* **beni:** refuse instance-variable names Ruby cannot write, except on data carriers ([be8c040](https://github.com/elct9620/beni/commit/be8c040234c2156b02425ca91a497a30330856a2))
|
|
81
|
+
* **tasks:** expect archive-gated surface in its own drift net body ([97af298](https://github.com/elct9620/beni/commit/97af298b7f46342484c544a949b73f41693d4ed9))
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
### Bug Fixes
|
|
85
|
+
|
|
86
|
+
* **beni-macros:** fully qualify the panic a derived carrier read raises ([1355f22](https://github.com/elct9620/beni/commit/1355f228560dc49cf0da14992c5b4bf7cfd15b1e))
|
|
87
|
+
* **beni-macros:** leave the fallback arm out when every variant names a class ([52de4e2](https://github.com/elct9620/beni/commit/52de4e2a6b5b90fd3c53a07f58bda6181aa0e0fd))
|
|
88
|
+
* **beni-sys:** fence a header example past any fence it holds ([5455f52](https://github.com/elct9620/beni/commit/5455f523e7e2ee190f2672d4e8a8fac13b3b3d91))
|
|
89
|
+
* **beni:** bound an enclosing scope's locals by its environment less self ([b7bc20a](https://github.com/elct9620/beni/commit/b7bc20a416de61a858a3f12fab8f6ef76d970e91))
|
|
90
|
+
* **beni:** end arena scopes in any order without re-protecting released slots ([d44b921](https://github.com/elct9620/beni/commit/d44b9216541babb93e2a40776fa419f8a40dd923))
|
|
91
|
+
* **beni:** hand every beni:build to mruby's rake ([06c274f](https://github.com/elct9620/beni/commit/06c274f98c01463e62fe4997e5dabb681965a812))
|
|
92
|
+
* **beni:** hide the typed surface's own arrays from ObjectSpace ([076779f](https://github.com/elct9620/beni/commit/076779fc649d7f1f917c75fb29689e1e3b2b7486))
|
|
93
|
+
* **beni:** hold what an inspector opened from Rust reads ([5afd1e0](https://github.com/elct9620/beni/commit/5afd1e047c25e907a8386c0781936429af4a4f34))
|
|
94
|
+
* **beni:** list a frame's local variables as mruby's local_variables does ([ebb1c26](https://github.com/elct9620/beni/commit/ebb1c26267d77b13ac42ca727c0673d79f1ee43d))
|
|
95
|
+
* **beni:** raise from the code fetch hook through the method bridges' path ([4ec8586](https://github.com/elct9620/beni/commit/4ec8586e39151df778a59c6869c8e6308ef65aa8))
|
|
96
|
+
* **beni:** read the running frame's line at the instruction the hook runs before ([ca20bed](https://github.com/elct9620/beni/commit/ca20bedf5d3047d549ff4758ceb98e7c030da6b3))
|
|
97
|
+
* **beni:** refuse a carrier path segment Ruby could not write as a constant ([df16fa3](https://github.com/elct9620/beni/commit/df16fa3cd0d0d1ead797deb742fcab3f05576c8b))
|
|
98
|
+
* **tasks:** clear a shell's MRUBY_LIB_DIR for the host legs ([89d2958](https://github.com/elct9620/beni/commit/89d2958568f8cf7f8de0eb62613cf8122360c96c))
|
|
99
|
+
* **tasks:** hand the float32 leg its build env as a hash ([50819dd](https://github.com/elct9620/beni/commit/50819ddd6718ec9b05c4f02cbfbe690e93d58089))
|
|
100
|
+
* **tasks:** read every gate axis and leave build-specific net bodies unread ([bfb6d00](https://github.com/elct9620/beni/commit/bfb6d000c27e6a5a574248d6168bb0ec6349c468))
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
### Performance Improvements
|
|
104
|
+
|
|
105
|
+
* **beni:** end an arena scope in one crossing ([7ace894](https://github.com/elct9620/beni/commit/7ace89469360abac032797f5c70973e922b9bd54))
|
|
106
|
+
* **beni:** read the lazy-value record through the interpreter's slot ([f1135b0](https://github.com/elct9620/beni/commit/f1135b024c79a3e6af9f6172090b2ceafdb239b0))
|
|
107
|
+
|
|
3
108
|
## [0.23.1](https://github.com/elct9620/beni/compare/v0.23.0...v0.23.1) (2026-10-13)
|
|
4
109
|
|
|
5
110
|
|
data/README.md
CHANGED
|
@@ -83,7 +83,7 @@ struct WidgetGem;
|
|
|
83
83
|
|
|
84
84
|
impl Gem for WidgetGem {
|
|
85
85
|
fn init(mrb: &Mrb) -> Result<(), Error> {
|
|
86
|
-
let widget = mrb.define_class(c"Widget", mrb.
|
|
86
|
+
let widget = mrb.define_class(c"Widget", mrb.class_object())?;
|
|
87
87
|
widget.define_method(mrb, c"answer", method!(answer, 0))?;
|
|
88
88
|
Ok(())
|
|
89
89
|
}
|
|
@@ -97,8 +97,10 @@ fn main() {
|
|
|
97
97
|
```
|
|
98
98
|
|
|
99
99
|
An interpreter is carried between threads but never reached from two at
|
|
100
|
-
once
|
|
101
|
-
compiles while sharing it needs a `Mutex` of your own.
|
|
100
|
+
once. `Mrb` is `Send` and not `Sync`: handing one to another thread
|
|
101
|
+
compiles, while sharing it needs a `Mutex` of your own. A handle stays on
|
|
102
|
+
the thread that made it; wrap it in `beni::value::Opaque` to carry it
|
|
103
|
+
along, and unwrap it there with `Mrb::get_inner`.
|
|
102
104
|
|
|
103
105
|
Every build needs the archive: with no discovery variable set the build
|
|
104
106
|
fails naming the ones it looked for, rather than handing you a crate
|
data/lib/beni/builder.rb
CHANGED
|
@@ -62,26 +62,11 @@ module Beni
|
|
|
62
62
|
File.join(staged_path(target), archive_file_name(sidecar))
|
|
63
63
|
end
|
|
64
64
|
|
|
65
|
-
#
|
|
66
|
-
#
|
|
67
|
-
#
|
|
68
|
-
#
|
|
69
|
-
# incremental and only emits what it lacks.
|
|
70
|
-
def built?
|
|
71
|
-
targets.all? { |target| exist?(archive_path(target)) }
|
|
72
|
-
end
|
|
73
|
-
|
|
74
|
-
# Idempotent build entry point for +rake beni:build+: skip with a
|
|
75
|
-
# note when every artifact is already present, otherwise build and
|
|
76
|
-
# report readiness. A declared config that does not exist aborts
|
|
77
|
-
# before the skip check — stale artifacts must not mask it.
|
|
65
|
+
# Build entry point for +rake beni:build+. mruby's rake decides what
|
|
66
|
+
# is stale — a changed build config, gem, or source rebuilds what
|
|
67
|
+
# depends on it, and an up-to-date tree compiles nothing — so every
|
|
68
|
+
# run hands it the build.
|
|
78
69
|
def ensure_built
|
|
79
|
-
check_build_config!
|
|
80
|
-
if built?
|
|
81
|
-
puts "[beni] archive already present for #{targets.join(" + ")} — skipping"
|
|
82
|
-
return
|
|
83
|
-
end
|
|
84
|
-
|
|
85
70
|
build
|
|
86
71
|
puts "[beni] archive ready for #{targets.join(" + ")}"
|
|
87
72
|
end
|
|
@@ -124,10 +109,6 @@ module Beni
|
|
|
124
109
|
File.basename(line.delete_prefix(ARCHIVE_PATH_KEY).strip.tr("\\", "/"))
|
|
125
110
|
end
|
|
126
111
|
|
|
127
|
-
def exist?(path)
|
|
128
|
-
!path.nil? && File.exist?(path)
|
|
129
|
-
end
|
|
130
|
-
|
|
131
112
|
# Spawn mruby's rake with the parent environment plus the +env+
|
|
132
113
|
# overlay. Extracted as a seam so tests can fake the subprocess
|
|
133
114
|
# while observing the full env + cmd contract.
|
data/lib/beni/version.rb
CHANGED
data/sig/beni/builder.rbs
CHANGED
|
@@ -20,8 +20,6 @@ module Beni
|
|
|
20
20
|
|
|
21
21
|
def archive_path: (String target) -> String?
|
|
22
22
|
|
|
23
|
-
def built?: () -> bool
|
|
24
|
-
|
|
25
23
|
def ensure_built: () -> void
|
|
26
24
|
|
|
27
25
|
def build: () -> void
|
|
@@ -32,8 +30,6 @@ module Beni
|
|
|
32
30
|
|
|
33
31
|
def archive_file_name: (String sidecar) -> String
|
|
34
32
|
|
|
35
|
-
def exist?: (String? path) -> bool
|
|
36
|
-
|
|
37
33
|
def run_mruby_rake: (Hash[String, String] env, Array[String] cmd) -> void
|
|
38
34
|
|
|
39
35
|
def env: () -> Hash[String, String]
|