Open novacrazy opened 5 years ago
It seems that cargo does not support multiple crates in a single repo: https://internals.rust-lang.org/t/multiple-libraries-in-a-cargo-project/8259/6 . So if I read this correctly, in order to keep the standard skeleton of a Rust library repo, we would need to create a separate hyperdual
repo which would have the current code, and the dual_num
repo would only re-export the Dual<T>
struct.
Sure it does! They just need separate Cargo.toml
files and directories. Cargo doesn't care about the structure of the repo itself, so long as each crate is separate.
hyperdual repo
hyperdual/
Cargo.toml
src/
lib.rs
...
dual_num/
Cargo.toml
src/
lib.rs
Additionally, a short non-crate Cargo.toml
file can be added to the top to create a Cargo workspace.
Oh awesome! I'm open to this change then ;-)
Can the differentiate
function work with any hyperdual number or just regular dual numbers? Would all the dual parts simple need to be set to one?
Nevermind, there really isn't much of a point in using a differentiate
function if you already know how they work, anyway. So I'll just leave the simple one for the common use case.
FYI, I'll be republishing this crate as hyperdual
. I have a dependency for another project on version 0.3.0, and it hasn't been published yet. So it's just easier, for now at least, if I republish it.
I've put it on my Gitlab account here: https://gitlab.com/chrisrabotin/hyperdual/issues/28
With the addition of #17, I don't think the name
dual_num
does this crate enough justice anymore.I propose that we move future work with hyperduals to a
hyperdual
crate, and thendual_num
will simply addhyperdual
as a dependency and re-exportDual<T>
. This would effectively deprecate thedual_name
crate but still leave it functional.This repo would be renamed to
hyperdual
and would contain both crates.Thoughts?