Swift to the cloud in a single step - Euan Harris

Поділитися
Вставка
  • Опубліковано 3 жов 2024
  • As a server-side engineer today, it’s not enough to build a stand-alone executable for your service. You need to wrap it in a container image, ready to run on any standard public or private cloud infrastructure.
    In this talk we’ll see that building a container image for your Swift project can be as quick and easy as building a native executable. Using Swift Package Manager plugins and Swift SDKs, we can extend Swift Package Manager, adding a new command tailor-made for wrapping Swift programs in container images:
    Swift SDKs let us build Linux binaries directly on macOS. Builds are as fast as your native compiler, with no virtualisation overhead.
    A Swift Package Manager command plugin can build any target in Package.swift, wrap it in a container and upload it to the cloud. A Dockerfile isn’t needed because the plugin already knows what to do.
    We’ll see how Swift SDKs can help us to build binaries for several popular Linux distributions, and even build statically-linked binaries with no runtime dependencies. We’ll take a quick look at the contents of the generated container image.Finally, we’ll show how a command plugin ties the whole process together into a single command.
    🧑‍💻 Check out Swift Container Plugin on GitHub. Contributions welcome!
    github.com/app...
    🎥 Recorded at the ServerSide.swift conference in London in 2024.
    🙌 Sponsored by Broken Hands: www.brokenhand...
    🐥 Twitter: / swiftserverconf
    🐘 Mastodon: hachyderm.io/@...
    📸 Instagram: / swiftserverconf
    👔 LinkedIn: / swiftserverconf
    📱 Website: www.serverside...
    ✌🏻Organized By
    Tim Condon: / 0xtim

КОМЕНТАРІ •