node-swift icon indicating copy to clipboard operation
node-swift copied to clipboard

Create Node modules in Swift

Results 26 node-swift issues
Sort by recently updated
recently updated
newest added

This PR introduces NAPI bindings for JavaScriptCore that enable NodeSwift (and other native modules!) to work on top of JSC.

Project looks great folks but the npm package is over 2 years old and only has a `package.json` in it. Would be great to use this library straight from NPM.

```text node_modules\node-swift\Sources\CNodeAPI\task_reflection.cpp:61:16: error: 'swiftasynccall' calling convention is not supported for this target __attribute__((swiftasynccall)) static void node_swift_resume_trampoline(__attribute__((swift_async_context)) void *ctx) { ^ node_modules\node-swift\Sources\CNodeAPI\task_reflection.cpp:70:24: error: incompatible function poi nter types assigning to 'TaskContinuationFunction...

This would be a nice to have: `example.swift`: ```swift import Foundation import NodeAPI @main struct MyExample: NodeModule { let exports: NodeValueConvertible init() throws { exports = [ "getTime": try NodeFunction...

```swift import NodeAPI import Foundation final class AwesomeClass: NodeClass { static let properties: NodeClassPropertyList = [ "foo": NodeMethod(foo), ] private static let queue = DispatchQueue(label: "new-queue") private let swiftJSQueue: NodeAsyncQueue...

Hi, great project but the example seems just a little minimal. I am trying to access the iTunesLibrary from node but i am not sure how to map the values/types...

Trying to build using Swift 6.0 on macOS 15.0 Beta. Output and error: $ swift build Building for debugging... /Users/---/Developer/---/.build/checkouts/node-swift/Sources/NodeAPI/NodeClass.swift:247:14: error: type of expression is ambiguous without a type annotation...

Maybe how can I debug the libray at the runtime with source code