stardance has been extended another month! the new deadline is october 31 :)

You are browsing as a guest. Sign up (or log in) to start making projects!

8h 30m 35s logged

Server Rewrite!

I’ve rewritten the server using Tokio instead of Threads for improved performance and less server-side overhead.

What Tokio is

It utilizes Rust’s async implementation with futures to create a much more lightweight alternative to threads. Basically, you can summon multiple tasks and instead of them being full threads with seperate 8MB stacks and so on, they have way less context switching overhead and a much smaller stack per instance.

Other Server-Side Changes

In the initial handshake, the client provides its name to the server. If the server receives a message with the wrong name from that client, it will replace the name with the originally given one.


Encryption

I’m still working on finishing up encryption for all messages and the initial handshake.

1
75

Comments 3

@eli

Tokio is a great choice! As long as your ok with a slightly larger binary… Make sure to run cargo clippy and fix those eventually (prefix things you won’t be using for a bit with _ to remove the clippy warning)

@MarioS271

@eli yea i guess a larger bin is ok for the runtime overhead it eliminates, and thx for the clippy reminder would’ve probably forgotten that one 😅

@eli

Lol my rust CLI I am making I removed Tokio and it lost 2MB :) Plus I never needed Async so I just switched to synchronous