Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
13fb756
Add alloy
yaito3014 Feb 8, 2026
7869dfe
Test components separately
yaito3014 Feb 8, 2026
54aab00
Fix CI workflow to correctly process component changes
yaito3014 Feb 8, 2026
a5befb3
Use `push`
yaito3014 Feb 8, 2026
7cc50b5
Fix
yaito3014 Feb 8, 2026
751ad25
Fix
yaito3014 Feb 9, 2026
99e360d
Debug
yaito3014 Feb 9, 2026
a01f1fa
Refactor CI configuration for component flags
yaito3014 Feb 9, 2026
9b908e9
Do replace `boost::fusion` with `alloy::tuple`
yaito3014 Feb 9, 2026
cb646b3
Restore mpl
yaito3014 Feb 9, 2026
4a02fcd
Sort deps
yaito3014 Feb 9, 2026
6f0d0a3
Fix typo
yaito3014 Feb 9, 2026
62ea07b
Remove some detail features
yaito3014 Feb 9, 2026
a81f773
Add script for preprocess
yaito3014 Feb 9, 2026
4f7b5c8
Let CMake generate tuple_impl.hpp on configure step
yaito3014 Feb 9, 2026
36d534e
Fix include
yaito3014 Feb 9, 2026
eb343d6
Fix CI error
yaito3014 Feb 9, 2026
fbcf939
Remove processed file from repository
yaito3014 Feb 9, 2026
18333a6
Refactor preprocessing
yaito3014 Feb 9, 2026
37f662e
Create batch script
yaito3014 Feb 9, 2026
fbfd699
Fix
yaito3014 Feb 9, 2026
02917d6
Use pushd/popd
yaito3014 Feb 9, 2026
6f9f524
Set off echo
yaito3014 Feb 9, 2026
84b1bd3
Update CMakeLists.txt to use .bat on Windows
yaito3014 Feb 9, 2026
1ddbde7
Fix typo
yaito3014 Feb 9, 2026
f5999d4
Switch execute_process to add_custom_command
yaito3014 Feb 9, 2026
ae1c8dc
Make iris_x4 depend iris_alloy
yaito3014 Feb 9, 2026
c4cb346
Use absolute path
yaito3014 Feb 9, 2026
dbd79de
Test both by default
yaito3014 Feb 9, 2026
b3d6a8c
Fix CI
yaito3014 Feb 9, 2026
8ab6b01
Add natvis
yaito3014 Feb 10, 2026
6ec9cde
Register nativs with target_sources
yaito3014 Feb 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 28 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,27 +23,45 @@ jobs:
changes:
runs-on: ubuntu-latest
outputs:
x4_component: ${{ steps.filter.outputs.changes }}
components: ${{ steps.processed.outputs.result }}
steps:
- uses: actions/checkout@v5
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
x4:
- '.github/workflows/*.yml'
- 'modules/iris'
general:
- '.github/workflows/*.yml'
- 'CMakeLists.txt'
- 'modules/iris'
- 'test/CMakeLists.txt'
alloy:
- 'include/iris/alloy/**/*'
- 'test/alloy/**/*'
x4:
- 'include/iris/x4.hpp'
- 'include/iris/x4/**/*'
- 'test/CMakeLists.txt'
- 'test/x4/**/*'
- uses: actions/github-script@v8
id: processed
env:
CHANGES: ${{ steps.filter.outputs.changes }}
with:
script: |
const changes = JSON.parse(process.env.CHANGES);
console.log('changes: ', changes);
let result = [];
if (changes.includes('general') || changes.includes('alloy')) result.push('alloy');
if (changes.includes('general') || changes.includes('alloy') || changes.includes('x4')) result.push('x4');
console.log('result: ', result);
return result;


build:
name: "[${{ matrix.cpp_version.name }}] ${{ matrix.x4_component }} | ${{ matrix.compiler.toolset }}-${{ matrix.compiler.version }} (${{ matrix.build_type.name }}) @ ${{ matrix.os.name }}-${{ matrix.os.version }}"
name: "[${{ matrix.cpp_version.name }}] ${{ matrix.components }} | ${{ matrix.compiler.toolset }}-${{ matrix.compiler.version }} (${{ matrix.build_type.name }}) @ ${{ matrix.os.name }}-${{ matrix.os.version }}"

needs: changes
if: ${{ needs.changes.outputs.x4_component != '[]' && needs.changes.outputs.x4_component != '' }}
if: ${{ needs.changes.outputs.components != '[]' && needs.changes.outputs.components != '' }}

runs-on: ${{ matrix.os.name }}-${{ matrix.os.version }}

Expand Down Expand Up @@ -83,7 +101,7 @@ jobs:
builder_additional_args: -- "-consoleLoggerParameters:ForceConsoleColor"
executable: cl

x4_component: ${{ fromJSON(needs.changes.outputs.x4_component) }}
components: ${{ fromJSON(needs.changes.outputs.components) }}

exclude:
# Blacklist all invalid combinations of environments
Expand Down Expand Up @@ -184,26 +202,15 @@ jobs:
tools/build \
tools/boost_install \
libs/assert \
libs/bind \
libs/config \
libs/container_hash \
libs/core \
libs/describe \
libs/detail \
libs/function \
libs/function_types \
libs/functional \
libs/fusion \
libs/io \
libs/mp11 \
libs/mpl \
libs/predef \
libs/preprocessor \
libs/static_assert \
libs/throw_exception \
libs/tuple \
libs/type_traits \
libs/typeof \
libs/utility

- name: Build upstream Boost libraries (Ubuntu)
Expand Down Expand Up @@ -271,6 +278,8 @@ jobs:
-DCMAKE_CXX_FLAGS="${{ matrix.compiler.cxxflags }}" \
-DCMAKE_CXX_STANDARD=${{ matrix.cpp_version.number }} \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type.name }} \
-DIRIS_TEST_ALLOY=${{ case(matrix.components == 'alloy' || matrix.components == 'x4', 'ON', 'OFF') }} \
-DIRIS_TEST_X4=${{ case(matrix.components == 'x4', 'ON', 'OFF') }} \
-S .

- name: Build Tests
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
.DS_Store
/build*/

# ignore preprocessed file
include/iris/alloy/detail/preprocessed/tuple_impl.hpp
98 changes: 70 additions & 28 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,64 @@ endif()

add_subdirectory("${IRIS_ROOT}")

# -----------------------------------------------------------------
# Create the alloy target

if(MSVC)
# This needs to be `OBJECT` target to set correct `/std:` flags on IDE
add_library(iris_alloy OBJECT EXCLUDE_FROM_ALL)
set_target_properties(iris_alloy PROPERTIES LINKER_LANGUAGE CXX)

target_link_libraries(iris_alloy PUBLIC Iris::Iris)

else()
add_library(iris_alloy INTERFACE)
target_link_libraries(iris_alloy INTERFACE Iris::Iris)
endif()

add_library(Iris::Alloy ALIAS iris_alloy)
set_target_properties(iris_alloy PROPERTIES CXX_EXTENSIONS OFF)

# -----------------------------------------------------------------
# Configure alloy target

if(MSVC)
add_custom_command(
OUTPUT ${PROJECT_SOURCE_DIR}/include/iris/alloy/detail/preprocessed/tuple_impl.hpp
COMMAND ${PROJECT_SOURCE_DIR}/scripts/generate_tuple_members.bat
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
DEPENDS ${PROJECT_SOURCE_DIR}/include/iris/alloy/detail/tuple_impl.hpp
VERBATIM
)
else()
add_custom_command(
OUTPUT ${PROJECT_SOURCE_DIR}/include/iris/alloy/detail/preprocessed/tuple_impl.hpp
COMMAND ${PROJECT_SOURCE_DIR}/scripts/generate_tuple_members.sh
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
DEPENDS ${PROJECT_SOURCE_DIR}/include/iris/alloy/detail/tuple_impl.hpp
VERBATIM
)
endif()

file(
GLOB_RECURSE IRIS_ALLOY_HEADERS
${PROJECT_SOURCE_DIR}/include/iris/alloy/*.hpp
${PROJECT_SOURCE_DIR}/include/iris/alloy/*.ipp
)

list(APPEND IRIS_ALLOY_HEADERS ${PROJECT_SOURCE_DIR}/include/iris/alloy/detail/preprocessed/tuple_impl.hpp)

target_sources(
iris_alloy
PRIVATE FILE_SET HEADERS TYPE HEADERS FILES ${IRIS_ALLOY_HEADERS}
)
source_group(
TREE ${PROJECT_SOURCE_DIR}/include/iris PREFIX iris FILES ${IRIS_ALLOY_HEADERS}
)
target_include_directories(
iris_alloy
INTERFACE ${PROJECT_SOURCE_DIR}/include
)

# -----------------------------------------------------------------
# Create the main X4 target
Expand All @@ -41,14 +99,14 @@ if(MSVC)
iris_x4
PRIVATE
# "${PROJECT_SOURCE_DIR}/cpp.hint" # TODO
# "${PROJECT_SOURCE_DIR}/iris_x4.natvis" # TODO
"${PROJECT_SOURCE_DIR}/iris_x4.natvis"
)

target_link_libraries(iris_x4 PUBLIC Iris::Iris)

else()
add_library(iris_x4 INTERFACE)
target_link_libraries(iris_x4 INTERFACE Iris::Iris)
target_link_libraries(iris_x4 INTERFACE Iris::Iris Iris::Alloy)
endif()

add_library(Iris::X4 ALIAS iris_x4)
Expand All @@ -60,30 +118,6 @@ set_target_properties(iris_x4 PROPERTIES CXX_EXTENSIONS OFF)

set(iris_x4_boost_deps "")

# Everything required by `fusion` (manually confirmed)
list(APPEND iris_x4_boost_deps fusion)
list(APPEND iris_x4_boost_deps config)
list(APPEND iris_x4_boost_deps container_hash)
list(APPEND iris_x4_boost_deps describe)
list(APPEND iris_x4_boost_deps mp11)
list(APPEND iris_x4_boost_deps core)
list(APPEND iris_x4_boost_deps assert)
list(APPEND iris_x4_boost_deps static_assert)
list(APPEND iris_x4_boost_deps throw_exception)
list(APPEND iris_x4_boost_deps function_types)
list(APPEND iris_x4_boost_deps detail)
list(APPEND iris_x4_boost_deps mpl)
list(APPEND iris_x4_boost_deps preprocessor)
list(APPEND iris_x4_boost_deps type_traits)
list(APPEND iris_x4_boost_deps predef)
list(APPEND iris_x4_boost_deps utility)
list(APPEND iris_x4_boost_deps io)
list(APPEND iris_x4_boost_deps tuple)
list(APPEND iris_x4_boost_deps typeof)
list(APPEND iris_x4_boost_deps functional)
list(APPEND iris_x4_boost_deps function)
list(APPEND iris_x4_boost_deps bind)

# Everything required by `preprocessor` (manually confirmed)
list(APPEND iris_x4_boost_deps preprocessor)

Expand All @@ -94,6 +128,13 @@ list(APPEND iris_x4_boost_deps config)
list(APPEND iris_x4_boost_deps static_assert)
list(APPEND iris_x4_boost_deps throw_exception)

# Everything required by `mpl`
list(APPEND iris_x4_boost_deps mpl)
list(APPEND iris_x4_boost_deps io)
list(APPEND iris_x4_boost_deps predef)
list(APPEND iris_x4_boost_deps type_traits)
list(APPEND iris_x4_boost_deps utility)

# ---------------------------------------------
list(REMOVE_DUPLICATES iris_x4_boost_deps)

Expand All @@ -114,8 +155,9 @@ endforeach()

file(
GLOB_RECURSE IRIS_X4_HEADERS
${PROJECT_SOURCE_DIR}/include/iris/*.hpp
${PROJECT_SOURCE_DIR}/include/iris/*.ipp
${PROJECT_SOURCE_DIR}/include/iris/x4/*.hpp
${PROJECT_SOURCE_DIR}/include/iris/x4/*.ipp
${PROJECT_SOURCE_DIR}/include/iris/x4.hpp
)

target_sources(
Expand Down
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,9 @@ Note: Boost dependency is going to be removed entirely in the near future.

```console
git submodule update --init --depth 1 --recursive -- \
tools/build tools/boost_install libs/assert libs/bind libs/config \
libs/container_hash libs/core libs/describe libs/detail \
libs/function libs/function_types libs/functional libs/fusion \
libs/io libs/mp11 libs/mpl libs/predef libs/preprocessor \
libs/static_assert libs/throw_exception libs/tuple \
libs/type_traits libs/typeof libs/utility
tools/build tools/boost_install libs/assert libs/config \
libs/core libs/io libs/mpl libs/predef libs/preprocessor \
libs/static_assert libs/throw_exception libs/type_traits libs/utility

# Linux
./bootstrap.sh
Expand Down
29 changes: 29 additions & 0 deletions include/iris/alloy/adapt.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#ifndef IRIS_ALLOY_ADAPT_HPP
#define IRIS_ALLOY_ADAPT_HPP

/*=============================================================================
Copyright (c) 2025 Yaito Kakeyama
Copyright (c) 2026 The Iris Project Contributors
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/

namespace iris::alloy {

namespace detail {

template<auto... Vs>
struct non_type_list;

} // detail

template<class T>
struct adaptor;

template<auto... Getters>
using make_getters_list = detail::non_type_list<Getters...>;

} // iris::alloy

#endif
34 changes: 34 additions & 0 deletions include/iris/alloy/adapted/std_pair.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#ifndef IRIS_ALLOY_ADAPTED_STD_PAIR_HPP
#define IRIS_ALLOY_ADAPTED_STD_PAIR_HPP

/*=============================================================================
Copyright (c) 2025 Yaito Kakeyama
Copyright (c) 2026 The Iris Project Contributors
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/

#include <utility>

namespace iris::alloy {

namespace detail {

template<auto... Vs>
struct non_type_list;

} // detail

template<class T>
struct adaptor;

template<class T, class U>
struct adaptor<std::pair<T, U>>
{
using getters_list = detail::non_type_list<&std::pair<T, U>::first, &std::pair<T, U>::second>;
};

} // iris::alloy

#endif
52 changes: 52 additions & 0 deletions include/iris/alloy/adapted/std_tuple.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#ifndef IRIS_ALLOY_ADAPTED_STD_TUPLE_HPP
#define IRIS_ALLOY_ADAPTED_STD_TUPLE_HPP

/*=============================================================================
Copyright (c) 2025 Yaito Kakeyama
Copyright (c) 2026 The Iris Project Contributors

Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/

#include <iris/alloy/detail/integer_seq_transform.hpp>

#include <tuple>
#include <utility>

#include <cstddef>

namespace iris::alloy {

template<class T>
struct adaptor;

namespace detail {

template<std::size_t I>
struct call_std_get
{
template<class Tuple>
static constexpr decltype(auto) operator()(Tuple&& t)
{
return std::get<I>(static_cast<Tuple&&>(t));
}
};

template<std::size_t I>
struct make_call_std_get
{
static constexpr auto value = call_std_get<I>{};
};

} // detail

template<class... Ts>
struct adaptor<std::tuple<Ts...>>
{
using getters_list = detail::integer_seq_transform_t<std::make_index_sequence<sizeof...(Ts)>, detail::make_call_std_get>;
};

} // iris::alloy

#endif
Loading