Skip to content

feat(lowering): add core HIR to Workshop WIR path - #36

Draft
Teakowa wants to merge 8 commits into
feat/del-rs-29-workshop-providerfrom
feat/del-rs-30-hir-wir
Draft

feat(lowering): add core HIR to Workshop WIR path#36
Teakowa wants to merge 8 commits into
feat/del-rs-29-workshop-providerfrom
feat/del-rs-30-hir-wir

Conversation

@Teakowa

@Teakowa Teakowa commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Stacked on del-rs#29, this PR advances del-rs#30 and the parent del-rs#8.

  • Consumes released workshop-rs 0.1.1, including the completed canonical rule-event contract from workshop-rs#12.
  • Preserves provider-produced canonical bindings in backend-neutral HIR.
  • Adds the DEL-owned HIR -> workshop_rs::wir::Program lowering API with source-file/span provenance.
  • Lowers deterministic global/player variables, explicit source IDs, reservations, top-level initializers, core rule events, conditions, literals, arrays, canonical enum constants, external action/value calls, assignments/modifications, if/while/auto-for, and subroutine tables/calls.
  • Validates structural WIR and canonical Workshop identities; unsupported forms return HI018 and do not emit an incomplete rule.

This is intentionally a partial #30 implementation. Object/reference runtime encodings, local Workshop storage strategy, classic for/foreach/switch, named-action argument reordering, and other advanced lowering remain explicit follow-up work.

Validation

  • cargo build --all-targets
  • cargo test --all-targets
  • cargo test --test matrix
  • cargo test --test corpus
  • focused cargo test --test workshop_lowering --test workshop_provider
  • rustfmt --edition 2021 --check src/workshop.rs tests/workshop_lowering.rs
  • git diff --check

Existing warnings remain unchanged in the frontend; no warning policy was weakened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant