Added yaml-cpp as input/output archive, how to incorporate in cereal proper ?

134 views
Skip to first unread message

Jiri Hoogland

unread,
Jul 30, 2016, 12:49:06 PM7/30/16
to cereal serialization library
Hi,

I added logic in my projects to create cereal input/output archives using yaml-cpp,
so that I can use cereal with yaml-cpp in the backend.

Since I assume more people would like to be able to use yaml with cereal,
I started looking at how I could add the logic to cereal proper.

However since cereal is a header-only library, and yaml-cpp is not, 
I don't see a straightforward way to add this in the current library.

My question therefore is, what is the preferred way to approach this ?

Regards
Jiri

w.shan...@gmail.com

unread,
Aug 5, 2016, 5:10:20 PM8/5/16
to cereal serialization library
How to incorporate things like this into cereal is an excellent question. We definitely want to keep cereal self-contained and header only, but don't want to shun contributions such as this.

One idea I had for how to handle things like this would be to have them exist as self-contained cereal "modules" (implemented potentially as a git submodule within cereal) that users could optionally download, knowing that they were essentially a third-party addition.

I created a page on github to house these a while ago (https://github.com/cerealcpp) but haven't fully fleshed out the idea yet.

My biggest concern is how to organize directory structures, assuming this is all implemented with git submodules. Presumably a cereal module would contain its own set of unit tests as well as actual code, but most users won't want to have unit tests included in their actual cereal installation. We need to decide on where modules will go within cereal's directory structure, and how we will organize things such as tests or other utility code associated with a module. 

Another issue is for things like yaml-cpp which is not header-only, should we be bundling it or just listing it as a requirement of a module?

Some relevant github issues: https://github.com/USCiLab/cereal/issues/123 (creating this whole module business) and https://github.com/USCiLab/cereal/issues/139 (making it so that a module could use our unit tests easily)

Shane
Reply all
Reply to author
Forward
0 new messages