A Flash Player emulator written in Rust
Go to file
David Wendt 2c87888e28 Implement prototype chain recursion limit of 255 prototypes.
In Flash, this also at least claims to halt ActionScript execution on the movie. No such implementation of AVM poisoning currently exists in Ruffle, primarily because it's unclear what gets poisoned and implementing some of these options isn't yet possible:

1. AVM (e.g. all movies) - we would need to make the AVM fail silently in this case. This is the most straightforward way to poison the movie, but I'm not sure if this is how Flash actually does it, or if it poisons...
2. Movie - the current structure of movies is incompatible with adding arbitrary data to them. We need to merge `moviefetch` in before we can attach data to loaded movies.
3. MovieClip - this would also be implementable but has problems. How do child MovieClips know that their parent has been poisoned, or vice versa? What if a movie clip is loaded from one movie and moved into another?

As a result, I have decided to hold off on implementing recursion poisoning until I know where it's supposed to go and how to implement that.
2019-11-27 08:59:16 -05:00
.circleci ci: Tweak extension build script 2019-11-25 17:00:29 -08:00
core Implement prototype chain recursion limit of 255 prototypes. 2019-11-27 08:59:16 -05:00
desktop build(deps): bump structopt from 0.3.4 to 0.3.5 2019-11-25 10:53:04 +00:00
scanner build(deps): bump structopt from 0.3.4 to 0.3.5 2019-11-25 10:53:04 +00:00
swf build(deps): bump num-derive from 0.2.5 to 0.3.0 2019-11-22 17:13:32 +00:00
web web: Default demo build to production mode 2019-11-25 17:00:29 -08:00
.gitattributes chore: Add gitattributes to normalize line endings 2019-10-11 16:53:36 -07:00
.gitignore chore: Add Cargo.lock 2019-11-17 17:36:21 -05:00
CONTRIBUTING.md chore: Renormalize line endings in misc files 2019-10-11 16:53:36 -07:00
Cargo.lock build(deps): bump num-traits from 0.2.9 to 0.2.10 2019-11-25 11:13:02 +00:00
Cargo.toml Added a bulk swf scanning tool 2019-10-11 16:37:15 -07:00
LICENSE_APACHE Initial commit 2019-04-25 10:52:22 -07:00
LICENSE_MIT Initial commit 2019-04-25 10:52:22 -07:00
README.md Added a bulk swf scanning tool 2019-10-11 16:37:15 -07:00
rustfmt.toml chore: Add rustfmt.toml and rustfmt pass 2019-08-26 16:38:48 -07:00

README.md

Ruffle

Travis Build Status Ruffle Discord
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.

Project status

Ruffle is in the proof-of-concept stage and can currently run early Flash animations. ActionScript support is still forthcoming; for more info, read the project roadmap.

Building from source

Follow the official guide to install Rust for your platform.

Desktop

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

Web

Running the web demo

Building the NPM package

  • cd web
  • wasm-pack build

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 --package=ruffle_scanner -- folder/with/swfs/ results.csv

Structure

  • core contains the core emulator and common code
  • desktop contains the desktop client (uses glium)
  • web contains the web client (uses wasm-bindgen)
  • scanner contains a utility to bulk parse swf files

License

Licensed under either of

Contribution

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.