A Flash Player emulator written in Rust

TÖRÖK Attila c288c7b710 chore: Bump locked `loom`, `generator`, `async-process`, and `async-signal` versions 1 day ago
.cargo 5b7c48e43d web: No longer set the `web_sys_unstable_apis` config variable 1 month ago
.github 20aa777f68 ci: run extra clippy step without tests 2 weeks ago
core 09e932163b xml: Add TODO comment in deepCopy() 2 days ago
desktop c6bfaf8fae build(deps): bump the cargo-minor group with 4 updates 2 days ago
exporter b7c9c870bb chore: Use workspace version for walkdir 2 weeks ago
flv 45a2ab69c0 chore: Use workspace version for thiserror 2 weeks ago
frontend-utils c6bfaf8fae build(deps): bump the cargo-minor group with 4 updates 2 days ago
render 3ca7cc821e nit: Silence nightly `dead_code` lint 4 days ago
ruffle_gc_arena f0ed5c7211 chore: Upgrade gc-arena to 0.5.0 3 months ago
scanner b7c9c870bb chore: Use workspace version for walkdir 2 weeks ago
stub-report 8001ce18f1 github: Generate AVM2 report as part of nightly release 2 months ago
swf d3cc9d5fa5 build(deps): bump the cargo-minor group with 11 updates 1 week ago
tests fd281cc715 avm2: Add IS_QNAME flag to Multiname, improve XML name matching 2 days ago
video 45a2ab69c0 chore: Use workspace version for thiserror 2 weeks ago
web d7b3a500d7 build(deps): bump the npm-minor group in /web with 11 updates 2 days ago
wstr 7f33dace8e nit: Silence nightly `clippy::missing_transmute_annotations` lint 4 days ago
.dockerignore 0f52d9808c chore: Add a .dockerignore file 2 months ago
.gitattributes 4368a81978 chore: Fix GitHub language detection 2 months ago
.gitignore c074047551 chore: Add .idea to gitignore 8 months ago
CODE_OF_CONDUCT.md 73b251d6ec chore: Update CODE_OF_CONDUCT.md 3 years ago
CONTRIBUTING.md a71e8c1aba docs: Tweak the suggested debug filters for RUST_LOG based off new desktop default 1 month ago
Cargo.lock c288c7b710 chore: Bump locked `loom`, `generator`, `async-process`, and `async-signal` versions 1 day ago
Cargo.toml 5c1fcb9f26 build(deps): bump the cargo-minor group with 4 updates 6 days ago
LICENSE.md 1bc4d9fd84 doc: Remove `generational-arena` from LICENSE.md, update slotmap copyright year 1 month ago
PKGBUILD 0968057011 chore: We don't need openssl/libssl now 1 week ago
README.md 0968057011 chore: We don't need openssl/libssl now 1 week ago
crowdin.yml 12e2758464 desktop: Localise texts 11 months ago
deny.toml 6dbef5170e chore: Clarify the ring license 1 week ago
rustfmt.toml 6a5c5ab1df chore: Add rustfmt.toml and rustfmt pass 4 years ago

README.md

Ruffle

Rust Build Status Web Build Status Ruffle npm Ruffle AUR Ruffle Discord Ruffle translations
website | demo | nightly builds | wiki

Ruffle

Ruffle is an Adobe Flash Player emulator written in the Rust programming language. Ruffle targets both the desktop and the web using WebAssembly.

Table of Contents

Project status

Ruffle supports ActionScript 1, 2 and 3 pretty well, but it's still not finished by any means. Please report any issues in the Issue Tracker.

Using Ruffle

The easiest way to try out Ruffle is to visit the web demo page, then click the "Select File" button to load a SWF file of your choice.

Nightly builds of Ruffle are available for desktop and web platforms.

For more detailed instructions, see our wiki page.

Building from source

Prerequisites

  • Latest stable channel of Rust
  • Java, available on your PATH as java (required for building the library containing the builtin Flash classes for ActionScript 3)

Linux prerequisites

The following are typical dependencies for Linux:

  • libasound2-dev
  • libxcb-shape0-dev
  • libxcb-xfixes0-dev
  • libgtk-3-dev
  • libudev-dev
  • libxcb-xinput-dev
  • libxcb-xkb-dev
  • libxcb-cursor-dev
  • default-jre-headless
  • cmake
  • g++

Desktop

Build

Use the following command to build and run the desktop app:

cargo run --release --package=ruffle_desktop

To run a specific SWF file, pass the SWF path as an argument:

cargo run --release --package=ruffle_desktop -- test.swf

To build in debug mode, simply omit --release from the command.

macOS

Ruffle desktop can be built from our Homebrew Tap:

brew install --HEAD ruffle-rs/ruffle/ruffle

Note: because it is HEAD-only, you'll need to run brew upgrade --fetch-HEAD ruffle each time you want to update.

Web or Extension

Follow the instructions in the web directory for building either the web or browser extension version of Ruffle.

This project is tested with BrowserStack.

Android

Follow the instructions in the ruffle-android project for building the Android application of Ruffle.

Scanner

If you have a collection of "real world" SWFs to test against, the scanner may be used to benchmark ruffle's parsing capabilities. Provided with a folder and an output filename, it will attempt to read all of the Flash files and report on the success of such a task.

cargo run --release --package=ruffle_scanner -- folder/with/swfs/ results.csv

Exporter

If you have a SWF file and would like to capture an image of it, you may use the exporter tool. This currently requires hardware acceleration, but can be run headless (with no window).

  • cargo run --release --package=exporter -- path/to/file.swf
  • cargo run --release --package=exporter -- path/to/file.swf path/to/screenshots --frames 5

Structure

  • core - core emulator and common code
  • swf - SWF and ActionScript parser
  • desktop - desktop client (uses wgpu-rs)
  • web - web client and browser extension (uses wasm-bindgen)
  • render - various rendering backends for both desktop and web
  • video - video decoding backends
  • flv - Flash Video decoder
  • wstr - a Flash-compatible implementation of strings
  • scanner - a utility to bulk parse SWF files
  • exporter - a utility to generate PNG screenshots of a SWF file

Sponsors

You can support the development of Ruffle via GitHub Sponsors. Your sponsorship will help to ensure the accessibility of Flash content for the future. Thank you!

Sincere thanks to the diamond level sponsors of Ruffle:

Newgrounds.com CPMStar Sébastien Bénard Crazy Games Cool Math Games The New York Times Armor Games Onda Educa TwoPlayerGames.org wowgame.jp Matt Roszak Doll Divine Movavi Kongregate Bubble Shooter Neopets

License

Ruffle is licensed under either of

at your option.

Ruffle depends on third-party libraries under compatible licenses. See LICENSE.md for full information.

Contributing

Ruffle welcomes contribution from everyone. See CONTRIBUTING.md for help getting started.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be dual licensed as above, without any additional terms or conditions.

The entire Ruffle community, including the chat room and GitHub project, is expected to abide by the Code of Conduct that the Rust project itself follows.