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
25 changes: 24 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.3.0] - 2025-12-18

### Added
- Syndication Module namespace support (`syn:updatePeriod`, `syn:updateFrequency`, `syn:updateBase`)
- `feed.published` field for Atom feeds and RSS channel `pubDate`
- `xml:base` URL resolution for relative URLs in Atom and RSS feeds
- `xml:lang` attribute tracking for feed and entry language detection
- Creative Commons `license` field extraction from `rel="license"` links
- Comprehensive RSS 1.0 integration tests (12+ test cases)
- Syndication metadata exposed in Python and Node.js bindings
- Dublin Core fields (`dc_creator`, `dc_publisher`, `dc_rights`) in bindings
- Benchmark results in all README files

### Changed
- Improved test coverage from 83% to 91%+
- Optimized Python bindings to return `&str` instead of `String` for enum values
- Simplified Node.js Entry conversion using idiomatic `.collect()` pattern
- Updated documentation with performance benchmarks (90-94x faster than Python feedparser)

### Fixed
- Performance issue with unnecessary string allocations in Python `__repr__` methods

## [0.2.1] - 2025-12-16

### Changed
Expand Down Expand Up @@ -125,7 +147,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Comprehensive test coverage
- Documentation with examples

[Unreleased]: https://github.com/bug-ops/feedparser-rs/compare/v0.2.1...HEAD
[Unreleased]: https://github.com/bug-ops/feedparser-rs/compare/v0.3.0...HEAD
[0.3.0]: https://github.com/bug-ops/feedparser-rs/compare/v0.2.1...v0.3.0
[0.2.1]: https://github.com/bug-ops/feedparser-rs/compare/v0.2.0...v0.2.1
[0.2.0]: https://github.com/bug-ops/feedparser-rs/compare/v0.1.8...v0.2.0
[0.1.8]: https://github.com/bug-ops/feedparser-rs/compare/v0.1.7...v0.1.8
Expand Down
6 changes: 3 additions & 3 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ members = [
resolver = "2"

[workspace.package]
version = "0.2.1"
version = "0.3.0"
edition = "2024"
rust-version = "1.88.0"
authors = ["bug-ops"]
Expand Down
23 changes: 19 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ High-performance RSS/Atom/JSON Feed parser written in Rust, with Python and Node
| Media RSS | Media attachments and metadata |
| iTunes | Podcast metadata (author, duration, explicit) |
| Podcast 2.0 | Chapters, transcripts, funding |
| Syndication | Update schedule (period, frequency, base) |
| GeoRSS | Geographic location data (point, line, polygon, box) |
| Creative Commons | License information with `rel="license"` links |

Expand Down Expand Up @@ -203,11 +204,25 @@ cargo make --list-all-steps

## Benchmarks

Run benchmark comparison against Python feedparser:
Measured on Apple M1 Pro, parsing real-world RSS feeds:

```bash
cargo make bench-compare
```
| Feed Size | Time | Throughput |
|-----------|------|------------|
| Small (2 KB) | **10.7 µs** | 187 MB/s |
| Medium (20 KB) | **93.6 µs** | 214 MB/s |
| Large (200 KB) | **939 µs** | 213 MB/s |

Format detection: **128 ns** (near-instant)

### vs Python feedparser

| Operation | feedparser-rs | Python feedparser | Speedup |
|-----------|---------------|-------------------|---------|
| Parse 20 KB RSS | 0.09 ms | 8.5 ms | **94x** |
| Parse 200 KB RSS | 0.94 ms | 85 ms | **90x** |

> [!TIP]
> Run your own benchmarks with `cargo bench` or compare against Python with `cargo make bench-compare`.

## MSRV Policy

Expand Down
24 changes: 21 additions & 3 deletions crates/feedparser-rs-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ This is the core parsing library that powers the Python and Node.js bindings.

- **Multi-format**: RSS 0.9x/1.0/2.0, Atom 0.3/1.0, JSON Feed 1.0/1.1
- **Tolerant**: Bozo flag for graceful handling of malformed feeds
- **Fast**: Native Rust performance
- **Fast**: Native Rust performance (200+ MB/s throughput)
- **Safe**: No unsafe code, comprehensive error handling
- **HTTP support**: Fetch feeds from URLs with compression and conditional GET
- **Podcast support**: iTunes and Podcast 2.0 namespace extensions
- **Namespace extensions**: Dublin Core, Media RSS, GeoRSS, Creative Commons
- **Well-tested**: 83%+ test coverage with real-world feed fixtures
- **Namespace extensions**: Dublin Core, Media RSS, Syndication, GeoRSS, Creative Commons
- **Well-tested**: 91%+ test coverage with real-world feed fixtures

## Installation

Expand Down Expand Up @@ -138,6 +138,24 @@ let feed = parse_with_limits(xml.as_bytes(), limits)?;
> [!NOTE]
> Default limits are generous for typical feeds. Use `ParserLimits::strict()` for untrusted input.

## Benchmarks

Measured on Apple M1 Pro:

| Feed Size | Time | Throughput |
|-----------|------|------------|
| Small (2 KB) | 10.7 µs | 187 MB/s |
| Medium (20 KB) | 93.6 µs | 214 MB/s |
| Large (200 KB) | 939 µs | 213 MB/s |

Format detection: 128 ns

Run benchmarks:

```bash
cargo bench
```

## Platform Bindings

- **Node.js**: [`feedparser-rs`](https://www.npmjs.com/package/feedparser-rs) on npm
Expand Down
21 changes: 16 additions & 5 deletions crates/feedparser-rs-node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,23 @@ if (entry.published) {

## Performance

Benchmarks vs Python feedparser (parsing 100KB RSS feed):
Benchmarks on Apple M1 Pro:

| Library | Time | Speedup |
|---------|------|---------|
| feedparser-rs | 0.5ms | 100x |
| feedparser (Python) | 50ms | 1x |
| Feed Size | Time | Throughput |
|-----------|------|------------|
| Small (2 KB) | 0.01 ms | 187 MB/s |
| Medium (20 KB) | 0.09 ms | 214 MB/s |
| Large (200 KB) | 0.94 ms | 213 MB/s |

### vs Python feedparser

| Operation | feedparser-rs | Python feedparser | Speedup |
|-----------|---------------|-------------------|---------|
| Parse 20 KB RSS | 0.09 ms | 8.5 ms | **94x** |
| Parse 200 KB RSS | 0.94 ms | 85 ms | **90x** |

> [!TIP]
> For best performance, pass `Buffer` instead of `string` to avoid UTF-8 conversion overhead.

## Platform Support

Expand Down
4 changes: 2 additions & 2 deletions crates/feedparser-rs-node/package-lock.json

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

4 changes: 2 additions & 2 deletions crates/feedparser-rs-node/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "feedparser-rs",
"version": "0.2.1",
"version": "0.3.0",
"description": "High-performance RSS/Atom/JSON Feed parser for Node.js",
"main": "index.js",
"types": "index.d.ts",
Expand Down Expand Up @@ -47,4 +47,4 @@
"@napi-rs/cli": "^3.5",
"c8": "^10.1.3"
}
}
}
2 changes: 1 addition & 1 deletion crates/feedparser-rs-py/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "feedparser-rs-py"
version = "0.1.0"
version.workspace = true
edition = "2024"
rust-version = "1.85"
license = "MIT OR Apache-2.0"
Expand Down
13 changes: 13 additions & 0 deletions crates/feedparser-rs-py/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,19 @@ for entry in d.entries:

- `ParserLimits` — Resource limits configuration

## Performance

Benchmarks vs Python feedparser on Apple M1 Pro:

| Operation | feedparser-rs | Python feedparser | Speedup |
|-----------|---------------|-------------------|---------|
| Parse 2 KB RSS | 0.01 ms | 0.9 ms | **90x** |
| Parse 20 KB RSS | 0.09 ms | 8.5 ms | **94x** |
| Parse 200 KB RSS | 0.94 ms | 85 ms | **90x** |

> [!TIP]
> For maximum performance, pass `bytes` instead of `str` to avoid UTF-8 re-encoding.

## Platform Support

Pre-built wheels available for:
Expand Down
2 changes: 1 addition & 1 deletion crates/feedparser-rs-py/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "maturin"

[project]
name = "feedparser-rs"
version = "0.2.1"
version = "0.3.0"
description = "High-performance RSS/Atom/JSON Feed parser with feedparser-compatible API"
readme = "README.md"
license = { text = "MIT OR Apache-2.0" }
Expand Down
Loading