Files
MosisDesigner/CLAUDE.md
2026-01-15 21:43:17 +01:00

1.6 KiB

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

Mosis Designer is a Windows desktop application for previewing RML/RCSS files using the RmlUi library. It provides live reloading when files change in the assets directory.

Build Commands

# Configure the build (requires vcpkg toolchain for dependencies)
cmake -B build -DCMAKE_TOOLCHAIN_FILE=D:/vcpkg/scripts/buildsystems/vcpkg.cmake

# Build debug
cmake --build build --config Debug

# Build release
cmake --build build --config Release

# Build with parallel jobs
cmake --build build --parallel 4

Running the Application

# Run with an RML file
./build/Debug/mosis-designer.exe assets/demo.rml

The application watches the parent directory of the loaded file for changes and automatically reloads.

Architecture

Single-file C++23 application (main.cpp) that:

  • Uses RmlUi for rendering HTML/CSS-like markup (RML/RCSS)
  • Uses RmlUi Lua bindings for scripting support in RML documents
  • Uses GLFW + OpenGL 3 backend from RmlUi
  • Windows-specific file watching via FindFirstChangeNotification
  • Automatically loads all .ttf fonts from the RML file's directory

Dependencies

  • RmlUi: Fetched via CMake FetchContent from GitHub (with Lua bindings enabled)
  • GLFW3: Via vcpkg
  • FreeType: Via vcpkg
  • Lua: Via vcpkg (5.4.x)

Code Style

  • C++23 standard
  • 4 spaces indentation
  • snake_case for variables, camelCase for functions/classes
  • UPPER_CASE for constants and enums
  • Early returns preferred over nested conditionals
  • Smart pointers over raw pointers