Is GO a good option to write a compiler/interpreter?

This page summarizes the projects mentioned and recommended in the original post on /r/golang

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • salsa

    A generic framework for on-demand, incrementalized computation. Inspired by adapton, glimmer, and rustc's query system.

  • Some optimizations are not easy with Go. For example caching like in Rust Analyser Salsa Framework

  • Benthos

    Fancy stream processing made operationally mundane

  • While I never wrote one, there are some good examples out there beyond the Go compiler itself. Have a look at the Benthos bloblang one (which is quite simple): https://github.com/Jeffail/benthos/tree/master/internal/bloblang and the go-jsonnet VM one (which is more complex): https://github.com/google/go-jsonnet

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • go-jsonnet

  • While I never wrote one, there are some good examples out there beyond the Go compiler itself. Have a look at the Benthos bloblang one (which is quite simple): https://github.com/Jeffail/benthos/tree/master/internal/bloblang and the go-jsonnet VM one (which is more complex): https://github.com/google/go-jsonnet

  • participle

    A parser library for Go

  • I made a domain specific language using https://github.com/alecthomas/participle what I found interesting is the grammar defined in structure annotations. After the parser runs, you get a fully instantiated structure based upon the input. I then invoke structure methods to do the work described in the DSL.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts