Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
Currently the Rust compiler assumes that all generated modules are rooted at the top-level of your crate (i.e. at lib.rs). There are many useful cases where you want to control exactly where the generated code lives (for example - you may want it to be inside another sub-module you control); typically this is done via thrift namespace definitions. The compiler currently ignores these declarations. It should be changed to:
- recognize them if they exist, and generate code with the proper module paths
- default to the current behavior if no namespace declarations exist
- work properly in both cases with service inheritance.
Attachments
Issue Links
- is related to
-
THRIFT-5071 Rust: rust tutorial can not be compiled with rust edition 2018
- Closed
- links to