[swift-users] Module System
Damien BRUN
dev at lanza.fr
Sat Dec 5 14:22:36 CST 2015
You can get a simple module to work with :
$ swift -I /path/to/module/dir swiftysource.swift
with module dir containing a file named module.modulemap which is something
like
CSmurf [system] {
header "/absolute/path/to/header.h"
link "smurf" // to link against libsmurf.so
export *
}
I am personnally currently struggling with it to get it working with more
complex libs but not everything (see http://clang.llvm.org/docs/Modules.html
for "everything"') seems implemented yet.
Regards
2015-12-05 5:54 GMT+01:00 Severen Redwood <severen.redwood at gmail.com>:
> How does the module system actually work in Swift? From what I've seen so
> far it seems to be pretty tied in with XCode and tools like the package
> manager.
>
> I come from languages like Rust where modules either map to files or to
> folders with a `mod.rs` file inside. I can also define modules inside of
> source files with the `mod` keyword.
>
> From what I've seen the way modules work in Swift is not very flexible.
>
> _______________________________________________
> swift-users mailing list
> swift-users at swift.org
> https://lists.swift.org/mailman/listinfo/swift-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20151205/77fa6562/attachment.html>
More information about the swift-users
mailing list