Repository navigation
Swift API #19
Description
Activity
I understand the sentiment, but Swift, C# and Java are not "every" language, and this is not "every project" either. This is open source and Github so there might be enough hands to man the maintanance of ports to the most popular languages for such an important piece of software. Python is quite popular in academia but a little less popular with the bulk of private sector developers.
Reacted by Robert S Mozayeni, Adam Kirk, Artem Sherbachuk, Andrei Popa, iko, MW, Joe, Omar Albeik, Aman Maharjan, ELI JOSEPH BRADLEY and 4 moreGiven that TensorFlow is designed to also run on mobile and that Apple is recommending Swift as a primary language for iOS development, I think having a Swift API for TensorFlow would be a good idea.
I don't think adding support for the most widely-used languages such as Java, C#, and Swift would be a bad idea. The gRPC project already supports 10 languages, including Java, C#, and JavaScript (via Node.js).
@jamesliu96 Feel free to open an issue for adding a Go API.
Reacted by Robert S Mozayeni, b310-n, Kristofor Lawson, Artem Sherbachuk, Max Desiatov, John Bona, Sergiu Nicuta, Andrei Popa, Alex Staravoitau, avalonx and 12 moreA Swift frontend, especially for simply running graphs for inference on mobile would be great. I don't know of current plans to provide one, so feel free to dive in. Since our exact plans on accepting external contributions are still in flux, it would be a good idea to check in with the discuss mailing list with a draft of the code ahead of time to figure out where it should live exactly.
Reacted by Mael, b310-n, JB, avalonx and Brian Vallelunga- addedstat:contribution welcomeStatus - Contributions welcomeStatus - Contributions welcome
on Dec 16, 2015 - added a commit that references this issue
on Mar 9, 2016 I'll take on this.
Reacted by Tudor Achim, Tyler Cloutier, Alex Staravoitau, Ignacio Benavides, avalonx, MattSich, iko, Brian Vallelunga, Dan Zheng, Bliss Chapman and 6 moreReacted by Tudor Achim, Tyler Cloutier, Ignacio Benavides, avalonx, iko, Brian Vallelunga, David, Dan Zheng, Roman Schlagowsky, Nan-Jiang Jiang and 1 moreReacted by Bairen YiI have this swift docker file with parsley mcparsefsce / tensorflow + separate swift 3 dev container. - I will plugin swift grpc once google resolve an issue with their just released grpc library
https://github.com/johndpope/DockerParseyMcParsefaceAPI
I could use some help to get it all working.
Some @nubbel stubbed out proto files in swift here
https://github.com/nubbel/swift-tensorflow/tree/master/types
Should be able to leverage this environment to get above working.I have been working on a painful private project for a while using Swift. I'll be migrating the project API library to Swift 3 soon and opening it up under the same licensing as TensorFlow (Apache 2.0). It was reasonably complete before Swift 3 and I plan to have the Swift 3 version complete before the end of 2016, sans mistakes from original, and including lessons learned.
@siilime fyi - Google released an official swift3 grpc library last week.
https://github.com/grpc/grpc-swift
There's still some heavy lifting to do to get it all working(eg generate swift 3 services classes). You may want to revisit your implementation and yield to official library. Surely less painful in the long run. I'm aware of some other grpc libraries and wrapping the c classes into swift module.(just search on GitHub (swift + grpc) there's one by Huawei. My interest is to get it working server side. If anyone wants to help / check the issues grpc-swift for docker issues ticket.Reacted by フィリップ@johndpope Good tip. Thanks. My focus was on the server side originally, and it's where the majority of my work has been so I'll be taking a look at that.
66 remaining items
- added 7 commits that reference this issue
on Apr 9, 2025 - added 5 commits that reference this issue
on Jul 28, 2025 - added a commit that references this issue
on Nov 26, 2025
Swift is a very popular and expressive language with a large community of pro developers.