Language Interoperability
Language interoperability means more than just running apps written in different languages.
Why is Language Interoperability Important?
We casually mentioned that WebAssembly is portable, and it's language agnostic (unlike most of the component models from the past), but why does that actually matter? What problems does it solve?
We love building applications that people can share with friends and colleagues. We also love building libraries because we want people to compose bigger things around them. The problem is, we all write applications in different languages. Perhaps you’re a Go developer, writing the first Golang microservice in your organization. Let's say your Go service needs a set of utility functions that are already contained in a Rust library written by another team in your organization.
It's "language sprawl" like this that usually inspires large organizations to put down hard mandates on which languages are allowed. This can stifle creativity and make it difficult for teams with different specializations.
If you really need to use the Rust code from your Go service, you can fire up CGO and write an FFI wrapper in Rust and then consume it in Go and hope 🤞 this all works in your cross-platform deployments. This process is so difficult and annoying that people usually give up and resign themselves to using a single language, which usually ends up being the "lowest common denominator" of language features needed by disparate teams.
Instead of being a blocker, the component model sees this as a huge opportunity. We can write components in whichever language we're most productive in (or whichever language is best suited to a particular problem), and not have to worry about which languages are used by our component's consumers. It just works.
If you're interested in a deeper dive on this before getting into the specifics of the wit
language, have a look at the following resources: