Skip to content

config: make yaml parsing self contained lib#384

Draft
MariusBgm wants to merge 7 commits into
mainfrom
dev_split_out_silkit_yaml
Draft

config: make yaml parsing self contained lib#384
MariusBgm wants to merge 7 commits into
mainfrom
dev_split_out_silkit_yaml

Conversation

@MariusBgm

@MariusBgm MariusBgm commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Split out SilKitYaml, as selfcontained interface to rapidyaml (including rapidyaml itself).
Allows reusing the YamlReader/Writer in other tools.
this is an internal lib, not part of the public SilKit API surface

Signed-off-by: Marius Börschig <Marius.Boerschig@vector.com>
move to SilKitYaml

Signed-off-by: Marius Börschig <Marius.Boerschig@vector.com>

@VDanielEdwards VDanielEdwards left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me overall. When using it from the sil-kit repository, the dependency on the rapidyaml target can be added as a subdirectory as well:

cmake_minimum_required(VERSION 3.24)
project(SilKitYamlTest)

add_subdirectory(
  "${CMAKE_CURRENT_SOURCE_DIR}/../sil-kit-b-yaml/ThirdParty/rapidyaml"
  "${CMAKE_CURRENT_BINARY_DIR}/_deps/rapidyaml"
  EXCLUDE_FROM_ALL
)

add_library(rapidyaml ALIAS rapidyaml-static)

add_subdirectory(
  "${CMAKE_CURRENT_SOURCE_DIR}/../sil-kit-b-yaml/SilKitYaml"
  "${CMAKE_CURRENT_BINARY_DIR}/_deps/SilKitYaml"
  EXCLUDE_FROM_ALL
)

add_executable("${PROJECT_NAME}" main.cpp)
target_link_libraries("${PROJECT_NAME}" PRIVATE SilKitYaml)

Comment thread SilKitYaml/README.md Outdated
Comment thread SilKitYaml/README.md Outdated
MariusBgm and others added 4 commits July 1, 2026 10:11
Co-authored-by: Daniel Edwards <daniel.edwards@vector.com>
Signed-off-by: Marius Börschig <marius.boerschig@vector.com>
Co-authored-by: Daniel Edwards <daniel.edwards@vector.com>
Signed-off-by: Marius Börschig <marius.boerschig@vector.com>
…yaml

dont use rapidyaml in capability parser

Signed-off-by: Marius Börschig <Marius.Boerschig@vector.com>
…silkit_yaml

Signed-off-by: Marius Börschig <Marius.Boerschig@vector.com>
@MariusBgm

Copy link
Copy Markdown
Collaborator Author

Looks good to me overall. When using it from the sil-kit repository, the dependency on the rapidyaml target can be added as a subdirectory as well:

cmake_minimum_required(VERSION 3.24)
project(SilKitYamlTest)

add_subdirectory(
  "${CMAKE_CURRENT_SOURCE_DIR}/../sil-kit-b-yaml/ThirdParty/rapidyaml"
  "${CMAKE_CURRENT_BINARY_DIR}/_deps/rapidyaml"
  EXCLUDE_FROM_ALL
)

add_library(rapidyaml ALIAS rapidyaml-static)

add_subdirectory(
  "${CMAKE_CURRENT_SOURCE_DIR}/../sil-kit-b-yaml/SilKitYaml"
  "${CMAKE_CURRENT_BINARY_DIR}/_deps/SilKitYaml"
  EXCLUDE_FROM_ALL
)

add_executable("${PROJECT_NAME}" main.cpp)
target_link_libraries("${PROJECT_NAME}" PRIVATE SilKitYaml)

that's a very good point: consuming the SilKitYaml fails if you do not provide the rapidyaml.
I'd love to have it self contained. e.g. users just have to do a add_subdirectory(sil-kit/SikItYaml) and be done. Maybe move the rapidyaml header into the folder so we can easily consume it, or move SilKitYaml to ThirdParty (since it is just a very thin facade on top of ryml). I'll experiment with this

…parate silkit_yaml

Signed-off-by: Marius Börschig <Marius.Boerschig@vector.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants