This approach probably only makes sense at the root level, when you expect library users to only need one float type, then they’d use your_crate::f64 as your_crate
, for instance. A slightly cleaner choice than include!
might be to use the path
attribute to use the same source file as several different modules but I haven’t tried it.
At this point, I think you have a pretty good grasp on both what you want and what the available tools can do; the rest is you thinking through the various options and picking one.