ES6 export all values from object

I can’t really recommend this solution work-around but it does function. Rather than exporting an object, you use named exports each member. In another file, import the first module’s named exports into an object and export that object as default. Also export all the named exports from the first module using export * from ‘./file1’; … Read more

Split a module across several files

Rust’s module system is actually incredibly flexible and will let you expose whatever kind of structure you want while hiding how your code is structured in files. I think the key here is to make use of pub use, which will allow you to re-export identifiers from other modules. There is precedent for this in … Read more