AstonJ

AstonJ

AssemblyScript - A language made for WebAssembly

Just discovered AssemblyScript (our portal is here).

It…“aims to make it easy to compile to WebAssembly using TypeScript, no strings attached.”

Designed for WebAssembly

AssemblyScript targets WebAssembly’s feature set specifically, giving developers low-level control over their code.

Familiar TypeScript syntax

Being a variant of TypeScript makes it easy to compile to WebAssembly without learning a new language.

Right at your fingertips

Integrates with the existing Web ecosystem - no heavy toolchains to set up. Simply npm install it!

Looks really cool, and I love the little touch when clicking on the ship on their homepage :heart_eyes::sunglasses:

Check out the examples:

If I end up using TypeScript, then I think I will feel compelled to give this a go too.

What do you think about it? Anyone fancy learning TypeScript and AssemblyScript soon? :nerd_face:

First Post!

AstonJ

AstonJ

This looks like a really good blog post about it:

Hello! I’m Aaron Turner, a senior software engineer on our Compute@Edge serverless compute environment, as well as a member of the AssemblyScript core team. We announced in our latest update to Compute@Edge that we’re supporting AssemblyScript — today, let’s take a deep dive into that fairly new language. Though it’s a bit ironic, I think the best way to start this discussion is with another language — JavaScript.

JavaScript is one of the most widely used programming languages. But it’s not always a perfect fit — like when you’re running logic at the edge. Downsides mostly revolve around JavaScript being a dynamically typed, interpreted language, meaning it requires a runtime to execute.

JavaScript runtimes must be heavily optimized and use techniques like Just-in-Time compilation to get JavaScript to perform at a level close to statically typed compiled languages in a best-case scenario at runtime. Runtimes like V8 do an amazing job at executing JavaScript using a reasonable amount of resources, but it would be more performant to not use a language that is dynamically typed or interpreted. What if we could have a similar developer experience to JavaScript but with the benefits of a statically typed compiled language?

TypeScript provides part of the answer by adding types to JavaScript, thereby, introducing type-safety to JavaScript applications. TypeScript is widely used among JavaScript developers: ~80% of JavaScript developers use, or want to learn, TypeScript. However, TypeScript doesn’t go the full distance toward compiled languages: it type-checks code but ultimately strips the types away to produce pure JavaScript rather than a fully-compiled binary.

Enter AssemblyScript

AssemblyScript is a variant of TypeScript that produces WebAssembly binaries, the binary format that powers Fastly’s Compute@Edge. WebAssembly is a new technology that is supported by all major browsers. Relative to JavaScript, WebAssembly offers predictable performance, making WebAssembly well suited for computationally intensive tasks. WebAssembly is also very portable, as it can be easily distributed in package registries like npm, and run in both the browser and standalone runtimes like Lucet.

While AssemblyScript requires stricter typing than TypeScript does, it sticks as close as possible to TypeScript syntax and semantics — which means that most JavaScript developers will find AssemblyScript comfortable to use…

Read in full here:

Where Next?

Popular Frontend topics Top

AstonJ
Sprinkles of JS, or full frontend frameworks? What do you use and why?
New
First poster: bot
Why do ARM chips have an instruction with Javascript in the name (FJCVTZS)?. FJCVTZS is “Floating-point Javascript Convert to Signed fix...
New
AstonJ
We should probably add a WASM portal at some point :nerd_face: Edit: Done:
New
AstonJ
Which WebAssembly language/s interest you? I just discovered AssemblyScript (portal | thread) which looks interesting! Here are some of...
New
mrmurphy
The situation Hi there! I’m working on a live view app right now that encrypts sensitive user content (text and images) using the browser...
New
ClaudiaGiv
Hi all, I recently started working with Svelte and created a small app with SvelteKit in order to understand better the framework. I hav...
New
Ayushk
Hello, This is pretty basic. I was trying to explore the front-end development as I was not from a tech background. But, very much inter...
New
mtmattei
A few months ago, Uno Platform unveiled Uno Platform for Figma plugin, a plugin created to turn your high-fidelity Figma design into XAML...
New
riyajohnson
When it comes to selecting a framework for a development project, it’s crucial to make an informed decision. With so many options availab...
New
DevynClark
Front-end Developer Griffin, USA As a student in college looking for a way to break into Front-end Web Development, the rise of things s...
New

Other popular topics Top

AstonJ
If it’s a mechanical keyboard, which switches do you have? Would you recommend it? Why? What will your next keyboard be? Pics always w...
New
AstonJ
Just done a fresh install of macOS Big Sur and on installing Erlang I am getting: asdf install erlang 23.1.2 Configure failed. checking ...
New
AstonJ
Inspired by this post from @Carter, which languages, frameworks or other tech or tools do you think is killing it right now? :upside_down...
New
AstonJ
I ended up cancelling my Moonlander order as I think it’s just going to be a bit too bulky for me. I think the Planck and the Preonic (o...
New
PragmaticBookshelf
Rails 7 completely redefines what it means to produce fantastic user experiences and provides a way to achieve all the benefits of single...
New
AstonJ
Was just curious to see if any were around, found this one: I got 51/100: Not sure if it was meant to buy I am sure at times the b...
New
PragmaticBookshelf
Author Spotlight Jamis Buck @jamis This month, we have the pleasure of spotlighting author Jamis Buck, who has written Mazes for Prog...
New
Help
I am trying to crate a game for the Nintendo switch, I wanted to use Java as I am comfortable with that programming language. Can you use...
New
PragmaticBookshelf
Author Spotlight: Tammy Coron @Paradox927 Gaming, and writing games in particular, is about passion, vision, experience, and immersio...
New
AstonJ
If you’re getting errors like this: psql: error: connection to server on socket “/tmp/.s.PGSQL.5432” failed: No such file or directory ...
New