split ruby gem into separate repository
All checks were successful
Rust / build (push) Successful in 5m1s

This commit is contained in:
Vinzenz Schroeter 2025-02-16 16:44:50 +01:00
parent 2f7a2dfd62
commit 31dac283ef
103 changed files with 114 additions and 14573 deletions

3
example/Gemfile Normal file
View file

@ -0,0 +1,3 @@
source 'https://rubygems.org'
gem 'servicepoint', path: '..'

19
example/Gemfile.lock Normal file
View file

@ -0,0 +1,19 @@
PATH
remote: ..
specs:
servicepoint (0.0.0)
ffi
GEM
remote: https://rubygems.org/
specs:
ffi (1.17.0-x86_64-linux-gnu)
PLATFORMS
x86_64-linux
DEPENDENCIES
servicepoint!
BUNDLED WITH
2.3.27

25
example/example.rb Normal file
View file

@ -0,0 +1,25 @@
require_relative "../lib/servicepoint_binding_uniffi"
include ServicepointBindingUniffi
connection = Connection.new("172.23.42.29:2342")
pixels = Bitmap.new_max_sized
x_offset = 0
loop do
pixels.fill(false)
(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

6
example/example.sh Executable file
View file

@ -0,0 +1,6 @@
#!/usr/bin/env bash
set -e
SCRIPT_PATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
LD_LIBRARY_PATH="$SCRIPT_PATH/../target/release:$LD_LIBRARY_PATH" ruby "$SCRIPT_PATH/example.rb"