@holoscript/compiler 1.0.0
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 +21 -0
- package/README.md +58 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/package.json +47 -0
- package/src/index.ts +11 -0
- package/tsconfig.json +5 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025-2026 HoloScript Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# @holoscript/compiler
|
|
2
|
+
|
|
3
|
+
> Standalone HoloScript compiler — `.hsplus` to platform-specific code.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
The compiler package provides standalone compilation from HoloScript source to platform-specific output. It wraps the compiler infrastructure from `@holoscript/core` into a focused, importable API.
|
|
8
|
+
|
|
9
|
+
## Supported Targets
|
|
10
|
+
|
|
11
|
+
| Target | Platform | Output |
|
|
12
|
+
|--------|----------|--------|
|
|
13
|
+
| `unity` | Unity Engine | C# scripts |
|
|
14
|
+
| `unreal` | Unreal Engine 5 | C++ / Blueprints |
|
|
15
|
+
| `godot` | Godot 4 | GDScript |
|
|
16
|
+
| `r3f` | React Three Fiber | JSX components |
|
|
17
|
+
| `babylon` | Babylon.js | TypeScript |
|
|
18
|
+
| `visionos` | Apple Vision Pro | Swift / RealityKit |
|
|
19
|
+
| `webgpu` | WebGPU | WGSL shaders |
|
|
20
|
+
| `wasm` | WebAssembly | WAT / binary |
|
|
21
|
+
| `openxr` | OpenXR | C++ / Khronos |
|
|
22
|
+
| `android-xr` | Android XR | Kotlin |
|
|
23
|
+
| `ios` | iOS / ARKit | Swift |
|
|
24
|
+
| `android` | Android / ARCore | Kotlin |
|
|
25
|
+
| `vrchat` | VRChat | Udon# |
|
|
26
|
+
| `urdf` | Robotics | URDF XML |
|
|
27
|
+
| `sdf` | Robotics | SDF XML |
|
|
28
|
+
| `dtdl` | Digital Twins | DTDL JSON |
|
|
29
|
+
| `usd` | Universal Scene | USD |
|
|
30
|
+
| `gltf` | 3D Interchange | glTF JSON |
|
|
31
|
+
|
|
32
|
+
## Usage
|
|
33
|
+
|
|
34
|
+
```typescript
|
|
35
|
+
import { compile } from '@holoscript/compiler';
|
|
36
|
+
|
|
37
|
+
const output = await compile('./scene.holo', { target: 'unity' });
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## CLI
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
holoscript compile scene.holo --target unity --output ./build/
|
|
44
|
+
holoscript compile agent.hsplus --target node --output ./dist/
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Adding a New Compiler Target
|
|
48
|
+
|
|
49
|
+
See [Contributing a New Compiler](../../docs/guides/contributing-new-compiler.md).
|
|
50
|
+
|
|
51
|
+
## Related
|
|
52
|
+
|
|
53
|
+
- [`@holoscript/core`](../core/) — Core compiler classes
|
|
54
|
+
- [`@holoscript/compiler-wasm`](../compiler-wasm/) — WASM-compiled compiler for browsers
|
|
55
|
+
|
|
56
|
+
## License
|
|
57
|
+
|
|
58
|
+
MIT
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@holoscript/core/compiler/index';
|
package/dist/index.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@holoscript/compiler",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "HoloScript compiler — 25 compile targets (Unity, Unreal, Godot, VisionOS, WASM, WebGPU, USD, glTF, etc.)",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "https://github.com/brianonbased-dev/HoloScript.git",
|
|
18
|
+
"directory": "packages/compiler"
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"@holoscript/core": "5.1.1",
|
|
22
|
+
"@holoscript/parser": "1.0.0",
|
|
23
|
+
"@holoscript/traits": "1.0.0"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"tsup": "^8.0.1",
|
|
27
|
+
"typescript": "~5.9.3",
|
|
28
|
+
"vitest": "^4.1.0"
|
|
29
|
+
},
|
|
30
|
+
"homepage": "https://github.com/brianonbased-dev/HoloScript#readme",
|
|
31
|
+
"bugs": {
|
|
32
|
+
"url": "https://github.com/brianonbased-dev/HoloScript/issues"
|
|
33
|
+
},
|
|
34
|
+
"author": "Brian X Base Team",
|
|
35
|
+
"keywords": [
|
|
36
|
+
"holoscript",
|
|
37
|
+
"xr",
|
|
38
|
+
"webxr",
|
|
39
|
+
"vr",
|
|
40
|
+
"ar",
|
|
41
|
+
"spatial-computing"
|
|
42
|
+
],
|
|
43
|
+
"scripts": {
|
|
44
|
+
"build": "tsup src/index.ts --format esm --dts",
|
|
45
|
+
"test": "vitest run"
|
|
46
|
+
}
|
|
47
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @holoscript/compiler — Multi-Target Compiler
|
|
3
|
+
*
|
|
4
|
+
* 25 compile targets: Unity, Unreal, Godot, VisionOS, VRChat,
|
|
5
|
+
* Babylon, PlayCanvas, R3F, WASM, WebGPU, URDF, DTDL, SDF, USD,
|
|
6
|
+
* glTF, Android, iOS, AndroidXR, etc.
|
|
7
|
+
*
|
|
8
|
+
* Source lives in @holoscript/core/src/compiler/ (212 files, 99K LOC).
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
export * from '@holoscript/core/compiler/index';
|