[swift-users] Need a way to include swift file into another swift file
Jens Alfke
jens at mooseyard.com
Tue Feb 28 01:19:37 CST 2017
> On Feb 27, 2017, at 2:45 AM, Rupendra Limbore via swift-users <swift-users at swift.org> wrote:
>
> I am using swift as a CGI script with Apache server (just to explore).
Are you treating Swift like a shell-script, by putting a “#!” at the top of the file? That works, but it’s going to be terribly slow for a CGI script because the source code has to be compiled for every... single… HTTP… request.
It would be much more efficient to compile the Swift to an executable file, and then use that file as the CGI. And that will solve your multiple-source-files problem too.
—Jens
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20170227/70ff307e/attachment.html>
More information about the swift-users
mailing list