# AS3/ TypeScript compiler in Rust

**URL:** <https://forum.kirupa.com/t/as3-typescript-compiler-in-rust/649965>\
**Category:** Uncategorized\
**Created:** [December 10, 2021, 10:26pm UTC](https://forum.kirupa.com/t/as3-typescript-compiler-in-rust/649965 "2021-12-10T22:26:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![steve.mills](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/steve.mills/32/14961_2.png) [@steve.mills](https://forum.kirupa.com/u/steve.mills)\
**Post date:** [December 10, 2021, 10:26pm UTC](https://forum.kirupa.com/t/as3-typescript-compiler-in-rust/649965/1 "2021-12-10T22:26:51Z")

</div>

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

[https://jessewarden.com/2012/10/typescript-for-actionscript-developers.html](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/](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?

---

<div class="post-metadata">

**Author:** ![Wayne](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/wayne/32/16501_2.png) [@Wayne](https://forum.kirupa.com/u/Wayne)\
**Post date:** [December 10, 2021, 10:31pm UTC](https://forum.kirupa.com/t/as3-typescript-compiler-in-rust/649965/2 "2021-12-10T22:31:25Z")

</div>

Is as3 still in use today?

---

<div class="post-metadata">

**Author:** ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)\
**Post date:** [December 11, 2021, 6:22pm UTC](https://forum.kirupa.com/t/as3-typescript-compiler-in-rust/649965/3 "2021-12-11T18:22:02Z")

</div>

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 😀

---

<div class="post-metadata">

**Author:** ![zermok](https://avatars.discourse-cdn.com/v4/letter/z/5daacb/32.png) [@zermok](https://forum.kirupa.com/u/zermok)\
**Post date:** [December 12, 2021, 2:09pm UTC](https://forum.kirupa.com/t/as3-typescript-compiler-in-rust/649965/4 "2021-12-12T14:09:29Z")

</div>

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

> **[GitHub - ruffle-rs/ruffle: A Flash Player emulator written in Rust](https://github.com/ruffle-rs/ruffle)**
>
> A Flash Player emulator written in Rust

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.

---

<div class="post-metadata">

**Author:** ![steve.mills](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/steve.mills/32/14961_2.png) [@steve.mills](https://forum.kirupa.com/u/steve.mills)\
**Post date:** [December 12, 2021, 11:53pm UTC](https://forum.kirupa.com/t/as3-typescript-compiler-in-rust/649965/5 "2021-12-12T23:53:25Z")

</div>

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 😄.

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

---

<div class="post-metadata">

**Author:** ![zermok](https://avatars.discourse-cdn.com/v4/letter/z/5daacb/32.png) [@zermok](https://forum.kirupa.com/u/zermok)\
**Post date:** [December 13, 2021, 12:29am UTC](https://forum.kirupa.com/t/as3-typescript-compiler-in-rust/649965/6 "2021-12-13T00:29:43Z")

</div>

Ruffle is mostly using crate libs so…
