Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions .github/dependabot.yml

This file was deleted.

17 changes: 9 additions & 8 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@ jobs:
- uses: dtolnay/rust-toolchain@1.80
- run: cargo check

test:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@1.80
- run: cargo test
- run: cargo test --features serde
test:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@1.80
- run: cargo test
- run: cargo test --features serde
- run: cargo test --doc

fmt:
name: Rustfmt
Expand Down
27 changes: 13 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 7 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "iptools"
version = "0.4.0"
version = "0.4.1"
authors = ["Denis Avvakumov"]
license = "MIT"
readme = "README.md"
Expand All @@ -25,12 +25,14 @@ serde = ["dep:serde"]
lazy-regex = "3.4.2"
once_cell = { version = "1.21", default-features = false, features = ["alloc"] }
tinyvec = { version = "1", features = ["alloc"] }
itoa = { version = "1", default-features = false }
serde = { version = "1", default-features = false, features = ["derive", "alloc"], optional = true }
serde = { version = "1", default-features = false, features = [
"derive",
"alloc",
], optional = true }

[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen = "0.2"
js-sys = "0.3"
wasm-bindgen = "0.2.106"
js-sys = "0.3.83"

[dev-dependencies]
pretty_assertions = "1.4.1"
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ This is a port of package [iptools](https://github.com/bd808/python-iptools) fro
Add the following dependency to your Cargo manifest:
```toml
[dependencies]
iptools = "0.4.0"
iptools = "0.4.1"
```

### `no_std` support
To use `iptools` in a `no_std` environment, disable the default features:
```toml
[dependencies]
iptools = { version = "0.4.0", default-features = false }
iptools = { version = "0.4.1", default-features = false }
```

## Example of usage
Expand Down Expand Up @@ -90,6 +90,9 @@ difference locally:
python3 -c "from iptools import ipv6; print(ipv6.validate_ip(':::1'))"
```

### Reversed range bounds difference
The Rust port rejects reversed bounds when constructing ranges (e.g. `"10.0.0.2"`, `"10.0.0.1"` returns an error). Python `iptools` normalizes and silently swaps those endpoints.

## Supported Rust Versions
Rust 1.78.0+

Expand Down
Loading