Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 28 additions & 18 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,37 @@ on:
env:
CARGO_TERM_COLOR: always

# Make sure CI fails on all warnings, including Clippy lints
RUSTFLAGS: "-Dwarnings"

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: install lzma
run: sudo apt-get update && sudo apt-get install -y liblzma-dev

- name: build default features
run: cargo build --all --verbose
- name: build default features -- examples
run: cargo build --examples --verbose
- name: test default features
run: cargo test --all --verbose

- name: build all features
run: cargo build --all-features --verbose
- name: build all features -- examples
run: cargo build --all-features --examples --verbose
- name: test all features
run: cargo test --all --all-features --verbose
- uses: actions/checkout@v4

- name: Update repos
run: sudo apt-get update -qq
- name: Install rust toolchain
run: sudo apt-get install -qy cargo rust-clippy
- name: install lzma
run: sudo apt-get update && sudo apt-get install -y liblzma-dev

- name: Run Clippy
run: cargo clippy --all-targets --all-features

- name: build default features
run: cargo build --all --verbose
- name: build default features -- examples
run: cargo build --examples --verbose
- name: test default features
run: cargo test --all --verbose

- name: build all features
run: cargo build --all-features --verbose
- name: build all features -- examples
run: cargo build --all-features --examples --verbose
- name: test all features
run: cargo test --all --all-features --verbose
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,22 @@
[![crates.io](https://img.shields.io/crates/v/servicepoint.svg)](https://crates.io/crates/servicepoint)
[![Crates.io Total Downloads](https://img.shields.io/crates/d/servicepoint)](https://crates.io/crates/servicepoint)
[![docs.rs](https://img.shields.io/docsrs/servicepoint)](https://docs.rs/servicepoint/latest/servicepoint/)
[![GPLv3 licensed](https://img.shields.io/crates/l/servicepoint)](../../LICENSE)
[![GPLv3 licensed](https://img.shields.io/crates/l/servicepoint)](./LICENSE)

In [CCCB](https://berlin.ccc.de/), there is a big pixel matrix hanging on the wall. It is called "Service Point
Display" or "Airport Display".
This repository contains a library for parsing, encoding and sending packets to this display via UDP in multiple
programming languages.

This repository will move to [git.berlin.ccc.de/servicepoint/servicepoint-simulator](https://git.berlin.ccc.de/servicepoint/servicepoint-simulator) soon.

Take a look at the contained crates for language specific information:

| Crate | Languages | Readme |
|-----------------------------|-----------------------------------|-------------------------------------------------------------------------|
| servicepoint | Rust | [servicepoint](crates/servicepoint/README.md) |
| servicepoint_binding_c | C / C++ | [servicepoint_binding_c](crates/servicepoint_binding_c/README.md) |
| servicepoint_binding_uniffi | C# / Python / Go / Kotlin / Swift | [servicepoint_binding_cs](crates/servicepoint_binding_uniffi/README.md) |
| Crate | Languages | Readme |
|-----------------------------|-----------------------------------|-----------------------------------------------------------------------------|
| servicepoint | Rust | [servicepoint](crates/servicepoint/README.md) |
| servicepoint_binding_c | C / C++ | [servicepoint_binding_c](crates/servicepoint_binding_c/README.md) |
| servicepoint_binding_uniffi | C# / Python / Go / Kotlin / Swift | [servicepoint_binding_uniffi](crates/servicepoint_binding_uniffi/README.md) |

## Projects using the library

Expand All @@ -28,7 +30,7 @@ Take a look at the contained crates for language specific information:
- animations that play on the display
- tanks game (C#): [servicepoint-tanks](https://github.com/kaesaecracker/cccb-tanks-cs)
- cellular automata slideshow (rust): [servicepoint-life](https://github.com/kaesaecracker/servicepoint-life)
- browser stream (typescript): [cccb-servicepoint-browser](https://github.com/SamuelScheit/cccb-servicepoint-browser)
- partial typescript implementation inspired by this library and browser stream: [cccb-servicepoint-browser](https://github.com/SamuelScheit/cccb-servicepoint-browser)

To add yourself to the list, open a pull request.

Expand Down
6 changes: 3 additions & 3 deletions crates/servicepoint/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@ mod tests {

#[test]
fn round_trip_bitmap_linear() {
for compression in all_compressions().to_owned() {
for compression in all_compressions().iter().copied() {
round_trip(Command::BitmapLinear(
23,
BitVec::repeat(false, 40),
Expand Down Expand Up @@ -750,7 +750,7 @@ mod tests {

#[test]
fn error_decompression_failed_win() {
for compression in all_compressions().to_owned() {
for compression in all_compressions().iter().copied() {
let p: Packet = Command::BitmapLinearWin(
Origin::new(16, 8),
Bitmap::new(8, 8),
Expand Down Expand Up @@ -780,7 +780,7 @@ mod tests {

#[test]
fn error_decompression_failed_and() {
for compression in all_compressions().to_owned() {
for compression in all_compressions().iter().copied() {
let p: Packet = Command::BitmapLinearAnd(
0,
BitVec::repeat(false, 8),
Expand Down
2 changes: 1 addition & 1 deletion crates/servicepoint/src/cp437.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ mod tests_feature_cp437 {
⌡"#;

let cp437 = Cp437Converter::str_to_cp437(utf8);
let actual = Cp437Converter::cp437_to_str(&*cp437);
let actual = Cp437Converter::cp437_to_str(&cp437);
assert_eq!(utf8, actual)
}

Expand Down