Some thoughts on an initial stdlib to get things going

This commit is contained in:
dcodeIO
2017-12-07 04:37:14 +01:00
parent 325ecf5165
commit 59dafc8d22
25 changed files with 196 additions and 280 deletions

1
src/glue/js.d.ts vendored
View File

@ -14,6 +14,7 @@ declare type bool = boolean;
// Raw memory access (here: Binaryen memory)
declare function store<T = u8>(ptr: usize, val: T): void;
declare function load<T = u8>(ptr: usize): T;
declare function assert(isTrue: bool): void;
// Other things that might or might not be useful
declare function select<T>(ifTrue: T, ifFalse: T, condition: bool): T;