Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: Add brush interpreter support#2527

Open
baszalmstra wants to merge 1 commit into
prefix-dev:mainfrom
baszalmstra:claude/plan-brush-support-DpeGS
Open

feat: Add brush interpreter support#2527
baszalmstra wants to merge 1 commit into
prefix-dev:mainfrom
baszalmstra:claude/plan-brush-support-DpeGS

Conversation

@baszalmstra
Copy link
Copy Markdown
Contributor

Adds support for brush, a bash-compatible shell written in Rust, as a build script interpreter.

Recipes can now opt in with interpreter: brush and an ordinary bash script will run under brush instead of the system bash. This works the same way on Linux, macOS, and Windows.

build:
  script:
    interpreter: brush
    content: |
      echo "Hello from brush!"
requirements:
  build:
    - brush

brush is taken from the build environment, so it must be listed in requirements/build. A brush found 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

  • Documentation is updated with a "Using brush" section.
  • An end-to-end test which also runs on windows builds a brush-based recipe and was verified against conda-forge.

@baszalmstra baszalmstra requested review from Hofer-Julian and wolfv June 3, 2026 18:01
@baszalmstra baszalmstra changed the title Add brush interpreter support feat: Add brush interpreter support Jun 3, 2026
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
@baszalmstra baszalmstra force-pushed the claude/plan-brush-support-DpeGS branch from a4b628f to 3de83db Compare June 3, 2026 18:02
"nu",
build_prefix,
platform,
InterpreterSearchScope::PrefixThenSystemPath,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything but bash and cmd should be only searched in the prefix I feel

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree but that would break the current behavior.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member

@wolfv wolfv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants