Before I thought of compiling Rust to WebAssembly and then to SWF (aka. ActionScript Bytecode). However, this isn't easy because Rust translated to .wasm loses basic high-level information and generates code full of pointers.
So... I think I might be interested in Rust's HIR, but I'm not sure from where to start.
Basically ActionScript bytecode (aka. the bytecode format from the document "AVM2 Overview") describes something similiar to Java bytecode (.class), except I think it doesn't support nested classes. If I were to compile Rust to ABC, then I'd not use the built-in std
dependency and kind of use a dialect of Rust, restraining it with what ActionScript supports.
I want to use Adobe AIR because, differently from browsers, it allows your app to use storage data more freely (compared to web localStorage
, IndexedDB and cookies). It supports a flash.filesystem.File
type with file:
, app:
and app-storage:
URLs. It's generally a platform comparable to a browser (but goes to other extents and supports native extensions). And starting from 2019, Adobe AIR was handed to another company. I also think it'd be fun to use Rust with it, mainly to re-use the flash.display
list. There are parts of the API which I don't like too, but I think it'd be really interesting to try it.