35 releases (13 stable)

2.0.0 Oct 21, 2021
1.10.0 Jan 7, 2021
1.9.0 Jan 23, 2020
1.8.0 May 25, 2019
0.0.1 Feb 12, 2015

#7 in Parser implementations

Download history 4974/week @ 2021-08-10 5053/week @ 2021-08-17 4354/week @ 2021-08-24 4023/week @ 2021-08-31 4001/week @ 2021-09-07 3313/week @ 2021-09-14 3157/week @ 2021-09-21 3642/week @ 2021-09-28 3645/week @ 2021-10-05 3763/week @ 2021-10-12 4404/week @ 2021-10-19 4077/week @ 2021-10-26 12723/week @ 2021-11-02 7567/week @ 2021-11-09 5920/week @ 2021-11-16 5344/week @ 2021-11-23

32,358 downloads per month
Used in 43 crates (40 directly)


3.5K SLoC


Build status Codecov crates.io Docs

Library for deserializing and serializing the RSS web content syndication format.

Supported Versions

Reading from the following RSS versions is supported:

  • RSS 0.90
  • RSS 0.91
  • RSS 0.92
  • RSS 1.0
  • RSS 2.0

Writing support is limited to RSS 2.0.



Add the dependency to your Cargo.toml.

rss = "2.0"


A channel can be read from any object that implements the BufRead trait.

From a file

use std::fs::File;
use std::io::BufReader;
use rss::Channel;

let file = File::open("example.xml").unwrap();
let channel = Channel::read_from(BufReader::new(file)).unwrap();

From a buffer

Note: This example requires reqwest crate.

use std::error::Error;
use rss::Channel;

async fn example_feed() -> Result<Channel, Box<dyn Error>> {
    let content = reqwest::get("http://example.com/feed.xml")
    let channel = Channel::read_from(&content[..])?;


A channel can be written to any object that implements the Write trait or converted to an XML string using the ToString trait.

Note: Writing a channel does not perform any escaping of XML entities.

use rss::Channel;

let channel = Channel::default();
channel.write_to(::std::io::sink()).unwrap(); // // write to the channel to a writer
let string = channel.to_string(); // convert the channel to a string


Builder methods are provided to assist in the creation of channels.

Note: This requires the builders feature, which is enabled by default.

use rss::ChannelBuilder;

let channel = ChannelBuilder::default()
    .title("Channel Title")
    .description("An RSS feed.")


Validation methods are provided to validate the contents of a channel against the RSS specification.

Note: This requires enabling the validation feature.

use rss::Channel;
use rss::validation::Validate;

let channel = Channel::default();


Elements which have non-default namespaces will be considered extensions. Extensions are stored in Channel.extensions and Item.extensions.

For conveninence, Dublin Core, Syndication and iTunes extensions are extracted to structs and stored in as properties on channels and items.

Invalid Feeds

As a best effort to parse invalid feeds rss will default elements declared as "required" by the RSS 2.0 specification to an empty string.


Licensed under either of

at your option.


~150K SLoC