24 releases (6 breaking)

Uses old Rust 2015

0.7.0 Mar 8, 2017
0.6.2 Oct 13, 2016
0.5.2 Sep 1, 2016
0.4.3 Aug 31, 2016
0.1.2 Aug 27, 2016

#793 in Asynchronous

Download history 1/week @ 2023-08-04 30/week @ 2023-08-18 30/week @ 2023-08-25 3/week @ 2023-09-01 30/week @ 2023-09-08 29/week @ 2023-09-15 3/week @ 2023-09-22 5/week @ 2023-09-29 3/week @ 2023-10-06 1/week @ 2023-10-13 3/week @ 2023-10-20 49/week @ 2023-10-27 7/week @ 2023-11-03 3/week @ 2023-11-10 31/week @ 2023-11-17

90 downloads per month

MIT license

913 lines

Sidekiq-rs Build Status Crates.io Crates.io Crates.io

Sidekiq compatible server in rust, which behaviours totally same as vanilla when you take a look into sidekiq's dashboard.

The basic idea is that, since ruby is slow, we write job handlers in rust with native code. So we write job definitions in ruby and implementations in rust and enqueue jobs in ruby and done jobs in rust.





  1. Implementing your own JobHandler
  2. Instantiate a sidekiq-rs server and insert your own job handlers
  3. Set up dummy jobs with same name as your job handlers in ruby
  4. Run sidekiq-rs server and submit jobs from ruby

You can refer to examples/main.rs for building a sidekiq-rs server, and refer to codes in ruby to get an idea on write dummy tasks in ruby.

Advanced usage:

You can definitely embed a ruby VM in your job handlers, running ruby codes when the job is not a native job, so that it soon becomes a complete sidekiq server with additional native code support.

Terminate the sidekiq-rs:

sidekiq-rs includes an implementation of signal handling, and it currently recognize 2 type of signals:

  • SIGINT, fpr force exiting the server. The server will terminate all workers and exit in exactly certain time. The default time is 10 seconds.
  • SIGUSR1, for gracefully exiting the server. The server will inform and wait workers to quit.

Server will not accept anymore jobs if either signal received.


  • Sidekiq dashboard capability.
  • Exit signal handling.
  • Support arbitrary fields in job object.
  • Middleware support.
  • Job retry support via middleware.
  • Documentation.
  • Unique job support via middleware.
  • Ruby code handler
  • Regex handler matching.


~242K SLoC