The file that would be run is autoit3.exe, which is an .exe, it would just have a command line argument of yourprog.au3.
You would put any necessary #includes in the same folder as where your Function.au3 was going to be placed, and path out to them in yourprog.au3.
Not only that, you don’t even need AutoIt.exe, you can use yourprog.exe as the interpreter of yourprog.au3, since every .au3 compiled with the #pragma compile(AutoItExecuteAllowed, True) is a mini-interpreter. See here for the syntax needed to call it.
So to recap, with this method, your function.au3 will not be “cooked into” the .exe, but rather the .exe will act as an interpreter of ALL your .au3 (if you choose not to use autoit3.exe directly).
The upside is you will be able to change any .au3 on the fly without recompilation.
The downside is you will need yourprog.au3 and any other UDFs to be local on the machine.
Questions?