Implement net.cidr_contains builtin#471
Merged
Merged
Conversation
anakrish
reviewed
Sep 1, 2025
anakrish
reviewed
Sep 1, 2025
Contributor
Author
|
@anakrish these java bindings are killing me... I figured out how to update them based on the github action, but I have a couple questions:
|
Collaborator
|
Hey @tjons, 1.a I don't exactly know why Java bindings fail. In the past, I have seen it fail due to stricter clippy errors. I thought my recent PR that uses the same rust toolchain uniformly would fix it. But looks like it doesn't. cc @unexge for insights.
|
Collaborator
|
Hey @tjons, Looks like all the OPA tests are passing. Kindly squash the commits and use a conventional commit style changelist description. I can then approve, rerun the test and merge. |
Major changes: - Implement the `net.cidr_contains` builtin - Enable the v0 and v1 test for `net.cidr_contains` - Add the `netip` crate to standardize CIDR searching and other operations Key Concept: - Allow users to leverage the `net.cidr_contains` builtin to check whether an IPv4 or IPv6 CIDR contains a specified IP address or subnet. Testing: - All tests passing. Signed-off-by: tjons <tylerschade99@gmail.com>
8a21dda to
16ef477
Compare
Contributor
Author
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.
Implement the
net.cidr_containsbuiltin in Regorus. Added the IpNet crate to handle and standardize CIDR parsing, which will be useful for the remainder of thenet.*built-ins.