Skip to content

Commit 3f9003f

Browse files
refactor(sdk)!: extract pj_datastore to the app repo; SDK now Apache-2.0 (#113)
The columnar storage engine (pj_datastore) was the only MPL-2.0 part of this package and the only component plugins never link: plugins reach storage through the pj_base C ABI, and the host-side write bridges live in the engine. Move it into the PlotJuggler application repo so this submodule is purely the plugin SDK (pj_base + pj_plugins). - Remove pj_datastore/ entirely and the datastore Conan/CMake component, the with_datastore / with_parquet_example options, and the nanoarrow / tsl / benchmark detection that existed only for the engine. - License is now Apache-2.0 in full (drop LICENSE-MPL); update LICENSE/README. - Bump 0.5.1 -> 0.6.0 (removing the datastore component is an API removal). - Update CI workflows, the SDK install smoke-test, and docs (CLAUDE.md, V4_STORE.md, pj_plugins docs) to reflect the new engine location. BREAKING CHANGE: the `datastore` CMake/Conan component is removed from plotjuggler_core. Consumers that need the storage engine must depend on it in the application repo; plugins are unaffected (they use base/plugin_sdk/plugin_host). Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent a17f6f5 commit 3f9003f

79 files changed

Lines changed: 56 additions & 23262 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/linux-ci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@ jobs:
169169
conan install . --output-folder=build --build=missing
170170
-s build_type=RelWithDebInfo -s compiler.cppstd=20
171171
-o "plotjuggler_core/*:with_tests=True"
172-
-o "plotjuggler_core/*:with_parquet_example=False"
173172
174173
- name: Save Conan cache to ghcr.io
175174
# Only push from the canonical repo on real pushes (forks lack write
@@ -208,7 +207,6 @@ jobs:
208207
-DCMAKE_BUILD_TYPE=RelWithDebInfo
209208
-DCMAKE_C_COMPILER_LAUNCHER=ccache
210209
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
211-
-DPJ_BUILD_PARQUET_IMPORT_EXAMPLE=OFF
212210
-DPJ_ENABLE_ABI_CHECK=ON
213211
214212
- name: Build

.github/workflows/macos-ci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,12 @@ jobs:
3030
conan install . --output-folder=build --build=missing
3131
-s build_type=RelWithDebInfo -s compiler.cppstd=20
3232
-o "plotjuggler_core/*:with_tests=True"
33-
-o "plotjuggler_core/*:with_parquet_example=False"
3433
3534
- name: Configure
3635
run: >
3736
cmake -S . -B build -G Ninja
3837
-DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/build/conan_toolchain.cmake
3938
-DCMAKE_BUILD_TYPE=RelWithDebInfo
40-
-DPJ_BUILD_PARQUET_IMPORT_EXAMPLE=OFF
4139
4240
- name: Build
4341
run: cmake --build build

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,5 +261,5 @@ jobs:
261261
```
262262
263263
See [README.md](https://github.com/PlotJuggler/plotjuggler_core/blob/main/README.md)
264-
for available components (`base`, `datastore`, `plugin_sdk`, `plugin_host`)
264+
for available components (`base`, `plugin_sdk`, `plugin_host`)
265265
and consumer examples.

.github/workflows/windows-ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@ jobs:
177177
-DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/build/conan_toolchain.cmake
178178
-DCMAKE_C_COMPILER_LAUNCHER=sccache
179179
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache
180-
-DPJ_BUILD_PARQUET_IMPORT_EXAMPLE=OFF
181180
182181
- name: Build
183182
run: cmake --build build --config Release

CLAUDE.md

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,15 @@
22

33
## Project Overview
44

5-
PlotJuggler Core — C++20 foundation libraries for PlotJuggler storage, plugin SDKs, and host-side
5+
PlotJuggler Core — C++20 foundation libraries that make up the PlotJuggler plugin SDK and host-side
66
plugin loading. **Read-only submodule** inside PJ4: consumed as-is; changes happen in this repo,
77
not in the PJ4 superproject. This file is the single navigation node for the whole submodule — the
8-
three modules below have no own CLAUDE.md.
8+
two modules below have no own CLAUDE.md.
9+
10+
> The columnar storage engine (`pj_datastore`) used to live here. It now lives in the PlotJuggler
11+
> application repo as a top-level module: plugins reach storage only through the C ABI defined in
12+
> `pj_base` (the host-side write implementations are not part of the SDK), so the engine does not
13+
> belong in the plugin SDK.
914
1015
### Modules
1116

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

2528
### Dependency graph
2629

27-
- `pj_datastore``pj_base` (+ fmt, nanoarrow)
2830
- `pj_plugins``pj_base` (+ nlohmann/json)
2931

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

56-
**Datastore** (`pj_datastore/docs/`): `REQUIREMENTS.md` (data model, ingest contract, schema
57-
evolution, query) · `ARCHITECTURE.md` (domain model, layers, encoding, DerivedEngine) ·
58-
`USER_GUIDE.md` (plugin-author write/read patterns, ValueRef, TypedNull) ·
59-
`OBJECT_STORE_DESIGN.md` (lazy-fetch blobs, retention).
60-
6158
**Plugin system** (`pj_plugins/docs/`): `REQUIREMENTS.md` (families, capability system, config
6259
contract) · `ARCHITECTURE.md` (C ABI protocols, SDK base classes, host loaders, dialog protocol) ·
6360
`data-source-guide.md` · `message-parser-guide.md` · `dialog-plugin-guide.md` · `toolbox-guide.md`.
@@ -123,7 +120,7 @@ or push a release without the user's go-ahead.
123120
## Instructions Glossary
124121

125122
- **"Read all documentation"** — read every `.md` in the tree (`find . -name '*.md'`), including
126-
`docs/`, `pj_datastore/docs/`, `pj_plugins/docs/`.
123+
`docs/` and `pj_plugins/docs/`.
127124
- **"Update the documentation"** — correct any doc made outdated/inaccurate this session; if a doc
128125
disagrees with code, fix the doc to match reality; add info whose absence caused a bug.
129126
- **"Check documentation"** — review the docs related to the changed module/API; confirm they still

CMakeLists.txt

Lines changed: 2 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,7 @@ include(PjPluginManifest)
1616
option(PJ_ASSERT_THROWS "Use exceptions instead of assert() for PJ_ASSERT" OFF)
1717
option(PJ_ENABLE_SANITIZERS "Enable ASAN for Debug builds" OFF)
1818
option(PJ_ENABLE_TSAN "Enable ThreadSanitizer for Debug builds" OFF)
19-
option(PJ_INSTALL_SDK "Install plotjuggler_core CMake package (base/datastore/plugin_sdk/plugin_host)" OFF)
20-
option(
21-
PJ_BUILD_PARQUET_IMPORT_EXAMPLE
22-
"Build parquet_import example (requires full Arrow C++ and Parquet)"
23-
ON
24-
)
25-
option(PJ_BUILD_DATASTORE "Build pj_datastore module (requires nanoarrow)" ON)
19+
option(PJ_INSTALL_SDK "Install plotjuggler_core CMake package (base/plugin_sdk/plugin_host)" OFF)
2620
option(PJ_BUILD_PORTED_PLUGINS "Build pj_ported_plugins (ported plugins collection)" ON)
2721
option(PJ_BUILD_TESTS "Build tests, benchmarks, and examples" ON)
2822
option(PJ_ENABLE_ABI_CHECK "Enable abidiff-based ABI drift gate (requires libabigail)" OFF)
@@ -87,87 +81,6 @@ target_link_libraries(pj_internal_fmt INTERFACE ${PJ_FMT_TARGET})
8781
# package under the capitalised name `FastFloat`.
8882
find_package(FastFloat REQUIRED)
8983

90-
if(PJ_BUILD_DATASTORE)
91-
find_package(tsl-robin-map REQUIRED)
92-
if(PJ_BUILD_TESTS)
93-
find_package(benchmark CONFIG REQUIRED)
94-
endif()
95-
96-
# --- nanoarrow core ---
97-
98-
find_package(nanoarrow CONFIG QUIET)
99-
100-
set(PJ_NANOARROW_TARGET "")
101-
if(TARGET nanoarrow::nanoarrow)
102-
set(PJ_NANOARROW_TARGET nanoarrow::nanoarrow)
103-
elseif(TARGET nanoarrow::nanoarrow_static)
104-
set(PJ_NANOARROW_TARGET nanoarrow::nanoarrow_static)
105-
elseif(TARGET nanoarrow::nanoarrow_shared)
106-
set(PJ_NANOARROW_TARGET nanoarrow::nanoarrow_shared)
107-
else()
108-
find_package(PkgConfig QUIET)
109-
if(PkgConfig_FOUND)
110-
pkg_check_modules(NANOARROW QUIET nanoarrow)
111-
if(NANOARROW_FOUND)
112-
add_library(pj_nanoarrow INTERFACE)
113-
target_include_directories(pj_nanoarrow INTERFACE
114-
${NANOARROW_INCLUDE_DIRS}
115-
)
116-
target_link_libraries(pj_nanoarrow INTERFACE ${NANOARROW_LIBRARIES})
117-
set(PJ_NANOARROW_TARGET pj_nanoarrow)
118-
endif()
119-
endif()
120-
endif()
121-
122-
if(PJ_NANOARROW_TARGET STREQUAL "")
123-
message(FATAL_ERROR
124-
"nanoarrow is required for pj_datastore. "
125-
"Install nanoarrow and expose a CMake target "
126-
"(nanoarrow::nanoarrow / nanoarrow::nanoarrow_static / nanoarrow::nanoarrow_shared) "
127-
"or provide a pkg-config entry named 'nanoarrow'."
128-
)
129-
endif()
130-
131-
# --- nanoarrow IPC ---
132-
133-
set(PJ_NANOARROW_IPC_TARGET "")
134-
if(TARGET nanoarrow::nanoarrow_ipc)
135-
set(PJ_NANOARROW_IPC_TARGET nanoarrow::nanoarrow_ipc)
136-
elseif(TARGET nanoarrow::nanoarrow_ipc_static)
137-
set(PJ_NANOARROW_IPC_TARGET nanoarrow::nanoarrow_ipc_static)
138-
elseif(TARGET nanoarrow::nanoarrow_ipc_shared)
139-
set(PJ_NANOARROW_IPC_TARGET nanoarrow::nanoarrow_ipc_shared)
140-
else()
141-
if(PkgConfig_FOUND)
142-
pkg_check_modules(NANOARROW_IPC QUIET nanoarrow_ipc)
143-
if(NANOARROW_IPC_FOUND)
144-
add_library(pj_nanoarrow_ipc INTERFACE)
145-
target_include_directories(pj_nanoarrow_ipc INTERFACE
146-
${NANOARROW_IPC_INCLUDE_DIRS}
147-
)
148-
target_link_libraries(pj_nanoarrow_ipc INTERFACE ${NANOARROW_IPC_LIBRARIES})
149-
set(PJ_NANOARROW_IPC_TARGET pj_nanoarrow_ipc)
150-
endif()
151-
endif()
152-
endif()
153-
154-
if(PJ_NANOARROW_IPC_TARGET STREQUAL "")
155-
message(FATAL_ERROR
156-
"nanoarrow IPC is required for pj_datastore. "
157-
"Install nanoarrow with IPC support and expose a CMake target "
158-
"(nanoarrow::nanoarrow_ipc / nanoarrow::nanoarrow_ipc_static / nanoarrow::nanoarrow_ipc_shared) "
159-
"or provide a pkg-config entry named 'nanoarrow_ipc'."
160-
)
161-
endif()
162-
163-
# nanoarrow IPC internally depends on the flatcc runtime (libflatccrt).
164-
# Some package managers (e.g. Conan) bundle it alongside the IPC library
165-
# but don't declare it as a transitive link dependency. Since the IPC target
166-
# already sets INTERFACE_LINK_DIRECTORIES, linking by name suffices.
167-
target_link_libraries(${PJ_NANOARROW_IPC_TARGET} INTERFACE flatccrt)
168-
169-
endif() # PJ_BUILD_DATASTORE
170-
17184
# ---------------------------------------------------------------------------
17285
# Modules
17386
# ---------------------------------------------------------------------------
@@ -177,9 +90,6 @@ if(PJ_BUILD_TESTS)
17790
endif()
17891

17992
add_subdirectory(pj_base)
180-
if(PJ_BUILD_DATASTORE)
181-
add_subdirectory(pj_datastore)
182-
endif()
18393
add_subdirectory(pj_plugins)
18494

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

205-
set(PJ_PACKAGE_VERSION "0.5.1")
114+
set(PJ_PACKAGE_VERSION "0.6.0")
206115
set(PJ_PACKAGE_CMAKE_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/plotjuggler_core)
207116

208117
install(EXPORT plotjuggler_coreTargets

LICENSE

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ SPDX-License-Identifier header that is authoritative for that file.
66
pj_base Apache-2.0 LICENSE-APACHE
77
pj_plugins Apache-2.0 LICENSE-APACHE
88
examples Apache-2.0 LICENSE-APACHE
9-
pj_datastore MPL-2.0 LICENSE-MPL
109

1110
Rationale:
1211

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

18-
- The storage engine (pj_datastore) is MPL-2.0. MPL-2.0 is file-level
19-
(weak) copyleft: modifications to the engine's own source files must be
20-
published, but the engine may be combined with proprietary code and
21-
linked into proprietary applications.
22-
23-
Plugins load through a stable C ABI and never statically link pj_datastore,
24-
so the MPL-2.0 engine imposes no obligations on plugin authors.
17+
The columnar storage engine (formerly the MPL-2.0 `pj_datastore` module) has
18+
moved to the PlotJuggler application repository; this SDK is now Apache-2.0
19+
in its entirety.
2520

2621
Copyright (c) 2026 Davide Faconti

0 commit comments

Comments
 (0)