SDK
SDK/ is the external-facing package for TonCut Desktop plugin developers. It contains the copied Pascal interface units, the shared C++ contract header, ready-to-open example projects, and the Markdown manuals that explain how to build plugins against the Desktop host contract.
Overview
The SDK is published on GitHub at codeton-software/toncut-plugin-sdk: clone or download it to get the Pascal and C++ headers, the example projects, and the manuals described below. This site documents that package.
Start with these files and directories:
SDK/README.mdSDK/include/cpp/TonCutPluginSdk.hppSDK/include/pascal/uITcPlugin.pasSDK/include/pascal/uITonCut.pasSDK/examples/SDK/manuals/
Every shipped native example keeps the public host contract unchanged:
- Export
TcpInitializeV2. - Return an ITcPlugin.
- Report
EngineVersionusing the current engine version shown in the header badge. - Expose , , and .
- Build to
.plgdirectly.
Open the SDK entrypoints
uses
uITcPlugin,
uITonCut,
uITcPluginCommon;
SDK layout
The SDK is split by concern:
| Directory | Purpose |
|---|---|
SDK/include/cpp/ | Shared translated C++ host contract |
SDK/include/pascal/ | Copied Pascal source-of-truth interface units |
SDK/examples/shared/ | Reusable starter helpers and sample CSV |
SDK/examples/<language>/ | Buildable example projects and solutions |
SDK/manuals/ | External-developer documentation in Markdown |
The detailed layout is documented in SDK/manuals/sdk-layout.md.
Manuals
The SDK manuals are part of the package and should be referenced directly when onboarding external developers:
SDK/manuals/getting-started.mdSDK/manuals/plugin-contract-and-abi.mdSDK/manuals/csv-schema.mdSDK/manuals/building-examples.mdSDK/manuals/support-by-language.mdSDK/manuals/public-contract-units.md
Use the manuals as the canonical file-path reference. The web docs now mirror the same SDK structure and no longer point to internal TonCut/... source paths.
Example projects
Open one of these entrypoints directly:
- Delphi:
SDK/examples/delphi/CsvImportExport/CsvImportExport.dproj - C++Builder (untested, provided as-is):
SDK/examples/cppbuilder/CsvImportExport/CsvImportExport.cbproj - VS C++:
SDK/examples/msvc/CsvImportExport/CsvImportExport.sln - C#:
SDK/examples/csharp/CsvImportExport/CsvImportExport.sln
The shared native starter logic lives in SDK/examples/shared/cpp/, and the round-trip sample input file lives in SDK/examples/shared/csv/example.csv.
The shipped starter now covers two output paths: source-data round trips through SaveFile and single-sheet PLT result export through SaveResult.
Starter feature set
function TCsvImportExportPlugin.GetFeatures(): TTcpFeatures;
begin
Result := [feImport, feExport, feSaveResultToFile];
end;
The split C# starter reports that feature set from its native shim. The managed project exposes only CsvCodec, CsvRowRecord, and CsvSchema; it does not publish a direct TTcpFeatures projection.
Support levels
| Environment | SDK status |
|---|---|
| Delphi | Full native starter |
| C++Builder | Native starter on the shared C++ subset; never compiled or tested by the maintainers, provided as-is |
| VS C++ | Native starter on the shared C++ subset |
| C# | Native-shim-only TonCut ABI plus managed CSV core |
The detailed boundary notes live in SDK/manuals/support-by-language.md.
C++Builder is untested. The Delphi, VS C++, and C# examples are built by
the maintainers. The C++Builder example (examples/cppbuilder/) and the
C++Builder build path in the example and test drivers have never been compiled
or tested by the maintainers, so they are provided as-is and may need
adjustments. If you find a problem, please open an
issue or send a
pull request.
The C# example is intentionally split. The native shim owns the exported
TcpInitializeV2 symbol, every TonCut interface pointer and callback, and the
starter PLT result-export path. Managed code owns only CSV parsing,
validation, row data, and serialization; the bridge between the two halves
remains project-specific.