-
Hi everyone, I'm not entirely sure if this is the right place to ask, but lately, I've been working with a database called SurrealDB. After a month of using it, I decided to build my own ORM for my use case, which I did in TypeScript. It worked great, but as my projects have started to include Python, JavaScript/TypeScript, and Rust, I realized that writing the same ORM for each language is becoming a real pain. That’s why I decided to explore WASM (WebAssembly) as a potential solution. However, I’m feeling a bit overwhelmed. I’m not sure where to start, or even if it’s possible to achieve what I have in mind. My plan is to build an ORM that includes a custom language for defining schemas and events, somewhat similar to Prisma. So, I’m wondering:
Any advice or guidance would be greatly appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
Hey @JustKira! So, there are multiple aspects to this matter. It is very much possible to put the core logic of the ORM in a WASM module and have it run everywhere. However...
All in all, I think this is too much work to set up, will negatively impact performance, and I would recommend against it, but happy to help if you decide to do it! |
Beta Was this translation helpful? Give feedback.
-
On a side note, I had another project in mind that I wanted to experiment with—building a "web browser", but not for the normal web. Instead, it would run custom applications (games). I wanted to create a web engine that runs games, with the sole purpose of testing out some ideas I have. One challenge I don’t fully understand is: is it possible to ship WASM to that browser and run games? To be honest, I don’t know how to approach this or where to even start learning. I like the idea of a browser built for near-native performance, not for traditional web browsing, but for running applications with some limitations. I’m sure there are much smarter engineers who have thought about this idea before and maybe even tried it, possibly figuring out that it’s impossible—but I still want to give it a try. The Idea Now, why do I think I need WASM? I’m not entirely sure if that’s the right approach since I’ve never tried it, but I’m still exploring. If the core engine is written in Rust, how do I allow anyone to use whatever language Wasmer supports? Or maybe I could even try to add support for other languages somehow? I wrote and issue how to support lua and i got a answer which seems possible to do with my current skill level. The goal is to allow people to build optimized games for my custom platform, which is aimed at running applications with near-native performance—which is exactly what WASM seems to claim it can do. I talked about this idea with my friends, and we’re all super excited—but none of us have the skills to actually build it yet 😆. So I’m asking here: Where should I start? I know this is an ambitious project, but hey—I’m a 21-year-old guy with way too much energy, nothing to do, and a strong urge to build something cool. So why not give it a shot? Also is youtube channel video that i watched and i wanted to give it a shoot too Video 1 Video 2 |
Beta Was this translation helpful? Give feedback.
-
This is not an issue of which languages wasmer supports; Wasmer does not support any specific languages. It runs wasm modules, so as long as you can compile/transpile/package your code to WASM, it'll work. If you intend to use WASIX for the 'games', then it becomes a question of which languages can be made to work on WASIX.
At the risk of sounding super-generic, start with a prototype. Make the smallest possible thing, and make it work. Then you'll know what challenges you face, and whether you can keep going or not.
It's worth keeping in mind that WASIX does not yet support any manner of graphics or rendering, nor access to the GPU, so it may not be suitable for games. |
Beta Was this translation helpful? Give feedback.
Hey @JustKira!
So, there are multiple aspects to this matter. It is very much possible to put the core logic of the ORM in a WASM module and have it run everywhere. However...