dymokomi/luce-demos
Small applications written in Luce, using the Luce Base luce-ui and luce-3d packages. Native compilation is the default. The standard library owns window, input and GPU backend resources; applications own their behavior.
A library written in luce. Latest release 0.4.4.
Install#
luc add dymokomi/luce-demosDocumentation#
Luce demos
Small applications written in Luce, using the Luce Base luce-ui and luce-3d packages. Native compilation is the default. The standard library owns window, input and GPU backend resources; applications own their behavior.
src/ui_demo.luc: a counter, a button and declarative stack layout. A retained connection calls the counter's boundincrementmethod.src/sphere.luc: a lit sphere and orbiting moon inside luce-ui'sSceneView, with pause/resume and reset controls.Application.on_framedrives animation.
Check out luce-base, luce, luce-ui, luce-3d and what they use alongside this repository, at main (python3 ../luce-base/tools/checkout_main.py . ../luce clones the missing ones). Build the compilers, then:
./build.sh
./build/ui
./build/sphere
Running the examples requires macOS with Metal. Their portable application and package code also compiles on Linux; native Vulkan presentation is future work. The --smoke argument closes each window after twelve frames.
./build.sh leaves just build/ui and build/sphere. To choose an optimization level or output directory, use `python3 tools/build.py --opt 3 --output-directory /path/to/output`. Dependencies are resolved through their manifests and public exports. Normal builds keep no generated Base source or staged dependencies.
luc test runs tests/interaction, the counter/pause/reset/animation handlers driven without a window, and tests/builds, which compiles both examples and checks that successful and failed builds leave nothing in the temporary directory. To see the windows themselves, run build/ui --smoke and build/sphere --smoke after ./build.sh (with MTL_DEBUG_LAYER=1 MTL_SHADER_VALIDATION=1 for Metal's validation on macOS).
The examples intentionally retain the language's current explicit try syntax. Error-handling ergonomics are a separate language design discussion, not a package-level exception suppression policy.
These are development examples with no compatibility promise before the first release. Licensed under MIT or Apache-2.0, at your option.
Windows x64
Run luc test as on the other hosts. For real windows and rendering, install the Vulkan SDK and start a fresh terminal with VULKAN_SDK set. Run python tools/build.py, then build/ui.exe --smoke or build/sphere.exe --smoke; they need an interactive desktop and Vulkan hardware.
Dependencies#
| Package | Version |
|---|---|
| dymokomi/luce-3d | newest |
| dymokomi/luce-std | newest |
| dymokomi/luce-ui | newest |
Versions#
0.4.4
Browse source · pack · commit 82812ff8219d
SHA-256 1437ad462e257cca9be941755356139ad10f74457ea19a3054697136014de9fe
luce-demos 0.4.4: batch release
0.4.3
Browse source · pack · commit fc41460c89a3
SHA-256 a4fed4fffb07bad4305034e2e21e99e2be2c75ecab9f184fe7b6e55083f48ae3
luce-demos 0.4.3: batch release
0.4.2
Browse source · pack · commit ef4fad9fd4a6
SHA-256 e0e741a8d675a3e030918b816ea4afbb40458c3168168893c6bce05b6135c989
luce-demos 0.4.2: batch release
0.4.1
Browse source · pack · commit c162ca6111fa
SHA-256 7dce153612d730c40eff2050452618ef3cd145b48399e34a67b0de880f7b3b92
dependencies name no version