xpile 0.1.616

Polyglot transpile workbench (Python/C/C++/Rust/Ruchy/Lean ↔ Rust/Ruchy/PTX/WGSL/SPIR-V) with provable contracts at every layer.
1
2
3
4
5
6
7
8
9
10
11
from dataclasses import dataclass
@dataclass
class Point:
    x: int
    y: int
    def norm1(self) -> int:
        return abs(self.x) + abs(self.y)
def main() -> None:
    p: Point = Point(3, -4)
    print(p.norm1())
    print(p.x, p.y)