diff options
| author | Michael Williamson <mike@zwobble.org> | 2026-07-02 11:02:30 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2026-07-02 11:02:30 +0100 |
| commit | fe0b53ce5b3577284f9020832c0f4bd3c0c2f58d (patch) | |
| tree | 81f1db1dcf2630d49264a10bb8e2986a8ef96c28 /src/main/java/org/zwobble | |
| parent | 7ecc00c036ae9380bafa80060dc35756195e9c1a (diff) | |
Support native types in Rust types generator
Diffstat (limited to 'src/main/java/org/zwobble')
| -rw-r--r-- | src/main/java/org/zwobble/hobgoblin/compiler/output/generators/rusttypes/RustTypesGenerator.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/org/zwobble/hobgoblin/compiler/output/generators/rusttypes/RustTypesGenerator.java b/src/main/java/org/zwobble/hobgoblin/compiler/output/generators/rusttypes/RustTypesGenerator.java index b71c9ed..3847433 100644 --- a/src/main/java/org/zwobble/hobgoblin/compiler/output/generators/rusttypes/RustTypesGenerator.java +++ b/src/main/java/org/zwobble/hobgoblin/compiler/output/generators/rusttypes/RustTypesGenerator.java @@ -184,8 +184,12 @@ public class RustTypesGenerator implements Generator { case SimpleNativeType simpleNativeType -> { yield this.config.nativeTypeConfig(simpleNativeType) - .orElseThrow(() -> new UnsupportedOperationException("TODO")) - .type(); + .map(config -> config.type()) + .orElseGet(() -> generateTypePath( + simpleNativeType.namespaceName(), + simpleNativeType.name(), + context + )); } case StructType structType -> { |
