Dear All,
maybe my question is a bit trifling, but I care about binary size and possible memory usage (even it's minimal). If I have more than one files in the project (e.g. utils.nim and main.nim), and let's say I use:
import strutils
in lib.nim project file, main.nim won't see symbols from strutils, unless I won't explicitly use the same import in main.nim* or won't include the whole **lib.nim (I'm not sure it's appropriate in perspective of convention).
Any good recommendations, practices, criticism on that?
Thanks
Nim trims unused code and does not generate duplicate code. So you can import anything you want but if you only use function, only it will be included in the binary.
If you really want to save space in your exe I written a tool to analyze it: https://github.com/treeform/dumpincludes
I ended up never really needed this tool as Nim produces small exes no matter what you include.