Rust seemed like a language worth exploring for me, as I wanted to have some more experience with “lower level” languages. My main languages so far had been Java and JavaScript/TypeScript, followed by only partial knowledge of many others. Almost all of them, however, were “high level” languages, i.e. are interpreted or run inside some bytecode VM. But because of all of these, I was accustomed to using generics, lambdas, and often had a big focus on type safety. When I tried C it really felt like I was treated like a toddler, who wasn’t yet allowed to play with the grown-up toys and instead had to be content with the few basic blocks they had. Go’s concurrency model was quite refreshing, but similarly felt incomplete due to having no generics at the time. Then there was Rust, the cool kid on the block now, having - on the surface - all of what I was looking for. Lots of resources too; blogs, videos, news. All within a similar-enough package to where a “hello world” was straight forward. But - obviously - a hello world is not enough to know a language.
The way I like to learn is to build a project befitting of what the language is primarily designed for. I had written a commodore64 emulator in C not long ago, so an emulator sounded like a good project. But there’s enough NES or other console emulators out there already and I wanted something that I have more interest in. There had been many attempts at server emulators for the MMORPG Silkroad Online in the past, but all of them targeted a rather old version of the game. Thus for a random person, playing around with those always required finding a very old version of the game. And thus, the project was started: use Rust to write a server emulator for the current version of Silkroad Online.
The goal obviously is not and was never to build a complete emulator for Silkroad Online; that’s when projects like this fail. After all, I just wanted to learn Rust. However, I would obviously be happier the more features the emulator ends up having. Additionally, the more basic features were already documented really well. The whole launcher with its interactions, the login and character select were essentially completely document when it came to the network interaction. This allowed me to focus on the stuff that actually mattered to me at the time.
I have since reached my initial goal of learning the language, particularly async. From here on out it’s just the fun of working on something that does not exist outside. But there’s a lot more things that trip me up now that I’m in uncharted terretory. I’m spending a lot more time on research given most packets beyond the charselect are not documented or are otherwise outdated. The client is also very unhappy about malformed packets. Reverse engineering not being my best skill also makes working with the client on other levels troubling. And least the implementation of things in Silkroad Online just straight up being weird.