Skip to content

Commit bb71862

Browse files
committed
Support LUMINO_BUILD_BASE_ONLY
1 parent b70cfa2 commit bb71862

File tree

16 files changed

+2627
-97
lines changed

16 files changed

+2627
-97
lines changed
Lines changed: 62 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,62 @@
1-
# CLAUDE.md
2-
3-
このファイルは、Claude Code (claude.ai/code) がこのリポジトリ内のコードを操作する際のガイダンスを提供します。
4-
5-
6-
## リポジトリアーキテクチャ
7-
8-
Lumino は、以下の主要なアーキテクチャレイヤーを備えたマルチプラットフォームゲームエンジンライブラリです。
9-
10-
### コアパッケージ構造
11-
- **LuminoCore**: 基盤レイヤー (演算、I/O、スレッド、シリアル化、文字列)
12-
- **LuminoEngine**: コアエンジンモジュール (グラフィックス RHI、オーディオ、レンダリング、プラットフォーム抽象化)
13-
- **LuminoFramework**: 高レベルゲームフレームワーク (シーン、物理演算、UI、エフェクト)
14-
- **LuminoFFI**: 他言語との統合のための C API バインディング
15-
- **lumino-js**: JavaScript/WebAssembly バインディング
16-
17-
### 主要なアーキテクチャコンセプト
18-
19-
**マルチプラットフォーム設計**: エンジンは、Windows (DirectX12/OpenGL)、Linux/macOS (OpenGL/Vulkan)、WebAssembly (WebGL/WebGPU)、Android/iOS (OpenGL ES) をサポートします。
20-
21-
**グラフィックス RHI**: 複数のバックエンドをサポートするハードウェア抽象化レイヤー(DirectX12、Vulkan、OpenGL、WebGL、WebGPU)
22-
23-
**アセットパイプライン**: メッシュ、テクスチャ、シェーダー、オーディオをサポートするランタイムアセットのロードとコンパイル
24-
25-
**コンポーネントアーキテクチャ**: ゲームオブジェクト用のエンティティコンポーネントシステムを備えたシーングラフ
26-
27-
**モダンC++17**: モダンC++機能、STLコンテナ、スマートポインタ、オプショナル型を使用
28-
29-
### パッケージ依存関係
30-
- LuminoCore → 内部依存関係なし
31-
- LuminoEngine → LuminoCore
32-
- LuminoFramework → LuminoEngine + LuminoCore
33-
- LuminoFFI → LuminoEngine + LuminoCore
34-
35-
### 外部依存関係
36-
vcpkg経由で管理: zlib、libpng、freetype、Vulkan、glslang、SPIRV-Cross、OpenAL、bullet3、box2d、ImGui、glTF、OBJローダー
37-
38-
### シェーダーシステム
39-
- プライマリ: HLSL/GLSL へのクロスコンパイルが可能な Slang シェーディング言語
40-
- レガシー: HLSL エフェクトシステム
41-
- 場所: `packages/LuminoEngine/shader/`
42-
43-
### プラットフォーム抽象化
44-
プラットフォーム固有のコードは `Platform/` ディレクトリに分離され、マネージャークラスによって Windows (Win32)、Linux/macOS (GLFW)、Web (Emscripten) 間で統一された API が提供されます。
45-
46-
## 開発ワークフロー
47-
48-
1. **セットアップ**: `docs/how-to-build.md` に記載されているとおり、vcpkg をリポジトリのルートにクローンします。
49-
2. **ビルド**: テストを含む完全なビルドには、`dotnet run -- Bootstrap` を使用します。
50-
3. **イテレーション**: エンジンのみのリビルドには、`dotnet run -- BuildEngine` を使用します。
51-
4. **テスト**: エンジンのビルド中に ctest を介してテストが自動的に実行されます。
52-
5. **Web**: `packages/lumino-js/` で別の npm ビルドプロセスを使用します。
53-
54-
## 重要なファイルの場所
55-
56-
- メイン CMake: `CMakeLists.txt`
57-
- コアエンジン: `packages/LuminoEngine/src/`
58-
- パブリックヘッダー: `packages/*/include/`
59-
- サンプル: `packages/*/examples/``examples/`
60-
- テスト: `packages/*/test/`
61-
- ビルドシステム: `tools/LuminoBuild/`
62-
- ドキュメント: `docs/`
1+
# CLAUDE.md
2+
3+
このファイルは、Claude Code (claude.ai/code) がこのリポジトリ内のコードを操作する際のガイダンスを提供します。
4+
5+
6+
## リポジトリアーキテクチャ
7+
8+
Lumino は、以下の主要なアーキテクチャレイヤーを備えたマルチプラットフォームゲームエンジンライブラリです。
9+
10+
### コアパッケージ構造
11+
- **LuminoCore**: 基盤レイヤー (演算、I/O、スレッド、シリアル化、文字列)
12+
- **LuminoEngine**: コアエンジンモジュール (グラフィックス RHI、オーディオ、レンダリング、プラットフォーム抽象化)
13+
- **LuminoFramework**: 高レベルゲームフレームワーク (シーン、物理演算、UI、エフェクト)
14+
- **LuminoFFI**: 他言語との統合のための C API バインディング
15+
- **lumino-js**: JavaScript/WebAssembly バインディング
16+
17+
### 主要なアーキテクチャコンセプト
18+
19+
**マルチプラットフォーム設計**: エンジンは、Windows (DirectX12/OpenGL)、Linux/macOS (OpenGL/Vulkan)、WebAssembly (WebGL/WebGPU)、Android/iOS (OpenGL ES) をサポートします。
20+
21+
**グラフィックス RHI**: 複数のバックエンドをサポートするハードウェア抽象化レイヤー(DirectX12、Vulkan、OpenGL、WebGL、WebGPU)
22+
23+
**アセットパイプライン**: メッシュ、テクスチャ、シェーダー、オーディオをサポートするランタイムアセットのロードとコンパイル
24+
25+
**コンポーネントアーキテクチャ**: ゲームオブジェクト用のエンティティコンポーネントシステムを備えたシーングラフ
26+
27+
**モダンC++17**: モダンC++機能、STLコンテナ、スマートポインタ、オプショナル型を使用
28+
29+
### パッケージ依存関係
30+
- LuminoCore → 内部依存関係なし
31+
- LuminoEngine → LuminoCore
32+
- LuminoFramework → LuminoEngine + LuminoCore
33+
- LuminoFFI → LuminoEngine + LuminoCore
34+
35+
### 外部依存関係
36+
vcpkg経由で管理: zlib、libpng、freetype、Vulkan、glslang、SPIRV-Cross、OpenAL、bullet3、box2d、ImGui、glTF、OBJローダー
37+
38+
### シェーダーシステム
39+
- プライマリ: HLSL/GLSL へのクロスコンパイルが可能な Slang シェーディング言語
40+
- レガシー: HLSL エフェクトシステム
41+
- 場所: `packages/LuminoEngine/shader/`
42+
43+
### プラットフォーム抽象化
44+
プラットフォーム固有のコードは `Platform/` ディレクトリに分離され、マネージャークラスによって Windows (Win32)、Linux/macOS (GLFW)、Web (Emscripten) 間で統一された API が提供されます。
45+
46+
## 開発ワークフロー
47+
48+
1. **セットアップ**: `docs/how-to-build.md` に記載されているとおり、vcpkg をリポジトリのルートにクローンします。
49+
2. **ビルド**: テストを含む完全なビルドには、`dotnet run -- Bootstrap` を使用します。
50+
3. **イテレーション**: エンジンのみのリビルドには、`dotnet run -- BuildEngine` を使用します。
51+
4. **テスト**: エンジンのビルド中に ctest を介してテストが自動的に実行されます。
52+
5. **Web**: `packages/lumino-js/` で別の npm ビルドプロセスを使用します。
53+
54+
## 重要なファイルの場所
55+
56+
- メイン CMake: `CMakeLists.txt`
57+
- コアエンジン: `packages/LuminoEngine/src/`
58+
- パブリックヘッダー: `packages/*/include/`
59+
- サンプル: `packages/*/examples/``examples/`
60+
- テスト: `packages/*/test/`
61+
- ビルドシステム: `tools/LuminoBuild/`
62+
- ドキュメント: `docs/`
File renamed without changes.
File renamed without changes.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Build with LUMINO_BUILD_BASE_ONLY
2+
3+
on:
4+
push:
5+
branches:
6+
- dev-lyric # main
7+
8+
jobs:
9+
build-base-only:
10+
strategy:
11+
matrix:
12+
os: [windows-latest] #[ubuntu-latest, windows-latest, macos-latest]
13+
runs-on: ${{ matrix.os }}
14+
15+
steps:
16+
- uses: actions/checkout@v3
17+
18+
- name: Setup CMake
19+
uses: jwlawson/actions-setup-cmake@v1.13
20+
with:
21+
cmake-version: 'latest'
22+
23+
- name: Configure CMake (with tests)
24+
run: >
25+
cmake -S . -B build -G"${{ matrix.os == 'windows-latest' && 'Visual Studio 17 2022' || 'Unix Makefiles' }}"
26+
-DCMAKE_INSTALL_PREFIX=installed
27+
-DCMAKE_DEBUG_POSTFIX=d
28+
-DLUMINO_BUILD_BASE_ONLY=ON
29+
-DLUMINO_BUILD_TESTS=OFF
30+
31+
- name: Build
32+
run: |
33+
cmake --build build --config Debug --target install
34+
cmake --build build --config Release --target install

CMakeLists.txt

Lines changed: 48 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,26 @@ message("VCPKG_CMAKE_SYSTEM_NAME: ${VCPKG_CMAKE_SYSTEM_NAME}")
3131
# -------------------------------------------------------------------------------
3232
# Options
3333
# -------------------------------------------------------------------------------
34+
# MSVC Runtime library.
35+
option(LN_MSVC_STATIC_RUNTIME "static runtime (/MT, /MTd) or DLL runtime (/MD, /MDd) or to link either." OFF)
36+
37+
# Builds LuminoCore.
38+
option(LUMINO_BUILD_BASE "Builds LuminoCore." ON)
39+
40+
# Builds LuminoEngine.
41+
option(LUMINO_BUILD_ENGINE "Builds LuminoEngine." ON)
42+
43+
# Builds Unit-Tests.
44+
option(LUMINO_BUILD_TESTS "Builds unit test projects." ON)
45+
46+
# Builds only the Base module.
47+
option(LUMINO_BUILD_BASE_ONLY "Builds only the Base module." OFF)
48+
49+
# -------------------------------------------------------------------------------
50+
# Options (experimental)
51+
# -------------------------------------------------------------------------------
3452
option(LN_TARGET_ARCH "arch." "Unknown")
3553

36-
option(LN_BUILD_TESTS "build unit test projects." ON)
3754

3855
option(LUMINO_BUILD_EXAMPLES "build example projects." ON)
3956

@@ -46,19 +63,11 @@ option(LN_BUILD_BINDINGS "build language bindings." OFF)
4663
# build shared library
4764
option(LN_BUILD_SHARED_LIBRARY "build shared library." OFF)
4865

49-
# build LuminoCore.
50-
option(LUMINO_BUILD_CORE "build LuminoCore." ON)
51-
52-
# build LuminoEngine.
53-
option(LUMINO_BUILD_ENGINE "build LuminoEngine." ON)
5466

5567
# build embedded shader transcompiler.
5668
option(LN_BUILD_EMBEDDED_SHADER_TRANSCOMPILER "build tool projects.build embedded shader transcompiler." OFF)
5769
option(LUMINO_USE_SLANG "build tool projects.build embedded shader transcompiler." OFF)
5870

59-
# MSVC Runtime library.
60-
option(LN_MSVC_STATIC_RUNTIME "static runtime (/MT, /MTd) or DLL runtime (/MD, /MDd) or to link either." OFF)
61-
6271
# use SDL on MSVC
6372
option(LN_MSVC_USE_SDL "use SDL on MSVC" OFF)
6473

@@ -168,16 +177,34 @@ if(WIN32)
168177
set(LN_USE_DIRECTX12 ON)
169178
endif()
170179

180+
if(LUMINO_BUILD_BASE)
181+
set(LN_BUILD_BASE ON)
182+
else()
183+
set(LN_BUILD_BASE OFF)
184+
endif()
171185

172186
if(LUMINO_BUILD_ENGINE)
173-
set(LUMINO_BUILD_CORE ON)
187+
set(LN_BUILD_ENGINE ON)
188+
set(LUMINO_BUILD_BASE ON)
189+
else()
190+
set(LN_BUILD_ENGINE OFF)
191+
endif()
192+
193+
if(LUMINO_BUILD_TESTS)
194+
set(LN_BUILD_TESTS ON)
195+
else()
196+
set(LN_BUILD_TESTS OFF)
197+
endif()
198+
199+
if(LUMINO_BUILD_BASE_ONLY)
200+
set(LN_BUILD_BASE ON)
201+
set(LN_BUILD_ENGINE OFF)
174202
endif()
175203

176204
# -------------------------------------------------------------------------------
177205
# Externals
178206
# -------------------------------------------------------------------------------
179-
find_package(tl-expected CONFIG REQUIRED)
180-
if(LN_OS_DESKTOP)
207+
if(LN_BUILD_TESTS AND LN_OS_DESKTOP)
181208
find_package(GTest CONFIG REQUIRED)
182209
endif()
183210

@@ -194,20 +221,19 @@ set(LN_SOURCES_gtest
194221
set(LN_GLTF_SAMPLE_MODELS_DIR "${CMAKE_CURRENT_LIST_DIR}/build/ExternalSource/glTF-Sample-Models/")
195222

196223
# ------------------------------------------------------------------------------
197-
if(LUMINO_BUILD_CORE)
224+
if(LN_BUILD_BASE)
198225
add_subdirectory(packages/LuminoCore)
199226
endif()
200227

201-
if(LUMINO_USE_WEBGPU)
202-
set(LN_USE_WEBGPU ON)
203-
if(LN_OS_DESKTOP)
204-
set(LN_DESKTOP_WEBGPU ON)
205-
set(WEBGPU_BACKEND "DAWN")
206-
add_subdirectory(build/tools/WebGPU-distribution)
228+
if(LN_BUILD_ENGINE)
229+
if(LUMINO_USE_WEBGPU)
230+
set(LN_USE_WEBGPU ON)
231+
if(LN_OS_DESKTOP)
232+
set(LN_DESKTOP_WEBGPU ON)
233+
set(WEBGPU_BACKEND "DAWN")
234+
add_subdirectory(build/tools/WebGPU-distribution)
235+
endif()
207236
endif()
208-
endif()
209-
210-
if(LUMINO_BUILD_ENGINE)
211237
if(LN_EMSCRIPTEN)
212238
add_subdirectory(packages/LuminoEngine)
213239
add_subdirectory(examples/Example-WebLibrary)

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
==========
33

44
Lumino is an open source library for building interactive applications such as games and digital art.
5-
It provides a simple API that runs on multiple platforms and is available for multiple programming languages.
5+
It provides a API that runs on multiple platforms and is available for multiple programming languages.
66

77
Lumino はゲームやデジタルアートなどのインタラクティブアプリケーションを構築するためのオープンソースライブラリです。
8-
マルチプラットフォームで動作し複数のプログラミング言語から利用できる、シンプルな API を提供します。
8+
マルチプラットフォームで動作し複数のプログラミング言語から利用できる API を提供します。
99

1010
## 💡 Project Status
1111

1212
Lumino is currently being developed with the following two use cases in mind.
1313

1414
- A. Use the core game engine modules (Graphics, Audio, Input, etc.) in other game engines or applications.
15-
- B. Use the basic modules (String, Array, FileSystem, etc.) in IoT platforms and testing tools. (auxiliary)
15+
- [B. Use the basic modules (String, Array, FileSystem, etc.) in IoT platforms and testing tools. (auxiliary)](./docs/use-base-module.md)
1616

1717
Until v0.10.1, Lumino was developed as a standalone game engine, but the main motivation was technical exploration.
1818

@@ -27,7 +27,7 @@ The future development concept is as follows:
2727
Lumino は現在、次の2つのユースケースを想定して開発を続けています。
2828

2929
- A. ゲームエンジンのコアモジュール (Graphics, Audio, Input 等) を 他のゲームエンジンやアプリケーションで利用する。
30-
- B. 基礎的なモジュール (String, Array, FileSystem, 等) を IoTプラットフォームやテスティングツール で利用する。(補助的)
30+
- [B. 基礎的なモジュール (String, Array, FileSystem, 等) を IoTプラットフォームやテスティングツール で利用する。(補助的)](./docs/use-base-module.md)
3131

3232
v0.10.1 までの Lumino はスタンドアロンゲームエンジンとして開発を続けていましたが、その主な動機は技術的探求でした。
3333

docs/use-base-module.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Using only the Base module
2+
3+
1. Configure
4+
5+
```sh
6+
# Without unit tests.
7+
cmake -S <RepositoryRootDir> -B <BuildDir> -G<Generator> \
8+
-DCMAKE_INSTALL_PREFIX=<InstallDir> \
9+
-DCMAKE_DEBUG_POSTFIX=d \
10+
-DLUMINO_BUILD_BASE_ONLY=ON \
11+
-DLUMINO_BUILD_TESTS=OFF
12+
13+
# With unit tests.
14+
cmake -S <RepositoryRootDir> -B <BuildDir> -G<Generator> \
15+
-DCMAKE_INSTALL_PREFIX=<InstallDir> \
16+
-DCMAKE_DEBUG_POSTFIX=d \
17+
-DLUMINO_BUILD_BASE_ONLY=ON
18+
```
19+
20+
2. Build
21+
22+
```sh
23+
cmake --build <BuildDir> --config Debug --target install
24+
cmake --build <BuildDir> --config Release --target install
25+
```
26+

packages/LuminoCore/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ target_include_directories(
5454
"src"
5555
)
5656

57-
target_link_libraries(${PROJECT_NAME} PRIVATE tl::expected ${LN_LINK_LIBS})
57+
target_link_libraries(${PROJECT_NAME} PRIVATE ${LN_LINK_LIBS})
5858

5959
set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Lumino")
6060
target_precompile_headers(${PROJECT_NAME} PRIVATE "src/LuminoCore.PCH.h")

packages/LuminoCore/include/LuminoCore/Base/Result.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#pragma once
2-
#include <tl/expected.hpp>
2+
#include "detail/tl/expected.hpp"
33
#include "String.hpp"
44

55
namespace ln {

0 commit comments

Comments
 (0)