core icon indicating copy to clipboard operation
core copied to clipboard

Unify protocol under the schemas crate

Open technobaboo opened this issue 2 years ago • 0 comments

This is a lot of just rearranging code.

The idea here is to take every single message that goes over IPC and force it to be a struct inside the schemas crate so we can see the protocol in 1 place, edit it in 1 place, and so on. To do this, I've created the unified_protocol branch that already has schemas arranged to do this.

What needs to be done is to get fusion and the server to use these crates, as well as take all of their internal schemas and put them inside the crate. There's a new Schema trait that everything serialized or deserialized must implement so we can be sure they're all inside the schemas crate. That way, you can just follow the errors to tell what needs to be converted next.

I recommend starting with the core crate, getting fusion and schemas fully sorted out. Then, the server will be a lot easier! Make sure all the method returns that the client gets do not borrow anything (e.g. /startup_settings/[instance]:generate_startup_token needs to return a struct with String in it, not &str).

technobaboo avatar May 09 '23 15:05 technobaboo