Git Product home page Git Product logo

swift-whiteboard's Introduction

Swift Whiteboard

A Swift shared-memory implementation of the blackboard communication architecture.

MacOS Monterey Swift Debug CI MacOS Monterey Swift Release CI MacOS Ventura Swift Debug CI MacOS Ventura Swift Release CI Swift Coverage Test Swift Lint Ubuntu 20.04 Swift Debug CI Ubuntu 20.04 Swift Release CI Ubuntu 22.04 Swift Debug CI Ubuntu 22.04 Swift Release CI

Overview

This is a Swift wrapper around gusimplewhiteboard. This package wraps the high-speed, concurrency-safe gusimplewhiteboard C library for use in Swift. The package provides a sendable Whiteboard class that allows concurrent read and write access to a common message base. Message slots can be configured by conforming to the WhiteboardSlot protocol. You can create your own type-safe messages through conformance to the WhiteboardSlotted protocol.

Prerequisites

Swift 5.6 or higher

To build, download Swift from https://swift.org/download/ -- if you are using macOS, make sure you have the command line tools installed as well). Test that your compiler works using swift --version, which should give you something like

$ swift --version
swift-driver version: 1.45.2 Apple Swift version 5.6 (swiftlang-5.6.0.323.62 clang-1316.0.20.8)
Target: x86_64-apple-darwin20.3.0

on macOS, or on Linux you should get something like:

$ swift --version
Swift version 5.6.2 (swift-5.6.2-RELEASE)
Target: x86_64-unknown-linux-gnu

Usage

Embedding this Package

Typically, you need to embed this package into your own project using the Swift Package Manager. After installing the prerequisites, add this package as a dependency to your Package.swift file, e.g.:

// swift-tools-version:5.6

import PackageDescription

let package = Package(name: "MyPackage",
    dependencies: [
        .package(url: "https://github.com/mipalgu/swift-whiteboard.git", branch: "main"),
    ],    
    targets: [
        .target(name: "MyPackage",
                dependencies: [
                    .product(name: "Whiteboard", package: "swift-whiteboard")
                ]
        )
    ]
)

Using the Whiteboard

For details on how to use the whiteboard, see the documentation. For a quick start, have a look at the Getting Started document.

swift-whiteboard's People

Contributors

callummccoll avatar rhx avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

swift-whiteboard's Issues

Handle [UInt8] on whiteboard slot

Currently posting an array of UInt8 to a whiteboard slot will eventually cause a bad access crash, this behaviour is expected, but having this functionality would be very useful in certain situations.

@rhx in our meeting today you have suggested this could be implemented. @Morgan2010 has also done a lot of this work already on the CFE and suggested discussion with him.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.