RustAllegro icon indicating copy to clipboard operation
RustAllegro copied to clipboard

Possible reorganisation of the package (making more use of features)

Open snoopdouglas opened this issue 4 years ago • 1 comments

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"] }

snoopdouglas avatar Jul 09 '20 07:07 snoopdouglas

It probably could work, although the advantages seem relatively minor.

SiegeLord avatar Jul 14 '20 03:07 SiegeLord