Swiftpack.co - kewlbear/NodeBridge as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
kewlbear/NodeBridge
Swift package of a simple bridge between Node.js and Swift.
.package(url: "https://github.com/kewlbear/NodeBridge.git", from: "0.0.1")

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

GitHub

link
Stars: 0
Last commit: 1 week ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Submit a free job ad (while I'm testing this). The analytics numbers for this website are here.

Dependencies

Release Notes

1 week ago

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