feat: Add brush interpreter support#2527
Open
baszalmstra wants to merge 1 commit into
Open
Conversation
Add support for brush (https://github.com/reubeno/brush), a bash-compatible shell written in Rust, as an opt-in build script interpreter. Recipes select it with `interpreter: brush` and existing bash scripts run unchanged across Linux, macOS, and Windows. brush runs as a child of the native bash/cmd activation wrapper, so the activated environment is inherited. It is resolved from the build prefix only (never the system PATH), so it must be listed in `requirements/build`, which keeps builds reproducible. A clear error with a help message is returned when brush is missing from the build environment. Includes documentation and an end-to-end test that builds a brush-based recipe (verified against conda-forge). https://claude.ai/code/session_01N5TGpjzMtxDzDyKUvjk28C
a4b628f to
3de83db
Compare
Hofer-Julian
reviewed
Jun 3, 2026
| "nu", | ||
| build_prefix, | ||
| platform, | ||
| InterpreterSearchScope::PrefixThenSystemPath, |
Contributor
There was a problem hiding this comment.
Everything but bash and cmd should be only searched in the prefix I feel
Contributor
Author
There was a problem hiding this comment.
I agree but that would break the current behavior.
Contributor
Author
There was a problem hiding this comment.
I think if we want to change the nushell support we should do the same thing as what we do with brush. Currently the implementation runs the activation and then directly invokes nushell. But with brush (and python) the normal bash activation runs and simply calls brush script.sh as part of the build instead. This has the advantage that the activation happens natively.
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.
Adds support for
brush, a bash-compatible shell written in Rust, as a build script interpreter.Recipes can now opt in with
interpreter: brushand an ordinary bash script will run under brush instead of the system bash. This works the same way on Linux, macOS, and Windows.brushis taken from the build environment, so it must be listed inrequirements/build. Abrushfound on the system is intentionally not used, which keeps builds reproducible. I explicitly used this instead of embedding brush itself into rattler-build (which is also possible) because I think this approach makes the recipe more reproducible and if we ever run things inside a container in the future this will work out of the box (e.g. if the build script itself is not run on the host).Notes
brush" section.