Skip to content
pocketonion edited this page Mar 25, 2020 · 16 revisions

Ruffle is built using the Rust programming language. The first step to building Ruffle:

Building for desktop

Ruffle can be built for Linux, OSX, and Windows using the following commands:

  • cd desktop
  • cargo run -- testing.swf

Building for web

Ruffle uses npm and wasm-pack to build for web.

Building the web demo

The demo page is a quick way to test SWF content in Ruffle on the web. Navigate to your cloned repository's main directory and run it with these steps:

  • cd web/demo
  • npm install
  • npm run serve -- --mode=production
  • Navigate to the indicated page in your browser (usually http://localhost:8080)

Building the modules without a web bundler

Navigate to your cloned repository's main directory and follow these steps:

  • cd web
  • wasm-pack --out-name=ruffle --target=web
  • The package scripts are built in the pkg folder
  • cd web/demo
  • npm run serve -- --mode=production

Tests

To run unit and regression tests:

cargo test --all