News for hackers. Stuff that matters.
Re:Was Rust Worth It? by dhosek on Wednesday October 25, 2023 @07:17PM (#38019581)
Agreed. The other thing I don’t really like is that you can’t split up things in the rust namespace hierarchy between crates (something that’s natural with jars in JVM). I would have liked to have defined things so that I could have the unicode handlers for finl live in finl::unicode, the parser in finl::parser, etc. but because they’re in separate crates rust gets upset about finl being defined twice and there’s no workaround for it. There are likely pitfalls I don’t see in what I want, so I live with it.
Re:Was Rust Worth It? by ramranch on Wednesday October 25, 2023 @07:19PM (#38019598)
Would re-exporting partially solve your problem?
Re:Was Rust Worth It? by dhosek on Wednesday October 25, 2023 @11:25PM (#38021295)
As I recall, I could do something where I could have a common root crate that would import and re-export the other crates with the namespaces modified on the exports and then control which crates are exported through feature gates, but it just seemed more hassle than it was worth.
Re:Was Rust Worth It? by epage on Thursday October 26, 2023 @09:47AM (#38025481)
We have an RFC for this that has fairly broad support that I just need to bug some people some more so we can approve it.

https://github.com/rust-lang/rfcs/pull/3243