toilscript 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE +1 -1
- package/README.md +4 -39
- package/bin/{asinit.js → toilinit.js} +5 -5
- package/bin/{asc.js → toilscript.js} +1 -1
- package/dist/cli.d.ts +4 -0
- package/dist/{asc.generated.d.ts → cli.generated.d.ts} +15 -15
- package/dist/{asc.js → cli.js} +8 -8
- package/dist/cli.js.map +7 -0
- package/dist/importmap.json +2 -2
- package/dist/toilscript.generated.d.ts +15 -15
- package/dist/toilscript.js +2 -2
- package/dist/toilscript.js.map +1 -1
- package/dist/transform.d.ts +1 -1
- package/dist/web.js +3 -3
- package/package.json +16 -16
- package/std/README.md +2 -2
- package/std/assembly/index.d.ts +1 -1
- package/std/assembly/rt/README.md +2 -2
- package/std/assembly/rt.ts +1 -1
- package/std/portable/index.d.ts +1 -1
- package/util/README.md +1 -1
- package/dist/asc.d.ts +0 -4
- package/dist/asc.js.map +0 -7
package/dist/transform.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Transform } from "./
|
|
1
|
+
export { Transform } from "./cli";
|
package/dist/web.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
var ASSEMBLYSCRIPT_VERSION = "0.1.
|
|
1
|
+
var ASSEMBLYSCRIPT_VERSION = "0.1.2";
|
|
2
2
|
var ASSEMBLYSCRIPT_IMPORTMAP = {
|
|
3
3
|
"imports": {
|
|
4
|
-
"toilscript": "https://cdn.jsdelivr.net/npm/toilscript@0.1.
|
|
5
|
-
"toilscript/
|
|
4
|
+
"toilscript": "https://cdn.jsdelivr.net/npm/toilscript@0.1.2/dist/toilscript.js",
|
|
5
|
+
"toilscript/cli": "https://cdn.jsdelivr.net/npm/toilscript@0.1.2/dist/cli.js",
|
|
6
6
|
"binaryen": "https://cdn.jsdelivr.net/npm/binaryen@129.0.0-nightly.20260428/index.js",
|
|
7
7
|
"long": "https://cdn.jsdelivr.net/npm/long@5.3.2/index.js"
|
|
8
8
|
}
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"toilscript",
|
|
9
9
|
"wasm"
|
|
10
10
|
],
|
|
11
|
-
"version": "0.1.
|
|
11
|
+
"version": "0.1.2",
|
|
12
12
|
"author": "Daniel Wirtz <dcode+assemblyscript@dcode.io>",
|
|
13
13
|
"license": "Apache-2.0",
|
|
14
14
|
"homepage": "https://github.com/dacely-cloud/toilscript",
|
|
@@ -46,9 +46,9 @@
|
|
|
46
46
|
"import": "./dist/toilscript.js",
|
|
47
47
|
"types": "./dist/toilscript.d.ts"
|
|
48
48
|
},
|
|
49
|
-
"./
|
|
50
|
-
"import": "./dist/
|
|
51
|
-
"types": "./dist/
|
|
49
|
+
"./cli": {
|
|
50
|
+
"import": "./dist/cli.js",
|
|
51
|
+
"types": "./dist/cli.d.ts"
|
|
52
52
|
},
|
|
53
53
|
"./transform": {
|
|
54
54
|
"import": "./dist/transform.js",
|
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
}
|
|
69
69
|
},
|
|
70
70
|
"bin": {
|
|
71
|
-
"toilscript": "./bin/
|
|
72
|
-
"toilinit": "./bin/
|
|
71
|
+
"toilscript": "./bin/toilscript.js",
|
|
72
|
+
"toilinit": "./bin/toilinit.js"
|
|
73
73
|
},
|
|
74
74
|
"scripts": {
|
|
75
75
|
"check": "npm run check:config && npm run check:import && npm run lint",
|
|
@@ -80,23 +80,23 @@
|
|
|
80
80
|
"prepublishOnly": "node scripts/build",
|
|
81
81
|
"watch": "node scripts/build --watch",
|
|
82
82
|
"coverage": "npx c8 -- npm test",
|
|
83
|
-
"test": "npm run test:parser && npm run test:compiler -- --parallel && npm run test:browser && npm run test:
|
|
83
|
+
"test": "npm run test:parser && npm run test:compiler -- --parallel && npm run test:browser && npm run test:toilconfig && npm run test:transform && npm run test:cli",
|
|
84
84
|
"test:parser": "node --enable-source-maps tests/parser",
|
|
85
85
|
"test:compiler": "node --enable-source-maps --no-warnings tests/compiler",
|
|
86
86
|
"test:browser": "node --enable-source-maps tests/browser",
|
|
87
|
-
"test:
|
|
87
|
+
"test:toilconfig": "cd tests/toilconfig && npm run test",
|
|
88
88
|
"test:transform": "npm run test:transform:esm && npm run test:transform:cjs",
|
|
89
|
-
"test:transform:esm": "node bin/
|
|
90
|
-
"test:transform:cjs": "node bin/
|
|
89
|
+
"test:transform:esm": "node bin/toilscript tests/compiler/empty --transform ./tests/transform/index.js --noEmit && node bin/toilscript tests/compiler/empty --transform ./tests/transform/simple.js --noEmit",
|
|
90
|
+
"test:transform:cjs": "node bin/toilscript tests/compiler/empty --transform ./tests/transform/cjs/index.js --noEmit && node bin/toilscript tests/compiler/empty --transform ./tests/transform/cjs/simple.js --noEmit",
|
|
91
91
|
"test:cli": "node tests/cli/options.js",
|
|
92
92
|
"asbuild": "npm run asbuild:debug && npm run asbuild:release",
|
|
93
|
-
"asbuild:debug": "node bin/
|
|
94
|
-
"asbuild:release": "node bin/
|
|
95
|
-
"asbuild:rtraced": "node bin/
|
|
93
|
+
"asbuild:debug": "node bin/toilscript --config src/toilconfig.json --target debug",
|
|
94
|
+
"asbuild:release": "node bin/toilscript --config src/toilconfig.json --target release",
|
|
95
|
+
"asbuild:rtraced": "node bin/toilscript --config src/toilconfig.json --target rtraced",
|
|
96
96
|
"bootstrap": "npm run bootstrap:debug && npm run bootstrap:release",
|
|
97
|
-
"bootstrap:debug": "node bin/
|
|
98
|
-
"bootstrap:release": "node bin/
|
|
99
|
-
"bootstrap:rtraced": "node bin/
|
|
97
|
+
"bootstrap:debug": "node bin/toilscript --config src/toilconfig.json --target debug && node bin/toilscript --config src/toilconfig.json --target debug-bootstrap --wasm ./build/toilscript.debug.js && node bin/toilscript --config src/toilconfig.json --target debug-bootstrap --wasm ./build/toilscript.debug-bootstrap.js && git --no-pager diff --no-index build/toilscript.debug.wast build/toilscript.debug-bootstrap.wast",
|
|
98
|
+
"bootstrap:release": "node bin/toilscript --config src/toilconfig.json --target release && node bin/toilscript --config src/toilconfig.json --target release-bootstrap --wasm ./build/toilscript.release.js && node bin/toilscript --config src/toilconfig.json --target release-bootstrap --wasm ./build/toilscript.release-bootstrap.js && git --no-pager diff --no-index build/toilscript.release.wast build/toilscript.release-bootstrap.wast",
|
|
99
|
+
"bootstrap:rtraced": "node bin/toilscript --config src/toilconfig.json --target rtraced && node bin/toilscript --config src/toilconfig.json --target rtraced --wasm ./build/toilscript.rtraced.js"
|
|
100
100
|
},
|
|
101
101
|
"files": [
|
|
102
102
|
"bin/",
|
package/std/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Standard library
|
|
2
2
|
================
|
|
3
3
|
|
|
4
|
-
Standard library components for use with `tsc` (portable) and `
|
|
4
|
+
Standard library components for use with `tsc` (portable) and `toilscript` (assembly).
|
|
5
5
|
|
|
6
|
-
Base configurations (.json) and definition files (.d.ts) are relevant to `tsc` only and not used by `
|
|
6
|
+
Base configurations (.json) and definition files (.d.ts) are relevant to `tsc` only and not used by `toilscript`.
|
package/std/assembly/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
The
|
|
1
|
+
The ToilScript Runtime
|
|
2
2
|
==========================
|
|
3
3
|
|
|
4
4
|
The runtime provides the functionality necessary to dynamically allocate and deallocate memory of objects, arrays and buffers, as well as collect garbage that is no longer used. The current implementation is either a Two-Color Mark & Sweep (TCMS) garbage collector that must be called manually when the execution stack is unwound or an Incremental Tri-Color Mark & Sweep (ITCMS) garbage collector that is fully automated with a shadow stack, implemented on top of a Two-Level Segregate Fit (TLSF) memory manager. It's not designed to be the fastest of its kind, but intentionally focuses on simplicity and ease of integration until we can replace it with the real deal, i.e. Wasm GC.
|
|
@@ -80,4 +80,4 @@ STUB / `--runtime stub`
|
|
|
80
80
|
|
|
81
81
|
The stub is a maximally minimal runtime substitute, consisting of a simple and fast bump allocator with no means of freeing up memory again, except when freeing the respective most recently allocated object on top of the bump. Useful where memory is not a concern, and/or where it is sufficient to destroy the whole module including any potential garbage after execution.
|
|
82
82
|
|
|
83
|
-
See also: [Garbage collection](https://
|
|
83
|
+
See also: [Garbage collection](https://toil.org/garbage-collection.html)
|
package/std/assembly/rt.ts
CHANGED
|
@@ -55,7 +55,7 @@ export function __tostack(ptr: usize): usize {
|
|
|
55
55
|
return ptr;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
// These are provided by the respective implementation, included as another entry file by
|
|
58
|
+
// These are provided by the respective implementation, included as another entry file by toilscript:
|
|
59
59
|
|
|
60
60
|
// // @ts-ignore: decorator
|
|
61
61
|
// @builtin @unsafe
|
package/std/portable/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Environment definitions for compiling
|
|
2
|
+
* Environment definitions for compiling ToilScript to JavaScript using tsc.
|
|
3
3
|
*
|
|
4
4
|
* Note that semantic differences require additional explicit conversions for full compatibility.
|
|
5
5
|
* For example, when casting an i32 to an u8, doing `<u8>(someI32 & 0xff)` will yield the same
|
package/util/README.md
CHANGED
|
@@ -16,7 +16,7 @@ Various utility functions shared accross the codebase.
|
|
|
16
16
|
It is possible to reuse the utility in your own project like so:
|
|
17
17
|
|
|
18
18
|
```ts
|
|
19
|
-
import { ... } from "
|
|
19
|
+
import { ... } from "toilscript/util/terminal.js";
|
|
20
20
|
...
|
|
21
21
|
```
|
|
22
22
|
|
package/dist/asc.d.ts
DELETED