Skip to content
Draft

Modules #2408

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
e60c55e
Early progress on modules
DockedFerret800 Mar 18, 2026
df65a28
Temporary change UT tag
DockedFerret800 Mar 18, 2026
e837c35
A fix for C2903 on MSVC
DockedFerret800 Mar 25, 2026
227af37
Remove /GR- from tests on MSVC
DockedFerret800 Mar 26, 2026
33acfb5
Progress on modules
DockedFerret800 Mar 27, 2026
8e2925d
Necessary fixes for beve_test
DockedFerret800 Mar 28, 2026
8abd9d8
buffer_pool convertation and tests
DockedFerret800 Mar 28, 2026
7fbca4c
exception and msgpack conversion
DockedFerret800 Mar 28, 2026
86d082e
Chrono tests
DockedFerret800 Mar 28, 2026
f6470b2
CBOR Tests
DockedFerret800 Mar 28, 2026
0dee536
Temporary disable networking tests
DockedFerret800 Mar 28, 2026
07f0733
cli_menu conversion and improvements
DockedFerret800 Mar 28, 2026
b1f661f
use correct module name in beve_test
DockedFerret800 Mar 28, 2026
3e94e03
example_json test
DockedFerret800 Mar 28, 2026
53a89c3
csv_test
DockedFerret800 Mar 28, 2026
20d1b81
[unfinished] some progress on eigen test
DockedFerret800 Mar 28, 2026
8a09516
compare convertation and compare_test
DockedFerret800 Mar 28, 2026
67677a9
Threads modules coverage and exceptions_test
DockedFerret800 Mar 28, 2026
e83e758
msgpack_test
DockedFerret800 Mar 28, 2026
6fc0d53
jsonrpc_test
DockedFerret800 Mar 28, 2026
828f3bc
simple_float_test
DockedFerret800 Mar 28, 2026
7cda3e6
Stencil conversion (including tests)
DockedFerret800 Mar 28, 2026
b8b2eb9
int_parsing test
DockedFerret800 Mar 28, 2026
6ce2385
mock_json_test
DockedFerret800 Mar 29, 2026
4b9e317
Full thread coverage and threading_test
DockedFerret800 Mar 29, 2026
b523edb
progress_bar convertation and utility_formats test
DockedFerret800 Mar 29, 2026
3cecc81
roundtrip test
DockedFerret800 Mar 29, 2026
da6a8f4
reflection and enum_test tests; code cleanup
DockedFerret800 Mar 29, 2026
4674f02
Toml convertation; toml_test and ostream_buffer_test
DockedFerret800 Mar 29, 2026
065f31b
key_transformers conversion and key_transformers_test
DockedFerret800 Mar 29, 2026
137aae9
u8string_test, value_based_skip_test and variant_ambiguous_test
DockedFerret800 Mar 29, 2026
7d88090
lib_test
DockedFerret800 Mar 29, 2026
5abe029
Fix .gitignore to include interface.ixx and test_lib.ixx
DockedFerret800 Mar 29, 2026
1ae0bca
jmepath test
DockedFerret800 Mar 29, 2026
4dce9d2
istream_buffer_test
DockedFerret800 Mar 29, 2026
b4f5fcc
inplace_vector test
DockedFerret800 Mar 29, 2026
8018c4f
lazy_beve_test and skip_null_on_read_test
DockedFerret800 Mar 29, 2026
5af2623
json performance tests
DockedFerret800 Mar 29, 2026
9295be9
api_test, json_perf tests and json_reflection tests
DockedFerret800 Mar 29, 2026
affd3cb
Progress on convertation
DockedFerret800 Mar 29, 2026
f8df65e
Fix errors on MSVC
DockedFerret800 Mar 31, 2026
baf809f
Resolve MSVC compilation errors
DockedFerret800 Apr 4, 2026
11912fa
Add usings for std types
DockedFerret800 Apr 4, 2026
f307e63
Resolve compilation errors and warnings on Clang
DockedFerret800 Apr 7, 2026
759c3d4
Resolve some GCC compilation errors
DockedFerret800 Apr 8, 2026
981357f
Merge glaze.core.context and glaze.core.error_category; and glaze.cor…
DockedFerret800 Apr 8, 2026
d2b543f
Begin sync with main
DockedFerret800 Apr 8, 2026
d73a381
Merge remote-tracking branch 'origin/main' into modules
DockedFerret800 Apr 8, 2026
2e086ab
Resolve conflicts
DockedFerret800 Apr 8, 2026
bf629cf
Resolve some build errors after sync
DockedFerret800 Apr 8, 2026
f9467d3
Merge remote-tracking branch 'origin/main' into modules
DockedFerret800 Apr 8, 2026
26460c2
Resolve compiler errors
DockedFerret800 Apr 10, 2026
7e7b50f
Merge remote-tracking branch 'origin/main' into modules
DockedFerret800 Apr 10, 2026
5656f8e
Merge remote-tracking branch 'origin/main' into modules
DockedFerret800 Apr 21, 2026
b001ccd
Resolution of many compiler errors; Jsonb conversion; minor improvements
DockedFerret800 Apr 22, 2026
9266267
Minor improvements
DockedFerret800 May 29, 2026
551fd43
Headers generation
DockedFerret800 May 31, 2026
1fe3747
Merge remote-tracking branch 'origin/main' into modules
DockedFerret800 May 31, 2026
fb779e1
BSON conversion
DockedFerret800 Jun 11, 2026
e14d20e
Merge remote-tracking branch 'origin/main' into modules
DockedFerret800 Jun 11, 2026
0696b7b
write_wrappers conversion
DockedFerret800 Jun 11, 2026
0d7517e
remove test workflow
DockedFerret800 Jun 11, 2026
98affbe
[skip ci] json_sqlite_test
DockedFerret800 Jun 12, 2026
4d76ba7
Merge remote-tracking branch 'origin/main' into modules
DockedFerret800 Jul 14, 2026
ca55153
Context and generic changes
DockedFerret800 Jul 14, 2026
0deddec
Generic conversion
DockedFerret800 Jul 29, 2026
bf834c2
format_str conversion; add missing imports and exports
DockedFerret800 Jul 29, 2026
1ddda4b
Merge remote-tracking branch 'origin/main' into modules
DockedFerret800 Aug 2, 2026
5cae671
Sync context.ixx with headers main
DockedFerret800 Aug 2, 2026
fbfb4b3
Conversion in order to correspond to the latest changes from main
DockedFerret800 Aug 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 5 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
out/
**/bin/
**/build*/
**/lib*/
**/lib/
**/_build*/

# CMake specific settings
Expand All @@ -12,18 +12,17 @@ CMakeUserPresets.json
**/Testing/

# IDE files
.claude/
.idea/
.vs/
.vscode/
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.claude/
*.swp
*~
_ReSharper*
__pycache__/
*.log
.cache/
compile_commands.json
Expand Down Expand Up @@ -63,6 +62,9 @@ pr_description.md
/size_tests
/tmp_benchmark
/exterior

pr.md

/vc140.pdb
/tmp/
tmp/
41 changes: 30 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
cmake_minimum_required(VERSION 3.21)
cmake_minimum_required(VERSION 4.4)

set(CACHE{CMAKE_EXPERIMENTAL_CXX_IMPORT_STD} VALUE "f35a9ac6-8463-4d38-8eec-5d6008153e7d")

include(cmake/prelude.cmake)

Expand All @@ -8,32 +10,46 @@ project(
LANGUAGES CXX
)

option(GLAZE_ENABLE_MODULES "Enable modules with import std" ON) # or GLAZE_GENERATE_HEADERS ??

if (GLAZE_ENABLE_MODULES)
set(CMAKE_CXX_MODULE_STD 1)
endif()

include(cmake/project-is-top-level.cmake)
include(cmake/variables.cmake)

if (PROJECT_IS_TOP_LEVEL)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
endif()

add_library(glaze_glaze INTERFACE)
if(GLAZE_ENABLE_MODULES)
add_library(glaze_glaze STATIC)
if (PROJECT_IS_TOP_LEVEL)
set_target_properties(glaze_glaze PROPERTIES POSITION_INDEPENDENT_CODE ON)
endif()
set(GLAZE_LIB_TYPE PUBLIC)
else()
add_library(glaze_glaze INTERFACE)
set(GLAZE_LIB_TYPE INTERFACE)
endif()
add_library(glaze::glaze ALIAS glaze_glaze)


if (MSVC)
string(REGEX MATCH "\/cl(.exe)?$" matched_cl ${CMAKE_CXX_COMPILER})
if (matched_cl)
# for a C++ standards compliant preprocessor, not needed for clang-cl
target_compile_options(glaze_glaze INTERFACE "/Zc:preprocessor" /permissive- /Zc:lambda)

if(PROJECT_IS_TOP_LEVEL)
target_compile_options(glaze_glaze INTERFACE
target_compile_options(glaze_glaze INTERFACE
$<$<CONFIG:Release>:/GL>
$<$<CONFIG:MinSizeRel>:/GL>)
target_link_options(glaze_glaze INTERFACE
target_link_options(glaze_glaze INTERFACE
$<$<CONFIG:Release>:/LTCG /INCREMENTAL:NO>
$<$<CONFIG:MinSizeRel>:/LTCG /INCREMENTAL:NO>)
endif()
endif()
endif()
else()
# Only apply -Wno-missing-braces for C and C++ compilation to avoid breaking ISPC and other language builds
target_compile_options(${PROJECT_NAME}_${PROJECT_NAME} INTERFACE
Expand All @@ -42,12 +58,15 @@ endif()

set_property(TARGET ${PROJECT_NAME}_${PROJECT_NAME} PROPERTY EXPORT_NAME glaze)

target_compile_features(${PROJECT_NAME}_${PROJECT_NAME} INTERFACE cxx_std_23)
target_compile_features(glaze_glaze ${GLAZE_LIB_TYPE} cxx_std_23)
target_include_directories(
${PROJECT_NAME}_${PROJECT_NAME} ${warning_guard}
INTERFACE "$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>"
glaze_glaze ${warning_guard}
PUBLIC
"$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/modules>"
)

include(cmake/modules-files.cmake)

option(glaze_INSTALL "Generate installation rules for glaze" "${PROJECT_IS_TOP_LEVEL}")
if(glaze_INSTALL AND NOT CMAKE_SKIP_INSTALL_RULES)
include(cmake/install-rules.cmake)
Expand Down Expand Up @@ -75,7 +94,7 @@ if(glaze_BUILD_EXAMPLES)
add_subdirectory(examples)
endif()

option(glaze_EETF_FORMAT "Enable Erlang external term format parsing" OFF)
option(glaze_EETF_FORMAT "Enable Erlang external term format parsing" OFF) # TODO: Convert

if(glaze_EETF_FORMAT)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
Expand Down
263 changes: 146 additions & 117 deletions CMakePresets.json
Original file line number Diff line number Diff line change
@@ -1,120 +1,149 @@
{
"version": 3,
"cmakeMinimumRequired": {
"major": 3,
"minor": 23,
"patch": 0
"version": 3,
"cmakeMinimumRequired": {
"major": 3,
"minor": 23,
"patch": 0
},
"configurePresets": [
{
"name": "clang-debug",
"displayName": "Clang Debug",
"description": "Debug build using Clang compiler",
"binaryDir": "${sourceDir}/build/debug",
"generator": "Ninja",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_C_COMPILER": "/usr/bin/clang",
"CMAKE_CXX_COMPILER": "/usr/bin/clang++",
"CMAKE_EXPORT_COMPILE_COMMANDS": true,
"glaze_DEVELOPER_MODE": true,
"BUILD_TESTING": true,
"glaze_BUILD_INTEROP": true,
"CMAKE_CXX_FLAGS": "-stdlib=libc++",
"CMAKE_EXE_LINKER_FLAGS": "-stdlib=libc++",
"CMAKE_SHARED_LINKER_FLAGS": "-stdlib=libc++",
"CMAKE_MODULE_LINKER_FLAGS": "-stdlib=libc++"
}
},
"configurePresets": [
{
"name": "clang-debug",
"displayName": "Clang Debug",
"description": "Debug build using Clang compiler",
"binaryDir": "${sourceDir}/build/debug",
"generator": "Ninja",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_C_COMPILER": "/usr/bin/clang",
"CMAKE_CXX_COMPILER": "/usr/bin/clang++",
"CMAKE_EXPORT_COMPILE_COMMANDS": true,
"glaze_DEVELOPER_MODE": true,
"BUILD_TESTING": true,
"glaze_BUILD_INTEROP": true,
"CMAKE_CXX_FLAGS": "-stdlib=libc++",
"CMAKE_EXE_LINKER_FLAGS": "-stdlib=libc++",
"CMAKE_SHARED_LINKER_FLAGS": "-stdlib=libc++",
"CMAKE_MODULE_LINKER_FLAGS": "-stdlib=libc++"
}
},
{
"name": "clang-release",
"displayName": "Clang Release",
"description": "Release build using Clang compiler",
"binaryDir": "${sourceDir}/build/release",
"generator": "Ninja",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"CMAKE_C_COMPILER": "/usr/bin/clang",
"CMAKE_CXX_COMPILER": "/usr/bin/clang++",
"CMAKE_EXPORT_COMPILE_COMMANDS": true,
"glaze_DEVELOPER_MODE": true,
"BUILD_TESTING": true,
"glaze_BUILD_INTEROP": true,
"CMAKE_CXX_FLAGS": "-stdlib=libc++",
"CMAKE_EXE_LINKER_FLAGS": "-stdlib=libc++",
"CMAKE_SHARED_LINKER_FLAGS": "-stdlib=libc++",
"CMAKE_MODULE_LINKER_FLAGS": "-stdlib=libc++"
}
},
{
"name": "gcc-debug",
"displayName": "GCC Debug",
"description": "Debug build using GCC compiler",
"binaryDir": "${sourceDir}/build/debug-gcc",
"generator": "Ninja",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_C_COMPILER": "/usr/bin/gcc",
"CMAKE_CXX_COMPILER": "/usr/bin/g++",
"CMAKE_EXPORT_COMPILE_COMMANDS": true,
"glaze_DEVELOPER_MODE": true,
"BUILD_TESTING": true,
"glaze_BUILD_INTEROP": true
}
},
{
"name": "gcc-release",
"displayName": "GCC Release",
"description": "Release build using GCC compiler",
"binaryDir": "${sourceDir}/build/release-gcc",
"generator": "Ninja",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"CMAKE_C_COMPILER": "/usr/bin/gcc",
"CMAKE_CXX_COMPILER": "/usr/bin/g++",
"CMAKE_EXPORT_COMPILE_COMMANDS": true,
"glaze_DEVELOPER_MODE": true,
"BUILD_TESTING": true,
"glaze_BUILD_INTEROP": true
}
}
],
"buildPresets": [
{
"name": "clang-debug",
"configurePreset": "clang-debug"
},
{
"name": "clang-release",
"configurePreset": "clang-release"
},
{
"name": "gcc-debug",
"configurePreset": "gcc-debug"
},
{
"name": "gcc-release",
"configurePreset": "gcc-release"
}
],
"testPresets": [
{
"name": "clang-debug",
"displayName": "Test Clang Debug",
"configurePreset": "clang-debug",
"output": {
"verbosity": "verbose",
"outputOnFailure": true
}
},
{
"name": "gcc-debug",
"displayName": "Test GCC Debug",
"configurePreset": "gcc-debug",
"output": {
"verbosity": "verbose",
"outputOnFailure": true
}
}
]
{
"name": "clang-release",
"displayName": "Clang Release",
"description": "Release build using Clang compiler",
"binaryDir": "${sourceDir}/build/release",
"generator": "Ninja",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"CMAKE_C_COMPILER": "/usr/bin/clang",
"CMAKE_CXX_COMPILER": "/usr/bin/clang++",
"CMAKE_EXPORT_COMPILE_COMMANDS": true,
"glaze_DEVELOPER_MODE": true,
"BUILD_TESTING": true,
"glaze_BUILD_INTEROP": true,
"CMAKE_CXX_FLAGS": "-stdlib=libc++",
"CMAKE_EXE_LINKER_FLAGS": "-stdlib=libc++",
"CMAKE_SHARED_LINKER_FLAGS": "-stdlib=libc++",
"CMAKE_MODULE_LINKER_FLAGS": "-stdlib=libc++"
}
},
{
"name": "gcc-debug",
"displayName": "GCC Debug",
"description": "Debug build using GCC compiler",
"binaryDir": "${sourceDir}/build/debug-gcc",
"generator": "Ninja",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_C_COMPILER": "/usr/bin/gcc",
"CMAKE_CXX_COMPILER": "/usr/bin/g++",
"CMAKE_EXPORT_COMPILE_COMMANDS": true,
"glaze_DEVELOPER_MODE": true,
"BUILD_TESTING": true,
"glaze_BUILD_INTEROP": true
}
},
{
"name": "gcc-release",
"displayName": "GCC Release",
"description": "Release build using GCC compiler",
"binaryDir": "${sourceDir}/build/release-gcc",
"generator": "Ninja",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"CMAKE_C_COMPILER": "/usr/bin/gcc",
"CMAKE_CXX_COMPILER": "/usr/bin/g++",
"CMAKE_EXPORT_COMPILE_COMMANDS": true,
"glaze_DEVELOPER_MODE": true,
"BUILD_TESTING": true,
"glaze_BUILD_INTEROP": true
}
},
{
"name": "windows-base",
"description": "Base preset for MSVC v14.52",
"hidden": true,
"generator": "Ninja",
"binaryDir": "${sourceDir}/out/build/${presetName}",
"installDir": "${sourceDir}/out/install/${presetName}",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
},
"toolset": {
"value": "v145,host=x64,version=14.52"
}
},
{
"name": "x64",
"displayName": "x64 Debug (MSVC v14.52 Preview)",
"inherits": "windows-base",
"architecture": {
"value": "x64",
"strategy": "external"
}
}
],
"buildPresets": [
{
"name": "clang-debug",
"configurePreset": "clang-debug"
},
{
"name": "clang-release",
"configurePreset": "clang-release"
},
{
"name": "gcc-debug",
"configurePreset": "gcc-debug"
},
{
"name": "gcc-release",
"configurePreset": "gcc-release"
},
{
"name": "x64-build",
"configurePreset": "x64"
}
],
"testPresets": [
{
"name": "clang-debug",
"displayName": "Test Clang Debug",
"configurePreset": "clang-debug",
"output": {
"verbosity": "verbose",
"outputOnFailure": true
}
},
{
"name": "gcc-debug",
"displayName": "Test GCC Debug",
"configurePreset": "gcc-debug",
"output": {
"verbosity": "verbose",
"outputOnFailure": true
}
}
]
}
Loading
Loading