Swiftpack.co - shotastage/LibC.swift as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by shotastage.
shotastage/LibC.swift 1.0.0
Import OS specific LibC automatically.
⭐️ 0
🕓 3 weeks ago
.package(url: "https://github.com/shotastage/LibC.swift.git", from: "1.0.0")


Build Status Swift 5 MIT License

Import Glibc or Darwin library automatically.


Please add "SwiftLibC" to Package.swift using Swift Package Manager(SPM).

import PackageDescription
let package = Package(
    name: "Package Name",
    dependences: [
    	.package(url: "https://github.com/shotastage/SwiftCLibrary.git", from: "1.0.0"),

You can import LibC like following code.

import clib

and You can use this library only add import clib to first line of source. You need not to write codes like following.

#if os(OSX)
	import Darwin
#elseif os(Linux)
	import Glibc


This program is freely distributed under the MIT, see LICENSE for detail.


Stars: 0
Last commit: 3 weeks ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

Compatible to Swift 3.0.2 Preview1
6 years ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics