carbon_fiber 0.1.0 → 0.1.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 727899b161b173287d3e863020d903d164580b4c82516b688c8ad7f17092673b
4
- data.tar.gz: 0657e1b4d45ebedf86fec876fb6ec64f5dc6841162349c65d41ca6c1dedb91b3
3
+ metadata.gz: c5d7027264dfb1b4d2751704427c0cb7a66f299d64ef09087961efa25e3e87de
4
+ data.tar.gz: 51293f770ecd63f98d587b41587accc1e2dfe638ae3b02247a5ec98fccec4ca3
5
5
  SHA512:
6
- metadata.gz: 6258179b5b10494c409af01a5b15c87f5d1b0929711c79eec4db06c61b0184b2081e8a8494ef3a4038857359f5fff3022234bcd4d324580c58d64935488d1208
7
- data.tar.gz: 6d2bf4c282f9cf204e0ff52f14cf30a55789259d54f5fc031aa0b0d169d22ef9aac36ae9419338a02f56b94a4cab2022bb0f19713d224ed307bf0406c5a4d7da
6
+ metadata.gz: ac4fcb671a1cc24a5bf60b0bfefeba2c6a84a2f11bfee6036f1c0dc3fdc817a7b8dca09baea35ab5597ff42094a0967aad08f0188b635dbd1cf8da5a2d781a9e
7
+ data.tar.gz: d36a685b4dcc9fee84a1c8782418606ce933e1120da281eb4d50627b440301111cec5be41351d918538f6712bb8d5ae17f2e84bf5b78c29fc7938c4c5feb5457
data/CHANGELOG.md CHANGED
@@ -1,3 +1,14 @@
1
+ ## [0.1.2] - 2026-04-29
2
+
3
+ - Fix the `x86_64-linux` precompiled gem (erroneously shipped an aarch64
4
+ `.so`).
5
+ - Add precompiled gems for `x86_64-linux-musl` and `aarch64-linux-musl`.
6
+
7
+ ## [0.1.1] - 2026-04-29
8
+
9
+ - Fix the macOS release build: rewrite the precompiled bundle's libruby reference to `@rpath/libruby.X.Y.dylib` and add `@executable_path/../lib` so the `arm64-darwin` gem loads on any Ruby install. Previously the install_name was a hardcoded path to the GitHub Actions tool-cache, causing dyld to refuse to load the bundle on user machines.
10
+ - A native binary that exists on disk but fails to load now raises `LoadError` instead of silently falling back to the pure-Ruby implementation.
11
+
1
12
  ## [0.1.0] - 2026-04-14
2
13
 
3
14
  - Initial release. Ruby Fiber Manager, Async backend, extensive benchmarking suite.
data/README.md CHANGED
@@ -9,18 +9,18 @@
9
9
  [![GitHub Release](https://img.shields.io/github/v/release/yaroslav/carbon_fiber)](https://github.com/yaroslav/carbon_fiber/releases)
10
10
  [![Docs](https://img.shields.io/badge/yard-docs-blue.svg)](https://rubydoc.info/gems/carbon_fiber)
11
11
 
12
- **Carbon Fiber is a Ruby Fiber Scheduler** with a native event loop (io_uring on Linux, kqueue on macOS). Install it, and your `Net::HTTP`, `TCPSocket`, `Mutex`, `Queue`, `Process.spawn` code becomes concurrent without any changes. Carbon Fiber also **supports the Async framework** ([async gem](https://github.com/socketry/async)) working as a plug and play backend.
12
+ **Carbon Fiber is a Ruby Fiber Scheduler** with a native event loop (io_uring on Linux, kqueue on macOS). Install it, and your `Net::HTTP`, `TCPSocket`, `Mutex`, `Queue`, `Process.spawn` code becomes concurrent without any changes. Carbon Fiber also works as a plug-and-play backend for the **Async framework** ([async gem](https://github.com/socketry/async)).
13
13
 
14
- By my benchmarks (follows), Carbon Fiber ends up being the **fastest pure Ruby Fiber Scheduler** currently available.
14
+ In my benchmarks (see below), Carbon Fiber is the **fastest pure Ruby Fiber Scheduler** currently available.
15
15
 
16
16
  Carbon Fiber is implemented using the **Zig** programming language and is powered by **[libxev](https://github.com/mitchellh/libxev)** by Mitchell Hashimoto, used in his **Ghostty** terminal emulator. It is one of the first Ruby native extensions written in Zig.
17
17
 
18
18
  ## Features
19
19
 
20
- - **Very fast.** My benchmarks place it as overall the fastest pure Ruby Fiber Scheduler. Uses **io_uring on Linux** and **kqueue on macOS**.
20
+ - **Very fast.** My benchmarks rank it as the fastest pure Ruby Fiber Scheduler overall. Uses **io_uring on Linux** and **kqueue on macOS**.
21
21
  - **Plug and play with plain Ruby**, thanks to the Fiber Scheduler API—`Net::HTTP`, `TCPSocket`, `Process.spawn`, `Mutex`, `Queue`, DNS—all transparently concurrent under the scheduler; no gem-specific wrappers required.
22
22
  - **Async (gem async) support** as a swappable backend. One call swaps the [Async](https://github.com/socketry/async) event loop for ours.
23
- - **Pure-Ruby fallback**—when the native extension isn't available (Windows, for instance), drops to pure Ruby 4.0+ code behind the same API.
23
+ - **Pure-Ruby fallback**—when the native extension isn't available (Windows, for instance), Carbon Fiber uses a pure Ruby implementation behind the same API.
24
24
 
25
25
  ## Example
26
26
 
@@ -63,7 +63,7 @@ Some benchmarks:
63
63
  | `cascading_timeout` | **4.659k ops/s** | 4.488k ops/s | error | +4% |
64
64
  | `connection_pool` | **4.989k co/s** | 4.912k co/s | 4.968k co/s | +2% |
65
65
 
66
- On my workloads, wins almost all workloads across Async, Itsi, fiber_scheduler, io-event, and libev. [See detailed benchmarks →](#benchmarks)
66
+ Wins on most workloads against Async, Itsi, fiber_scheduler, io-event, and libev. [See detailed benchmarks →](#benchmarks)
67
67
 
68
68
  ---
69
69
 
@@ -72,7 +72,7 @@ On my workloads, wins almost all workloads across Async, Itsi, fiber_scheduler,
72
72
  - Ruby 3.4 or 4.0.
73
73
  - Linux (amd64 or arm64), macOS (Apple Silicon, x64 uses fallback*), Windows (fallback*).
74
74
 
75
- Distributed as aleady compiled and ready to use: Zig compiler _not_ needed.
75
+ Ships precompiled—no Zig compiler required.
76
76
 
77
77
  _\* Fallback means pure Ruby code, worse performance._
78
78
 
@@ -174,7 +174,7 @@ Alternatively, set the environment variable: `IO_EVENT_SELECTOR=CarbonFiberSelec
174
174
 
175
175
  #### Example: Fan-out API calls
176
176
 
177
- Call multiple upstream endpoints in parallel using `Async::Barrier`, then wait for all results.
177
+ Call multiple upstream endpoints in parallel using `Async::Barrier`, then wait for all results.
178
178
 
179
179
  ```ruby
180
180
  require "async"
@@ -256,7 +256,7 @@ If the native extension can't be loaded (on Windows, for example), a pure-Ruby f
256
256
 
257
257
  ## Benchmarks
258
258
 
259
- AWS EC2 c7a.2xlarge, 8 dedicated vCPUs,Ubuntu 24.04 LTS, kernel 6.17, Ruby 4.0.2 + YJIT, io_uring. 5-run median.
259
+ AWS EC2 c7a.2xlarge, 8 dedicated vCPUs, Ubuntu 24.04 LTS, kernel 6.17, Ruby 4.0.2 + YJIT, io_uring. 5-run median.
260
260
 
261
261
  ### Ruby Fiber Schedulers (leading ones): Carbon Fiber vs. Async vs. Itsi
262
262
 
@@ -20,14 +20,17 @@ native_paths = [
20
20
  )
21
21
  ]
22
22
 
23
+ # A native binary that exists but fails to load raises LoadError instead of
24
+ # silently falling back, so dyld/packaging bugs surface immediately.
23
25
  native_loaded =
24
26
  if ENV["CARBON_FIBER_FORCE_FALLBACK"] == "1"
25
27
  false
26
28
  else
27
- native_paths.any? do |path|
28
- require path
29
+ existing = native_paths.find { |path| File.exist?(path) }
30
+ if existing
31
+ require existing
29
32
  true
30
- rescue LoadError
33
+ else
31
34
  false
32
35
  end
33
36
  end
@@ -2,5 +2,5 @@
2
2
 
3
3
  module CarbonFiber
4
4
  # @return [String] the current gem version
5
- VERSION = "0.1.0"
5
+ VERSION = "0.1.2"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carbon_fiber
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yaroslav Markin