

Multi-language support: moving the core to Rust
#Padme actress code
Our best option would be to take the core code and port it to something that could be embedded in all the language libraries.

We knew we didn't want to port the whole codebase to every language we want to support and that we wanted to keep Oso as a library that worked with application data in the same way. But, we wanted it to work for anyone in any language.

This was a very natural way of expressing authorization and our early users liked it. It made the Polar language feel like an extension of Python itself. This made it feel like the policy was executing “inside” of your app, rather than requiring you to serialize all the data and send it to the policy. It was also easy to look up properties on a Python object or call a method on an object right from the policy. Since we were using the Polar language from within Python, it was very natural to pass Python objects as arguments to Polar queries. The first version of Oso was a Python library and the first version of Polar was written in Python. Polar is a language used for writing authorization logic, and it has a lot of nice features that make it easy to interact with your application data. Within that library, there is an interpreter for a declarative programming language called Polar. It comes as a library that you call into to make authorization decisions. Oso is an authorization framework that runs inside your application. That allows us to support so many languages without rewriting every feature 6 times. Every library is based on a core that is written in Rust. Oso has libraries for Python, Ruby, Java, Javascript, Go, and Rust, and each of those libraries works on Linux, Windows, and macOS. Those actions build libraries for 6 different languages and test them on different versions of the language across 3 different operating systems. When we create a new release of Oso, we run 87 different Github actions.
