Skip to content

Swift package of a simple bridge between Node.js and Swift.

License

Notifications You must be signed in to change notification settings

evilutioner/NodeBridge

 
 

Repository files navigation

NodeBridge

Swift package of a simple bridge between Node.js and Swift.

Usage

import NodeBridge

Addon.handler = { env, value in
    print(Value(env: env, value: value).description)
}

Addon.ready = {
    Addon.callJS(dict: [
        "foo": "bar",
    ])
}
const NativeBridge = process._linkedBinding('SwiftBridge');

NativeBridge.doSomethingUseful((msg, cb) => {
    console.log(msg);
    cb({baz: 'abc'});
});

For a real world example app, see https://github.com/kewlbear/Inssagram.

Swift Package Manager

.package(url: "https://github.com/kewlbear/NodeBridge.git", .branch("main")),

License

MIT

About

Swift package of a simple bridge between Node.js and Swift.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Swift 75.6%
  • Objective-C 18.9%
  • C 4.9%
  • JavaScript 0.6%