-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate mruby bindings locally and check them in to the repository instead of during build time #2514
Merged
lopopolo
merged 7 commits into
trunk
from
lopopolo/artichoke-backend-sys-check-in-bindgen
Apr 24, 2023
Merged
Generate mruby bindings locally and check them in to the repository instead of during build time #2514
lopopolo
merged 7 commits into
trunk
from
lopopolo/artichoke-backend-sys-check-in-bindgen
Apr 24, 2023
Conversation
This file contains 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
bundle exec rake bindgen
lopopolo
added
A-build
Area: CI build infrastructure.
A-vm
Area: Interpreter VM implementations.
A-performance
Area: Performance improvements and optimizations.
A-deps
Area: Source and library dependencies.
B-mruby
Backend: Implementation of artichoke-core using mruby.
labels
Apr 24, 2023
lopopolo
added a commit
to artichoke/docker-artichoke-nightly
that referenced
this pull request
Apr 24, 2023
markdown link check job failure is a flake on |
Related change to remove |
lopopolo
added a commit
to artichoke/docker-artichoke-nightly
that referenced
this pull request
Apr 25, 2023
playground is busted now due to these changes: https://github.com/artichoke/playground/actions/runs/4792255663/jobs/8523565662
|
this busted artichoke builds on 32 bit architectures, in particular wasm32-unknown-emscripten. |
lopopolo
added a commit
that referenced
this pull request
Apr 25, 2023
Revert #2514, run bindgen at build time with a `bindgen` build dependency
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-build
Area: CI build infrastructure.
A-deps
Area: Source and library dependencies.
A-performance
Area: Performance improvements and optimizations.
A-vm
Area: Interpreter VM implementations.
B-mruby
Backend: Implementation of artichoke-core using mruby.
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.
Check in the outputs of running bindgen on mruby and the associated C extensions required for building artichoke-backend.
bindgen is a heavy dependency with many transitives that don't already show up in Artichoke's
Cargo.lock
file (e.g.clang-sys
). This was the motivation for replacing a Rustdev-dependency
on bindgen with a requirement that thebindgen
CLI be available ambiently inPATH
when building Artichoke:bindgen
executable instead of dev-dependency #1300Because
bindgen
is available by default in GitHub Actions runners and this requirement was able to be documented inCONTRIBUTING.md
, this seemed like an acceptable loss of build hermeticity. Additionally, relying on pre-built bindgen sped up clean build compilation time significantly.The maintenance burden of this approach has been increasing recently as the bindgen CLI interface has undergone more rapid iteration:
cc
andbindgen
steps in backend build script #2117bindgen-cli
package #2222bindgen-cli
package docker-artichoke-nightly#127BINDGEN_PACKAGE
build arg to README docker-artichoke-nightly#128Instead, add a
bindgen
Rake task (invokable asbundle exec rake bindgen
) which uses the bindgen CLI on a developer laptop to generate the bindings once and dumps them into the source tree to be checked in.This allows removing a bunch of code in artichoke-backend's
build.rs
and makes the code authorship experience better by improving browsing of generated bindings, ensuring goto definition works, and reducing build times.The reduction in runtime of artichoke-backend's
build.rs
means the long poles for Artichoke compilation aretzdb
andartichoke-backend
(both of these crates have a huge amount of code):