Pakgage Manager and MacOS

Hello. I'm start learn creating frameworks, and very want to create frameworks for Cocoa Application within SPM. I just want to make draws on the screen. So I found that is very hard. So my question is, do you know any packages which work with hardware on MacOS and can draw on the screen? For make drawing apps not with Cocoa but instead on pure Swift.
Upd. After all I could draw the little orange screen via this code in main.swift of my package.

import Cocoa
func graphic() {
    let application = NSApplication.shared
    let rect = NSRect(x:100,y:100,width:100,height:100)
    let window = NSWindow(contentRect: rect, styleMask: NSWindow.StyleMask.borderless, backing: NSWindow.BackingStoreType.buffered, defer: false)
    window.backgroundColor = NSColor.orange
    window.makeKeyAndOrderFront(nil)
    NSApp.run()
}

graphic()

Swift requires some kind of library to "draw on the screen". Besides Cocoa and Cocoa Touch, there's SpriteKit, SceneKit, Metal, and so on. If you can write such a library in C, you can call it from Swift. Can you do that?

Cocoa app creating with no problem within shell sessions which handle Package Manager. This is very nice. No, I don't know C. May be exist ready C library for MacOS. But I need Quartz for drawing...

I'm pretty sure you can call Quartz from Swift in a Cocoa app. Taking code that works in that situation and packaging that into a library should be relatively straight-forward. Can you do that?