EtienneDx / git-mentor

A git server with built-in tools for teaching programming
MIT License
2 stars 0 forks source link

Draft: Feat/protobuf #24

Closed EtienneDx closed 9 months ago

EtienneDx commented 10 months ago

Added protobuf definition and mechanism for transpilation to rust and typescript.

Still missing an exemple usage in typescript, I'll work on it soon.

EtienneDx commented 10 months ago

After looking more into typescript-protobuf integration, it appears using protobuf creates some major drawbacks and isn't the best option considering the goal of the project. A better option would be using JSON schemas generated from the rust code to ensure the front-end matches the back end perfectly. The process would look like:

Rust -> on build -> create schema.json -> on npm start -> create types.ts from schema.json -> build and run project

EtienneDx commented 9 months ago

This was and still is a mess. Found a better solution with #25