Welcoming AssemblyScript to the Suborbital Development Platform

Welcoming AssemblyScript to the Suborbital Development Platform

Last week, official support for AssemblyScript was added to our various OSS projects including Subo, Reactr, and Atmo. You can now compile and run AssemblyScript-based Runnables in your projects! This is a big deal, because TypeScript - the language that AssemblyScript's syntax closely mirrors - is hugely popular in the developer community. This was by far the most-requested language for Atmo to support, and I'm glad it's finally here!

To quote the AssemblyScript website: "Being a variant of TypeScript makes it easy to compile to WebAssembly without learning a new language." This is core to why we decided to bring it into the fold. One of the main things that drives decisions about Suborbital is "how can we make WebAssembly as familiar and easy to use as possible?", and offering languages that developers already know is a big part of that.

With Subo v0.0.17, Reactr v0.10.0, and Atmo v0.2.3, you can now build Runnables with TypeScript syntax alongside the Rust and Swift code you're already familiar with. Let's take a look at an example:

import { logInfo } from "@suborbital/suborbital"

export function run(input: ArrayBuffer): ArrayBuffer {
    let inStr = String.UTF8.decode(input)

    let out = "hello, " + inStr

    logInfo(out)

    return String.UTF8.encode(out)
}

As you can see, it follows a very similar pattern as the other languages supported by the Suborbital family, and all of the same APIs are available such as logging, HTTP requests, cache access, and more. AssemblyScript support will gain even more capabilities alongside the others as we begin work on Atmo Beta-3. You can learn all about using AssemblyScript in your Runnables from the Atmo documentation

Last but not least, Suborbital is now a sponsor of the AssemblyScript project! We think it's essential to the success of WebAssembly as a whole, and we wanted to show our support. Check out all of the great people and organizations sponsoring the project.

There are some really big announcements coming soon, and I'm very excited to show everyone what we have planned. Follow @SuborbitalDev on Twitter, and sign up for the newsletter to stay up to date, and as always, stay safe out there!

Cover Photo by Aaron Burden on Unsplash

 
Share this