osyoyu / pf2

A sampling-based profiler for Ruby
https://rubygems.org/gems/pf2
MIT License
42 stars 3 forks source link

Upload a precompiled version to RubyGems? #22

Open osyoyu opened 1 month ago

osyoyu commented 1 month ago

Most users probably don't have rustc ready on their Ruby environment (especially Docker containers). It might be nice if a precompiled version of Pf2 was provided through rubygems.org, just like nokogiri and grpc.

At the moment, I have no idea what the ideal setup would look like.

osyoyu commented 1 month ago

To make the problem worse, the current version also requires clang for rb-sys's bindgen, even if gcc is installed.

Perhaps we can drop this requirement by using stable-api-compiled-fallback as commonmarker does. We were hacking around with this anyway. https://github.com/gjtorikian/commonmarker/blob/4a59b35cbb8b1a5b891a10290e9f77419f0ffd59/ext/commonmarker/Cargo.toml#L10-L12

https://github.com/osyoyu/pf2/blob/d7aa667b3c7e6db62160a168ac7ecee1af0f1e32/ext/pf2/Cargo.toml#L16

However, this could break my personal workflow of using unreleased CRuby (3.4 as for now).