beni 0.15.0 → 0.17.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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +95 -0
  3. data/README.md +2 -1
  4. data/lib/beni/version.rb +1 -1
  5. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 88f769d75e8f4d6b9f76128041aedd046cd62b9135a8616b3e8cad8c40ac2813
4
- data.tar.gz: 480979d7e78980367fe3801cc2d02c6f88666340cf2538243cdcceebad16473f
3
+ metadata.gz: fe222d8d0760669922003c2adc5a2a642f7cd6dbf822f59566efa8e70f40e8f5
4
+ data.tar.gz: 7e61f980d9dba27513586d4baad0763e899044b731b2af59a121caf7f4c036d2
5
5
  SHA512:
6
- metadata.gz: 04616eed3885496e8a3a88a52f34b947b18b0763ca640f283be5936e1edc97066a762639e053e2f46776e9553bbdbb90db8e65691e8aca48a18c2871e5cfd9f5
7
- data.tar.gz: ba5712267d5012f5c4695ddb94196f76edd20f6e2e0613bf92880602fbed4c231f33597792ff0f5e82d6a6cd8c461e2f4114607e8e1a6002631bdf9c0f0135df
6
+ metadata.gz: e6a00b42a294c91c38a8ad1fe49cd383ca29e0458be4618d62933cd3b3409627b91612052e3508379a165ea8f0165fee360da0a648ccbf8ca187195352bcf361
7
+ data.tar.gz: 4dd3cc5d2a7660a73b07762196ee89333ee2be1d2c5b54343884b644d14067c2356c989d4230c19344f0c77ab6c97861eceb0b303b16028a94864c5d60595509
data/CHANGELOG.md CHANGED
@@ -1,5 +1,100 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.17.0](https://github.com/elct9620/beni/compare/v0.16.0...v0.17.0) (2026-09-19)
4
+
5
+
6
+ ### ⚠ BREAKING CHANGES
7
+
8
+ * **beni:** RString::to_bytes() -> Vec<u8> is gone. Read an owned Vec<u8> with Vec::<u8>::from_value(s.as_value()), or enable the bytes feature, where s.to_bytes() answers a bytes::Bytes.
9
+ * **beni:** RClass::data_wrap(mrb, value, &TYPE) becomes an unsafe impl TypedData for the payload type plus Mrb::wrap_as(value, class) (or wrap / obj_wrap); Value::data_get(mrb, &TYPE) becomes <&T>::try_convert or RTypedData::get::<T>; Value::data_reinit has no replacement beyond typed_data::Dup's clone.
10
+ * **beni:** the Method0 … Method2Block and MethodAny traits take the receiver type as a new leading type parameter, so a closure registered without an annotated receiver no longer infers.
11
+ * **beni:** method!, scan_args, and get_kwargs bound their parameters on TryConvert rather than FromValue; a Float argument now truncates into an integer parameter instead of being rejected, and a conversion failure's message is mruby's rather than "wrong argument type (expected <Rust type>)".
12
+ * **beni:** Array::entry(idx) is now entry(mrb, idx),
13
+ * **beni:** count a call's keyword hash as its last argument
14
+ * **beni:** read a call's arguments through scan_args alone
15
+ * **beni:** read any handle's raw value through sys::AsRawValue over ReprValue
16
+ * **beni:** reach a class pointer only through the class value
17
+ * **beni:** carry the interned id on its own Id beside the Symbol handle
18
+ * **beni-sys:** an archive configured with MRB_GC_FIXED_ARENA no longer builds.
19
+ * **beni:** Array::splice takes (isize, usize), RString::substr takes (isize, usize) and RString::index takes an isize offset.
20
+ * **beni:** cross into the typed domain only through unsafe
21
+ * **beni:** keep the configured-width float out of the typed signatures
22
+ * **beni:** key every named operation by a symbol-or-name key
23
+ * **beni:** resolve a symbol-or-name key to a typed symbol
24
+ * **beni:** keep the configured-width integer out of the typed signatures
25
+ * **beni:** take the argument count Error::argnum renders as usize
26
+
27
+ ### Features
28
+
29
+ * **beni-sys:** publish the float width the bindings declare ([7e2759e](https://github.com/elct9620/beni/commit/7e2759ead998ce64540e5c115141a903743bfa1d))
30
+ * **beni-sys:** publish the integer width the bindings declare ([fd00fb0](https://github.com/elct9620/beni/commit/fd00fb0c8e0d069045b23e4d3bae0671e61316e0))
31
+ * **beni-sys:** refuse bindings of a fixed-size GC arena ([e958a33](https://github.com/elct9620/beni/commit/e958a3347181ece291b937a24fabceb09b72cffa))
32
+ * **beni:** carry Rust data through magnus's TypedData ([84c212c](https://github.com/elct9620/beni/commit/84c212c0d2bf2266a08429c530a3695c51ba4290))
33
+ * **beni:** carry the interned id on its own Id beside the Symbol handle ([0be46b4](https://github.com/elct9620/beni/commit/0be46b4a70fbce0a988b224ae4715e76ceaf4ad7))
34
+ * **beni:** convert a method's receiver through TryConvert ([933666e](https://github.com/elct9620/beni/commit/933666e3a67e96348fdf9ae2a7fb1c9661de0e5a))
35
+ * **beni:** convert arrays and hashes into Rust collections through TryConvert ([cba8b1d](https://github.com/elct9620/beni/commit/cba8b1db8a86cee74c96578b8c840246f11790cb))
36
+ * **beni:** convert bytes::Bytes behind a bytes feature ([f157771](https://github.com/elct9620/beni/commit/f1577718502d2b41e980db9ea63b22647ef5c006))
37
+ * **beni:** convert every Rust integer the configured width holds ([e8b990a](https://github.com/elct9620/beni/commit/e8b990a6c73253b5c2e8b6ad703dc2cc502c43be))
38
+ * **beni:** convert method arguments through TryConvert ([b33f907](https://github.com/elct9620/beni/commit/b33f907162e7c57592d1421076186194e0c5929c))
39
+ * **beni:** copy a TypedData payload through typed_data::Dup ([2a964a7](https://github.com/elct9620/beni/commit/2a964a7caf633a2bc7053788e12bb9ab6cc611a6))
40
+ * **beni:** count a call's keyword hash as its last argument ([95a7ec2](https://github.com/elct9620/beni/commit/95a7ec25cbffd30f0f8244f8ccf7e39214bf1a57))
41
+ * **beni:** cross into the typed domain only through unsafe ([9ab09ca](https://github.com/elct9620/beni/commit/9ab09ca714db4ad22a4e541ec0abecfbfb5ec63f))
42
+ * **beni:** keep the configured-width float out of the typed signatures ([515d527](https://github.com/elct9620/beni/commit/515d527c2985f6703907f732131e3f44a33de829))
43
+ * **beni:** keep the configured-width integer out of the typed signatures ([4a0d3b0](https://github.com/elct9620/beni/commit/4a0d3b06820c8704337da63e99619b47a2a1fa10))
44
+ * **beni:** key every named operation by a symbol-or-name key ([8bfbecc](https://github.com/elct9620/beni/commit/8bfbecc5cee087c0695d512293eae7422c6bbd82))
45
+ * **beni:** reach a class pointer only through the class value ([02bc3a7](https://github.com/elct9620/beni/commit/02bc3a7ccec6f2ee78d5f9e50e9f39b1b9769843))
46
+ * **beni:** reach Rust data only through TypedData ([e6577de](https://github.com/elct9620/beni/commit/e6577ded0b9a769193222d998970525a3202b785))
47
+ * **beni:** read a call's arguments through scan_args alone ([549c397](https://github.com/elct9620/beni/commit/549c397225bfa855bd31e5670523aed4ae771eb1))
48
+ * **beni:** read a string handle as bytes::Bytes through to_bytes ([c86d8b2](https://github.com/elct9620/beni/commit/c86d8b2f5dbd468e7d9c00099bd28bc4e99b63e2))
49
+ * **beni:** read any argument shape through scan_args ([f446f88](https://github.com/elct9620/beni/commit/f446f886c2b7ef073f54f3a69d3b284fa78e4a2f))
50
+ * **beni:** read any handle's raw value through sys::AsRawValue over ReprValue ([a838630](https://github.com/elct9620/beni/commit/a838630214142cbfceeb691292977ba718a2e81e))
51
+ * **beni:** resolve a symbol-or-name key to a typed symbol ([48943cc](https://github.com/elct9620/beni/commit/48943ccf949ca195fcfac18b4cd472949976e371))
52
+ * **beni:** take a keyword bucket apart by name through get_kwargs ([3cea138](https://github.com/elct9620/beni/commit/3cea138e9095125b731a19ab23167364361c6a85))
53
+ * **beni:** take splice and substring positions as isize and lengths as usize ([af0d505](https://github.com/elct9620/beni/commit/af0d505652f27068fdb2019bd68c5bf260b07680))
54
+ * **beni:** undefine a class's default allocator as magnus does ([08a93c8](https://github.com/elct9620/beni/commit/08a93c8b508f378c17dfa563d773b8da48acd6c5))
55
+ * **beni:** wrap Rust types through #[beni::wrap] and derive(TypedData) ([82b6803](https://github.com/elct9620/beni/commit/82b6803ae5bddd92c0c162d25a8be49b109a93b3))
56
+ * **surface:** hold the re-exported macros in the drift net ([99815e9](https://github.com/elct9620/beni/commit/99815e93910d4f517559dd8a8fd6a7e962bf8e5c))
57
+
58
+
59
+ ### Bug Fixes
60
+
61
+ * **beni-sys:** keep the float-width refusals on one line ([cd76ec1](https://github.com/elct9620/beni/commit/cd76ec139463b0d38414081b45204ddc82ec86f6))
62
+ * **beni:** keep a value read out of a container reachable after it lets go ([366b1b1](https://github.com/elct9620/beni/commit/366b1b17e53e8fd4902622bc28d82cd7bcfdba51))
63
+ * **beni:** take the argument count Error::argnum renders as usize ([1dcc8de](https://github.com/elct9620/beni/commit/1dcc8dee51b936bf95e0a25c39b26ac4cabf6c06))
64
+
65
+ ## [0.16.0](https://github.com/elct9620/beni/compare/v0.15.0...v0.16.0) (2026-09-14)
66
+
67
+
68
+ ### ⚠ BREAKING CHANGES
69
+
70
+ * **beni:** `Mrb::intern_cstr`, `Mrb::intern_str`, and `Mrb::intern_static` return `Result<sys::mrb_sym, Error>`; `Mrb::intern`, `Symbol::new`, and `RString::intern` return `Result<Symbol, Error>`; and `IntoSym::into_sym` returns `Result<sys::mrb_sym, Error>`, so an implementation of `IntoSym` outside the crate changes its signature to match.
71
+ * **beni:** `Mrb::define_global_const` returns `Result<(), Error>` instead of `()`.
72
+ * **beni:** `Mrb::protect`, `Mrb::rescue`, and `Mrb::ensure` are gone. Wrap a raising raw call in `beni::sys::protect(&mrb, |mrb| ...)` instead; a panic inside that body aborts rather than returning `Err(Error::Panic)`. Rescue by matching on the `Err`, and run cleanup as the code after the operation.
73
+ * **beni:** `Mrb::argv` returns `Vec<Value>` instead of `&[Value]`; a body that needs the zero-copy view calls the unsafe
74
+ * **beni:** `Mrb::get_args` and `Format::read` return `Result<F::Output, Error>`, `Mrb::arg1` returns `Result<Value, Error>`, and `format::Str` reads as `Vec<u8>` rather than a borrowed slice. A method body adds `?` to each read; a custom `Format` implementation returns its output wrapped in `Ok`.
75
+
76
+ ### Features
77
+
78
+ * **beni:** carry one slot of user data on the interpreter ([bffada5](https://github.com/elct9620/beni/commit/bffada5c386c3ae4f8adfe2207dccf1a417b7dad))
79
+ * **beni:** catch a C callback's panic with beni::sys::catch_unwind ([673d051](https://github.com/elct9620/beni/commit/673d051820c7aee07ee7b373dc6535c76369a5dd))
80
+ * **beni:** catch a raw binding's raise in beni::sys, without a panic boundary ([fe43ca1](https://github.com/elct9620/beni/commit/fe43ca12401d02a6148dbf6e0eefa9a3c57fc04a))
81
+ * **beni:** hand the argument-array read back as a copy ([6fb83dd](https://github.com/elct9620/beni/commit/6fb83ddf82131b4f13f2d000480766c759b6926d))
82
+ * **beni:** let a method parameter take any value, an i64, or nil ([a9f8588](https://github.com/elct9620/beni/commit/a9f8588b335a0696c68c0a69e24e5814dbbe0e8d))
83
+ * **beni:** let a value answer is_a? and instance_of? for a module ([04ada92](https://github.com/elct9620/beni/commit/04ada92c6ea221384b5fd26d6260e7dc729ecb1e))
84
+ * **beni:** let an argument read hand its failure back to the body ([0a9aebd](https://github.com/elct9620/beni/commit/0a9aebd7384eb54d8727f30787e75e8aa18d3ace))
85
+ * **beni:** let an Err answer is_a? for the exception it carries ([2b1509c](https://github.com/elct9620/beni/commit/2b1509cd0040bdbc1c42008ce47742cc85fd2d0a))
86
+
87
+
88
+ ### Bug Fixes
89
+
90
+ * **beni:** hand a frozen Object's refusal back from define_global_const ([58d3261](https://github.com/elct9620/beni/commit/58d3261f960f03665605349ea5df9814c91e66de))
91
+ * **beni:** hand an over-long name's intern failure back as an Err ([851e908](https://github.com/elct9620/beni/commit/851e90815ecf8dfcfce32f988df4e3115db5c323))
92
+ * **beni:** keep a load's raise inside the method that ran it ([d938db5](https://github.com/elct9620/beni/commit/d938db5196e77d88779f75523773950f784bc913))
93
+ * **beni:** let a raise under protect reach its jump target on MSVC ([ae026be](https://github.com/elct9620/beni/commit/ae026bebe43cf6f1260fb6c5c94912bd10a1a0a8))
94
+ * **beni:** miss a name too long to intern instead of raising from intern_check ([88cac10](https://github.com/elct9620/beni/commit/88cac10b52625f458e7b3b501d002a9024b0144f))
95
+ * **beni:** read a typed method's arguments without jumping its panic boundary ([5401ba2](https://github.com/elct9620/beni/commit/5401ba2f9195b8c0b0ce158927cc34fa863826e9))
96
+ * **beni:** surface the raise a compile context's parser catches ([5bd19a1](https://github.com/elct9620/beni/commit/5bd19a11ddb3fefe1592f3144b6ceb945e45881e))
97
+
3
98
  ## [0.15.0](https://github.com/elct9620/beni/compare/v0.14.1...v0.15.0) (2026-09-13)
4
99
 
5
100
 
data/README.md CHANGED
@@ -13,13 +13,14 @@ semantics and may still evolve between minor versions.
13
13
 
14
14
  ## Packages
15
15
 
16
- All three packages release in lockstep under a single version.
16
+ All four packages release in lockstep under a single version.
17
17
 
18
18
  | Package | Registry | Role |
19
19
  |---|---|---|
20
20
  | `beni` gem | rubygems.org | Rake tasks + DSL config that download mruby and build the archive |
21
21
  | `beni-sys` crate | crates.io | bindgen FFI surface over the mruby C API |
22
22
  | `beni` crate | crates.io | safe typed wrapper over `beni-sys`, aligned with magnus idioms |
23
+ | `beni-macros` crate | crates.io | the `beni` crate's `wrap` and `TypedData` macros, used through `beni` |
23
24
 
24
25
  ## Getting started
25
26
 
data/lib/beni/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Beni
4
- VERSION = "0.15.0"
4
+ VERSION = "0.17.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beni
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.0
4
+ version: 0.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aotokitsuruya