I have a multiple-precision floating point number arithmetic library written by myself in C and C++ and I recently want to translate it into rust. But I simply have no idea of how to organize my code.
I plan to let it be a crate. My C files do low level mantissa operations, and my C++ files implement a class of realizing multiple-precision arithmetic operations. The C files are quite independent of one another.
According to “the book”, the functions in the root module, even private, can be called by all the functions in the crate. Thus it seems I should put the lowest level routines in the root module. But we all know if the crate is a bin, then the main function is in the root module and main is the highest level function. So I get confused. Is there any guidelines on code organization for rust?