From the repo root:
.\build.ps1The script:
- Delegates to
bun run build. - Runs
vcvars64.batwhen needed so MSVC + Ninja see the standard library correctly. - Configures with Ninja if
build/is missing, builds JS bundles, then builds CMake targets.
Requirements: Visual Studio 2022 (or compatible MSVC), CMake, Ninja, Bun.
Useful commands:
bun run fetch:depsbun run build:frameworkbun run build:examplebun run build
Copy .env.example to .env to override local build settings without changing tracked files.
Common keys:
VS_PATH: Visual Studio install root or directvcvars64.batpath.USE_PREBUILT:ONby default. Uses Skia/V8 prebuilts.FETCH_PREBUILT:ONby default. Downloads missing prebuilts during CMake configure.PREBUILT_DIR: defaults toexternal/prebuilt.SKIA_DIR,V8_DIR: default toexternal/prebuilt/skiaandexternal/prebuilt/v8.SKIA_URL,V8_URL: optional archive URL overrides.BUILD_DIR,CMAKE_BUILD_TYPE,CMAKE_GENERATOR,CMAKE_PATH: build tool overrides.FETCH_SUBMODULES,BUN_INSTALL_MODULES: dependency setup toggles forfetch:deps.
Downloaded on first configure if external/prebuilt/skia/lib/skia.lib (Windows) is missing. URL is defined in the root CMakeLists.txt.
Expected layout after download or manual copy:
external/prebuilt/v8/include/v8.hexternal/prebuilt/v8/lib/v8_monolith.lib
CMake sets /Zc:__cplusplus on MSVC so V8’s C++20 check matches -std:c++20.
If an archive was extracted one level too high (external/prebuilt/include, lib, …), the CMake logic can move those folders under external/prebuilt/v8 once.
| Target | Artifact |
|---|---|
SphereKit_Foundation |
SphereKit.Foundation.dll |
SphereKit_GraphicInterface |
SphereKit.GraphicInterface.dll |
SphereKit_GraphicComponent |
SphereKit.GraphicComponent.dll |
SphereKit_JavaScriptEngine |
SphereKit.JavaScriptEngine.dll |
Sphere_React |
Sphere.React.dll |
Sphere_Vue |
SphereKit.Vue.dll |
SphereKit_DirectAudioEngine |
SphereKit.DirectAudioEngine.dll (Windows) |
ReactUIDemo |
ReactUIDemo.exe (example) |
VueUIDemo |
VueUIDemo.exe (example) |
MikoUI is an INTERFACE library (headers + link dependencies only).
Workflow: .github/workflows/build.yml
- OS:
windows-latest - Caches
external/prebuilt/skiaandexternal/prebuilt/v8keyed onhashFiles('CMakeLists.txt') - Builds the core DLLs plus the supported UI paths: native C++ nodes, JS/React, and JS/Vue
- Uploads SphereKit-SDK and SphereKit-Examples artifacts