-
-
Notifications
You must be signed in to change notification settings - Fork 670
Status and Roadmap
Max Graey edited this page Feb 23, 2019
·
167 revisions
Current state of development is tracked in GitHub projects.
- Most of TypeScript's AOT-compatible syntax is supported
- Manual memory management is in but GC remains to do
- Classes are still wonky when it comes to the details
- Standard library is very basic and needs a lot of work
- No exception support yet, waiting for WebAssembly/exception-handling to land
- We need more tests (pretty sure this will remain here)
- Get a memory manager and GC combo up and running
- Memory manager
- GC
- Get a standard library up that "just works" (where AOT-compatible)
- Improve linking, e.g. with C, based on what's supported by common tools
- Compile the AssemblyScript compiler to WebAssembly using itself
- Provide tools to automatically generate glue code and definitions
And, of course, keep up with the state of WebAssembly, most notably at this point:
Proposal | Phase | Status |
---|---|---|
Sign Extension Operations | standardize | --enable sign-extension |
Mutable Globals | standardize | --enable mutable-global |
Non-trapping float-to-int Conversions | standardize | |
Reference Types | implementation | |
Multi-value | implementation | |
Bulk Memory Operations | standardize | --enable bulk-memory |
SIMD | implementation | --enable simd |
Threads | implementation | |
Exception handling | proposal | |
Host Bindings | proposal | |
GC | proposal |
AssemblyScript comes with its own lightweight standard library that aims to be as compatible as it can get to what you'd expect in the browser. The following table outlines what's implemented already:
Feature | Notes | |
---|---|---|
NaN | ✓ | Context-sensitive (f32 in f32 context, otherwise f64) |
Infinity | ✓ | Context-sensitive (f32 in f32 context, otherwise f64) |
isFinite | ✓ | |
isNaN | ✓ | |
parseFloat | ✓ | Naive implementation |
parseInt | ✓ | |
decodeURI | ||
decodeURIComponent | ||
encodeURI | ||
encodeURIComponent | ||
There is no Number object in AssemblyScript, but one for each type instead. |
||
EPSILON | ✓ | |
MIN_VALUE | ✓ | |
MAX_VALUE | ✓ | |
MIN_NORMAL_VALUE | ✓ | AssemblyScript specific |
MIN_SAFE_INTEGER | ✓ | |
MAX_SAFE_INTEGER | ✓ | |
NaN | ✓ | |
NEGATIVE_INFINITY | ✓ | |
POSITIVE_INFINITY | ✓ | |
isFinite | ✓ | |
isInteger | ✓ | |
isNaN | ✓ | |
isSafeInteger | ✓ | |
parseFloat | ✓ | Naive implementation |
parseInt | ✓ | |
toExponential | ||
toFixed | ||
toLocaleString | ||
toPrecision | ||
toString | ✓ | |
length | ✓ | |
from | ||
isArray | ✓ | |
of | ||
concat | ✓ | |
copyWithin | ✓ | |
entries | ||
every | ✓ | No closures yet |
fill | ✓ | |
filter | ✓ | No closures yet |
find | ||
findIndex | ✓ | No closures yet |
flat | ||
flatMap | ||
forEach | ✓ | No closures yet |
includes | ✓ | |
indexOf | ✓ | |
join | ✓ | |
keys | ||
lastIndexOf | ✓ | |
map | ✓ | No closures yet |
pop | ✓ | |
push | ✓ | |
reduce | ✓ | No closures yet |
reduceRight | ✓ | No closures yet |
reverse | ✓ | |
shift | ✓ | |
slice | ✓ | |
some | ✓ | No closures yet |
sort | ✓ | |
splice | ✓ | Partially implement without inserting items |
toLocaleString | ||
toString | ✓ | |
unshift | ✓ | |
values | ||
[Symbol.iterator] | ||
BYTES_PER_ELEMENT | ✓ | |
buffer | ✓ | |
byteLength | ✓ | |
byteOffset | ✓ | |
length | ✓ | |
from | ||
of | ||
copyWithin | ||
entries | ||
every | ✓ | No closures yet |
fill | ✓ | |
filter | ||
find | ||
findIndex | ✓ | No closures yet |
forEach | ||
includes | ||
indexOf | ||
join | ||
keys | ||
lastIndexOf | ||
map | ✓ | No closures yet |
reduce | ✓ | No closures yet |
reduceRight | ✓ | No closures yet |
reverse | ||
set | ||
slice | ||
some | ✓ | No closures yet |
sort | ✓ | |
subarray | ✓ | |
toLocaleString | ||
toString | ||
values | ||
[Symbol.iterator] | ||
byteLength | ✓ | |
isView | ✓ | |
slice | ✓ | |
transfer | Stage 2 Proposal | |
toString | ✓ | |
✓ | ||
buffer | ✓ | |
byteLength | ✓ | |
byteOffset | ✓ | |
getInt8 | ✓ | |
getUint8 | ✓ | |
getInt16 | ✓ | |
getUint16 | ✓ | |
getInt32 | ✓ | |
getUint32 | ✓ | |
getInt64 | ✓ | AssemblyScript specific |
getUint64 | ✓ | AssemblyScript specific |
getFloat32 | ✓ | |
getFloat64 | ✓ | |
setInt8 | ✓ | |
setUint8 | ✓ | |
setInt16 | ✓ | |
setUint16 | ✓ | |
setInt32 | ✓ | |
setUint32 | ✓ | |
setInt64 | ✓ | AssemblyScript specific |
setUint64 | ✓ | AssemblyScript specific |
setFloat32 | ✓ | |
setFloat64 | ✓ | |
toString | ✓ | |
length | ✓ | |
lengthUTF8 | ✓ | AssemblyScript specific |
fromCharCode | ✓ | |
fromCharCodes | ✓ | AssemblyScript specific |
fromCodePoint | ✓ | |
fromCodePoints | ✓ | AssemblyScript specific |
fromUTF8 | ✓ | AssemblyScript specific |
charAt | ✓ | |
charCodeAt | ✓ | |
concat | ✓ | |
endsWith | ✓ | |
includes | ✓ | |
indexOf | ✓ | |
lastIndexOf | ✓ | |
localeCompare | ||
match | ||
normalize | ||
padEnd | ✓ | |
padStart | ✓ | |
repeat | ✓ | |
replace | ||
replaceAll | Stage 1 Proposal | |
search | ||
slice | ✓ | |
split | ✓ | |
startsWith | ✓ | |
substr | ✓ | |
substring | ✓ | |
toLocaleLowerCase | ||
toLocaleUpperCase | ||
toLowerCase | ||
toUpperCase | ||
toString | ✓ | |
toUTF8 | ✓ | AssemblyScript specific |
trim | ✓ | |
trimLeft/trimStart | ✓ | |
trimRight/trimEnd | ✓ | |
[Symbol.iterator] | ||
raw | ||
✓ | ||
for | ✓ | |
keyFor | ✓ | |
toString | ✓ | |
This also applies to specific Mathf (single float point) version of Math | ||
E | ✓ | |
LN10 | ✓ | |
LN2 | ✓ | |
LOG10E | ✓ | |
LOG2E | ✓ | |
PI | ✓ | |
SQRT1_2 | ✓ | |
SQRT2 | ✓ | |
abs | ✓ | |
acos | ✓ | |
acosh | ✓ | |
asin | ✓ | |
asinh | ✓ | |
atan | ✓ | |
atan2 | ✓ | |
atanh | ✓ | |
cbrt | ✓ | |
ceil | ✓ | |
clz32 | ✓ | |
cos | ||
cosh | ✓ | |
exp | ✓ | |
expm1 | ✓ | |
floor | ✓ | |
fround | ✓ | |
hypot | ✓ | |
imul | ✓ | |
log | ✓ | |
log10 | ✓ | |
log1p | ✓ | |
log2 | ✓ | |
max | ✓ | |
min | ✓ | |
pow | ✓ | |
random | ✓ | |
round | ✓ | |
sign | ✓ | |
signbit | ✓ | Stage 1 Proposal |
sin | ||
sincos | AssemblyScript specific | |
sinh | ✓ | |
sqrt | ✓ | |
tan | ||
tanh | ✓ | |
trunc | ✓ | |
size | ✓ | |
clear | ✓ | |
delete | ✓ | |
entries | ||
forEach | ||
get | ✓ | |
has | ✓ | |
set | ✓ | |
keys | ||
values | ||
toString | ✓ | |
[Symbol.iterator] | ||
size | ✓ | |
add | ✓ | |
clear | ✓ | |
delete | ✓ | |
difference | Stage 2 Proposal | |
entries | ||
forEach | ||
has | ✓ | |
intersection | Stage 2 Proposal | |
isDisjointFrom | Stage 2 Proposal | |
isSubsetOf | Stage 2 Proposal | |
isSupersetOf | Stage 2 Proposal | |
union | Stage 2 Proposal | |
symmetricDifference | Stage 2 Proposal | |
values | ||
toString | ✓ | |
[Symbol.iterator] | ||
delete | ||
get | ||
has | ||
set | ||
toString | ||
add | ||
delete | ||
has | ||
toString | ||
assert | ||
clear | ||
count | ||
countReset | ||
dir | ||
error | ||
group | ||
groupCollapsed | ||
groupEnd | ||
info | ||
log | ||
table | ||
time | ||
timeEnd | ||
trace | ||
warn | ||
parse | ||
stringify | ||
is | ||
keys | ||
assign | ||
create | ||
entries | ||
getOwnPropertyNames | ||
getOwnPropertySymbols | ||
toString | ||
values | ||
UTC | ✓ | |
now | ✓ | |
parse | ||
getDate | ||
getDay | ||
getFullYear | ||
getHours | ||
getMilliseconds | ||
getMinutes | ||
getMonth | ||
getSeconds | ||
getTime | ✓ | |
getTimezoneOffset | ||
getUTCDate | ||
getUTCDay | ||
getUTCFullYear | ||
getUTCHours | ||
getUTCMilliseconds | ||
getUTCMinutes | ||
getUTCMonth | ||
getUTCSeconds | ||
setDate | ||
setFullYear | ||
setHours | ||
setMilliseconds | ||
setMinutes | ||
setMonth | ||
setSeconds | ||
setTime | ✓ | |
setUTCDate | ||
setUTCFullYear | ||
setUTCHours | ||
setUTCMilliseconds | ||
setUTCMinutes | ||
setUTCMonth | ||
setUTCSeconds | ||
toDateString | ||
toISOString | ||
toJSON | ||
toLocaleDateString | ||
toLocaleString | ||
toLocaleTimeString | ||
toString | ||
toTimeString | ||
toUTCString | ||
message | ✓ | |
name | ✓ | |
stack | ||
toString | ✓ | |
collect | Iterator helpers proposal (Stage 1) | |
from | Iterator helpers proposal (Stage 1) | |
filter | Iterator helpers proposal (Stage 1) | |
of | Iterator helpers proposal (Stage 1) | |
map | Iterator helpers proposal (Stage 1) | |
next | ||
reduce | Iterator helpers proposal (Stage 1) | |
return | ||
take | Iterator helpers proposal (Stage 1) | |
throw | ||
all | ||
allSettled | Stage 2 | |
race | ||
reject | ||
resolve | ||
catch | ||
finally | ||
then | ||
$1-$9 | ||
input ($_) | ||
lastMatch ($&) | ||
lastParen ($+) | ||
lastIndex | ||
leftContext ($`) | ||
rightContext ($') | ||
flags | ||
global | ||
ignoreCase | ||
multiline | ||
source | ||
sticky | ||
unicode | ||
exec | ||
test | ||
toSource | ||
toString | ||
[Symbol.replace] | ||
[Symbol.search] | ||
[Symbol.split] | ||
add | ||
and | ||
compareExchange | ||
exchange | ||
isLockFree | ||
load | ||
notify | ||
or | ||
store | ||
sub | ||
wait | ||
wake | ||
xor | ||
const | ||
splat | ||
extract_lane(_u/_s) | ||
replace_lane | ||
shuffle | ||
add | ||
sub | ||
mul | ||
neg | ||
add_saturate_(u/s) | ||
sub_saturate_(u/s) | ||
shl | ||
shr_(u/s) | ||
and | ||
or | ||
xor | ||
not | ||
bitselect | ||
any_true | ||
all_true | ||
eq | ||
ne | ||
lt(_u/_s) | ||
le(_u/_s) | ||
gt(_u/_s) | ||
ge(_u/_s) | ||
load | ||
store | ||
abs | ||
min | ||
max | ||
div | Only f32x4/f64x2 | |
sqrt | Only f32x4/f64x2 | |
convert_(u/s) | ||
trunc_(u/s) |