Last active
May 12, 2020 07:46
-
-
Save Burgestrand/ba9c2d93a23bd858181ec5b77cd948a6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public struct Environment { | |
init() { | |
print("Current.init") | |
} | |
public var name = "World" | |
} | |
public var Current: Environment! = Environment() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Environment | |
print("Hello") | |
print(Current.name) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
default: compile | |
./Main | |
compile: Main | |
Main: Environment | |
swiftc Main.swift -I . -L . -lEnvironment | |
Environment: Environment.swift libEnvironment.dylib | |
swiftc -emit-library -emit-module -parse-as-library Environment.swift |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment