2
2
Fork
You've already forked MeshulaLab
1
a framework that makes all the meshula Lab projects available via a single apparatus.
  • C++ 48.5%
  • C 45.9%
  • Objective-C 1.8%
  • Objective-C++ 1.7%
  • CMake 1.3%
  • Other 0.5%
2026年07月02日 15:02:25 -07:00
attic Rename LabRaven consistently to MeshulaLab 2026年05月09日 15:06:27 -07:00
cmake Add FilesSystem provider 2026年06月05日 22:20:19 -07:00
docs Construct Activity/Studio/Provider from C structs only 2026年05月15日 12:06:15 -07:00
examples Construct Activity/Studio/Provider from C structs only 2026年05月15日 12:06:15 -07:00
ext port font studio to labgl_font, update camera to chording 2026年06月30日 08:41:43 -07:00
resources Rename LabRaven consistently to MeshulaLab 2026年05月09日 15:06:27 -07:00
scripts Rename LabRaven consistently to MeshulaLab 2026年05月09日 15:06:27 -07:00
src improve callout API 2026年07月02日 15:02:25 -07:00
tests Implement Selection Provider 2026年06月05日 08:15:19 -07:00
.gitattributes Initial commit: Phase 1 - Repository setup 2025年11月28日 16:20:05 -08:00
.gitignore Port to LabCmd2, wrap Camera and Color with commands 2026年05月31日 19:08:14 -07:00
CMakeLists.txt Update build for shared labgl/imgui 2026年05月15日 23:36:16 -07:00
CMakePresets.json Phase 3 complete: Build system and platform support 2025年11月28日 16:46:15 -08:00
LICENSE.txt BSD License 2025年12月03日 22:55:55 -08:00
README.md Rename LabRaven consistently to MeshulaLab 2026年05月09日 15:06:27 -07:00

MeshulaLab Framework

Application framework using a Studio-Activity-Provider architecture pattern.

MeshulaLab enables developers to build modular, composable applications with clean separation of concerns, event-driven programming, and comprehensive undo/redo support.

Features

  • Studio-Activity-Provider Architecture - Modular design with clear separation between workspace configuration (Studios), UI/functionality (Activities), and data/services (Providers)
  • Cross-Platform - Supports macOS, iOS, Windows, Linux, and WebAssembly via Emscripten
  • Event-Driven - CSP (Communicating Sequential Processes) engine for reactive programming
  • Transaction System - Built-in undo/redo with journaling
  • Immediate Mode UI - Built on Dear ImGui for rapid development
  • Hot-Reloadable Plugins - Dynamic plugin system with C ABI

Architecture

MeshulaLab uses a Studio-Activity-Provider pattern:

  • Studios - Workspace configurations that define which Activities and Providers are active
  • Activities - Discrete, composable UI/functionality modules
  • Providers - Singleton services that supply data and functionality
  • Orchestrator - Central coordinator managing lifecycle and dependencies
┌─────────────────────────────────────────────────┐
│ Studios │ ← Workspace Configurations
├─────────────────────────────────────────────────┤
│ Activities │ ← UI/Functionality Modules
├─────────────────────────────────────────────────┤
│ Providers │ ← Data/Service Layer
├─────────────────────────────────────────────────┤
│ Orchestrator │ ← Core Coordination
├─────────────────────────────────────────────────┤
│ CSP Engine (ZeroMQ / Web Workers) │ ← Event System
├─────────────────────────────────────────────────┤
│ Transaction/Journal System │ ← Undo/Redo
├─────────────────────────────────────────────────┤
│ Platform Layer (RGFW / SDL2 / Native) │ ← OS/Graphics APIs
└─────────────────────────────────────────────────┘

Example: Minimal Application

#include "Core/App.h"#include "Core/StudioCore.hpp"#include "Studios/Minimal/MinimalStudio.hpp"
int main(int argc, char** argv) {
 MeshulaLab::App app;
 app.init();
 auto studio = std::make_unique<MinimalStudio>();
 app.loadStudio(std::move(studio));
 app.run();
 app.shutdown();
 return 0;
}

Quick Start

Prerequisites

  • CMake 3.20 or later
  • C++20 compatible compiler:
    • macOS: Xcode 13+ (Apple Clang)
    • Windows: Visual Studio 2022
    • Linux: GCC 11+ or Clang 13+
    • Emscripten: Latest emsdk

Build and Run

# Clone the repository
git clone https://codeberg.org/meshula/MeshulaLab.git
cd MeshulaLab
# Configure and build
mkdir build
cd build
cmake ..
cmake --build .
# Run the demo
./MeshulaLab

Quick Start Scripts

# Setup (first time only)
./scripts/setup.sh
# Build
./scripts/build.sh
# Run
./build/bin/Studiola

Platform-Specific Builds

macOS

cmake -B build
cmake --build build
./build/MeshulaLab.app/Contents/MacOS/MeshulaLab

iOS

cmake -B build-ios -G Xcode -DCMAKE_SYSTEM_NAME=iOS
open build-ios/MeshulaLab.xcodeproj

Windows

cmake -B build
cmake --build build --config Debug
.\build\Debug\MeshulaLab.exe

Linux

cmake -B build
cmake --build build
./build/MeshulaLab

WebAssembly (Emscripten)

# Setup Emscripten environment
source $EMSDK/emsdk_env.sh
# Configure for Emscripten
mkdir build-emsc
cd build-emsc
emcmake cmake .. -DCMAKE_BUILD_TYPE=Release
# Build an example
cmake --build . --target minimal-app
# Run in browser (auto-opens)
cd bin
python3 serve.py minimal-app.html
# Or use the convenience script
./run_minimal-app.sh

Available Emscripten Examples:

  • minimal-app - Full MeshulaLab app with AppMenu and Preferences
  • wasm-demo - Simple demo with interactive UI
  • MeshulaLabTests - Test suite (runs in browser console)

Note: The Emscripten build uses a lightweight Web Worker-based CSP implementation instead of ZeroMQ, maintaining the same API while working within browser constraints.

Documentation

Complete documentation is available in the docs/ directory:

Examples

The examples/ directory contains complete example projects:

Running Web Examples

All examples can be built for WebAssembly:

cd build-emsc
cmake --build . --target minimal-app
cd bin
python3 serve.py minimal-app.html

The server provides:

  • CORS headers for WebAssembly + SharedArrayBuffer
  • Auto-reload on file changes
  • Professional loading UI with progress indicator
  • Colored request logging

Project Structure

MeshulaLab/
├── src/
│ ├── Core/ # Core interfaces and orchestrator
│ ├── Platform/ # Platform abstraction
│ ├── UI/ # UI utilities
│ ├── Activities/ # Sample Activities
│ ├── Providers/ # Sample Providers
│ ├── Studiola/ # The main application
│ └── Studios/ # Sample Studios
├── ext/ # Third-party dependencies
├── examples/ # Example projects
├── tests/ # Unit and integration tests
└── docs/ # Documentation

Building From Source

CMake Options

option(MESHULALAB_BUILD_EXAMPLES "Build examples" ON)option(MESHULALAB_BUILD_TESTS "Build tests" ON)option(MESHULALAB_USE_SYSTEM_LIBS "Use system libraries when available" OFF)option(MESHULALAB_ENABLE_SCRIPTING "Enable scripting support (s7)" ON)

Example Build

cmake -B build \
 -DMESHULALAB_BUILD_EXAMPLES=ON \
 -DMESHULALAB_BUILD_TESTS=ON \
 -DCMAKE_BUILD_TYPE=Release
cmake --build build

Testing

# Build with tests
cmake -B build -DMESHULALAB_BUILD_TESTS=ON
cmake --build build
# Run tests
cd build
ctest

Dependencies

MeshulaLab includes the following vendored dependencies:

  • Dear ImGui (MIT) - Immediate mode GUI
  • ImPlot (MIT) - Plotting library (optional)
  • SDL2 (zlib) - Window/input management (Emscripten)
  • ZeroMQ (MPL-2.0) - Message passing (desktop only)
  • s7 Scheme (BSD) - Scripting (optional)
  • Clay (MIT) - immediate-mode UI layout library by Nic Barker

License: zlib

Library Structure:

  • MeshulaLabCore - UI-independent core library (orchestration, events, transactions)
  • MeshulaLabUI - UI utilities and custom widgets (depends on ImGui)
  • Activities, Studios, and Examples link to both Core and UI as needed

Platform-Specific:

  • Desktop builds use RGFW + ZeroMQ
  • Emscripten builds use SDL2 + Web Workers (no ZeroMQ)
  • All platforms share the same MeshulaLab API

See ext/README.md and resources/emscripten/README.md for complete dependency information.

Contributing

Contributions are welcome! Please read CONTRIBUTING.md for guidelines.

Development

# Format code
./scripts/format.sh
# Run tests
./scripts/test.sh

License

MeshulaLab is licensed under the BSD License. See LICENSE for details.

Third-party dependencies have their own licenses. See ext/README.md for details.

Credits

Created by Nick Porcino

Built with:

  • Dear ImGui by Omar Cornut
  • ImPlot by Evan Pezent
  • RGFW by ColleagueRiley
  • ZeroMQ by the ZeroMQ community
  • s7 Scheme by Bill Schottstaedt