File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
88## [ Unreleased]
99
10+ ### Changed
11+
12+ - Use native llhttp gem for MRI Ruby and llhttp-ffi for other interpreters for better performance
13+
1014### Removed
1115
1216- ** BREAKING** Drop Ruby 2.x support
Original file line number Diff line number Diff line change @@ -30,7 +30,13 @@ Gem::Specification.new do |gem|
3030 gem . add_runtime_dependency "addressable" , "~> 2.8"
3131 gem . add_runtime_dependency "http-cookie" , "~> 1.0"
3232 gem . add_runtime_dependency "http-form_data" , "~> 2.2"
33- gem . add_runtime_dependency "llhttp-ffi" , "~> 0.5.0"
33+
34+ # Use native llhttp for MRI (more performant) and llhttp-ffi for other interpreters (better compatibility)
35+ if RUBY_ENGINE == "ruby"
36+ gem . add_runtime_dependency "llhttp" , "~> 0.5.0"
37+ else
38+ gem . add_runtime_dependency "llhttp-ffi" , "~> 0.5.0"
39+ end
3440
3541 gem . metadata = {
3642 "source_code_uri" => "https://github.com/httprb/http" ,
You can’t perform that action at this time.
0 commit comments