Saturday, July 24, 2021

An Urgent Notice from AssemblyScript

URGENT NOTICE TO OUR USERS, STAKEHOLDERS AND SPONSORS

On August 3rd, the WebAssembly CG will poll on whether JavaScript string semantics/encoding are out of scope of the Interface Types proposal. This decision will likely be backed by Google (C++), Mozilla (Rust) and the Bytecode Alliance (WASI), who appear to have a common interest to exclusively promote C++, Rust respectively non-Web semantics and concepts in WebAssembly.

If the poll passes, which is likely, AssemblyScript will be severely impacted as the tools it has developed must be deprecated due to unresolvable correctness and security problems the decision imposes upon languages utilizing JavaScript-like 16-bit string semantics and its users.

It is our expectation that AssemblyScript's only viable way forward to guarantee data integrity will be to replace its dependency upon Interface Types with a dependency upon Reference Types and import its standard library from JavaScript. While the full impact cannot be known, this transition may either turn out to be too large in scope, or, if it can be done, is likely to impact users running AssemblyScript on WASI hosts like Wasmtime and Wasmer, in that neither the JavaScript standard library nor a GC will be available on these platforms. As a result, it would likely not be feasible anymore to utilize future versions of AssemblyScript on these platforms, and we would strongly recommend to avoid earlier versions since these will not be safe.

We believe that the resulting Web platform, programming language and security breakage, as well as the particularly unfortunate outcome for the AssemblyScript project, should be prevented, but after many years of dedicated yet futile efforts we also have to conclude that we are powerless against giants.

�hank you for your consideration

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!

#!runtime=stub
/** Calculates the n-th Fibonacci number. */
export function fib(n: i32): i32 {
  var a = 0, b = 1
  if (n > 0) {
    while (--n) {
      let t = a + b
      a = b
      b = t
    }
    return b
  }
  return a
}

#!html
<textarea id="output" style="height: 100%; width: 100%" readonly></textarea>
<script>
loader.instantiate(module_wasm, { /* imports */ })
  .then(({ exports }) => {
    const output = document.getElementById('output')
    for (let i = 0; i <= 10; ++i) {
      output.value += `fib(${i}) = ${exports.fib(i)}\n`
    }
  })
</script>

Why AssemblyScript?

Surma

“You are now able to write WebAssembly without learning a new language, and harness all these benefits WebAssembly might offer you. I think that is kind of powerful. AssemblyScript is absolutely usable, and very enjoyable!” – Surma, WebAssembly for Web Developers (Google I/O ’19)

Alon Zakai

“AssemblyScript is 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.” – Alon Zakai, Shipping Tiny WebAssembly Builds (WebAssembly Summit)

Peter Salomonsen

“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 directly write WebAssembly intrinsics if you want to.” – Peter Salomonsen, WebAssembly Music (WebAssembly Summit)

Join our Discord

If you have questions only a human can answer, would like to show others what you are working on or just want to hang out with other AssemblyScript folks, make sure to join our Discord server! There you'll find channels for #announcements, #help, and more.



from Hacker News https://ift.tt/2UaG5RW

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.