@@[target("rust")]

// Frame type string → Go type spelling.
// Frame has NO type system: type names pass through VERBATIM
// (docs/frame_language.md). The name-alias table (str→string,
// int→int, Any→any, …) was exterminated — it contradicted the
// passthrough contract. Write Go's own type names.
//
// The ONE transform that remains is structural, not name-aliasing:
// Go has no void return type, so the framework's `void`/`None` token
// maps to the empty string (absence of a return spec). Everything
// else passes through unchanged.

@@system GoMapType {
    interface:
        map(t: String): String

    machine:
        $Active {
            map(t: String): String {
                let result = if t == "void" || t == "None" {
                    String::new()
                } else {
                    t
                };
                @@:(result)
            }
        }
}
