A Flash Player emulator written in Rust
Go to file
Daniel Jacobs f5faa39a2d chore: Properly detect files as GLSL on GitHub 2024-05-29 09:52:44 -04:00
.cargo web: No longer set the `web_sys_unstable_apis` config variable 2024-03-02 16:13:43 +01:00
.github ci: Disable rust-lld on Rust nightly 2024-05-21 11:15:36 +02:00
core core: Fix stop() when executing attachMovie in DoInitAction 2024-05-28 23:57:13 +02:00
desktop chore: Update translations from Crowdin 2024-05-28 01:08:35 +02:00
exporter chore: Use workspace version for walkdir 2024-04-04 17:29:00 +02:00
flv chore: Use workspace version for thiserror 2024-04-04 17:29:00 +02:00
frontend-utils desktop/frontend-utils: Show filename or bundle name in recent list 2024-05-26 00:37:35 +03:00
render chore: Bump h263-rs git reference 2024-05-21 18:38:29 +02:00
ruffle_gc_arena chore: Upgrade gc-arena to 0.5.0 2024-01-06 09:45:35 +01:00
scanner chore: Use workspace version for walkdir 2024-04-04 17:29:00 +02:00
stub-report github: Generate AVM2 report as part of nightly release 2024-02-04 15:42:25 -05:00
swf build(deps): bump the cargo-minor group with 14 updates 2024-05-13 15:49:29 +02:00
tests chore: Remove inaccurate syntax comment from another AS file 2024-05-29 09:36:04 -04:00
video chore: Bump h263-rs git reference 2024-05-21 18:38:29 +02:00
web web: Wait until the player is fully ready, for tests 2024-05-29 00:03:47 +02:00
wstr core: Support dependent strings for concatenation 2024-05-26 12:14:30 +02:00
.dockerignore chore: Add a .dockerignore file 2024-02-04 00:06:11 +01:00
.gitattributes chore: Properly detect files as GLSL on GitHub 2024-05-29 09:52:44 -04:00
.gitignore chore: Add .idea to gitignore 2023-08-06 17:37:41 +02:00
CODE_OF_CONDUCT.md chore: Update CODE_OF_CONDUCT.md 2021-02-27 16:58:32 -08:00
CONTRIBUTING.md docs: Fix scanner command and broken mtasc links 2024-05-06 22:04:25 +02:00
Cargo.lock build(deps): bump the cargo-minor group with 2 updates 2024-05-28 00:48:13 +02:00
Cargo.toml build(deps): bump the cargo-minor group with 2 updates 2024-05-28 00:48:13 +02:00
LICENSE.md doc: Remove `generational-arena` from LICENSE.md, update slotmap copyright year 2024-03-03 21:18:39 +01:00
PKGBUILD chore: We don't need openssl/libssl now 2024-04-15 23:07:56 +02:00
README.md docs: Fix scanner command and broken mtasc links 2024-05-06 22:04:25 +02:00
crowdin.yml desktop: Localise texts 2023-05-24 23:50:48 +02:00
deny.toml meta: Deny including multiple versions of `image` 2024-05-17 01:19:01 +03:00
rustfmt.toml chore: Add rustfmt.toml and rustfmt pass 2019-08-26 16:38:48 -07:00

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 -- scan 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.