Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split to multiple crates #211

Open
5 of 6 tasks
steinerkelvin opened this issue Oct 31, 2022 · 5 comments
Open
5 of 6 tasks

Split to multiple crates #211

steinerkelvin opened this issue Oct 31, 2022 · 5 comments
Assignees

Comments

@steinerkelvin
Copy link
Contributor

steinerkelvin commented Oct 31, 2022

Problem: very long build times and modules with gigantic dependencies that can be split in separate modules e.g.

  • CLI (clap) + http client (reqwest)
  • http server (warp, tokio)

We have already split the code into the following crates:

  • kindelia_core: KHVM, Node, crypto
  • kindelia_server: HTTP API server
  • kindelia_client: HTTP API client
  • kindelia_ws: events Websocket server
  • kindelia: glues all the above and exposes through CLI

We can further slipt into:

  • kindelia_lang: exposes the AST and parser
@developedby
Copy link
Contributor

It'd be nice to have the AST and the parser in separate modules to be able to use them in a compiler, language server, etc

@steinerkelvin
Copy link
Contributor Author

@developedby I like that idea, but I'm not sure how to share some type like U120 and Name

@steinerkelvin steinerkelvin moved this from ◯ Todo to Icebox in Kindelia Network Project Nov 17, 2022
@developedby
Copy link
Contributor

I think a kindelia-common module is fine.
I don't know how we would decouple all the dependencies like serde and all the cryptographic stuff. Since rust forces us to implement the type only where it's declared it would be bothersome to separate these things (like by creating a bunch of intermediate traits/types).

@steinerkelvin
Copy link
Contributor Author

I'm fine with this. Do you intend to do it?

@developedby
Copy link
Contributor

Sure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants