Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-4098

Support user-defined output namespaces in generated Rust modules

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.15.0
    • Rust - Compiler
    • 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:

      1. recognize them if they exist, and generate code with the proper module paths
      2. default to the current behavior if no namespace declarations exist
      3. work properly in both cases with service inheritance.

      Attachments

        Issue Links

          Activity

            People

              allengeorge Allen George
              allengeorge Allen George
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h