I have written a small library, which is designed to use with egui, or any other UI framework.
Now my project looks like:
src/lib.rs // the library itself examples/main.rs // app, which demonstrates the features examples/helper.rs // helper class for the demo examples/demo1.rs // feature 1 demo examples/demo2.rs // feature 2 demo
It looks okay in GutHub, but not if I want to make a crate from it: the demo code is 20x as big as the library itself.
FIrst of all, I want to split the project, there should be a separate repository for the lib and another one the demos. Especially, I want to make the demo publish on web (whit egui), and I will use eframe_template, which is also too big to include it with the lib.
The final solution would be upload the lib as a crate, and it should have a link to the demo repository, which is using the crate.
But I don't want to create a crate right now, probably there will be some changes, which will come up using it, I mean during writing demos. So, my question is: how can I use a library outside a project, if it was a crate? The best solution would be upload it to crates.io, but as a private one. Is there such on crates.io?
Maybe, I'm wrong, and the original directory structure is okay, if a program uses my crate, it will use only
lib.rs and not the examples?