Windows support for NativeScript allowing 100% access to Windows Runtime APIs and .NET APIs from JavaScript.
The workspace is split into the main runtime pieces:
metadata- WinRT/.NET metadata reading and declaration modeling.metadata-generator- reads.winmd,.dll,.exe,.nupkg, or directories and emits runtime metadata bundles.runtime- V8-based JavaScript runtime and WinRT interop.runtime-binding-gen- runtime-phase binding metadata support.nativescript- native library entry point used by template/demo apps.dotnet-bridge- .NET/C# dispatch bridge.sbg- static binding generator. js -> csdevtools/runtime-devtools- debugging and developer tooling.
Install these before building the full workspace:
- Windows 10 or Windows 11.
- Visual Studio 2022 or Build Tools for Visual Studio 2022 with:
- Desktop development with C++.
- MSVC v143 toolset.
- Windows 10/11 SDK.
- C++ CMake tools are useful for native dependency troubleshooting.
- Rust stable via
rustup. - Rust MSVC targets used by the native library build:
rustup target add x86_64-pc-windows-msvcrustup target add i686-pc-windows-msvcrustup target add aarch64-pc-windows-msvc
- .NET SDK, currently needed for the C# bridge, tests, demo apps, and template projects.
- PowerShell 7+ (
pwsh) for the build scripts.
Open a Visual Studio Developer PowerShell when building native libraries so cl.exe
and the Windows SDK tools are on PATH.
Build the main workspace crates:
cargo build --workspaceBuild native nativescript.dll libraries and the runtime pipeline:
.\build.ps1 -Profile debug -NativeArch x64Build all native targets:
.\build.ps1 -Profile release -NativeArch allRun the SBG phase when you want generated static binding output:
.\build.ps1 -RunSBGRun Rust tests:
cargo test --workspaceRun .NET bridge tests:
dotnet test dotnet-bridge-tests\DotNetBridgeTests.csprojDevTools are part of the runtime story, not an optional afterthought. Use the
release-with-devtools profile when you need debugger/devtools symbols and runtime
tooling enabled:
.\build.ps1 -Profile release-with-devtools -NativeArch x64