Deployment on Linux

I'm planning to deploy a server application written with Swift on Linux and I have few questions regarding deployment :
1 - Is there any runtime to install on target system before running Swift App ? I think it's true if the standard library is an external shared library. Anyway, I would to avoid to deploy the whole toolchain.
2 - Can I build a executable on CentOS and deploy on Debian/Unbuntu or I need to build executable on the same Linux platform it will run on ?

Thanks for your help.

David

1 Like

Have a look at the packaging guide from the SSWG with best practices. But essentially, you don't need the whole Swift toolchain, just the runtime and it's dependencies. As for building on CentOS and deploying on Debian, I'm not sure it would work (or at least be 100% sure you won't hit an edge case) but you can always compile in a Docker container to get the same environment.

Technically it is possible to do this, but in practice it's very hard. It relies on being able to be confident that you are only depending on libraries with stable ABIs, and that you're only deploying to platforms that have strictly that ABI version or later.

Terms of Service

Privacy Policy

Cookie Policy