Thanks for helping with openvino-nim. This document covers how to build,
check and submit changes. Read STYLE_GUIDE.md before
writing code, and
OPENVINO_NIM_0.1_DEVELOPMENT_PLAN.md
for the phase-by-phase scope of 0.1.0.
| Component | Requirement | Needed for |
|---|---|---|
| Nim | 2.0.0 or newer; 2.2.12 is the pinned primary version | everything |
| OpenVINO Runtime | 2026.4.x |
ABI, integration and example tasks |
| OpenVINO C headers | From the same 2026.4.x release |
regenerating bindings, ABI probes |
clang-format |
Version pinned by CI | handwritten C |
Unit tests, linting and formatting do not require OpenVINO. Tasks that do require it fail with an explicit message naming the missing prerequisite. They never skip silently and report success.
nimble check # Nimble's own package validation
nimble lint # style, whitespace and layering checks
nimble format # rewrite handwritten Nim with the pinned nimpretty
nimble formatCheck # fail if anything is not already formatted
nimble test # unit tests, no OpenVINO runtime required
nimble docs # generate API docs into build/docs
nimble releaseCheck # verify version metadata consistencynimble check is Nimble's built-in package validation and cannot be
overridden by a task of the same name. Strict compiler checking
(nim check --styleCheck:error) therefore runs inside nimble lint.
These entry points are available in the current task set. Tasks that need an OpenVINO installation fail with an explicit prerequisite message instead of silently reporting a skip as a pass:
| Task | Introduced with |
|---|---|
nimble testAbi |
C ABI probe |
nimble testSmoke |
runtime symbol smoke test |
nimble testLifecycle |
CPU lifecycle and error paths |
nimble testIntegration |
CPU inference closed loop |
nimble examples |
runnable public examples |
nimble packagingCheck |
clean-directory package consumer |
nimble releaseArchive |
release packaging dry run |
nimble formatCheckpasses with a zero diff.nimble lintpasses.nimble testpasses.nimble checkpasses.- Every new public symbol has a doc comment stating ownership, copying, blocking behaviour and exceptions.
- Every new public symbol has at least one success test and at least one related failure-path test.
docs/c-api-coverage.mdor the managed API list is updated.CHANGELOG.mdis updated whenever user-observable behaviour changes.DEVLOG.mdrecords any decision, measurement or overturned assumption worth remembering. It is bilingual: add the entry to both the## Englishand the## 中文half in the same commit.nimble lintfails when the two halves hold a different number of entries.
The raw layer is not a convenience wrapper. It is an audited transcription of a pinned C ABI.
- Never guess a signature, ownership rule or thread-safety property. Check
the pinned
2026.4.xheaders. If the headers do not settle the question, record a blocking issue and a decision record rather than implementing a guess. - Never rename an upstream symbol to satisfy Nim naming, including upstream typos.
- Never call a C varargs entry point. Use the non-variadic properties API.
- Never hand-edit generated bindings. Change the generator and commit the regenerated output together.
{.push styleChecks: off.}is permitted only insidesrc/openvino/rawand must be closed immediately with{.pop.}.
- One atomic, explainable change per commit, ideally matching one phase sub-goal.
- Keep pure reformatting separate from semantic change.
- Ship a generator change together with its generated output.
- Update tests, documentation and the changelog in the same commit as a public API change.
- The commit message answers What, Why, Test and Risk. "Fix issue" is not acceptable.
- Prefer small, complete changes. A handwritten semantic diff approaching 1000 lines should be split. Generated files are counted separately and may not be used to disguise handwritten complexity.
Conventional Commit style, with the scope naming the layer:
feat(raw): bind OpenVINO 2026.4 core and property APIs
test(raw): add OpenVINO 2026.4 ABI probe
feat(runtime): add tensor and synchronous inference
docs: document handle ownership rules
Branch names: feat/..., fix/..., docs/..., test/..., chore/....
Reviewers work through a change in this order, because an early problem makes later comments moot:
- Scope and layering
- ABI correctness and ownership
- API shape and naming
- Tests
- Cross-platform behaviour and documentation
- Formatting and lint
Generated diffs are reviewed through their input version, the generator change, the coverage diff and the ABI probe results, not by scanning thousands of lines by eye.
openvino-nim is a general-purpose binding. The following belong in a
downstream application, not in this package:
- Choosing a default device, ordering device preferences or falling back to another device after a failure.
- Cache file naming, cache directories, cache invalidation or "import if the blob exists, otherwise compile and export" policies.
- Model discovery, downloading, preprocessing, postprocessing or result interpretation.
- Logging, CLI handling, configuration files, task scheduling or infer request pooling.
Import and export of a compiled model are offered as explicit operations. Deciding when to use them is the application's job.
Creating tags, pushing, opening pull requests, publishing releases and publishing to the Nimble package index all require explicit authorisation from the project owner for that specific action. Nothing in the development plan or in this document grants that authorisation implicitly.
Contributions are accepted under Apache-2.0, matching
LICENSE. Every handwritten source file starts with
SPDX-License-Identifier: Apache-2.0.