xbintsc 0.6.17 → 0.6.18
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/dist/src/cli/help.d.ts
CHANGED
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* It lives apart from the command dispatch so the executable entry point stays
|
|
5
5
|
* under the repository's per-file line budget; the text is data, not logic.
|
|
6
6
|
*/
|
|
7
|
-
export declare const HELP = "xbintsc 0.6.
|
|
7
|
+
export declare const HELP = "xbintsc 0.6.18 - TypeScript binary compiler\n\nUsage:\n xbintsc build <file.ts> [options] Compile to a native binary\n xbintsc run <file.ts> [-- args] Compile and execute\n xbintsc check <file.ts> Parse, bind and check without linking\n xbintsc watch <file.ts> [options] Rebuild whenever the source tree changes\n xbintsc emit <file.ts> Print LLVM IR\n xbintsc doctor Report the resolved toolchain\n xbintsc version Print the version\n xbintsc help Show this message\n\nOptions:\n -o, --output <path> Output path\n --out <dir> Output directory (default: build/)\n --emit <kind> exe | obj | ir (default: exe)\n -O0..-O3 Optimization level (default: -O2)\n --ext <names> Comma separated extensions (e.g. node,gui)\n --feature <names> Force optional link features on (media,gpu,images,shaping,webgl,all)\n --no-feature <n> Keep optional link features out even when detected\n --ext-native <m> Register a C++/Rust extension from a JSON manifest\n (comma separated for several)\n --config <path> Use a project config (default: auto-detect\n xbintsc.config.json)\n --no-config Do not read any project config\n --icon <path> Embed an application icon (PNG/ICO/ICNS)\n --bundle macOS: also produce a .app bundle\n --app-name <name> Bundle / display name\n --app-id <id> macOS bundle identifier (e.g. com.example.demo)\n --force Ignore the incremental cache\n --verbose Print progress information\n --time Print per-phase build timings\n --debug Emit debug info (DWARF/CodeView) and keep frame pointers\n --check Run the semantic checker (default)\n --no-check Skip the semantic checker; only erase type syntax\n --lto Compile program and runtime to LTO bitcode; link with lld\n --pgo-generate [dir] Build an instrumented binary writing profiles to dir\n --pgo-use [dir] Build with the profiles collected from --pgo-generate\n --json Print diagnostics as a JSON array on stdout\n --no-hints Do not append the \"hint: \u2026 see <doc>\" line to failures\n\nxbintsc compiles a subset of TypeScript to a native binary. Types are erased;\nonly inference-free facts (names, redeclarations, call arity) are checked.\nNode built-ins need --ext node, packages in node_modules are bundled at build\ntime, and clang 16+ is required to link.\n\nInstalled as a project dependency (npm):\n npx xbintsc doctor\n npx xbintsc build <entry.ts> --out build\n npx xbintsc run <entry.ts>\nThe first build compiles the C runtime; later builds reuse the cache.\n\nDocs: doc/ai/README.md (task guide) - doc/ai/language-support.md (subset) -\ndoc/ai/troubleshooting.md (failures) - llms.txt (index of every document).\nWhen installed from npm, these live under node_modules/xbintsc/doc/ and\nnode_modules/xbintsc/doc/npm-package.md is the project guide.\n";
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
* `main`/`master` only (see `.githooks/pre-commit`), so feature branches never
|
|
10
10
|
* change this line and merging two of them cannot conflict here.
|
|
11
11
|
*/
|
|
12
|
-
export const COMPILER_VERSION = "0.6.
|
|
12
|
+
export const COMPILER_VERSION = "0.6.18";
|
|
13
13
|
//# sourceMappingURL=version.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xbintsc",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.18",
|
|
4
4
|
"description": "xbintsc - a TypeScript binary compiler (TypeScript -> LLVM IR -> native binary)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -72,12 +72,12 @@
|
|
|
72
72
|
"vitest": "^2.1.8"
|
|
73
73
|
},
|
|
74
74
|
"optionalDependencies": {
|
|
75
|
-
"@xbintsc/linux-x64": "0.6.
|
|
76
|
-
"@xbintsc/linux-arm64": "0.6.
|
|
77
|
-
"@xbintsc/darwin-x64": "0.6.
|
|
78
|
-
"@xbintsc/darwin-arm64": "0.6.
|
|
79
|
-
"@xbintsc/win32-x64": "0.6.
|
|
80
|
-
"@xbintsc/win32-arm64": "0.6.
|
|
75
|
+
"@xbintsc/linux-x64": "0.6.18",
|
|
76
|
+
"@xbintsc/linux-arm64": "0.6.18",
|
|
77
|
+
"@xbintsc/darwin-x64": "0.6.18",
|
|
78
|
+
"@xbintsc/darwin-arm64": "0.6.18",
|
|
79
|
+
"@xbintsc/win32-x64": "0.6.18",
|
|
80
|
+
"@xbintsc/win32-arm64": "0.6.18"
|
|
81
81
|
},
|
|
82
82
|
"engines": {
|
|
83
83
|
"node": ">=22"
|
|
@@ -131,7 +131,11 @@ bool Convert::texture_format(const std::string &name, SDL_GPUTextureFormat *out)
|
|
|
131
131
|
{"rgba16uint", SDL_GPU_TEXTUREFORMAT_R16G16B16A16_UINT},
|
|
132
132
|
{"rgba16sint", SDL_GPU_TEXTUREFORMAT_R16G16B16A16_INT},
|
|
133
133
|
{"depth16unorm", SDL_GPU_TEXTUREFORMAT_D16_UNORM},
|
|
134
|
-
|
|
134
|
+
/* WebGPU's `depth24plus` is a promise format: the implementation picks a
|
|
135
|
+
* depth of at least 24 bits. Metal has no 24-bit-only depth format (its
|
|
136
|
+
* `D24_UNORM` is `MTLPixelFormatInvalid`), so use 32-bit float, which is
|
|
137
|
+
* ≥24 bits and supported by every backend (matching Dawn on Metal). */
|
|
138
|
+
{"depth24plus", SDL_GPU_TEXTUREFORMAT_D32_FLOAT},
|
|
135
139
|
{"depth24plus-stencil8", SDL_GPU_TEXTUREFORMAT_D24_UNORM_S8_UINT},
|
|
136
140
|
{"depth32float", SDL_GPU_TEXTUREFORMAT_D32_FLOAT},
|
|
137
141
|
{"depth32float-stencil8", SDL_GPU_TEXTUREFORMAT_D32_FLOAT_S8_UINT},
|
|
@@ -83,13 +83,17 @@ bool build_stage_code(Device &device, ShaderModule &module, const std::string &e
|
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
if (!create_shader) return true;
|
|
86
|
-
if (resources->format != SDL_GPU_SHADERFORMAT_SPIRV) {
|
|
87
|
-
*error = "graphics pipelines need SPIR-V on this backend";
|
|
88
|
-
return false;
|
|
89
|
-
}
|
|
90
86
|
SDL_GPUShaderCreateInfo info = {};
|
|
91
|
-
|
|
92
|
-
|
|
87
|
+
/* The device consumes MSL text on Metal and SPIR-V words on Vulkan; point
|
|
88
|
+
* `code` at whichever the backend asked for, exactly like the WebGL path.
|
|
89
|
+
* `entry` already holds the cross-compiled name on Metal. */
|
|
90
|
+
if (resources->format == SDL_GPU_SHADERFORMAT_MSL) {
|
|
91
|
+
info.code = reinterpret_cast<const Uint8 *>(resources->msl.data());
|
|
92
|
+
info.code_size = resources->msl.size();
|
|
93
|
+
} else {
|
|
94
|
+
info.code = reinterpret_cast<const Uint8 *>(resources->spirv.data());
|
|
95
|
+
info.code_size = resources->spirv.size() * sizeof(uint32_t);
|
|
96
|
+
}
|
|
93
97
|
info.entrypoint = resources->entry.c_str();
|
|
94
98
|
info.format = resources->format;
|
|
95
99
|
info.stage = stage == 1 ? SDL_GPU_SHADERSTAGE_FRAGMENT : SDL_GPU_SHADERSTAGE_VERTEX;
|
package/src/driver/version.ts
CHANGED