11# feedparser-rs
22
3+ [ ![ Crates.io] ( https://img.shields.io/crates/v/feedparser-rs )] ( https://crates.io/crates/feedparser-rs )
4+ [ ![ docs.rs] ( https://img.shields.io/docsrs/feedparser-rs )] ( https://docs.rs/feedparser-rs )
5+ [ ![ MSRV] ( https://img.shields.io/crates/msrv/feedparser-rs )] ( https://github.com/bug-ops/feedparser-rs )
6+ [ ![ License] ( https://img.shields.io/crates/l/feedparser-rs )] ( LICENSE )
7+
38High-performance RSS/Atom/JSON Feed parser written in Rust.
49
510This is the core parsing library that powers the Python and Node.js bindings.
@@ -12,15 +17,25 @@ This is the core parsing library that powers the Python and Node.js bindings.
1217- ** Safe** : No unsafe code, comprehensive error handling
1318- ** HTTP support** : Fetch feeds from URLs with compression and conditional GET
1419- ** Podcast support** : iTunes and Podcast 2.0 namespace extensions
15- - ** Well-tested** : Extensive test coverage with real-world feed fixtures
20+ - ** Namespace extensions** : Dublin Core, Media RSS, GeoRSS, Creative Commons
21+ - ** Well-tested** : 83%+ test coverage with real-world feed fixtures
1622
1723## Installation
1824
25+ ``` bash
26+ cargo add feedparser-rs
27+ ```
28+
29+ Or add to your ` Cargo.toml ` :
30+
1931``` toml
2032[dependencies ]
21- feedparser-rs = " 0.1 "
33+ feedparser-rs = " 0.2 "
2234```
2335
36+ > [ !IMPORTANT]
37+ > Requires Rust 1.88.0 or later (edition 2024).
38+
2439## Quick Start
2540
2641``` rust
@@ -70,31 +85,25 @@ if feed2.status == Some(304) {
7085# Ok :: <(), feedparser_rs :: FeedError >(())
7186```
7287
88+ > [ !TIP]
89+ > Use conditional GET with ETag/Last-Modified to minimize bandwidth when polling feeds.
90+
7391To disable HTTP support and reduce dependencies:
7492
7593``` toml
7694[dependencies ]
77- feedparser-rs = { version = " 0.1 " , default-features = false }
95+ feedparser-rs = { version = " 0.2 " , default-features = false }
7896```
7997
80- ## Platform Bindings
81-
82- - ** Node.js** : [ ` feedparser-rs ` ] ( https://www.npmjs.com/package/feedparser-rs ) on npm
83- - ** Python** : [ ` feedparser-rs ` ] ( https://pypi.org/project/feedparser-rs/ ) on PyPI (coming soon)
84-
85- ## Performance
86-
87- Rust implementation provides significant performance improvements over interpreted alternatives.
88-
89- See [ benchmarks/] ( ../../benchmarks/ ) for benchmark code and methodology.
98+ ## Cargo Features
9099
91- ## API Documentation
92-
93- For full API documentation, see [ docs.rs/feedparser-rs ] ( https://docs.rs/feedparser-rs ) .
100+ | Feature | Description | Default |
101+ | --------- | ------------- | --------- |
102+ | ` http ` | URL fetching with reqwest (gzip/deflate/brotli) | Yes |
94103
95104## Error Handling
96105
97- The library uses a "bozo" flag (like feedparser) to indicate parsing errors while still returning partial results:
106+ The library uses a "bozo" flag (like Python's feedparser) to indicate parsing errors while still returning partial results:
98107
99108``` rust
100109use feedparser_rs :: parse;
@@ -111,7 +120,7 @@ assert_eq!(feed.feed.title.as_deref(), Some("Broken"));
111120
112121## Parser Limits
113122
114- To prevent resource exhaustion, the parser enforces limits:
123+ To prevent resource exhaustion (DoS protection) , the parser enforces configurable limits:
115124
116125``` rust
117126use feedparser_rs :: {parse_with_limits, ParserLimits };
@@ -126,12 +135,31 @@ let feed = parse_with_limits(xml.as_bytes(), limits)?;
126135# Ok :: <(), feedparser_rs :: FeedError >(())
127136```
128137
138+ > [ !NOTE]
139+ > Default limits are generous for typical feeds. Use ` ParserLimits::strict() ` for untrusted input.
140+
141+ ## Platform Bindings
142+
143+ - ** Node.js** : [ ` feedparser-rs ` ] ( https://www.npmjs.com/package/feedparser-rs ) on npm
144+ - ** Python** : [ ` feedparser-rs ` ] ( https://pypi.org/project/feedparser-rs/ ) on PyPI
145+
146+ ## MSRV Policy
147+
148+ Minimum Supported Rust Version: ** 1.88.0** (edition 2024).
149+
150+ MSRV increases are considered breaking changes and will result in a minor version bump.
151+
129152## License
130153
131- MIT OR Apache-2.0
154+ Licensed under either of:
155+
156+ - [ Apache License, Version 2.0] ( ../../LICENSE-APACHE )
157+ - [ MIT License] ( ../../LICENSE-MIT )
158+
159+ at your option.
132160
133161## Links
134162
135163- [ GitHub] ( https://github.com/bug-ops/feedparser-rs )
136- - [ Documentation] ( https://docs.rs/feedparser-rs )
164+ - [ API Documentation] ( https://docs.rs/feedparser-rs )
137165- [ Changelog] ( ../../CHANGELOG.md )
0 commit comments