How to expose all .rs files in

I have the following structure:

proto_rust/src/protos/{lots of auto generated .rs files}

Since there are lots of auto generated files on proto_rust/src/protos/, it does not make sense for me to put them manually in Is there a way to expose all them to Something like pub mod *

PS: files are generated from protobuf so there could be a lot and it could grow with time. On C++ and Dart it's already working for all of them, now I need Rust.

You can also auto generate the, because why not?

$ ls src/protos/ | sed 's/./ /' | awk '{ print "pub mod "$1";" }' > src/protos/

Something like automod?

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.