3

How is it possible to use Swift as programming language for elementaryOS?

As far as I've seen elementaryOS is based on Ubuntu. So installing & using Swift should be a snap.

But I'm quite unsure in terms of using the existing libraries for elementaryOS - according to https://elementary.io/de/developer these libraries are written in Vala. As I haven't any expertise in Vala yet: Is it possible to use elementaryOS libraries from within Swift?

  • Sorry, this is not an answer, but I wanted to ask the same question. The lack of an answer means probably 'No'. Elementary OS obviously attracts the attention of Mac users and the idea of developing something both for the Mac and for Linux is the natural next step. A common language is needed - please make the bridging required for Swift to talk to the elementaryOS framework. Thanks, Ondo – user5795 Aug 8 '16 at 20:32
2

There are some experimental tools, but nothing stable enough to build a production app with.

Any libraries specific to elementary OS can only be used with Vala. elementary OS is built on Gtk+, and there are experimental Gtk+ bindings for Linux. According to the documentation, "currently it implements only a small subset of Gtk+".

If you're looking for a way to build cross-platform apps that can run on elementary and other OSes, Electron seems to work well, and any language with Gtk+ bindings would probably be fine. But if you want to build a "native" elementary OS app, Vala is the way to go.

  • Just to add. While Vala is the main language used in elementary OS, libs created with Vala are converted to C before final build and may be used by a lot of languages. – Thiago Jedi Sep 8 '16 at 23:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.