15 releases (5 breaking)

✓ Uses Rust 2018 edition

0.8.0 Jul 8, 2019
0.7.0 May 21, 2019
0.3.0 Mar 30, 2019
0.0.8 Oct 30, 2018
0.0.1 Jul 31, 2017

#47 in Parser implementations

Download history 29/week @ 2019-03-25 42/week @ 2019-04-01 19/week @ 2019-04-08 19/week @ 2019-04-15 117/week @ 2019-04-22 27/week @ 2019-04-29 16/week @ 2019-05-06 28/week @ 2019-05-13 96/week @ 2019-05-20 6/week @ 2019-05-27 16/week @ 2019-06-03 13/week @ 2019-06-10 66/week @ 2019-06-17 228/week @ 2019-06-24 97/week @ 2019-07-01

250 downloads per month
Used in 1 crate

AGPL-3.0-or-later

144KB
4K 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 --init --recursive --remote

This library is a standard Cargo project. You can test your changes with cargo test. The commands must be run from the rs directory.

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
~87K SLoC