Add Bazel build system support#342
Open
callframe wants to merge 4 commits into
Open
Conversation
Update README Remove unnecessary information
Member
|
I'm not sure we want to maintain yet another build system in this repository… every one we add comes with a maintenance cost. (Note that for people who don't want to use utf8proc's included build, or simply link it as a library that is installed separately, it can be included in any project as literally a single file that has to be compiled and linked in, + includes.) |
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.
I often use utf8proc via Bazel and found I had to repeatedly inject my own Bazel files into the cloned repository. This PR adds Bazel support upstream in case others would benefit too.
What's included
The build currently produces only the library, since that's what consumers most commonly need. Thanks to Bazel's flexibility, extending support to the test files, benchmarks, and packaging should be straightforward if there's interest.
Usage
Builds can be run from the command line:
Or inside another Bazel project, by adding the following to your
MODULE.bazel:The
git_overrideis only needed because the module isn't published yet. If utf8proc were added to the Bazel Central Registry, thebazel_depline alone would be enough and dependents could pull it directly from the registry.Notes
WORKSPACEmechanism is not supported, as it was removed in Bazel 9.0.0..gitignoreandREADME.md.Let me know how you feel about this, or whether there's interest in Bazel support at all.