feat(sdk): scaffold KCSDK library + kcsdk pybind11 module (#350) #358

Merged
forbes merged 1 commits from feat/kcsdk-scaffold into main 2026-02-27 19:51:39 +00:00
Owner

Summary

Scaffolds the KCSDK C++ shared library and kcsdk pybind11 module — the build infrastructure for the C++-backed addon SDK.

Closes #350 (Phase 1 of KCSDK epic #346).

Changes

New files:

  • src/Gui/SDK/KCSDKGlobal.h — DLL export macros (same pattern as KCSolveGlobal.h)
  • src/Gui/SDK/SDKRegistry.h/.cpp — Empty singleton with API_VERSION_MAJOR = 1 and available()
  • src/Gui/SDK/CMakeLists.txt — Builds KCSDK shared library, links FreeCADBase
  • src/Gui/SDK/bindings/kcsdk_py.cpp — pybind11 module exposing API_VERSION_MAJOR and available()
  • src/Gui/SDK/bindings/CMakeLists.txt — Builds kcsdk pybind11 module, links KCSDK + pybind11

Modified:

  • src/Gui/CMakeLists.txtadd_subdirectory(SDK)

Verification

import kcsdk
print(kcsdk.API_VERSION_MAJOR)  # 1
print(kcsdk.available())         # []

Next steps

Issue #351 will migrate the editing context API through this module.

## Summary Scaffolds the KCSDK C++ shared library and `kcsdk` pybind11 module — the build infrastructure for the C++-backed addon SDK. Closes #350 (Phase 1 of KCSDK epic #346). ## Changes **New files:** - `src/Gui/SDK/KCSDKGlobal.h` — DLL export macros (same pattern as KCSolveGlobal.h) - `src/Gui/SDK/SDKRegistry.h/.cpp` — Empty singleton with `API_VERSION_MAJOR = 1` and `available()` - `src/Gui/SDK/CMakeLists.txt` — Builds `KCSDK` shared library, links FreeCADBase - `src/Gui/SDK/bindings/kcsdk_py.cpp` — pybind11 module exposing `API_VERSION_MAJOR` and `available()` - `src/Gui/SDK/bindings/CMakeLists.txt` — Builds `kcsdk` pybind11 module, links KCSDK + pybind11 **Modified:** - `src/Gui/CMakeLists.txt` — `add_subdirectory(SDK)` ## Verification ```python import kcsdk print(kcsdk.API_VERSION_MAJOR) # 1 print(kcsdk.available()) # [] ``` ## Next steps Issue #351 will migrate the editing context API through this module.
forbes added the enhancement label 2026-02-27 19:37:13 +00:00
forbes added 1 commit 2026-02-27 19:37:14 +00:00
feat(sdk): scaffold KCSDK library + kcsdk pybind11 module (#350)
All checks were successful
Build and Test / build (pull_request) Successful in 29m2s
9b28feb8ca
Add the KCSDK C++ shared library and kcsdk pybind11 module, establishing
the build infrastructure for the C++-backed addon SDK.

New files:
- src/Gui/SDK/KCSDKGlobal.h — DLL export macros
- src/Gui/SDK/SDKRegistry.h/.cpp — empty singleton with API_VERSION_MAJOR=1
- src/Gui/SDK/CMakeLists.txt — builds KCSDK shared library
- src/Gui/SDK/bindings/kcsdk_py.cpp — pybind11 module exposing version + available()
- src/Gui/SDK/bindings/CMakeLists.txt — builds kcsdk pybind11 module

Modified:
- src/Gui/CMakeLists.txt — add_subdirectory(SDK)

Verified: import kcsdk; kcsdk.API_VERSION_MAJOR == 1; kcsdk.available() == []
forbes merged commit 169c177b69 into main 2026-02-27 19:51:39 +00:00
forbes deleted branch feat/kcsdk-scaffold 2026-02-27 19:51:40 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kindred/create#358