twill-codegen crate + Cranelift JIT skeleton #80

Open
opened 2026-10-04 02:37:21 +00:00 by jacksonopp · 0 comments
Owner

Depends on #1 only insofar as it doesn't touch Twill's AST at all yet - this issue is purely "does Cranelift work on this machine/toolchain."

  • Add a new twill-codegen crate to the workspace.
  • Wire up cranelift-codegen, cranelift-frontend, cranelift-jit, cranelift-module.
  • Prove the absolute minimum: hand-build a Cranelift IR function (e.g. one that just returns a constant Int), JIT-compile it, and call it from Rust, asserting the returned value.

No connection to Twill's parser/checker/HIR yet - this isolates toolchain setup from lowering correctness, so failures in later issues are unambiguously about our own lowering, not the Cranelift integration itself.

Depends on #1 only insofar as it doesn't touch Twill's AST at all yet - this issue is purely "does Cranelift work on this machine/toolchain." - Add a new `twill-codegen` crate to the workspace. - Wire up `cranelift-codegen`, `cranelift-frontend`, `cranelift-jit`, `cranelift-module`. - Prove the absolute minimum: hand-build a Cranelift IR function (e.g. one that just returns a constant `Int`), JIT-compile it, and call it from Rust, asserting the returned value. No connection to Twill's parser/checker/HIR yet - this isolates toolchain setup from lowering correctness, so failures in later issues are unambiguously about our own lowering, not the Cranelift integration itself.
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jacksonopp/twill#80
No description provided.