Realm offers so far two bindings for Cocoa-related development: Realm Objective-C and Realm Swift. The latter is based on the former and a shallow wrapper around the Objective-C APIs adopting types and protocols from the Swift standard library and exposing more convenient APIs. The reason for that architecture instead of a pure Swift binding is that Swift doesn't allow to interface C++ code, but Realm's underlying storage engine is based on that.
This means that even with Realm Swift, you have Foundation as transitive dependency as we rely on it for e.g. RLMObject
with Key-Value Coding, inter-operate with KVO, use Foundation's value types (NSNumber
, NSArray
, …).
So assuming that there won't be a Linux-compatible Foundation distribution shipping with the Linux version of Swift, using Realm on Linux would require a "pure" Swift binding of Realm, which isn't possible yet, an alternative Objective-C binding, which avoids Foundation, or a mature alternative implementation of Foundation, where GNUstep might be a candidate, but this is entirely untested from our side.
Update #1
Swift was open-sourced together with a Swift implementation stub of Foundation's APIs as a shim over OS APIs, so that it can be portably used on Linux and other platforms where Apple's Foundation is not available. This stub was filled since then with actual implementations by contributors to the project and is part of the Swift 3 release, so it can be used for pure Swift projects.
However this doesn't solve the general issue here that Realm Swift is not pure Swift and is based on Realm Objective-C. So it relies on the availability of the Objective-C runtime and Foundation.
Update #2
We recently announced the Realm Mobile Platform, which you can run on-premises or on the public cloud. So this makes it indeed possible to use Realm on Linux. But server-side access is so far exclusively supported on the Enterprise Edition with the Node.js binding.