wit-bindgen
wit-bindgen copied to clipboard
In the Python generator, create aliases for numeric types
When users are consuming generated code in Python, they are not able to tell which integer type a given int was or what size a float was. We can make this somewhat easier by introducing aliases for used numeric types that preserve that type info.
e.g.
def foo(a: int) -> int:
...
becomes
s32 = int
s64 = int
def foo(a: s32) -> s64:
...