[ ] Fail faster, with a more explicit compilation error
Maybe something like:
#[cfg(not(any(feature = "2d", feature = "3d")))]
compile_error!("the feature \"2d\" or \"3d\" must be enabled to use heron");
[ ] Enable 3d by default.
So that a setup would become:
For a 3d game: heron = "3.0.0"
For a 2d game: heron = { version = "3.0.0", default-features = false, features = ["2d"] }
The rationale behind choosing 3d as the default instead of 2d is that 3d is a "superset" of the 2d capabilities in the sense that one could make a 2d game using the 3d version of heron, but the not the opposite.
To use heron, one must enable either the 2d or 3d feature flag: https://docs.rs/heron/3.0.0/heron/index.html#add-the-dependency-and-choose-to-work-with-either-2d-or-3d
This can be friction for new users, who can stumble into unclear error messages: https://discord.com/channels/691052431525675048/966502688751779931/966599689749270558
I think we can improve the situation.
Maybe something like:
So that a setup would become:
heron = "3.0.0"
heron = { version = "3.0.0", default-features = false, features = ["2d"] }
The rationale behind choosing
3d
as the default instead of2d
is that 3d is a "superset" of the 2d capabilities in the sense that one could make a 2d game using the 3d version of heron, but the not the opposite.