|Paradigm||Multi-paradigm: functional, generic, imperative, object-oriented|
|Designed by||Daniel Wirtz, Max Graey|
|Developer||The AssemblyScript Project|
0.21.00 / August 21, 2022
|License||Apache License 2.0|
|File formats||Text, Unicode (source)|
.wasm binary format (object)
|asc (AssemblyScript compiler)|
clz (count leading zero bits),
ctz (count trailing zero bits), and
popcnt (population count), used in applications such as encryption and cryptographic libraries.
asc, the reference AssemblyScript compiler, is based on Binaryen, a back-end compiler toolchain developed by Alon Zakai that compiles to WebAssembly and is a component of Emscripten (which Zakai also developed). The asc compiler and other tooling are available via the npm package manager.
While WebAssembly was originally designed for execution within Web browsers, the development of WASI (WebAssembly System Interface), a community specification for a standard API that allows WebAssembly programs access to system calls and other operating system functions, has led to the development of WebAssembly runtime environments from projects such as Wasmtime and Wasmer that allow WebAssembly, and code written in languages such as AssemblyScript that can compile to it, to run in non-Web environments as well.
(As of July 2022) more than 12,000 projects hosted on GitHub are written, either wholly or partially, in AssemblyScript, with roughly 18,000 downloads of the AssemblyScript compiler per week via npm.
In 2021, Webpack started using AssemblyScript to speed up the calculation of hash functions such as xxhash and md4 sources. This also made it possible to get rid of native dependencies.
Lead Emscripten developer Alon Zakai has characterized AssemblyScript as being “designed with WebAssembly and code size in mind. It’s not an existing language that we are using for a new purpose, but it’s a language designed for WebAssembly. It has great
wasm-opt integration—in fact, it’s built with it—and it’s very easy to get good code size.”
Norwegian musician Peter Salomonsen, in a 2020 WebAssembly Summit talk titled, “WebAssembly Music,” demonstrated the use of AssemblyScript for real-time compilation to WebAssembly in live electronic music synthesis, saying, “I chose AssemblyScript because it has high-level readability and low-level control; it’s like a high-level language, but you get that low-level feeling, and you can even write direct WebAssembly intrinsics if you want to.”
Aaron Turner, a senior engineer at Fastly, a cloud computing services provider that uses WebAssembly for the company’s Compute@Edge serverless compute environment, in a review of AssemblyScript wrote:
However, Turner went on to cite the language’s relative newness and thus its lack of some features available in larger, more complex and established programming languages as potential but temporary shortcomings of the language.
- The AssemblyScript Project (2020-04-24). "AssemblyScript Working Group". AssemblyScript Project. https://github.com/AssemblyScript/working-group. "Daniel Wirtz (@dcodeIO) - Author of AssemblyScript"
- The AssemblyScript Project (2017). "assemblyscript 0.1.0". AssemblyScript Project. https://www.npmjs.com/package/assemblyscript/v/0.1.0.
- The AssemblyScript Project (2022-08-21). "assemblyscript". The AssemblyScript Project. https://www.npmjs.com/package/assemblyscript.
- The AssemblyScript Project (2017-09-29). "LICENSE". The AssemblyScript Project. https://github.com/AssemblyScript/assemblyscript/blob/master/LICENSE. "AssemblyScript/assemblyscript is licensed under the Apache License 2.0"
- The AssemblyScript Project. "The AssemblyScript Project". The AssemblyScript Project. https://github.com/AssemblyScript.
- WebAssembly Community Group (November 2017). "Roadmap". WebAssembly Community Group. https://webassembly.org/roadmap/.
- WebAssembly Working Group. "WebAssembly". WebAssembly Working Group. https://webassembly.org/.
- Alon Zakai and Emscripten Contributors. "Emscripten". Emscripten project. https://emscripten.org/.
- The AssemblyScript Project. "Types". The AssemblyScript Project. https://www.assemblyscript.org/types.html.
- The AssemblyScript Project. "Environment". The AssemblyScript Project. https://www.assemblyscript.org/environment.html.
- The Wasmtime Project. "WASI: The WebAssembly System Interface". The Wasmtime Project. https://wasi.dev/.
- The Wasmtime Project. "Wasmtime: A small and efficient runtime for WebAssembly & WASI". The Wasmtime Project. https://wasmtime.dev/.
- Wasmer, Inc.. "Wasmer: The Universal WebAssembly Runtime". Wasmer, Inc.. https://wasmer.io/.
- Mozilla Developer Network. "Loading and running WebAssembly code". Mozilla Developer Network. https://developer.mozilla.org/en-US/docs/WebAssembly/Loading_and_running.
- GitHub. "AssemblyScript/assemblyscript Dependency graph". GitHub. https://github.com/AssemblyScript/assemblyscript/network/dependents?package_id=UGFja2FnZS0xODY0NzM4NQ%3D%3D.
- npmjs. "assemblyscript Weekly Downloads". npmjs.com. https://www.npmjs.com/package/assemblyscript.
- "Resolve Error In Typescript". https://ittutoria.net/resolve-error-in-typescript-object-is-possibly-undefined/. Saturday, 7 May 2022
- Alon Zakai (2020-02-19). "Shipping Tiny WebAssembly Builds". WebAssembly-Summit.org. https://www.youtube.com/watch?v=_lLqZR4ufSI.
- Peter Salomonsen (2020-02-19). "WebAssembly Music". WebAssembly-Summit.org. https://www.youtube.com/watch?v=C8j_ieOm4vE.
- Aaron Turner (2020-10-29). "Meet AssemblyScript: your next computing language". Fastly. https://www.fastly.com/blog/meet-assemblyscript-your-next-computing-language.
- AssemblyScript.org (official site)
- AssemblyScript documentation (project page)
- The AssemblyScript Project (on GitHub)
- assemblyscript (on npm)
Original source: https://en.wikipedia.org/wiki/AssemblyScript. Read more