Skip to content

Conversation

VJftw
Copy link
Contributor

@VJftw VJftw commented Aug 25, 2025

Adds an optional build_entrypoint field to the build_rule builtin to enable us to use binaries directly when building and support other cross-platform shells (e.g. nushell or Powershell).

TODO:

  • Code docs, including design decisions/narration (e.g. where ExitOnError, etc. came from and what we could do in the future as a breaking change).
  • PR description.

@peterebden
Copy link
Collaborator

peterebden commented Aug 26, 2025

Understood that this is still a WIP, but my initial take is: there's already an entry_points argument. Adding another called build_entrypoint needs some explanation of what it does vs. the existing one and why and how they differ.
I also think a dict with a bunch of 'magic' keys seems pretty messy. I feel like this wants to do something very specific - it would be useful to have a clearer description of the problem statement ("use binaries directly when building" seems like something that's already supported, and I'm uncertain how this would help to use something like Powershell).

@VJftw
Copy link
Contributor Author

VJftw commented Aug 29, 2025

👋 I definitely should have started with an issue first! The TLDR is that i'm interested in removing the Bash dependency for build actions which is something Bazel supports via run_binary and it's also mentioned in their genrule doc.

In terms of implementation, I have the same concerns with the magic keys. I think it was the least amount of change/additions to make it somewhat work, and I got a little eager with the potential for using cross-platform shells like nushell which comes with a lot of built-in cross-platform commands.

Maybe a separate run_binary/run_binary_rule/binary_rule built-in would be a lot better/simpler to start with?


Relevant comments/discussions which I think would benefit from this:

@VJftw VJftw force-pushed the binary-build-rules branch 5 times, most recently from e7ee401 to 2a2caee Compare September 6, 2025 00:16
Adds optional `build_entrypoint` fields to the `build_rule` builtin to
enable us to use binaries directly when building and support other
cross-platform shells (e.g. nushell).
@VJftw VJftw force-pushed the binary-build-rules branch from 2a2caee to 22b19d8 Compare September 6, 2025 00:27
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.

2 participants