Skip to main content

Sports Launcher for Minecraft Baseball League

·3 mins

When I started with this project, I had no experience with rust and had never used Tauri before, so this was the first project I used it in. I started off trying to do the account settings. Still, I decided against it and then started with auth, which was a pain from the very beginning due to my lack of knowledge of async vs. sync things which, thankfully, I know very well in Rust because of this to sum it up trying to start to auth on the main thread while rendering a web page is a no-no but either running it in another thread or running it async will work which is why pretty much all of the code is async as it has to be for the web components of the Tauri app to function. I was having a lot of trouble early on (9+ hours worth) because of my lack of basic rust knowledge, but as I continued, that changed. First, I tried two libraries for auth, one that did it sync, which for the time being I choose not to use, and one that did it async, which I choose to use; however, when trying to get it to work, I could not get the web view window to work so I decided to use the device code authentication flow however the async library after finishing the auth flow had another issue it returned data that was just plain wrong as in the data was all incorrect (I never checked the token but the uuid and username were wrong). So, I was forced to switch to the sync library, which I could finally get to work after that. Things got slightly smoother; I separated the auth into a different file and made a launching thing that was half done. After that, I did the assets, which took forever due to how the Value type works in Serde, but after that, it went pretty well. But then, I ran into an issue so simple to solve, yet I spent weeks on it. I assumed that when I had tried the launcher on my Windows machine, and it had not worked that it was with the quotes, and that fixed it, and it launched, but then one of the graphic dependencies did not work, and that stumped me for a while so I went ahead and did a little bit of solving and some more and some more but eventually after multiple days of trial and error I found out that my escaped quotes hadn’t escaped but had put " instead of " after that the client worked. This project has taught me a lot, especially to always test on the main platform people would be using, as it worked fine on Linux. I also pretty much learned rust off of this. Even though I thought I would be doing more typescript overall, this experience was fun, and I am still working on it today to fix smaller bugs and to try to improve the experience of the users.

Update: After recently working with this more I have to say that it has really helped not only my development skills but also my support skills and as it continues to develop I am happy to be working on it.