Re:Show HN: TinyGo – LLVM-based Go compiler for microcontrol...
by aykevl on Saturday August 18, 2018 @11:18AM
(#17788855)
That's pretty cool!
If you want something now, I've also written and abandoned this: https://github.com/aykevl/tinygo-gccgo
It actually worked fairly well, but the code was way too bloated to be useful.
Re:Show HN: TinyGo – LLVM-based Go compiler for microcontrol...
by jsolson on Saturday August 18, 2018 @12:31PM
(#17789223)
Honestly for what I'm doing what you have here is a pretty reasonable start. I'm comfortable writing (and calling into) C where the Go bits aren't in place yet, and I'm a lot more familiar with LLVM's internals than with GCC's if I need to debug something. We'll see what I get up to after brunch.
One request: if you're open to PRs (I can't promise I'll send any, but I'm trying to get into a habit of contributing to OSS with my hobby hackery), can you add a LICENSE file (context: the OSS patching policy I'm bound by is very friendly for projects on Github under most licenses -- https://opensource.google.com/docs/patching/ -- it's more problematic when the license for the code is undefined)?
Re:Show HN: TinyGo – LLVM-based Go compiler for microcontrol...
by aykevl on Saturday August 18, 2018 @01:06PM
(#17789406)
I'm certainly open to PRs :)
Good catch on the LICENSE file, I totally forgot about it. I've added it now.
Re:Show HN: TinyGo – LLVM-based Go compiler for microcontrol...
by kodablah on Saturday August 18, 2018 @10:55AM
(#17788729)
Yeah, just wait until you see multiple megabytes of WASM instructions for tiny progs or the realize the team does not care about non-web targets. You're much better off leveraging Rust's WASM support for resource limited, non-web WASM targets.
Re:Show HN: TinyGo – LLVM-based Go compiler for microcontrol...
by jsolson on Saturday August 18, 2018 @12:27PM
(#17789208)
In my case I was less interested in the WASM part of it than I was in something targeting a "no OS" environment. That said, for my target (those little Pine64 RTL8710 Cortex M3 MCU) you're almost certainly right. On the other hand it's a hobby project, and I like writing Go while I find writing Rust to be a bit of a chore. Also, it's a hobby project, so distractions like re-targeting WASM to the ARMv7-M are half of the fun :)
This project seems more immediately useful :)