warpo 2.0.0-beta-1
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/LICENSE +201 -0
- package/README.md +39 -0
- package/assemblyscript/std/assembly/index.d.ts +2713 -0
- package/assemblyscript/tsconfig-base.json +14 -0
- package/dist/warpo.js +38 -0
- package/package.json +44 -0
- package/tsconfig-warpo.json +13 -0
- package/types/warpo/index.d.ts +10 -0
- package/types/warpo/package.json +3 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"strict": true,
|
|
4
|
+
"alwaysStrict": true,
|
|
5
|
+
"noImplicitAny": true,
|
|
6
|
+
"noImplicitReturns": true,
|
|
7
|
+
"noImplicitThis": true,
|
|
8
|
+
"noEmitOnError": true,
|
|
9
|
+
"strictNullChecks": true,
|
|
10
|
+
"experimentalDecorators": true,
|
|
11
|
+
"preserveConstEnums": false,
|
|
12
|
+
"downlevelIteration": true
|
|
13
|
+
}
|
|
14
|
+
}
|
package/dist/warpo.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as os from "node:os";
|
|
2
|
+
import { execSync, spawn } from "node:child_process";
|
|
3
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
4
|
+
import { join } from "node:path";
|
|
5
|
+
var dirname = import.meta.dirname;
|
|
6
|
+
function download_url(version, arch, platform) {
|
|
7
|
+
if ((platform === "linux" && arch === "x86_64") || (platform === "macos" && arch === "arm64")) {
|
|
8
|
+
return "https://github.com/wasm-ecosystem/warpo/releases/download/".concat(version, "/warpo-").concat(version, "-").concat(platform, "-").concat(arch, ".tar.gz");
|
|
9
|
+
}
|
|
10
|
+
console.log("there is no precompiled binary for ".concat(version, " + ").concat(platform, " + ").concat(arch, ", please compile from source."));
|
|
11
|
+
process.exit(1);
|
|
12
|
+
}
|
|
13
|
+
function get_binary() {
|
|
14
|
+
if (process.env["WARPO_BINARY_PATH"]) {
|
|
15
|
+
return process.env["WARPO_BINARY_PATH"];
|
|
16
|
+
}
|
|
17
|
+
if (process.env["WARPO_FORCE_DOWNLOAD"] !== "1" && existsSync(join(dirname, "warpo"))) {
|
|
18
|
+
return join(dirname, "warpo", "warpo_asc");
|
|
19
|
+
}
|
|
20
|
+
var version = process.env["WARPO_DOWNLOAD_VERSION"] ||
|
|
21
|
+
JSON.parse(readFileSync(join(dirname, "..", "package.json"), "utf8")).version;
|
|
22
|
+
var platform = os.platform();
|
|
23
|
+
if (platform === "darwin")
|
|
24
|
+
platform = "macos";
|
|
25
|
+
var url = download_url(version, os.arch(), platform);
|
|
26
|
+
console.log("downloading warpo from ".concat(url));
|
|
27
|
+
execSync("curl -L ".concat(url, " | tar xz -C ").concat(dirname), { stdio: "inherit" });
|
|
28
|
+
return join(dirname, "warpo", "warpo_asc");
|
|
29
|
+
}
|
|
30
|
+
var binary = get_binary();
|
|
31
|
+
var ps = spawn(binary, process.argv.slice(2), { stdio: "inherit" });
|
|
32
|
+
function shutdown() {
|
|
33
|
+
ps.kill("SIGTERM");
|
|
34
|
+
process.exit();
|
|
35
|
+
}
|
|
36
|
+
process.on("SIGINT", shutdown);
|
|
37
|
+
process.on("SIGTERM", shutdown);
|
|
38
|
+
ps.on("close", function (e) { return process.exit(e); });
|
package/package.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "warpo",
|
|
3
|
+
"version": "2.0.0-beta-1",
|
|
4
|
+
"description": "next generation AssemblyScript compiler with optimizations",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"warpo": "dist/warpo.js"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"build:ts": "tsc -p tools/scripts/tsconfig.json",
|
|
11
|
+
"build:cpp": "cmake -S . -B build && cmake --build build --parallel",
|
|
12
|
+
"build": "npm run build:ts && npm run build:cpp",
|
|
13
|
+
"test:ut": "./build/passes/warpo_passes_test && ./build/support/warpo_support_test",
|
|
14
|
+
"test:as:snapshot": "./build/tests/frontend/warpo_frontend_test",
|
|
15
|
+
"test:opt:snapshot": "node tests/snapshot_diff/index.mjs",
|
|
16
|
+
"test:bootstrap:debug": "./tests/bootstrap/debug.sh",
|
|
17
|
+
"test:bootstrap:release": "./tests/bootstrap/release.sh",
|
|
18
|
+
"test": "npm run test:ut && npm run test:as:snapshot && npm run test:opt:snapshot && npm run test:bootstrap:debug && npm run test:bootstrap:release",
|
|
19
|
+
"docs:dev": "vitepress dev docs",
|
|
20
|
+
"docs:build": "vitepress build docs"
|
|
21
|
+
},
|
|
22
|
+
"license": "Apache-2.0",
|
|
23
|
+
"keywords": [
|
|
24
|
+
"assemblyscript",
|
|
25
|
+
"wasm",
|
|
26
|
+
"webassembly",
|
|
27
|
+
"compiler"
|
|
28
|
+
],
|
|
29
|
+
"author": "congcong.cai@bmw.com",
|
|
30
|
+
"files": [
|
|
31
|
+
"dist",
|
|
32
|
+
"types",
|
|
33
|
+
"tsconfig-warpo.json",
|
|
34
|
+
"assemblyscript/tsconfig-base.json",
|
|
35
|
+
"assemblyscript/std/assembly/index.d.ts"
|
|
36
|
+
],
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@types/node": "^22.15.21",
|
|
39
|
+
"assemblyscript": "^0.28.4",
|
|
40
|
+
"diff": "^7.0.0",
|
|
41
|
+
"typescript": "^5.8.3",
|
|
42
|
+
"vitepress": "^1.6.3"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "./assemblyscript/tsconfig-base.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"target": "esnext",
|
|
5
|
+
"module": "commonjs",
|
|
6
|
+
"noLib": true,
|
|
7
|
+
"allowJs": false,
|
|
8
|
+
"typeRoots": ["types"],
|
|
9
|
+
"types": ["warpo"],
|
|
10
|
+
"baseUrl": ".",
|
|
11
|
+
"paths": { "*": ["./assembly/*"] }
|
|
12
|
+
}
|
|
13
|
+
}
|