Consider creating umbrella crate `malachite`
Andlon opened this issue · 3 comments
Hi, thanks for this very nice library! It's amazing to have a great alternative to GMP that just builds without the portability problems.
So far I've only tried it out in a very basic benchmark, but I hope to use it more in the future, as I have some upcoming geometry processing tasks that will likely require exact arithmetic. I was a little bit puzzled at first because I was expecting a crate called malachite
. Instead you have separate crates for integer and rational arithmetic. Whenever I want to learn about a new library, I often just type docs.rs/libname
in my address bar - I must assume many other Rust users do the same.
For one, I think you should register the malachite
crate on crates.io, because if someone else registers it, it will be very confusing for users of malachite
.
Beyond that, I suggest that you consider the following:
- Make the
malachite
crate an "umbrella" crate that depends on the othermalachite-*
crates as needed.malachite
would be the entrypoint for all users. That way themalachite
docs ondocs.rs
would be a good entry point to the library. - Make e.g. rational arithmetic optional under a (probably default) feature flag. That way users can opt out of rational arithmetic if they don't need it.
I think overall this would make the first experience for users a little more straightforward and cohesive, and types would be imported as malachite::Rational
and malachite::Integer
instead of malachite_q::Rational
and malachite_nz::integer::Integer
(I took the liberty of moving the Integer
type to the top-level in this example).
What do you think?
Thank you for your kind words!
Something like this has been in the back of my mind for some time. I'll incorporate it into the next release.
Fixed in Malachite 0.3.0.
Awesome! Looking forward to trying it out. By the way, I've been using malachite more actively for some geometry processing tasks in recent weeks, and it works like a breeze :-)