You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 876482e
Browse filesBrowse the repository at this point in the historyBrowse files
ci: build, test and check the installed package, and document the build and the ABI policy
The workflow builds and tests wolf on Linux and Windows, runs the script
tests and the declaration lint, installs the package and builds a
consumer that checks the exported variables and the absence of the
Support headers. The README describes the linguist identity, the ABI
policy and the vcpkg build, and docs/Status.md records the state of the
implementation.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@@ -41,16 +43,20 @@ Each entry is a path to a linguist manifest:
41
43
42
44
The `(interface, level, variant)` triple selects a provider through synthrt's interpreter discovery. The provider interprets `exports`, `configuration`, import options, execution factories, validators, and extensions for that contract.
43
45
44
-
The split follows the one synthrt already uses. `exports`is what the linguist declares about itself. `configuration` contains provider-specific resources. Relative paths resolve against the declaration file's directory.
46
+
The split follows the convention of synthrt. `language` and `scheme` are fields that the `linguist` category adds to every declaration and reads before a provider is selected. Together they form the identity of the linguist: an ISO 639-3 language code and the notation in which its pronunciations are written. `exports` contains the declarations of the linguist about itself. `configuration` contains provider-specific resources. Relative paths resolve against the declaration file's directory.
45
47
46
48
A linguist is referred to like any other contribute:
vendor/sample:linguist/mandarin # version resolved from dependencies
51
-
:linguist/mandarin # within the referring package
51
+
vendor/sample:linguist/mandarin # a module in a resolved direct dependency
52
+
:linguist/mandarin # a module in the referring package
52
53
```
53
54
55
+
A reference carries no version. The version of `vendor/sample` to which the reference binds is
56
+
determined by the entry for that package in the `dependencies` of the referring package. The
57
+
package id must appear in `dependencies`, and a reference to a module in the referring package
58
+
must use the leading `:` form.
59
+
54
60
## Providing a linguist
55
61
56
62
Implement `wolf::LinguistProvider` and expose it through a `wolf::LinguistProviderPlugin`. The provider owns all contract-specific behavior, including import options, execution factories, validators, and spec extensions:
@@ -78,15 +84,75 @@ auto spec = package->contribution("linguist", "mandarin")
78
84
79
85
A `SynthUnit` reads the list of registered categories once, when it is constructed. wolf registers `linguist` before `main`, so any unit built afterwards has it. A plugin could not do the same: plugins load lazily *through* a unit, so by the time one runs its static initializers, that unit has already built its categories. Contributing a category is something a linked library does.
80
86
87
+
Linking alone is not sufficient. A linker that drops unreferenced libraries, as ELF linkers do under `--as-needed` and the MSVC linker does for every import library, drops wolf from a host that uses only the category and references no wolf symbol. Such a host calls `wolf::linkLinguistCategory()` once before it constructs a unit. The function has an empty body; the reference to it keeps the library on the link line.
88
+
89
+
## Versioning and ABI
90
+
91
+
The current version is 0.1.0.0. **No ABI guarantee applies before version 1.0.** Most types that a
92
+
host uses are value types in public headers, namely `LanguageStatus`, `LanguageEntry`,
93
+
`SingerEntry`, `SingerRef` and every payload under `Api/`. A new field changes the size of such a
94
+
type, and a new virtual function changes the vtable of a contract interface such as
95
+
`WolfPipelineExtension`. Mixing objects compiled against two versions of these headers is undefined
96
+
behavior rather than a link error, and therefore produces no diagnostic.
97
+
98
+
The public headers are those under `Api/`, `Linguist/` and `Session/`, and the package installs no
99
+
other header. `wolf/Support` contains the internal helpers of the plugins in this repository and is
100
+
not installed. Its stateless helpers are compiled into the static library `wolfsupport` with hidden
101
+
visibility; libwolf and each plugin link that library privately, and no binary exports its
102
+
symbols. The two components that must exist once per process, the resource cache and the log
103
+
category, remain in libwolf and are exported under `WOLF_INTERNAL_EXPORT` for use by the plugins
104
+
of this repository. These symbols are not public API, carry no ABI guarantee at any version, and
105
+
must not be linked by a third-party provider. A provider built outside this repository depends
106
+
only on the installed headers and on synthrt.
107
+
108
+
**A host must be rebuilt whenever the version of wolf changes.** The version is raised in the same
109
+
commit as every ABI-breaking change, so a changed version number indicates that a rebuild is
110
+
required.
111
+
The installed CMake package is written with `ExactVersion` compatibility, so `find_package(wolf)`
112
+
with a version accepts only that exact version. `wolf::LinguistSession` is the only public type
113
+
held behind a pimpl, and its layout is therefore stable across versions.
114
+
81
115
## Requirements
82
116
83
-
CMake 3.19 or later.
117
+
CMake 3.19 or later, and a checkout of the vcpkg overlay submodule:
118
+
119
+
```sh
120
+
git submodule update --init
121
+
```
122
+
123
+
Every dependency, including synthrt, is installed through vcpkg from the manifest in
124
+
`scripts/vcpkg-manifest`. Ports resolve through two overlays in order: `scripts/vcpkg-ports` in
125
+
this repository, which holds the `synthrt-main` and `wolf-lang-packages` ports, and then the shared
126
+
`scripts/vcpkg` submodule.
84
127
85
-
+[synthrt](https://github.com/diffscope/synthrt)
128
+
+[synthrt](https://github.com/diffscope/synthrt), through the in-repo `synthrt-main` port. The
129
+
port pins the synthrt branch `onnxruntime-builds-uptake`, which is based on the synthrt main
130
+
line. The `synthrt` port of the shared overlay pins the refactor line and is not used here.
|`onnx`| Builds dsinfer and its ONNX Runtime driver through `synthrt-main[onnx]`, which enables the `multig2p-onnx` variant. |
174
+
|`lang-packages`| Installs the default suites of the published language packages (`cmn`, `jpn`, `yue`, `zxx` and the backends they require) through the `wolf-lang-packages` port, for use by the tests. |
175
+
|`tests`| Adds Boost.Test. |
106
176
107
-
synthrt is not a vcpkg dependency here. Build and install it separately, then point at that install:
177
+
> The pin of the overlay submodule must match the pin that synthrt uses. Two revisions of
178
+
> `stdcorelib-plugin` share the version string `0.1.0.0#1` but fetch different upstream refs, and
179
+
> they name the CMake helper differently (`stdc_add_plugin_metadata` and
180
+
> `stdc_add_plugin_manifest`). A mismatched pin therefore fails at configure time.
0 commit comments