비트와 자장가

스위프트 멀티플랫폼 시스템 API 오픈소스화 본문

개발/소식

스위프트 멀티플랫폼 시스템 API 오픈소스화

eastriver 2020. 9. 27. 00:45
728x90

스위프트 네이티브로 시스템 프로그래밍이 가능해지는 "스위프트 시스템" api가 어제 오픈소스화 됐다.

크로스플랫폼이 아니라 멀티플랫폼으로,

맥, ios, watchos, tvos를 지원하고, 소스가 공개되며 리눅스 지원을 추가했다고 한다.

"we’ll be working to adopt System in the Swift Package Manager. This will include enhancements to FilePath and adding support for the recently announced Swift on Windows." 

하지만 머잖아 윈도우즈도 지원할 예정이라고 한다.

 

Our immediate goal is to simplify building cross-platform libraries and applications such as SwiftNIO and SwiftPM. 

이 api의 목적은 크로스플랫폼 라이브러리와 어플리케이션의 개발을 단순화하기 위해서란다.

 

import SystemPackage

let message = "Hello, world!" + "\n"
let path: FilePath = "/tmp/log"
let file = try FileDescriptor.open(
	path, 
	.writeOnly, 
	options: [.append, .create], 
	permissions: .ownerReadWrite
)
try file.closeAfter {
	_ = try file.writeAll(message.utf8)
}

끔.

 

스위프트의 미래가 밝다......!

 

github.com/apple/swift-system

 

apple/swift-system

Contribute to apple/swift-system development by creating an account on GitHub.

github.com

https://swift.org/blog/swift-system/

 

Swift System is Now Open Source

In June, Apple introduced Swift System, a new library for Apple platforms that provides idiomatic interfaces to system calls and low-level currency types. Today, I’m excited to announce that we’re open-sourcing System and adding Linux support! Our visi

swift.org

 

728x90
반응형

'개발 > 소식' 카테고리의 다른 글

스위프트 regex  (0) 2022.06.09
SwiftUI 4.0  (0) 2022.06.09
WWDC22  (0) 2022.06.08
구글 2022 현황 보고  (0) 2022.05.21
스위프트 윈도우즈 공식 지원 시작  (0) 2020.09.23
Comments