Split out new crate all-is-cubes-base
.
#491
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It contains the majority of code from the
math
andutil
modules ofall-is-cubes
.This new crate will enable us to use
raycast
in the build script ofall-is-cubes
to generate fully pre-calculated light propagation data (#490). It may also assist in further splitting ofall-is-cubes
into separately compilable parts, if I find such divisions worth making.I chose the name “base” to be sufficiently abstract that it will not become unsuitable for its purpose (being the crate that all others eventually depend on) regardless of exactly what it evolves to contain. I also considered “all-is-cubes-core”, but I feel that only the crate containing
Block
andSpace
deserves that name if I were to use it.Also, because it's now possible and convenient, the macros
notnan
,rgb_const
, andrgba_const
have been moved toall_is_cubes::math
. (This is only possible because macro re-exports can be exported from specific modules, even thoughmacro_rules
declarations can only be exported from the crate root.)