Skip to content

Commit

Permalink
feat: use compiled rust q565 library
Browse files Browse the repository at this point in the history
  • Loading branch information
brokenmass committed Sep 18, 2023
1 parent fcdca4f commit 10adf89
Show file tree
Hide file tree
Showing 8 changed files with 427 additions and 2 deletions.
340 changes: 340 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[package]
name = "q565_rust"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[lib]
name = "q565_rust"
path = "rust/lib.rs"
crate-type = ["cdylib"]

[dependencies]
pyo3 = "0.19.0"
q565 = "*"
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,19 @@ The app adds an icon to the systray that can be left clicked

## Development

You must have python 3.11 and rust installed in your system

checkout the repository or download the latest code and install python dependencies

```
pip install --upgrade hidapi mss pillow winusbcdc>=1.5 libusb-package psutil pystray pyinstaller
pip install -r requirements.txt --upgrade
```

build and install the q565 image compressor using rust

```
maturin build --release
pip install ./target/wheels/q565_rust-0.1.0-cp311-none-win_amd64.whl --force-reinstall
```

## Usage
Expand Down
2 changes: 2 additions & 0 deletions build.ps1
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
maturin build --release
pip install ./target/wheels/q565_rust-0.1.0-cp311-none-win_amd64.whl --force-reinstall
pyinstaller --noconfirm --onefile --windowed --icon "./icon.ico" --add-data "./fonts;fonts/" --add-data "./images;images/" --add-data "./SignalRGBPlugin;SignalRGBPlugin/" "./signalrgb.py"
Loading

0 comments on commit 10adf89

Please sign in to comment.