Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

*_ttrpc.rs generate also can support gen_mod_rs. #231

Open
jokemanfire opened this issue Jul 24, 2024 · 0 comments
Open

*_ttrpc.rs generate also can support gen_mod_rs. #231

jokemanfire opened this issue Jul 24, 2024 · 0 comments

Comments

@jokemanfire
Copy link
Contributor

jokemanfire commented Jul 24, 2024

Is your feature request related to a problem? Please describe.
if I set ProtobufCustomize::default().gen_mod_rs(true); but *.ttrpc.rs will not add in mod.rs. If *_ttrpc.rs also can add in mod.rs. When I point out the gen_mod_rs(true).

Describe the solution you'd like

ttrpc_compiler::codegen::gen_and_write function support customize's gen_mod_rs ,and write it in mod.rs

Describe alternatives you've considered

pub fn gen_and_write( file_descriptors: &[FileDescriptorProto], files_to_generate: &[String], out_dir: &Path, customize: &Customize, ) -> io::Result<()> { let results = gen(file_descriptors, files_to_generate, customize);
if results is not null and gen_mod_rs is true,add it in mod.rs .

Additional context

Before raising this feature request

yes

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant