0.4.0
Magnus 0.4.0 adds a handful of new features and fixes. Support for different platforms has been greatly improved.
Magnus is a Rust library binding to the C API of the Ruby programming language. Magnus lets you write Ruby extension libraries (or 'gems') in Rust, or embed Ruby in your Rust program.
Magnus has switched from our own built in bindings to Ruby to using the rb-sys
crate. This, along with the rb-sys
gem, greatly improves the compatibility and reliability across different platforms and Ruby versions. Notable improvements include:
- Support for cross-compilation
- Improved static linking support
- Support for Ruby 3.2 preview
- Support for mswin/msvc platform with Ruby 3.2
- Support for Xcode 14
Thanks to @ianks for all his hard work on this.
Additions around exceptions make for easier defining of custom exceptions. See examples/custom_exception_ruby
and examples/custom_exception_rust
.
Notable fixes include:
- Calling and creating Ruby blocks/procs should be much more reliable.
- Fixed a memory leak of the error message when returning an
Error
to raise an exception. Flonum
support disabled on platforms where it is not supported. This allows compiling Magnus on 32 bit systems (though full 32 bit support is not yet guaranteed).
See CHANGELOG.md for full details.