Establish native deterministic codegen framework (#45)
Some checks failed
Native code generation / deterministic (macos-latest) (push) Has been cancelled
Native code generation / deterministic (ubuntu-latest) (push) Has been cancelled
Native code generation / deterministic (windows-latest) (push) Has been cancelled
Imaging and meshing gate / native (macos-latest) (push) Has been cancelled
Imaging and meshing gate / native (ubuntu-latest) (push) Has been cancelled
Imaging and meshing gate / native (windows-latest) (push) Has been cancelled
JPEG 2000 feature / linux (push) Has been cancelled
JPEG 2000 feature / macos (push) Has been cancelled
JPEG 2000 feature / windows (push) Has been cancelled
Skia feature / linux (push) Has been cancelled
Skia feature / macos (push) Has been cancelled
Skia feature / windows (push) Has been cancelled
Some checks failed
Native code generation / deterministic (macos-latest) (push) Has been cancelled
Native code generation / deterministic (ubuntu-latest) (push) Has been cancelled
Native code generation / deterministic (windows-latest) (push) Has been cancelled
Imaging and meshing gate / native (macos-latest) (push) Has been cancelled
Imaging and meshing gate / native (ubuntu-latest) (push) Has been cancelled
Imaging and meshing gate / native (windows-latest) (push) Has been cancelled
JPEG 2000 feature / linux (push) Has been cancelled
JPEG 2000 feature / macos (push) Has been cancelled
JPEG 2000 feature / windows (push) Has been cancelled
Skia feature / linux (push) Has been cancelled
Skia feature / macos (push) Has been cancelled
Skia feature / windows (push) Has been cancelled
This commit is contained in:
60
codegen/README.md
Normal file
60
codegen/README.md
Normal file
@@ -0,0 +1,60 @@
|
||||
# Native data generation
|
||||
|
||||
`libremetaverse-codegen` is the Rust-only framework for the six source
|
||||
generators present at LibreMetaverse commit
|
||||
`2aa70bb68513b39795da5d13c88f31b86e85a3ba`. Normal builds compile only the
|
||||
checked-in Rust outputs. They do not run this tool, invoke .NET or Roslyn, read
|
||||
an environment-dependent path, access the network, or open the sibling
|
||||
reference checkout.
|
||||
|
||||
## Provenance inventory
|
||||
|
||||
[`sources.json`](sources.json) is the machine-readable inventory. It records
|
||||
the upstream repository and commit, source-generator hashes, every actual
|
||||
`AdditionalFile`, its vendored path, SHA-256, format, and BSD-3-Clause license.
|
||||
|
||||
| Golden generator | Pinned data inputs |
|
||||
| --- | --- |
|
||||
| PacketSourceGenerator | `message_template.msg` |
|
||||
| VisualParamGenerator | `avatar_lad.xml` |
|
||||
| SkeletonGenerator | `avatar_skeleton.xml` |
|
||||
| AttentionsGenerator | `attentions.xml`, `attentionsN.xml` |
|
||||
| TreesGenerator | `trees.xml`, `grass.xml` |
|
||||
| GenepoolGenerator | `genepool.xml` |
|
||||
|
||||
The C# project does not provide the optional `visualparamtemplate.cs` file.
|
||||
The pinned VisualParam generator therefore uses the template embedded in its
|
||||
own source; the inventory records that generator source and hash as provenance.
|
||||
|
||||
The files under `inputs/` are exact, unmodified snapshots. Their license and
|
||||
copyright attribution are covered by the repository
|
||||
[`LICENSE.md`](../LICENSE.md). The generated source manifest repeats each hash
|
||||
and license in its header and data table.
|
||||
|
||||
## Commands
|
||||
|
||||
Regenerate every currently registered Rust output using only checked-in data:
|
||||
|
||||
```console
|
||||
cargo run -p libremetaverse-codegen -- generate
|
||||
```
|
||||
|
||||
Verify hashes and reject stale output without writing:
|
||||
|
||||
```console
|
||||
cargo run -p libremetaverse-codegen -- check
|
||||
```
|
||||
|
||||
Maintainers can refresh the vendored snapshots from an explicitly supplied
|
||||
checkout. The command verifies all six golden generator hashes and all input
|
||||
hashes before writing, so a different upstream revision is rejected:
|
||||
|
||||
```console
|
||||
cargo run -p libremetaverse-codegen -- vendor ../libremetaverse
|
||||
```
|
||||
|
||||
Generation uses UTF-8 with an optional BOM, normalizes CRLF/CR to LF, rejects
|
||||
NUL input, reports stable `path:line:column: severity[code]` diagnostics, sorts
|
||||
manifest records by stable IDs, emits provenance-rich generated headers, and
|
||||
always terminates output with one LF. Tests generate twice in memory and
|
||||
require byte identity before comparing with the checked-in file.
|
||||
Reference in New Issue
Block a user