Our great sponsors
-
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.
Today I remembered for some random reason that Go compiler was initially written in C and then was mostly transpiled into Go. So, I was curious, which projects exist to do something like this. And after some googling I've found very interesting project called cxgo.
To test this, I decided to try to convert something useful and found a small header-only 2D physics engine called physac.
Apparently, it was pretty easy! After some small fixes it started working. So, I added ebiten to see how it works in practice. And finally, I created a small wasm demo. It was harder, because of some strange bugs, which I could fix by getting rid of unsafe from transplited code. But it wasn't too much hard (actually - nothing, comparing to writing physics engine from scratch).
Apparently, it was pretty easy! After some small fixes it started working. So, I added ebiten to see how it works in practice. And finally, I created a small wasm demo. It was harder, because of some strange bugs, which I could fix by getting rid of unsafe from transplited code. But it wasn't too much hard (actually - nothing, comparing to writing physics engine from scratch).