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

When consuming Strata as a dependency, these CMake targets are available:

TargetDescription
strata_v2_appMain app target (SDL loop, windowing, full pipeline)
strata_uiUI tree, style, layout, events
strata_render_treeImmutable snapshot builder, stamps, hit testing
strata_renderer_coreCompositor + rasterizer (SDL-free)
strata_renderer_backend_sdlSDL GPU backend
strata_renderer_backend_mockMock GPU backend (for testing)
strata_rendererInterface target linking core + active backend
strata_textFont loading, text shaping, glyph caching
strata_baseFoundation (hash, geometry, stamps)
strata_animSpring physics, tweens, animation system
strata_hostShared host pipeline (layout/snapshot/render/input)
strata_imageImage decoding
strata_scriptJS engine backends (requires SV2_ENABLE_SCRIPTING)
strata_netNetworking/fetch (requires SV2_ENABLE_NET)
sui_runtimeSUI DSL runtime (requires SV2_ENABLE_SUI)

Next steps