feat: Implement net.cidr_contains builtin (#471)

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>
This commit is contained in:
Tyler Schade
2025-09-05 16:21:41 -04:00
committed by GitHub
parent 85753aaf37
commit 1b0c2d4072
10 changed files with 149 additions and 5 deletions

View File

@@ -546,6 +546,12 @@ dependencies = [
"hashbrown 0.15.5",
]
[[package]]
name = "ipnet"
version = "2.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130"
[[package]]
name = "is_terminal_polyfill"
version = "1.70.1"
@@ -960,6 +966,7 @@ dependencies = [
"dashmap",
"data-encoding",
"globset",
"ipnet",
"jsonschema",
"lazy_static",
"mimalloc",