| # Vigil runtime source |
|
|
| This directory contains the complete source used by the Vigil runtime to read |
| skill packages, produce the model input features, load the ONNX weights, and |
| return an aggregate verdict. |
|
|
| The source is included for transparency and reproducibility. Most users do not |
| need to build it because the local browser harness installs the matching |
| prebuilt runtime automatically. |
|
|
| ## Build |
|
|
| Install Go 1.26.1 or newer on the target platform, then run: |
|
|
| ```bash |
| go build -o vigil-runtime ./cmd/vigil-compact |
| ``` |
|
|
| Build each operating system and architecture on a matching native runner. The |
| ONNX Go binding is platform-specific and is not intended for |
| `CGO_ENABLED=0` cross-compilation. |
|
|
| The resulting binary dynamically loads ONNX Runtime when it starts. Pass the |
| shared library, model, and metadata paths to the runtime: |
|
|
| ```bash |
| ./vigil-runtime \ |
| --require-model \ |
| --model ../compact-model.onnx \ |
| --metadata ../compact-model.onnx.json \ |
| --runtime-lib /path/to/libonnxruntime.so \ |
| --format json \ |
| /path/to/skill |
| ``` |
|
|
| Use `libonnxruntime.dylib` on macOS or `onnxruntime.dll` on Windows. |
|
|
| The source is provided under the repository's OpenMDW-1.1 license. Go module |
| dependencies and the separately packaged ONNX Runtime retain their respective |
| licenses. |
|
|