Adrian Cochrane on Nostr: Today I'll study a couple more core components of Ruffle's Rust/WebASM ...
Today I'll study a couple more core components of Ruffle's Rust/WebASM reimplementation of Flash AVM1!
It includes a tagged enum holding an interpreted data value (undefined, null, bool, double, string, object with properties, or movie clip. Which can be converted to/from the Rust equivalent types, including parsing numbers from strings. Or call builtin type-coercion & comparison methods.
There's a register machine with methods for the different opcodes, & (looped) methods to dispatch to them!
It includes a tagged enum holding an interpreted data value (undefined, null, bool, double, string, object with properties, or movie clip. Which can be converted to/from the Rust equivalent types, including parsing numbers from strings. Or call builtin type-coercion & comparison methods.
There's a register machine with methods for the different opcodes, & (looped) methods to dispatch to them!