Skip to content

rune-langium / codegen/src / CodeGenerationRequest

Interface: CodeGenerationRequest

Defined in: packages/codegen/src/types.ts:43

Request to generate code from one or more Rune DSL model files.

Config

  • language — must match a known generator ID (see KNOWN_GENERATORS). Use isKnownGenerator() to validate before submitting.
  • files — all .rosetta source files needed for the generation context, including reference/dependency models. Files not listed here will not be available for cross-namespace type resolution in the generator.
  • options — generator-specific key-value pairs forwarded to the JVM generator. Keys and valid values depend on the generator implementation.

Pitfalls

  • NEVER include only a subset of required namespace files — generators that perform cross-namespace type resolution will produce incomplete output or fail silently if dependency types are missing.
  • Regenerating target files does NOT preserve user edits — output files are always overwritten. Store generated output in a separate directory and never hand-edit it.

Properties

PropertyTypeDescriptionDefined in
files{ content: string; path: string; }[].rosetta files with absolute path and content, including all dependency namespaces.packages/codegen/src/types.ts:47
languagestringTarget language (e.g., "scala", "typescript", "kotlin"). See KNOWN_GENERATORS.packages/codegen/src/types.ts:45
options?Record<string, string>Generator-specific options forwarded to the JVM generator as key-value pairs.packages/codegen/src/types.ts:49

Core packages released under MIT. Studio app released under FSL-1.1-ALv2.