RustAllegro
RustAllegro copied to clipboard
Possible reorganisation of the package (making more use of features)
I'm still relatively new to Rust (let alone RustAllegro!) - however, the thought just occurred to me that - as some of the addons are so tiny - it might be worth not having them in separate crates, but instead conditionally including modules using crate features (with some sensible defaults). Forgive me if this is a daft idea - I'd be interested to know why it wouldn't work, if so.
As an example, we'd include Allegro and the font addon into the readme's hello world like this:
use allegro::*;
use allegro::font::*;
...and would either have font
included in the default set of features, or ask that the user enabled it:
allegro = { version = "0.1.0", features = ["font"] }
It probably could work, although the advantages seem relatively minor.