Codegen: generate visual parameters and tree definitions #48

Closed
opened 2026-08-08 08:18:18 +00:00 by hugo · 1 comment
Owner

Objective

Port VisualParamGenerator and TreesGenerator output to deterministic Rust data/types.

Deliverables

  • Parse the pinned character/tree inputs with schema validation.
  • Generate public visual parameter IDs, ranges, defaults, groups, wearable links, and tree definitions required by APIs/tests.
  • Preserve source ordering only where observable and document lookup structures.

Validation

  • Generated values/counts match the reference catalog and fixtures.
  • All related translated tests compile/pass when behavior is in scope.
  • Regeneration is byte-identical.

Prerequisite

The fixed API/test gates, Types, StructuredData, and relevant imaging foundations are complete.

Project constraints

  • All LibreMetaverse-specific generation and wire behavior is new native Rust code.
  • Generated Rust is deterministic, checked in, and covered by the fixed public API and semantic tests.
  • No normal build or release may depend on .NET, Roslyn, C# assemblies, or the reference checkout.
## Objective Port VisualParamGenerator and TreesGenerator output to deterministic Rust data/types. ## Deliverables - Parse the pinned character/tree inputs with schema validation. - Generate public visual parameter IDs, ranges, defaults, groups, wearable links, and tree definitions required by APIs/tests. - Preserve source ordering only where observable and document lookup structures. ## Validation - Generated values/counts match the reference catalog and fixtures. - All related translated tests compile/pass when behavior is in scope. - Regeneration is byte-identical. ## Prerequisite The fixed API/test gates, Types, StructuredData, and relevant imaging foundations are complete. ## Project constraints - All LibreMetaverse-specific generation and wire behavior is new native Rust code. - Generated Rust is deterministic, checked in, and covered by the fixed public API and semantic tests. - No normal build or release may depend on .NET, Roslyn, C# assemblies, or the reference checkout.
hugo added this to the 07 - Wire codegen milestone 2026-08-08 08:18:18 +00:00
hugo added the enhancement label 2026-08-08 08:18:18 +00:00
Author
Owner

Implemented in commit 5f83ce6.

Summary:

  • Added a native Rust XML generator with source-located schema validation for the pinned avatar_lad.xml, trees.xml, and grass.xml inputs.
  • Generated and checked in 672 complete visual parameters, 253 transmitted group-0/group-3 IDs, 21 tree definitions, and 6 grass definitions.
  • Preserved sorted visual-ID lookup and source-indexed foliage lookup, with the observable ordering and structures documented.
  • Implemented the mapped public visual metadata constructors, VisualParams lookup, avatar appearance decoding including driven parameters, foliage getters/setters, and Primitive foliage lookup paths.
  • Integrated deterministic regeneration and the related semantic suites into the Ubuntu Gitea codegen workflow.

Verification:

  • cargo test -p libremetaverse-codegen: 8 passed
  • cargo test -p libremetaverse --test generated_catalogs: 4 passed
  • cargo test -p libremetaverse-compat-tests --test appearance_visual_semantics: 10 passed
  • cargo test -p libremetaverse --lib visual_catalog: passed
  • cargo test -p libremetaverse --lib foliage_catalog: passed
  • cargo run -p libremetaverse-codegen -- check: passed
  • python3 tools/generate_api_shims.py --check: passed
  • python3 tools/generate_rust_mapping.py --check: passed
  • cargo check --manifest-path tests/api-compile/Cargo.toml: passed
  • cargo clippy for codegen and libremetaverse with warnings denied: passed
  • cargo fmt --all -- --check: passed
  • cargo test --workspace --no-run: passed
  • cargo build --workspace --locked: passed

The final review found no remaining issue-scoped stub, unimplemented branch, stale generated output, or API/test gap.

Implemented in commit 5f83ce6. Summary: - Added a native Rust XML generator with source-located schema validation for the pinned avatar_lad.xml, trees.xml, and grass.xml inputs. - Generated and checked in 672 complete visual parameters, 253 transmitted group-0/group-3 IDs, 21 tree definitions, and 6 grass definitions. - Preserved sorted visual-ID lookup and source-indexed foliage lookup, with the observable ordering and structures documented. - Implemented the mapped public visual metadata constructors, VisualParams lookup, avatar appearance decoding including driven parameters, foliage getters/setters, and Primitive foliage lookup paths. - Integrated deterministic regeneration and the related semantic suites into the Ubuntu Gitea codegen workflow. Verification: - cargo test -p libremetaverse-codegen: 8 passed - cargo test -p libremetaverse --test generated_catalogs: 4 passed - cargo test -p libremetaverse-compat-tests --test appearance_visual_semantics: 10 passed - cargo test -p libremetaverse --lib visual_catalog: passed - cargo test -p libremetaverse --lib foliage_catalog: passed - cargo run -p libremetaverse-codegen -- check: passed - python3 tools/generate_api_shims.py --check: passed - python3 tools/generate_rust_mapping.py --check: passed - cargo check --manifest-path tests/api-compile/Cargo.toml: passed - cargo clippy for codegen and libremetaverse with warnings denied: passed - cargo fmt --all -- --check: passed - cargo test --workspace --no-run: passed - cargo build --workspace --locked: passed The final review found no remaining issue-scoped stub, unimplemented branch, stale generated output, or API/test gap.
hugo closed this issue 2026-08-09 09:01:48 +00:00
Sign in to join this conversation.