I believe this occurs because when used as a stand alone crate, the implicit global path automatically starts from the root of the package, but when bundled in as a mere module, the globally identified root module/crate changes to the main module of the containing project.
The bundler can be augmented to automatically adjust usage paths as needed to support this, however, in the meantime, more explicit use paths inside custom crates will ensure they continue to be usable.
See this commit in my vector/physics library for examples: MarcosCosmos/rust-phys2d@f9e58e6
I believe this occurs because when used as a stand alone crate, the implicit global path automatically starts from the root of the package, but when bundled in as a mere module, the globally identified root module/crate changes to the main module of the containing project.
The bundler can be augmented to automatically adjust usage paths as needed to support this, however, in the meantime, more explicit use paths inside custom crates will ensure they continue to be usable.
See this commit in my vector/physics library for examples: MarcosCosmos/rust-phys2d@f9e58e6