GSET
Targets

Targets Overview

Which backends exist, how target selection works, and what M2 will add.

GSET currently ships one working backend — go — and plans five plus more. The M2 milestone delivers the full set.

How the target is chosen

  • The target is chosen with -t/--to (default go); --target is accepted as an alias.
  • The source language is inferred from the file extension, and overridden with -f/--from.
FlagValues
-t, --togo, python, js/javascript, java, ruby

Unknown targets are rejected with a clear message. Backends that exist only in the plan produce gset: no backend for target \X`; supported: go` rather than wrong output.

Backend table

TargetStatusrun needs installed
GoImplementedgo
PythonImplementedpython3
JavaScriptImplementednode
JavaImplementedjava + javac
RubyImplementedruby
C, C++, Rust, C#, PHP, Swift, Kotlin, TypeScriptPlanned—

What "a working backend" means

gset run fib.py -t go does five things, all verified:

  1. Parses the Python source with a tree-sitter grammar.
  2. Lowers it to the typed IR and runs the semantic pass.
  3. Emits a complete, runnable file — wrapper and imports included.
  4. Writes it to a per-invocation temp directory.
  5. Executes the target runtime (go run) and propagates its exit code.

gset transpile does steps 1–3 and prints the file to stdout, or saves it with -o file.

The M2 acceptance criterion

When all five backends land, generated output for every corpus case must pass the target's own syntax checker — gofmt/go vet, python -m py_compile, node --check, javac, ruby -c — gated on toolchain presence in CI.

On this page