Your projects are multi-language. So is SonarQube analysis. Find Bugs, Vulnerabilities, Security Hotspots, and Code Smells so you can release quality code every time. Get started analyzing your projects today for free. Learn more →
Top 3 Swift Scripting Projects
-
-
Yes, swift CLI will compile and run your swift file.
But many people also want to use libraries. For Python, they use the system libraries or work within an environment with installed libraries (i.e., the library-install process happens at environment-configuration time).
In Swift, the easiest way to consume libraries is using packages, but that requires a Package.swift declaring the project scope for the script file (which must comply with top-level and main-entrypoint code requirements).
The easiest way to do that when scripting is a swift tool that manages the process of gathering your library dependencies, auto-generating a project, building the tool, and caching it all so there's no overhead the next time.
The best available tool now is https://github.com/mxcl/swift-sh. It reads dependency information off import comments.
It can also generate the project for you, if/when you want to build in XCode (e.g., move into a more complex application, perhaps requiring sandbox declarations).
Working scripts are not always updated, so any script-build tool has to maintain backwards compatibility, but the swift package manager has changed a lot in recent versions. swift-sh seems to err on the side of backwards compatibility, and does not support e.g., the most recent dependency versioning styles.
Swift-forum discussions about better support for scripting haven't resulted in any official tooling.
-
Appwrite
Appwrite - The Open Source Firebase alternative introduces iOS support. Appwrite is an open source backend server that helps you build native iOS applications much faster with realtime APIs for authentication, databases, files storage, cloud functions and much more!
-
Project mention: Show HN: KS1019/Script.swift: Scripting in Swift with method chaining | news.ycombinator.com | 2022-03-23
Swift Scripting related posts
- Using Swift for Scripting
- A curated directory of 700 Mac menu bar apps
- Quick check of gateway metrics - MacOS only
- Looking for an app that sits in the menu bar. When I click it, it pops up a window with my custom text and in my custom styling. Does this exist?
- Is there a way to turn the menu bar into one long scrolling stock ticker?
- Scaler Bandwidth Monitor - a free menubar app to monitor your device traffic in real-time. Supports M1 Macs.
- Show HN: SwiftBar – build macOS menu bar apps with scripts
-
A note from our sponsor - SonarQube
www.sonarqube.org | 3 Feb 2023
Index
What are some of the best open-source Scripting projects in Swift? This list will help you:
Project | Stars | |
---|---|---|
1 | SwiftBar | 2,015 |
2 | swift-sh | 1,684 |
3 | Script.swift | 1 |