9 unstable releases (3 breaking)

✓ Uses Rust 2018 edition

new 0.5.1 Apr 24, 2019
0.5.0 Apr 22, 2019
0.4.0 Apr 14, 2019
0.3.2 Apr 6, 2019
0.0.1 Jul 31, 2017

#54 in Parser implementations

Download history 5/week @ 2019-01-09 2/week @ 2019-01-16 1/week @ 2019-01-23 1/week @ 2019-01-30 1/week @ 2019-02-06 2/week @ 2019-02-13 1/week @ 2019-02-20 6/week @ 2019-02-27 10/week @ 2019-03-06 13/week @ 2019-03-20 22/week @ 2019-03-27 46/week @ 2019-04-03 18/week @ 2019-04-10 36/week @ 2019-04-17

57 downloads per month
Used in 1 crate

AGPL-3.0-or-later

133KB
3.5K SLoC

Open Flash logo

SWF Parser

crates.io GitHub repository Build status

SWF parser implemented in Rust. Converts bytes to swf-tree movies.

Usage

use swf_parser;
use swf_tree;

fn main() {
  let bytes: &[u8] = ...;
  let (_, movie): (_, swf_tree::Movie) = swf_parser::parsers::movie::parse_movie(&bytes[..])
  .expect("Failed to parse movie");
}

Contributing

This repo uses Git submodules for its test samples:

# Clone with submodules
git clone --recurse-submodules git://github.com/open-flash/swf-parser.git
# Update submodules for an already-cloned repo
git submodule update --recursive --remote

This library is a standard Cargo project. You can test your changes with cargo test.

The Rust implementation supports fuzzing:

# Make sure that you have `cargo-fuzz`
cargo install cargo-fuzz
# Fuzz the `movie` parser
cargo fuzz run movie

Prefer non-master branches when sending a PR so your changes can be rebased if needed. All the commits must be made on top of master (fast-forward merge). CI must pass for changes to be accepted.

Dependencies

~4.5MB
~88K SLoC