Getting Started
Quick start
The fastest way to create a new Strata SUI app:
curl -fsSL https://getstrata.sh/init | sh -s -- my-app
cd my-app
cmake -B build
cmake --build build
./build/my_app
This scaffolds a standalone project with CMakeLists.txt, strata.json, theme.json, SUI sources, and a C entry point.
FetchContent setup
Add Strata to any CMake project using FetchContent:
cmake_minimum_required(VERSION 3.20)
project(my_app LANGUAGES C CXX)
include(FetchContent)
# Set strata options BEFORE FetchContent_MakeAvailable
set(SV2_ENABLE_SUI ON CACHE BOOL "" FORCE)
FetchContent_Declare(
strata_v2
GIT_REPOSITORY https://github.com/etherbound-dev/strata-v2.git
GIT_TAG main
)
FetchContent_MakeAvailable(strata_v2)
add_executable(my_app app/main.c)
target_link_libraries(my_app PRIVATE strata_v2_app)
Using a local checkout
For faster iteration during development, point SOURCE_DIR at a local clone:
FetchContent_Declare(
strata_v2
SOURCE_DIR /path/to/your/local/strata-v2
)
FetchContent_MakeAvailable(strata_v2)
Building from source
Clone and build the strata-v2 repo directly:
git clone https://github.com/etherbound-dev/strata-v2.git
cd strata-v2
cmake -B build -DCMAKE_BUILD_TYPE=Debug
cmake --build build
Running tests
# All tests
ctest --test-dir build --output-on-failure
# Unit tests only
./build/tests/unit/strata_v2_test_unit
# Visual tests (requires GPU)
./build/tests/visual/strata_v2_test_visual --require-gpu
Available link targets
When consuming Strata as a dependency, these CMake targets are available:
| Target | Description |
|---|---|
strata_v2_app | Main app target (SDL loop, windowing, full pipeline) |
strata_ui | UI tree, style, layout, events |
strata_render_tree | Immutable snapshot builder, stamps, hit testing |
strata_renderer_core | Compositor + rasterizer (SDL-free) |
strata_renderer_backend_sdl | SDL GPU backend |
strata_renderer_backend_mock | Mock GPU backend (for testing) |
strata_renderer | Interface target linking core + active backend |
strata_text | Font loading, text shaping, glyph caching |
strata_base | Foundation (hash, geometry, stamps) |
strata_anim | Spring physics, tweens, animation system |
strata_host | Shared host pipeline (layout/snapshot/render/input) |
strata_image | Image decoding |
strata_script | JS engine backends (requires SV2_ENABLE_SCRIPTING) |
strata_net | Networking/fetch (requires SV2_ENABLE_NET) |
sui_runtime | SUI DSL runtime (requires SV2_ENABLE_SUI) |
Next steps
- SUI Apps — build declarative UIs with the SUI DSL
- React Apps — use React and TypeScript
- Configuration —
strata.json,theme.json, and CMake options