Ruffle – An Adobe Flash Player Written in Rust Compiled to WebAssembly
github.com
github.com
[https://github.com/mozilla/shumway] [https://en.wikipedia.org/wiki/ActionScript]
The AS3 spec, compiler and runtime/VM are all open source, have been since at least 2008 IIRC. Details are in the wikipedia page you linked, third paragraph.
Aside: discussions of Flash or its legacy have an unfortunate tendency to get derailed by FUD, so it would perhaps be useful to avoid speculation like this where possible.
I definitely agree it'd be hugely useful, and wish it would happen, but I kind of doubt we'll ever see it.
Yes, it may find a niche subset of Flash content it can do well, but there have been many attempts at Flash replacements, and all of them have failed, including serious ones with corporate backing like Shumway. Another cool one is Lightspark [1]
The only real chance at 100% preservation of Flash content is for Adobe to open source all of it - the VMs, the runtime including the graphics, etc. - and to compile that.
Looking back on it, I have nothing I can show for it, really, besides some screenshots here and there. Pretty much all of the sites and projects are gone. It's a bit of a shame. This industry changes and moves forward at a lightning pace.
Some of the other people from my uni went into motion graphics and they can at least use examples of ads or animations from over a decade ago in their showreels. We can't really do that as web developers because of the dynamic nature of the medium.
Anyways, nice work!
WebAssembly is different because it's built around the high-performance JavaScript VMs that have been developed over the past decade or so. When a browser-maker fixes a security hole in their VM, it's fixed for JavaScript and WebAssembly at the same time, because they're built on the same foundation.
So no, you don't have to worry about security as much with WebAssembly - not because of any magical security properties WebAssembly has, but because even though the WebAssembly API is new, the security environment has seen decades of hardening.
I didn't bother creating an account, but the game opened fine and everything.
Couldn't log in properly, but that seems to be a server issue on their end. Support ticket opened, so we'll see. :)
You can compile any JAR into js, and there is even a Chrome extension to conveniently run Applets found in the wild[1].
[0] https://www.leaningtech.com/cheerpj/
[1] https://chrome.google.com/webstore/detail/cheerpj-applet-run...
I wish them the best of luck on their path to full compatibility with Adobe flash.
• Capability of ActionScript (which can harbor malware) along with potential vulnerabilities in the interpreter itself.
• Memory and CPU usage
• Proprietary
Does this rust variant even address all of these? Are we hoping to shim flash support into wasm-supported browsers? What good would this bring, specifically in regards to native flash's shortcomings?
Not trashing the project, cause it's actually really cool, just curious why.
As for RAM and CPU usage, there's not much that can likely be done. Better garbage collectors and other things like that might help but Flash itself was the cause of a lot of those problems.
If this was a full implementation it'd be something open source that could run flash files/movies, so it'd be a bit less proprietary. There still wouldn't be open source editors that could handle doing it all so it wouldn't be complete or even close as an ecosystem.
That said, all this could end up creating a good alternative for when all the browsers and adobe drop flash support in the next year (Firefox ESR is the only one I know of that's committed to supporting it until the end of 2020). A sane and safe migration path would be really useful for somewhere like newgrounds or archive.org to preserve internet history.
• Proven track record of terrible security bugs
• Was most frequently used for ads
* Flash games market was huge
Regardless, that's whataboutery. Flash Player was famously riddled with security bugs. The question is [Browser + Flash Player] vs [Browser] and the answer is obvious. Removing an entire surface area—a pure subset—is always a security win.
My objection is only to people who in any way lament the death of Flash. Consider that nobody is scrambling to build a clone of the Netscape Navigator 4 parser and renderer. The fact that this project exists is testament to its importance for a brief period—but also to the awfulness of the canonical implementation.
Meanwhile, plenty of treasure has been found in the smoldering ashes of a dumpster fire. Rick Astley inspired an entirely new genre of comedy. That doesn’t speak to the inherent merit of his music.
And no, making “an app for that” is no replacement
So what? Flash created all sorts of usability problems. Horribly inefficient video playback, keyboard focus stealing, not responding to mouse/trackpad input the way native widgets do.
* Powerful graphical tooling, where HTML/CSS are still catching up to
* Guarantee to actually have hardware acceleration, instead of CSS z-index tricks hoping for the best
* It was the first to support game engines on the Web, like Unreal
Unknown to many, Flash apps actually do exist on mobile, because Flash also AOT compiles to native code.
I don't think I've ever quite gotten over my resentment at the tech community for killing Flash in the name of "security".
https://www.adobe.com/devnet/air/articles/ios-packaging-comp...
So, most ads skipped to JS or gif animation, and most game developers rushed to develop for the app stores (where money could supposedly be made much more easily than on the web).
https://www.adobe.com/devnet/air/articles/ios-packaging-comp...
I personally miss the existence of thousands of Planetarion clones on the internet.
There is no miraculous contribution to open source 3D animation going on.
As a counterexample, I present: Homestar Runner. Also, Homestuck.
The project's roadmap (https://github.com/ruffle-rs/ruffle/wiki/Roadmap) says: "The Flash Player has existed since 1996, and there are millions of pieces of Flash content around the web. This content represents an important piece of computing history and culture ... Ruffle's chief goal is to preserve this legacy content and keep it accessible for the future."
I think that's a good goal.
I don't understand why people keep repeating this. This is simply not true, Flash wasn't slow at all. It took HTML5+js+canvas years to catch up with Flash performance-wise.
Even after the introduction of GPU acceleration in browsers such as IE9 and Firefox 4, on typical machines of that period HTML5 was still far too slow for browser games, while Flash was usable even on Pentium III-era computers.
IMO, it's because flash was not great with resources, but good enough to try advanced/creative things. Sure, canvas wasn't even a common thing at the time, when flash supported many video/graphics use cases.
But that meant people thought a few effects on the website was worth including a flash animation which pegged your CPU at 100% for a while. Or auto played some FLV which killed performance for the entire website.
The performance was also very platform dependent. "Linux can support 128 cores, but can't play YouTube without stuttering." was a meme, but also the truth for many users for a long time. Then Adobe pretty much abandoned the plugin support on Linux.
So sure, the tech was great, and many people implemented it - maybe too many and too early.
Obviously it was possible to code competent stuff with Flash; that kind of competence tended to be limited to few expert publishers.
Flash was performant in the sense that it allowed you to run decent graphical games at an acceptable framerate.
Flash was unperformant in the sense that it stole all of your computer resources to do it, and didn't play well with other elements on the page that needed those resources.
But GP is right that when canvas started getting pushed as an alternative to Flash, you just couldn't do as much with it. I remember seeing people online talk about how Flash could finally die, and then I'd load up the demo projects that they linked to, and they'd chug at 15 fps on my computer -- a computer that was more than capable of running a 30-60fps bullet hell flash game.
You have to remember that the game developer community's experience with Flash was, "you go to a page, full-screen my thing, and then play it." They weren't worried about how Flash interacted with the rest of the web, they just wanted good framerates and audio controls. The web developer community's experience with Flash was, "you go to my page, and suddenly everything slows down because Greg in marketing wanted to make a funny ball bounce around the side bar." They didn't care about whether canvas was hitting 60fps with hundreds of sprites, they just didn't want their webpages to freeze.