AS3/ TypeScript compiler in Rust

Hey peoples,
I was having a read of this article:

https://jessewarden.com/2012/10/typescript-for-actionscript-developers.html

And thought maybe AS3/ Typescript could be a full fledged language that compiles to binary with the help of a Rust compiler, like they’re doing with the Roc Language:

https://www.roc-lang.org/

If it was doable:

  • the performance would probably be pretty similar to Rust
  • you could use it anywhere with decent performance
  • it would have Rust memory safety guarantees
  • you could probably compile to WASM for use in web apps
  • you could probably use the Typescript compiler as well

Does anybody have any ideas about the feasibility of this and why it hasn’t been done already?

Is as3 still in use today?

Another area where a language like AS3 would be powerful is in serverless Node runtimes like AWS Lambda or Google Functions.

As for why either the Rust or serverless route hasn’t been taken, my guess is because of its similarity to JavaScript. I am not sure what “new” thing AS can bring over what JavaScript and TypeScript provide already :grinning:

Hi Steve,
take a look at (and why not contribute) to the amazing Ruffle project

in early stage but very promising.
And yes, actionscript is still used since Samsung continues to update and evolve Air SDK which is less hassle (in certain cases) than javascript, especially when you need a full cross OS application without to write different code or compile for each platform.

2 Likes

Thanks I’ll have to look into it.

I’ve been learning Rust for a while, however it can be really frustrating.

Its the kind of language where you have to know 90%+ of the language decently before you can do anything really useful

Unlike JS where you can do a whole lot without even knowing for loops :grinning_face_with_smiling_eyes:.

It would be nice to a subset of Rust with AssemblyScript syntax (e.g let x:u8 = 5;) and some built in methods/ macros .

Ruffle is mostly using crate libs so…

1 Like