closure-migration - Migrate Mojo parametric closures to unified closures
Migrates Mojo code from legacy parametric and capturing closures to value-taking unified closures, and verifies compilation and host-side offload binding.
Tags
Updated: 2026-10-04Capabilities
Typical Inputs
Typical Outputs
What this skill does
- Inventory legacy closure usage
- Rewrite parametric closure calls
- Convert nested closure declarations
- Preserve copy-capture semantics
- Migrate closure-taking APIs
- Remove obsolete overloads
- Typecheck migrated Mojo code
- Elaborate offload bindings
Inputs
- Mojo source files
- Closure-taking API definitions
- Mojo compiler toolchain
- Matching kgen executable
- Target accelerator configuration
Outputs
- Migrated Mojo source code
- Updated skills or documentation
- Compiler typecheck results
- Host-side elaboration results
- Migration self-check results
Requirements
- Mojo compiler
- Access to source files
- Bazel toolchain for in-tree kgen
- Matching compiler and kgen versions
