The creator needed to discover ways to make my very own programming language for a extremely very long time, however I couldn’t discover the highway within the onerous principle behind compilers, parsers, ASTs and so forth… I discovered the tutorials onerous and my consideration was not lasting for greater than 5 minutes earlier than fully shut down the mission.
Some days in the past, although, one thing modified.
I’m presently in love with WebAssembly and had this absurd concept of creating a programming language that compiles to WebAssembly.
I didn’t know the way WebAssembly internals labored so it was the right stage to study one thing new and make a cool mission.
Offered!
What’s WebAssembly about
Began doing a little analysis and I discovered no tutorials besides two superb articles, one was about methods to construct a compile for a customized programming language that compiles to WebAssembly (precisely what I used to be searching for), and the opposite was a sequence of articles on methods to construct a Net meeting compiler (precisely what I used to be searching for, once more!)
However right here come the issues: the primary was written in Typescript and the second in Rust.
The best way to do WebAssembly with Golang
I needed to observe Go and I don’t know something about Rust.
So lengthy story brief I studied the idea behind these two superb articles, WebAssembly specification and so forth… and I began writing a compiler in Go (i like Go).
I’ve discovered no articles about writing WebAssembly compilers with Go, so I made a decision to doc the constructing of Luna so future Gophers that can have my identical concept received’t must wrestle as a lot as I did to search out assets.