Repository navigation
Build and load the extension with the rutie gem instead of thermite - #189
Merged
danielpclark merged 2 commits intoOct 7, 2026
Merged
Conversation
thermite was the gem's one dependency that could not be satisfied from rubygems.org: the fork it needed is not the published gem, and a gemspec cannot point at a repository. Everything faster_path used it for, the rutie gem already provides. `Rutie::RakeTask` builds the extension with Cargo (`rutie:build`), with the same macOS linking as before, and `Rutie#init` loads it; ext/Rakefile points Cargo at the gem's Cargo.toml since RubyGems runs it from ext/, builds against the installing Ruby through the RUBY variable, and keeps only the built library in lib/faster_path, so an installed gem is under a megabyte instead of carrying Cargo's whole output. In a checkout the library is loaded from target/release, where `rake rutie:build` leaves it. With that go thermite's REXML and tomlrb dependencies, the Cargo.toml metadata for its GitHub-release downloads, and the CI job that built the release tarballs: the gem is built from source with Cargo at install time. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CXvfgWzuq28ewqT3AyhX4Z
Changed Files
|
…tall page Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CXvfgWzuq28ewqT3AyhX4Z
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes master's dependency on
thermite ~> 0.14, which cannot be satisfied from rubygems.org (the fork is not the published gem, and a gemspec cannot point at a repository), by dropping thermite altogether. Everything faster_path used it for, the publishedrutiegem (0.0.5) already provides.What
lib/faster_path/build_task.rbdefinesrutie:build/rutie:cleanthroughRutie::RakeTask, pointing Cargo at the gem'sCargo.tomlwith--manifest-path(RubyGems runsext/Rakefilefromext/) and settingRUBYto the installing Ruby so Rutie's build script links to the right libruby. The macOS linking (NO_LINK_RUTIE,-undefined dynamic_lookup) comes from Rutie's task.ext/Rakefilebuilds, copies the library tolib/faster_path/, and runscargo clean, so the installed gem is 772 KB instead of carrying 19 MB of Cargo output.lib/faster_path.rbusesRutie#init, preferring a freshtarget/releasebuild in a checkout and falling back tolib/faster_path/in an installed gem.FasterPath::FFI_LIBRARYis still there for therust_arch_bitsFiddle import.[package.metadata.thermite]section ofCargo.toml, thethermite_test, and the CI job that built prebuilt tarballs for GitHub releases. The gem is built from source with Cargo at install time, as decided; the README says so under Requirements, and the Binary Release badge is removed.test/build_test.rbchecks the library location in a checkout and in an installed gem, and the build command's manifest path andRUBY.The thermite fork and danielpclark/thermite#2 are untouched; faster_path simply no longer uses them.
Verification
TEST_MONKEYPATCHES=true WITH_REGRESSION=true ENCODING=true bundle exec rake testpasses end to end (cargo, 139 minitest tests, rubocop, pbench, mspec), building throughrutie:build.gem buildthengem installinto a cleanGEM_HOMEbuilds the extension at install time ("Building native extensions"), andrequire 'faster_path'from outside the project works; the installed gem has notarget/directory.🤖 Generated with Claude Code
https://claude.ai/code/session_01CXvfgWzuq28ewqT3AyhX4Z
Generated by Claude Code