forked from GNOME/glib
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeno.json
More file actions
76 lines (76 loc) · 5.13 KB
/
deno.json
File metadata and controls
76 lines (76 loc) · 5.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
{
"name": "@discere-os/glib.wasm",
"version": "2.78.1",
"description": "High-performance GLib foundation library with WebAssembly, SIMD optimizations, and TypeScript-first API",
"exports": {
".": "./src/lib/index.ts",
"./types": "./src/lib/types.ts",
"./side": "./install/wasm/glib-side.wasm",
"./main": "./install/wasm/glib-main.js"
},
"imports": {
"@std/assert": "jsr:@std/assert@^1.0.14",
"@std/testing": "jsr:@std/testing@^1.0.0",
"@std/async": "jsr:@std/async@^1.0.5",
"module": "data:application/javascript,export const createRequire = () => (id) => { if (id === 'path') return { dirname: () => '', join: (...args) => args.join('/') }; if (id === 'url') return { fileURLToPath: (url) => url.replace('file://', '') }; if (id === 'fs') return { readFileSync: () => { throw new Error('fs not supported'); } }; throw new Error(`Module ${id} not found`); }; export default { createRequire };",
"path": "data:application/javascript,export const dirname = () => ''; export const join = (...args) => args.join('/'); export default { dirname, join };",
"url": "data:application/javascript,export const fileURLToPath = (url) => url.replace('file://', ''); export default { fileURLToPath };",
"fs": "data:application/javascript,export const readFileSync = () => { throw new Error('fs not supported'); }; export default { readFileSync };",
"os": "data:application/javascript,export const platform = () => 'browser'; export const arch = () => 'wasm32'; export default { platform, arch };"
},
"tasks": {
"demo": "deno run --allow-read --allow-write demo-deno.ts",
"demo:threading": "deno run --allow-read --allow-write demo-threading.ts",
"demo:filesystem": "deno run --allow-read --allow-write demo-filesystem.ts",
"test": "deno test --allow-read --allow-write --no-check tests/deno/",
"test:basic": "deno test --allow-read --allow-write --no-check tests/deno/basic.test.ts",
"test:threading": "deno test --allow-read --allow-write --no-check tests/deno/threading.test.ts",
"test:gobject": "deno test --allow-read --allow-write --no-check tests/deno/gobject.test.ts",
"benchmark": "deno run --allow-read --allow-write bench/glib.bench.ts",
"benchmark:threads": "deno run --allow-read --allow-write bench/threads.bench.ts",
"benchmark:collections": "deno run --allow-read --allow-write bench/collections.bench.ts",
"build": "deno task build:wasm && deno task build:types",
"build:wasm": "deno task build:wasm",
"build:types": "deno run --allow-read --allow-write scripts/build-types.ts",
"build:side": "deno task build:side",
"build:main": "deno task build:main",
"build:main": "PKG_CONFIG_PATH=$PWD/../libffi.wasm/install/wasm/pkgconfig meson setup build-main --cross-file=scripts/emscripten.cross -Ddefault_library=static -Dxattr=false -Dtests=false --force-fallback-for=libpcre2-8 -Dbuildtype=release --prefix=$PWD/install -Dlibdir=wasm -Dbindir=wasm && meson compile -C build-main glib-main && mkdir -p install/wasm && cp build-main/wasm/glib-main.js build-main/wasm/glib-main.wasm install/wasm/",
"build:side": "PKG_CONFIG_PATH=$PWD/../libffi.wasm/install/wasm/pkgconfig meson setup build-side --cross-file=scripts/emscripten.cross -Ddefault_library=static -Dxattr=false -Dtests=false --force-fallback-for=libpcre2-8 -Dbuildtype=release --prefix=$PWD/install -Dlibdir=wasm -Dbindir=wasm && meson compile -C build-side glib-side && mkdir -p install/wasm && cp build-side/wasm/glib-side.so install/wasm/glib-side.wasm",
"build:wasm": "deno task build:main && deno task build:side && deno task manifest",
"manifest": "deno run --allow-read --allow-write --allow-run ../../../../scripts/generate-wasm-manifest.ts .",
"build:npm": "deno run --allow-all _build_npm.ts",
"build:all": "deno task build:wasm && deno task build:npm",
"build:docs": "deno doc --html --name=\"GLib.wasm\" src/lib/index.ts",
"publish:npm": "deno task build:all && cd npm && npm publish",
"publish:dry": "deno task build:all && cd npm && npm publish --dry-run",
"clean": "rm -rf build-* dist/ install/ npm/ && echo '✅ Cleaned all build artifacts'",
"check": "deno check src/lib/index.ts",
"check:all": "deno check src/lib/index.ts && deno check demo-deno.ts && deno check bench/glib.bench.ts && deno check _build_npm.ts"
},
"compilerOptions": {
"lib": ["deno.ns", "dom", "es2022", "deno.unstable", "webworker"],
"strict": true,
"allowUnreachableCode": false,
"allowUnusedLabels": false,
"exactOptionalPropertyTypes": true,
"noFallthroughCasesInSwitch": true,
"noImplicitOverride": true,
"noImplicitReturns": true,
"noPropertyAccessFromIndexSignature": true,
"noUncheckedIndexedAccess": true,
"noUnusedLocals": true,
"noUnusedParameters": true
},
"fmt": {
"include": ["src/", "tests/", "demo*.ts", "bench/", "scripts/"],
"exclude": ["dist/", "build*/", "install/", "npm/", "node_modules/"]
},
"lint": {
"include": ["src/", "tests/", "demo*.ts", "bench/", "scripts/"],
"exclude": ["dist/", "build*/", "install/", "npm/", "node_modules/"]
},
"test": {
"include": ["tests/deno/"],
"exclude": ["tests/unit/", "node_modules/"]
}
}