#amf #parser #serializer #flash #sol


Fast and safe SOL/AMF0/AMF3 parsing. Supports serde, Adobe flex and cyclic references

7 releases (4 breaking)

0.5.0 Feb 8, 2021
0.4.0 Nov 27, 2020
0.3.2 Nov 3, 2020
0.3.1 Aug 13, 2020
0.1.0 Jun 24, 2020

#332 in Parser implementations

49 downloads per month

MIT license

2.5K SLoC


GitHub license GitHub issues

A parser and serializer for Adobe Local Shared Object (LSO) file format (.sol), AMF0 and AFM3 in 100% safe rust

The primary goal of this crate is to be as safe as possible against malformed and invalid input and to fail cleanly when this is identified.


use std::fs::File;
use std::io::Read;
use flash_lso::read::Reader;
fn main() {
    let mut x = File::open(path).expect("Couldn't open file");
    let mut data = Vec::new();
    let _ = x.read_to_end(&mut data).expect("Unable to read file");
    let d = Reader::default().parse_full(&data).expect("Failed to parse lso file");
    println!("{:#?}", d);


The web directory contains an example web viewer for LSO files using yew. To run, first build into WASM like so

cd web
wasm-pack build --out-name wasm --out-dir ./static --target web --release

Then serve the static directory like so

# If needed install miniserve with `cargo install miniserve`
miniserve ./static --index index.html

Development / Testing

This project has a collection of integration tests to verify that it is able to serialize and then deserialize LSO files to produce output that is identical to it's input Also available is a lso-to-json project which allows dumping an LSO file to json for debugging and testing.


To enable serde support

flash-lso = { version = "0.2.0", features = ["serde"] }

To enable (alpha) support for flex

flash-lso = { version = "0.2.0", features = ["flex"] }


This project makes use of cargo-fuzz to ensure correct handling of invalid data

cargo fuzz run --release fuzz_amf3_body


This project is licensed under MIT


~64K SLoC