Skip to content

mc2-project/mc2-serialization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mc2-serialization

This repo contains shared serialization functionality across the mc2 ecosystem.

Overview

mc2-serialization contains the following:

Building

Building for an enclave environment

To build mc2-serialization for an enclave, add the following to your CMakeLists.txt file:

include(FetchContent)
FetchContent_Declare(
  mc2_serialization
  GIT_REPOSITORY https//github.com/mc2-project/mc2-serialization.git
)
set(FETCHCONTENT_QUIET OFF)
FetchContent_MakeAvailable(mc2_serialization)

Building for a host environment

To build mc2-serialization for a host, add the following to your CMakeLists.txt:

include(FetchContent)
FetchContent_Declare(
  mc2_serialization
  GIT_REPOSITORY https://github.com/mc2-project/mc2-serialization.git
)
set(FETCHCONTENT_QUIET OFF)
set(HOST ON CACHE BOOL "")
FetchContent_MakeAvailable(mc2_serialization)

Usage

After building, the mc2_serialization target can be linked to, and flattbuffers/flatbuffers_cpp_generation can be added as dependencies.

Headers can be imported directly (e.g. #include "serialization.h"). If you need to include the flatbuffers headers, add the following line to your CMakeLists.txt file:

include_directories(${mc2_serialization_BINARY_DIR}/flatbuffers/include)

and import headers as #include flatbuffers/schema.h.

About

Serialization functionality used by the mc2 ecosystem

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published