Files
compiler-explorer/examples/sway/default.sw
Joshua Batty b272efdb53 Add sway compiler (#7409)
Should be pretty self explanatory. I've added a corresponding PR to the
infra repo [here](https://github.com/compiler-explorer/infra/pull/1532)

Please let me know if there is anything I've done incorrectly here!
Thanks

---------

Co-authored-by: Matt Godbolt <matt@godbolt.org>
2025-02-24 09:38:13 -06:00

10 lines
106 B
Plaintext

script;
fn square(x: u64) -> u64 {
x * x
}
fn main() {
let x = square(5);
assert(x == 25);
}