Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/linux-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ jobs:
conan install . --output-folder=build --build=missing
-s build_type=RelWithDebInfo -s compiler.cppstd=20
-o "plotjuggler_core/*:with_tests=True"
-o "plotjuggler_core/*:with_parquet_example=False"

- name: Save Conan cache to ghcr.io
# Only push from the canonical repo on real pushes (forks lack write
Expand Down Expand Up @@ -208,7 +207,6 @@ jobs:
-DCMAKE_BUILD_TYPE=RelWithDebInfo
-DCMAKE_C_COMPILER_LAUNCHER=ccache
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
-DPJ_BUILD_PARQUET_IMPORT_EXAMPLE=OFF
-DPJ_ENABLE_ABI_CHECK=ON

- name: Build
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/macos-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,12 @@ jobs:
conan install . --output-folder=build --build=missing
-s build_type=RelWithDebInfo -s compiler.cppstd=20
-o "plotjuggler_core/*:with_tests=True"
-o "plotjuggler_core/*:with_parquet_example=False"

- name: Configure
run: >
cmake -S . -B build -G Ninja
-DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/build/conan_toolchain.cmake
-DCMAKE_BUILD_TYPE=RelWithDebInfo
-DPJ_BUILD_PARQUET_IMPORT_EXAMPLE=OFF

- name: Build
run: cmake --build build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -261,5 +261,5 @@ jobs:
```

See [README.md](https://github.com/PlotJuggler/plotjuggler_core/blob/main/README.md)
for available components (`base`, `datastore`, `plugin_sdk`, `plugin_host`)
for available components (`base`, `plugin_sdk`, `plugin_host`)
and consumer examples.
1 change: 0 additions & 1 deletion .github/workflows/windows-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ jobs:
-DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/build/conan_toolchain.cmake
-DCMAKE_C_COMPILER_LAUNCHER=sccache
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache
-DPJ_BUILD_PARQUET_IMPORT_EXAMPLE=OFF

- name: Build
run: cmake --build build --config Release
Expand Down
19 changes: 8 additions & 11 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@

## Project Overview

PlotJuggler Core — C++20 foundation libraries for PlotJuggler storage, plugin SDKs, and host-side
PlotJuggler Core — C++20 foundation libraries that make up the PlotJuggler plugin SDK and host-side
plugin loading. **Read-only submodule** inside PJ4: consumed as-is; changes happen in this repo,
not in the PJ4 superproject. This file is the single navigation node for the whole submodule — the
three modules below have no own CLAUDE.md.
two modules below have no own CLAUDE.md.

> The columnar storage engine (`pj_datastore`) used to live here. It now lives in the PlotJuggler
> application repo as a top-level module: plugins reach storage only through the C ABI defined in
> `pj_base` (the host-side write implementations are not part of the SDK), so the engine does not
> belong in the plugin SDK.

### Modules

Expand All @@ -15,16 +20,13 @@ three modules below have no own CLAUDE.md.
SceneEntities, RobotDescription, CameraInfo, Log, ImageAnnotations, FrameTransforms) and their 14
wire codecs (RobotDescription carries source text as-is — no codec), the C-ABI protocol headers for
DataSource/MessageParser/Toolbox + the C++ SDK base classes / host-view helpers built on them.
- **pj_datastore** — columnar storage engine (`DataEngine`) + `ObjectStore` (media/opaque blobs) +
`DerivedEngine` (fmt, tsl::robin_map, nanoarrow). Plugin-data host implementations live here.
- **pj_plugins** — host-side loaders + RAII handles + plugin discovery/catalog for four plugin
families (DataSource, MessageParser, Dialog, Toolbox), config-envelope helpers, and the **dialog
C ABI** (`pj_plugins/dialog_protocol/`). Note the split: the DataSource/MessageParser/Toolbox C-ABI
protocol headers live in `pj_base`; the **Dialog** protocol header lives here, not in `pj_base`.

### Dependency graph

- `pj_datastore` → `pj_base` (+ fmt, nanoarrow)
- `pj_plugins` → `pj_base` (+ nlohmann/json)

## Read path
Expand Down Expand Up @@ -53,11 +55,6 @@ documentation check before commit.
| `docs/toolbox-porting-gap-analysis.md` | Historical PJ3→PJ4 toolbox SDK gap analysis (most gaps now closed; read as context, not current reference) |
| `V4_STORE.md` | ObjectStore plugin ABI: services, ownership rules, lazy fetch |

**Datastore** (`pj_datastore/docs/`): `REQUIREMENTS.md` (data model, ingest contract, schema
evolution, query) · `ARCHITECTURE.md` (domain model, layers, encoding, DerivedEngine) ·
`USER_GUIDE.md` (plugin-author write/read patterns, ValueRef, TypedNull) ·
`OBJECT_STORE_DESIGN.md` (lazy-fetch blobs, retention).

**Plugin system** (`pj_plugins/docs/`): `REQUIREMENTS.md` (families, capability system, config
contract) · `ARCHITECTURE.md` (C ABI protocols, SDK base classes, host loaders, dialog protocol) ·
`data-source-guide.md` · `message-parser-guide.md` · `dialog-plugin-guide.md` · `toolbox-guide.md`.
Expand Down Expand Up @@ -123,7 +120,7 @@ or push a release without the user's go-ahead.
## Instructions Glossary

- **"Read all documentation"** — read every `.md` in the tree (`find . -name '*.md'`), including
`docs/`, `pj_datastore/docs/`, `pj_plugins/docs/`.
`docs/` and `pj_plugins/docs/`.
- **"Update the documentation"** — correct any doc made outdated/inaccurate this session; if a doc
disagrees with code, fix the doc to match reality; add info whose absence caused a bug.
- **"Check documentation"** — review the docs related to the changed module/API; confirm they still
Expand Down
95 changes: 2 additions & 93 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,7 @@ include(PjPluginManifest)
option(PJ_ASSERT_THROWS "Use exceptions instead of assert() for PJ_ASSERT" OFF)
option(PJ_ENABLE_SANITIZERS "Enable ASAN for Debug builds" OFF)
option(PJ_ENABLE_TSAN "Enable ThreadSanitizer for Debug builds" OFF)
option(PJ_INSTALL_SDK "Install plotjuggler_core CMake package (base/datastore/plugin_sdk/plugin_host)" OFF)
option(
PJ_BUILD_PARQUET_IMPORT_EXAMPLE
"Build parquet_import example (requires full Arrow C++ and Parquet)"
ON
)
option(PJ_BUILD_DATASTORE "Build pj_datastore module (requires nanoarrow)" ON)
option(PJ_INSTALL_SDK "Install plotjuggler_core CMake package (base/plugin_sdk/plugin_host)" OFF)
option(PJ_BUILD_PORTED_PLUGINS "Build pj_ported_plugins (ported plugins collection)" ON)
option(PJ_BUILD_TESTS "Build tests, benchmarks, and examples" ON)
option(PJ_ENABLE_ABI_CHECK "Enable abidiff-based ABI drift gate (requires libabigail)" OFF)
Expand Down Expand Up @@ -87,87 +81,6 @@ target_link_libraries(pj_internal_fmt INTERFACE ${PJ_FMT_TARGET})
# package under the capitalised name `FastFloat`.
find_package(FastFloat REQUIRED)

if(PJ_BUILD_DATASTORE)
find_package(tsl-robin-map REQUIRED)
if(PJ_BUILD_TESTS)
find_package(benchmark CONFIG REQUIRED)
endif()

# --- nanoarrow core ---

find_package(nanoarrow CONFIG QUIET)

set(PJ_NANOARROW_TARGET "")
if(TARGET nanoarrow::nanoarrow)
set(PJ_NANOARROW_TARGET nanoarrow::nanoarrow)
elseif(TARGET nanoarrow::nanoarrow_static)
set(PJ_NANOARROW_TARGET nanoarrow::nanoarrow_static)
elseif(TARGET nanoarrow::nanoarrow_shared)
set(PJ_NANOARROW_TARGET nanoarrow::nanoarrow_shared)
else()
find_package(PkgConfig QUIET)
if(PkgConfig_FOUND)
pkg_check_modules(NANOARROW QUIET nanoarrow)
if(NANOARROW_FOUND)
add_library(pj_nanoarrow INTERFACE)
target_include_directories(pj_nanoarrow INTERFACE
${NANOARROW_INCLUDE_DIRS}
)
target_link_libraries(pj_nanoarrow INTERFACE ${NANOARROW_LIBRARIES})
set(PJ_NANOARROW_TARGET pj_nanoarrow)
endif()
endif()
endif()

if(PJ_NANOARROW_TARGET STREQUAL "")
message(FATAL_ERROR
"nanoarrow is required for pj_datastore. "
"Install nanoarrow and expose a CMake target "
"(nanoarrow::nanoarrow / nanoarrow::nanoarrow_static / nanoarrow::nanoarrow_shared) "
"or provide a pkg-config entry named 'nanoarrow'."
)
endif()

# --- nanoarrow IPC ---

set(PJ_NANOARROW_IPC_TARGET "")
if(TARGET nanoarrow::nanoarrow_ipc)
set(PJ_NANOARROW_IPC_TARGET nanoarrow::nanoarrow_ipc)
elseif(TARGET nanoarrow::nanoarrow_ipc_static)
set(PJ_NANOARROW_IPC_TARGET nanoarrow::nanoarrow_ipc_static)
elseif(TARGET nanoarrow::nanoarrow_ipc_shared)
set(PJ_NANOARROW_IPC_TARGET nanoarrow::nanoarrow_ipc_shared)
else()
if(PkgConfig_FOUND)
pkg_check_modules(NANOARROW_IPC QUIET nanoarrow_ipc)
if(NANOARROW_IPC_FOUND)
add_library(pj_nanoarrow_ipc INTERFACE)
target_include_directories(pj_nanoarrow_ipc INTERFACE
${NANOARROW_IPC_INCLUDE_DIRS}
)
target_link_libraries(pj_nanoarrow_ipc INTERFACE ${NANOARROW_IPC_LIBRARIES})
set(PJ_NANOARROW_IPC_TARGET pj_nanoarrow_ipc)
endif()
endif()
endif()

if(PJ_NANOARROW_IPC_TARGET STREQUAL "")
message(FATAL_ERROR
"nanoarrow IPC is required for pj_datastore. "
"Install nanoarrow with IPC support and expose a CMake target "
"(nanoarrow::nanoarrow_ipc / nanoarrow::nanoarrow_ipc_static / nanoarrow::nanoarrow_ipc_shared) "
"or provide a pkg-config entry named 'nanoarrow_ipc'."
)
endif()

# nanoarrow IPC internally depends on the flatcc runtime (libflatccrt).
# Some package managers (e.g. Conan) bundle it alongside the IPC library
# but don't declare it as a transitive link dependency. Since the IPC target
# already sets INTERFACE_LINK_DIRECTORIES, linking by name suffices.
target_link_libraries(${PJ_NANOARROW_IPC_TARGET} INTERFACE flatccrt)

endif() # PJ_BUILD_DATASTORE

# ---------------------------------------------------------------------------
# Modules
# ---------------------------------------------------------------------------
Expand All @@ -177,9 +90,6 @@ if(PJ_BUILD_TESTS)
endif()

add_subdirectory(pj_base)
if(PJ_BUILD_DATASTORE)
add_subdirectory(pj_datastore)
endif()
add_subdirectory(pj_plugins)

if(PJ_BUILD_PORTED_PLUGINS AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/pj_ported_plugins/CMakeLists.txt")
Expand All @@ -193,7 +103,6 @@ endif()
# Exported CMake namespace: plotjuggler_core::
# Components:
# base — vocabulary types (always available)
# datastore — columnar engine (optional, requires PJ_BUILD_DATASTORE)
# plugin_sdk — plugin-author surface: base + dialog SDK + parser SDK
# plugin_host — host-side loaders (data_source, message_parser, toolbox,
# dialog, catalogs)
Expand All @@ -202,7 +111,7 @@ endif()
if(PJ_INSTALL_SDK)
include(CMakePackageConfigHelpers)

set(PJ_PACKAGE_VERSION "0.5.1")
set(PJ_PACKAGE_VERSION "0.6.0")
set(PJ_PACKAGE_CMAKE_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/plotjuggler_core)

install(EXPORT plotjuggler_coreTargets
Expand Down
11 changes: 3 additions & 8 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ SPDX-License-Identifier header that is authoritative for that file.
pj_base Apache-2.0 LICENSE-APACHE
pj_plugins Apache-2.0 LICENSE-APACHE
examples Apache-2.0 LICENSE-APACHE
pj_datastore MPL-2.0 LICENSE-MPL

Rationale:

Expand All @@ -15,12 +14,8 @@ Rationale:
the SDK without restriction. Apache-2.0 also grants an explicit patent
license to downstream users.

- The storage engine (pj_datastore) is MPL-2.0. MPL-2.0 is file-level
(weak) copyleft: modifications to the engine's own source files must be
published, but the engine may be combined with proprietary code and
linked into proprietary applications.

Plugins load through a stable C ABI and never statically link pj_datastore,
so the MPL-2.0 engine imposes no obligations on plugin authors.
The columnar storage engine (formerly the MPL-2.0 `pj_datastore` module) has
moved to the PlotJuggler application repository; this SDK is now Apache-2.0
in its entirety.

Copyright (c) 2026 Davide Faconti
Loading
Loading