From fae6ed4f962e124d3d2d9f20fc56ad4b0e47902c Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sun, 16 Feb 2025 18:26:33 +0100 Subject: [PATCH] remove redundant infos --- Cargo.lock | 1 - README.md | 48 ++++++++++++++++++++++++++++++--------- uniffi-bindgen/Cargo.toml | 7 ------ 3 files changed, 37 insertions(+), 19 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f744ab2..03a9969 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -682,7 +682,6 @@ dependencies = [ name = "uniffi-bindgen" version = "0.0.0" dependencies = [ - "thiserror 2.0.11", "uniffi", ] diff --git a/README.md b/README.md index 0377840..af03aa8 100644 --- a/README.md +++ b/README.md @@ -5,21 +5,29 @@ Display" or "Airport Display". This crate contains C# bindings for the [servicepoint](https://git.berlin.ccc.de/servicepoint/servicepoint) library based on [servicepoint-binding-uniffi](https://git.berlin.ccc.de/servicepoint/servicepoint-binding-uniffi). -Also take a look at the main project [README](https://git.berlin.ccc.de/servicepoint/servicepoint/src/branch/main/README.md) for more -information. +## Example -## Note on stability +```ruby +connection = Connection.new("172.23.42.29:2342") -This library is still in early development. -You can absolutely use it, and it works, but expect minor breaking changes with every version bump. +pixels = Bitmap.new_max_sized +x_offset = 0 +loop do -## Notes on differences to rust library + pixels.fill(false) -- Performance will not be as good as the rust version: - - most objects are reference counted. - - objects with mutating methods will also have a MRSW lock -- You will not get rust backtraces in release builds of the native code -- Panic messages will work (PanicException) + (0..((pixels.height) -1)).each do |y| + pixels.set((y + x_offset) % pixels.width, y, true); + end + + command = Command.bitmap_linear_win(0, 0, pixels, CompressionCode::UNCOMPRESSED) + + connection.send(command) + sleep 0.0005 + + x_offset += 1 +end +``` ## Installation @@ -32,3 +40,21 @@ git commit -m "add servicepoint submodule" Run `generate-binding.sh` to regenerate all bindings. This will also build `libservicepoint.so` (or equivalent on your platform). + +## Note on stability + +This library is still in early development. +You can absolutely use it, and it works, but expect minor breaking changes with every version bump. + +## Notes on differences to rust library + +- Performance will not be as good as the rust version: + - most objects are reference counted. + - objects with mutating methods will also have a MRSW lock +- You will not get rust backtraces in release builds of the native code +- Panic messages will work (PanicException) + +## Everything else + +Look at the main project [README](https://git.berlin.ccc.de/servicepoint/servicepoint/src/branch/main/README.md) for +further information. diff --git a/uniffi-bindgen/Cargo.toml b/uniffi-bindgen/Cargo.toml index 94f495b..cdc42e9 100644 --- a/uniffi-bindgen/Cargo.toml +++ b/uniffi-bindgen/Cargo.toml @@ -2,16 +2,9 @@ name = "uniffi-bindgen" publish = false edition = "2021" -license = "GPL-3.0-or-later" -description = "C bindings for the servicepoint crate." -homepage = "https://git.berlin.ccc.de/servicepoint/servicepoint-binding-ruby" -repository = "https://git.berlin.ccc.de/servicepoint/servicepoint-binding-ruby.git" -#readme = "README.md" -keywords = ["cccb", "cccb-servicepoint", "uniffi"] [build-dependencies] uniffi = { version = "0.25.3", features = ["build"] } [dependencies] uniffi = { version = "0.25.3", features = ["cli"] } -thiserror = "2.0"