Conversation
Copilot
AI
changed the title
[WIP] Fix portfile workarounds and add DLL export support for parsers
Fix vcpkg packaging: debug headers, DLL exports, YAML_USE_CXX17 typo, x86 exclusion
Apr 1, 2026
eea9633 to
c99d2f1
Compare
matajoh
reviewed
Apr 2, 2026
Member
matajoh
left a comment
There was a problem hiding this comment.
It would be good to test the DLL functionality on windows to ensure it is working properly.
9cd0f97 to
d1a4c18
Compare
matajoh
approved these changes
Apr 9, 2026
8310242 to
e29cf8a
Compare
dg0yt
reviewed
Apr 9, 2026
dg0yt
reviewed
Apr 9, 2026
a827f8b to
c0905b3
Compare
mjp41
reviewed
Apr 13, 2026
c0905b3 to
c4b776c
Compare
Decouple from snmalloc headers and add shared library (DLL) support
- Introduce include/trieste/compiler.h with self-contained TRIESTE_SLOW_PATH,
TRIESTE_FAST_PATH, TRIESTE_LIKELY/UNLIKELY, and TRIESTE_USED_FUNCTION macros,
replacing all uses of snmalloc/ds_core/defines.h macros throughout the
headers (ast.h, intrusive_ptr.h, logging.h, pass.h, rewrite.h, wf.h).
- Make snmalloc an optional dependency controlled by TRIESTE_USE_SNMALLOC.
When disabled, the core library no longer fetches or links snmalloc at all.
The vcpkg port moves snmalloc from a hard dependency to an opt-in "snmalloc"
feature.
- Add DLL export support for the JSON and YAML parser libraries:
- Use CMake's GenerateExportHeader to produce json_export.h / yaml_export.h.
- Annotate all public API functions with JSON_EXPORT / YAML_EXPORT.
- Define JSON_STATIC_DEFINE / YAML_STATIC_DEFINE for static builds.
- Rename output libraries to trieste-json / trieste-yaml.
- Add a Windows shared-libs CI job (BUILD_SHARED_LIBS=ON).
- CMake modernisation:
- Bump cmake_minimum_required to 3.28 and remove the cmake_utils
dependency entirely. EXCLUDE_FROM_ALL is used natively on all
FetchContent declarations.
- Disable C++20 module scanning (CMAKE_CXX_SCAN_FOR_MODULES=OFF) since
Trieste does not use modules.
- Guard header installs on non-Debug builds to avoid installing into Debug
prefixes.
- Only define the clangformat target when snmalloc is available (it
provides the clangformat_targets macro).
- vcpkg port fixes:
- Prefix release tag refs with "v" to match actual Git tags.
- Drop redundant PACKAGE_NAME from vcpkg_cmake_config_fixup.
- Add "supports": "!x86" platform constraint.
- Fix C++17 compatibility in yaml reader (replace std::set::contains with
find/end).
- Bump VERSION to 1.1.0.
Signed-off-by: Matthew A Johnson <matjoh@microsoft.com>
c4b776c to
1f8b324
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
vcpkg and CMake refinements
Decouple from snmalloc headers and add shared library (DLL) support
Introduce include/trieste/compiler.h with self-contained TRIESTE_SLOW_PATH,
TRIESTE_FAST_PATH, TRIESTE_LIKELY/UNLIKELY, and TRIESTE_USED_FUNCTION macros,
replacing all uses of snmalloc/ds_core/defines.h macros throughout the
headers (ast.h, intrusive_ptr.h, logging.h, pass.h, rewrite.h, wf.h).
Make snmalloc an optional dependency controlled by TRIESTE_USE_SNMALLOC.
When disabled, the core library no longer fetches or links snmalloc at all.
The vcpkg port moves snmalloc from a hard dependency to an opt-in "snmalloc"
feature.
Add DLL export support for the JSON and YAML parser libraries:
CMake modernisation:
dependency entirely. EXCLUDE_FROM_ALL is used natively on all
FetchContent declarations.
Trieste does not use modules.
prefixes.
provides the clangformat_targets macro).
vcpkg port fixes:
Fix C++17 compatibility in yaml reader (replace std::set::contains with
find/end).
Bump VERSION to 1.1.0.