Interop & Migration

Lena Code Interop

How Topaz can be used as a source or target language in Lena Code conversions.

Lena Code is a separate conversion product. Topaz may be its input or output language, but the handoff is source conversion, not a shared runtime or an extension of Topaz grammar. Converted output must satisfy the same SPEC, checker, and host-profile rules as hand-written Topaz.

Contract and components

When Topaz is the target, the converter should use current syntax, preserve Unicode identifiers deliberately, and keep recoverable failures explicit. When Topaz is the source, the converter owns the mapping into the destination language and its host behavior.

Workflow

Pin the Lena Code version and language-pair support used for a conversion. Review the generated .tpz diff, run parse and check, establish reference output with run, then compare the intended built target. Keep foreign source samples in their own labeled fences and retain a human review for API, data, effects, and fault boundaries.

Current support

Converted Topaz should pass parse, check, run, and the intended build target. Lena Code publishes its own conversion coverage and release status; support for one language pair does not imply support for every program.

Boundaries and limitations

The two products do not automatically share an ABI, package manager, or deployment bundle. Rust and TypeScript examples remain examples of those languages, not Topaz syntax. Generated Topaz that uses unsupported syntax is rejected by topaz check.

Command reference

topaz parse converted.tpz
topaz check converted.tpz
topaz run converted.tpz
topaz build converted.tpz --out-dir converted-build --run