Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ gem "nuckle", path: ENV["OMQ_DEV"] ? "../nuckle" : nil
gem "protocol-zmtp", path: "gems/protocol-zmtp"

gem "omq-backend-rust", require: false, path: "gems/omq-backend-rust"
gem "omq-rs", require: false, path: ENV["OMQ_RS_PATH"]
gem "omq-qos", require: false, path: "gems/omq-qos"
gem "omq-websocket", require: false, path: "gems/omq-websocket"

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,8 @@ See the [omq-cli README](https://github.com/paddor/omq-cli) for full documentati

## Optional Rust backend

Install `omq-backend-rust` for a Rust/omq-tokio backend. Same socket API,
but connection handling runs in native code on a Tokio runtime.
Install `omq-backend-rust` for an OMQ.rs backend through the first-class
`omq-rs` binding. Same socket API, with connection handling on a Tokio runtime.

The Rust backend also supports TruffleRuby. The pure Ruby backend currently
requires MRI-style native `Fiber.scheduler` support, so use `backend: :rust`
Expand Down
5 changes: 5 additions & 0 deletions gems/omq-backend-rust/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
- Added JRuby support through OMQ.java Maven artifacts for Linux x86_64,
macOS aarch64, macOS x86_64, and Windows x86_64.

### Changed

- Replaced the private MRI/TruffleRuby native extension with the first-class
`omq-rs` binding.

## [0.2.0] - 2026-08-08

### Added
Expand Down
3 changes: 0 additions & 3 deletions gems/omq-backend-rust/Cargo.toml

This file was deleted.

2 changes: 1 addition & 1 deletion gems/omq-backend-rust/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ ROOT = File.expand_path("../..", __dir__)
SIBLINGS = File.expand_path("../../..", __dir__)

gem "omq", path: ROOT
gem "omq-rs", path: ENV["OMQ_RS_PATH"]
gem "protocol-zmtp", path: File.join(ROOT, "gems/protocol-zmtp")
gem "nuckle", path: ENV["OMQ_DEV"] ? File.join(SIBLINGS, "nuckle") : nil

gem "minitest"
gem "rake"
gem "rake-compiler" unless RUBY_ENGINE == "jruby"
18 changes: 9 additions & 9 deletions gems/omq-backend-rust/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
[![Ruby](https://img.shields.io/badge/Ruby-%3E%3D%203.3-CC342D?logo=ruby&logoColor=white)](https://www.ruby-lang.org)

Rust-backed engine for [OMQ](https://github.com/zeromq/omq.rb). Same socket API,
but networking runs on a [Tokio](https://tokio.rs/) runtime inside a native
extension compiled via [rb_sys](https://github.com/oxidize-rb/rb-sys) on MRI
and TruffleRuby, or through OMQ.java on JRuby.
but networking runs through the first-class
[omq-rs](https://github.com/paddor/omq.rs/tree/main/bindings/ruby) binding on
MRI and TruffleRuby, or through OMQ.java on JRuby.

## Install

Requires a Rust toolchain (stable) at gem install time on MRI and
TruffleRuby. JRuby uses OMQ.java on Java 25 or newer. The Java gem selects
the matching OMQ.java artifact on Linux x86_64, macOS aarch64, macOS x86_64,
and Windows x86_64.
The `omq-rs` dependency compiles OMQ.rs during installation on MRI and
TruffleRuby. JRuby uses OMQ.java on Java 25 or newer. The Java gem selects the
matching OMQ.java artifact on Linux x86_64, macOS aarch64, macOS x86_64, and
Windows x86_64.

```ruby
# Gemfile
Expand Down Expand Up @@ -77,8 +77,8 @@ the first `bind` or `connect` for a Rust-backed socket.
## Development

```sh
OMQ_DEV=1 bundle install
OMQ_DEV=1 bundle exec rake
OMQ_RS_PATH=/path/to/omq.rs/bindings/ruby bundle install
OMQ_RS_PATH=/path/to/omq.rs/bindings/ruby bundle exec rake
```

## License
Expand Down
8 changes: 2 additions & 6 deletions gems/omq-backend-rust/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,12 @@ GEMSPEC = Gem::Specification.load(GEMSPEC_FILE) ||
abort("Could not load #{GEMSPEC_FILE}")

JAVA_GEMSPEC_FILE = "omq-backend-rust-java.gemspec"
JAVA_GEM_PATH = File.join("pkg", "omq-backend-rust-#{OMQ::Rust::VERSION}-java.gem")
JAVA_GEM_PATH = File.join("pkg", "omq-backend-rust-#{OMQ::Backend::Rust::VERSION}-java.gem")

if RUBY_ENGINE == "jruby"
task :compile
else
require "rb_sys/extensiontask"

RbSys::ExtensionTask.new("omq_backend_rust", GEMSPEC) do |ext|
ext.lib_dir = "lib/omq/rust"
end
task :compile
end

desc "Build omq-backend-rust Java platform gem into pkg"
Expand Down
33 changes: 0 additions & 33 deletions gems/omq-backend-rust/ext/omq_backend_rust/Cargo.toml

This file was deleted.

23 changes: 0 additions & 23 deletions gems/omq-backend-rust/ext/omq_backend_rust/build.rs

This file was deleted.

8 changes: 0 additions & 8 deletions gems/omq-backend-rust/ext/omq_backend_rust/extconf.rb

This file was deleted.

16 changes: 0 additions & 16 deletions gems/omq-backend-rust/ext/omq_backend_rust/src/error.rs

This file was deleted.

51 changes: 0 additions & 51 deletions gems/omq-backend-rust/ext/omq_backend_rust/src/lib.rs

This file was deleted.

69 changes: 0 additions & 69 deletions gems/omq-backend-rust/ext/omq_backend_rust/src/notify.rs

This file was deleted.

Loading
Loading