assemblyscript

A TypeScript-like language for WebAssembly.

APACHE-2.0 License

Downloads
6.5M
Stars
16.4K
Committers
69

Bot releases are hidden (Show)

assemblyscript - v0.19.18

Published by dcodeIO almost 3 years ago

New features

  • Make timeout and count optional for atomic.wait and atomic.notify (#2093)

Bug fixes

  • Don't assume LHS of binary overload has a valid type (#2098)
assemblyscript - v0.10.2

Published by dcodeIO over 4 years ago

From v0.10.2 onwards we are switching to automated semantic releases. This tag is otherwise identical to v0.10.1.

assemblyscript - v0.10.1

Published by dcodeIO over 4 years ago

New features

  • Added an experimental GC finalization hook to perform custom cleanup on free
  • Implemented radix argument on Number#toString
  • Allow disabling arbitrary globals with --use TheGlobal=
  • Emit a warning when exporting a generic element with no concrete instances
  • Implemented portable variants of TypedArray.wrap
  • Use node-like resolution instead of relative paths in asinit-generated tsconfigs, if possible
  • Updated Binaryen to latest incl. support for f32x4/f64x2.ceil/floor/trunc/nearest

Relevant fixes

  • Fixed Array#flat definitions
  • Improved error messages on unusual usages of void, null and undefined types
  • Fixed a resolver issue when calling function expressions
  • Disabled aggressive ARC optimizations due to a pending issue
  • Fixed a compiler issue when referencing variables in their own initializer
  • Fixed an assertion on accesses to variables that failed to compile earlier
  • Fixed Wasm module exports reference in asinit-generated index file
assemblyscript - v0.10.0

Published by dcodeIO over 4 years ago

Breaking changes

  • Added a seed import (along abort and trace) for seeding the random number generator
  • Arrays no longer inherit from ArrayBufferView, but are now distinct
  • The loader API now more closely aligns with the WebAssembly API
  • Various compiler API changes (i.e. decoupled the parser from the program)
  • Classes initialized from object literals can no longer define a constructor
  • Moved examples from the main repo to their own repo
  • Modules now become validated by default (disable with --noValidate, --validate is gone)
  • Reworked memory options (added --noExportMemory, --initialMemory, --maximumMemory, with --sharedMemory now being a boolean flag)
  • Renamed the --asmjsFile command line option to --jsFile (alias: -j)

Improvements

  • Simplified WASI integration via import "wasi" (implements abort, trace, seed)
  • Implemented virtual overloading and interfaces (consider this minimal viable)
  • Reworked optimization pass pipeline / more aggressive inlining
  • Added support for Binaryen's lowMemoryUnused feature
  • Added --lowMemoryLimit option for embedded scenarios with less than one page of memory
  • Added support for StaticArray to the loader
  • Non-MVP types are now always present to aid conditional compilation (i.e. same source, with and without SIMD)
  • Added Array<T>#flat
  • Updated stdlib to Unicode 13.0.0
  • Added a --yes option to asinit to accept all prompts
  • Added memory.data to explicitly create static memory segments
  • Expose setArgumentsLength (for varargs calls) only when required
  • Added v128.pmin<T>, v128.pmax<T>, v128.abs<T>, v128.bitmask<T> incl. their respective inline-assembler variants

Relevant fixes

  • Fixed column numbers in diagnostics being off by one
  • Made asc respect absolute output paths
  • Fixed various issues with object literal compilation
  • Fixed WASI struct sizes to match the specification
  • Fixed default export issues
assemblyscript - v0.9.4

Published by dcodeIO over 4 years ago

Relevant fixes

  • Fixed an unintended breaking compiler API change (affecting users of transforms).
assemblyscript - v0.9.3

Published by dcodeIO over 4 years ago

New features

  • Added StaticArray<T>, a more efficient array variant
  • Added support for context dependent sigma symbols to String#toLowerCase
  • Refactored the compiler so it can compile itself (binary is not yet runnable)
  • Added afterInitialize transform hook
  • Updated Binaryen to latest

Relevant fixes

  • Fixed various code generation, type propagation and resolver issues
assemblyscript -

Published by dcodeIO over 4 years ago

New features

  • Added a --tableBase CLI option (like --memoryBase, but for tables)
  • Added support for x instanceof GenericClass
  • Updated Binaryen to latest

Relevant fixes

  • Fixed null related edge cases when inferring array literals
  • Fixed several code generation issues
  • Aligned Map#set and Set#add with the spec, returning this
  • Fixed WASI import scheme to be wasi_snapshot_preview1
assemblyscript - v0.9.1

Published by dcodeIO over 4 years ago

Relevant fixes

  • Reverted exclusive use of the mutable __argumentsLength global introduced in 0.9.0 due to compatibility concerns with node < 12 and Safari. Exporting a __setArgumentsLength helper function for now. The loader has been updated to recognize both.

New features

  • Updated Binaryen to latest. Might be relevant for users of transforms, where the exact same version is required.
  • Command line options have been divided into categories to be easier to grasp, and documentation updated accordingly.
assemblyscript -

Published by dcodeIO over 4 years ago

Breaking changes

  • The explicit start function generated with --explicitStart has been renamed to _start (was __start) to match WASI.
  • The __setargc helper to set the number of arguments to a varargs call has been removed and replaced with an exported mutable global __argumentsLength. The loader has been updated accordingly.
  • For consistency, the loader's __getInt8Array etc. functions now copy, and new __getInt8ArrayView functions with the old behavior have been introduced.
  • The call_indirect builtin has been removed due to expected problems with closures.
  • Distribution files are now being built with ES2016 as the target, exposing ES classes instead of ES5 prototypes.

New features

  • Binaryen has AssemblyScript-specific optimization passes now targeting reference counting.
  • Optimization pass order is no longer inherited from Binaryen but has been customized to account for AS specifics.
  • Tables can now be exported using the --exportTable flag.
  • The implementations of the Math functions exp, exp2, log, log2 and pow have been replaced with faster variants.
  • New standard library functions: String#toUpperCase, String#toLowerCase, String#localeCompare. TypedArray#set
  • The stub runtime now exports the __reset helper to clear the heap externally.
  • Added support for the SIMD avgr_u family of instructions.
  • Updated the WASI implementation to wasi_snapshot (preview1).
  • The type of an array literal can now be inferred from its contents.
  • The compiler can now detect if the entire program is acyclic (no cyclic classes), omitting unnecessary parts of the GC in this case.

And, of course, lots of fixes.

assemblyscript - v0.8.1

Published by dcodeIO almost 5 years ago

  • Reduced release dependencies to a minimum: binaryen and long
  • Added support for the SIMD min_s, max_s, dot_i16x8_s family of instructions
  • Fixed validation error on closure usage, now emits a proper diagnostic instead
  • Fixed issues with scoped anyref typed locals
  • Fixed definition of TypedArray.wrap
  • Added support for node-like resolution of compiler transforms
  • Fixed out of bound issues on Array[index] sets
  • Updated math implementation to match latest musl fixes
  • Removed unnecessary / broken loader dependencies
assemblyscript - v0.8.0

Published by dcodeIO almost 5 years ago

Due to popular demand, this marks our first release of the standalone (non-prototype) compiler on npm.

assemblyscript - Pre-runtime

Published by dcodeIO over 5 years ago

This is the state before the new runtime functionality landed.