I'm confused about how I can structure libraries. Let's say I have a whizbang 
library. It's complex enough that I want whiz and bang submodules, but that's 
just an implementation detail: I'd like clients of the libraries to use the 
public API with just an `import whizbang;`. I had thought something like the 
following would work:

whizbang.rs
   import whiz::*;
   import bang::*;

   export whiz1, whiz2;
   export bang1;

whiz.rs:
   fn whiz1() {}
   fn whiz2() {}

bang.rs:
   fn bang1() {}

And it does work…but only within the whizbang project. whiz.rs, for example, 
can use bang1 without even doing an import. But external libraries have to do 
whizbang::whiz::whiz1.

  -- Jesse
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to