Read the LICENSE first.
Running GacUI in browsers with WebAssembly is GacJS's primary purpose and most important feature. The current demos load the GacUI C++ core as a .wasm file in a browser worker, render its UI with HTML5, and can implement its view model in TypeScript.
Both the HTML5 renderer and the TypeScript view-model host connect to the core through exposed WebAssembly functions and callbacks. This reuses GacUI Remote Protocol for rendering and Workflow RPC for view models. WebAssembly and HTTP are alternative transports for those channels; HTTP support primarily makes it possible to test HTML5 rendering without building WebAssembly.
| Area | Document |
|---|---|
| Architecture | Project Structure |
| WebAssembly demos | Running the Wasm Demos on Linux |
| Network transport and handshakes | GacJS Network Protocol |
| Remote Protocol | GacUI Remote Protocol Reference |
| Rendering | GacUI HTML DOM Rendering |
| Rich text | DocumentParagraph Implementation |
| E2E testing | Testing the Remote Protocol with Playwright |
| Snapshot testing | Testing with Snapshots |
| Workflow RPC | Workflow Interface-Based RPC |
| Workflow RPC lifetime | Memory Management for Workflow RPC in TypeScript |
| Workflow RPC bindings | Generating TypeScript Bindings for Workflow RPC |
The root of test projects is in the Gaclib folder,
yarn build and you will get all files created to Gaclib\website\entry\lib\dist.
The existing demos run the core inside the browser. To prepare them on Linux:
- Build
WasmFCT,WasmRPT, andWasmRVMTin the sibling GacUI checkout. From eachGacUI/Test/Linux/<project>directory, run../../../.github/Ubuntu/build.sh -bw -o. - Build GacJS with
yarn buildfromGaclib. - From
Gaclib, run../copy-wasm.shto copy each demo's matchingapp.mjs,app.wasmandapp.worker.jsinto the website. Repeat this after every website build because that build cleans the output directory.
See the WebAssembly build guide for details. The website build does not compile or copy the WebAssembly binaries automatically.
From Gaclib/website/entry, start the website on port 8896:
npm run startOpen one of these pages:
| Page | Demo |
|---|---|
| FullControlTest | Control showcase |
| RemoteProtocolTest | Remote rendering features |
| RemoteViewModelTest | HTML5 rendering and a TypeScript view model connected to the WebAssembly core |
The website server supplies the module files and shared-memory headers; application traffic uses WebAssembly functions through the worker, without a separate HTTP core process. Press ENTER in the server terminal when you want to stop serving the website.
For testing the same HTML5 renderer against a native core, run RemotingTest_Core with /Http on Windows or /MiniHttp on Windows, Linux, or macOS. Start the website as above and open the HTTP renderer.
For a TypeScript view model over HTTP, run Core with /RVMT /Http or /RVMT /MiniHttp and open the renderer with a TypeScript host, without starting a separate view-model host.
You can start a local RemotingTest_Win32_Renderer with /Http, do something to the UI, and start the website, you can see the website take over the running UI on the fly.
A demo for rendering GacUI Unit Test with Snapshots





