https://github.com/simmsb/inkview-rs
Rust bindings and a Slint backend for libinkview
https://github.com/simmsb/inkview-rs
inkview pocketbook
Last synced: 8 months ago
JSON representation
Rust bindings and a Slint backend for libinkview
- Host: GitHub
- URL: https://github.com/simmsb/inkview-rs
- Owner: simmsb
- Created: 2023-12-31T15:48:30.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-06-29T13:04:43.000Z (almost 2 years ago)
- Last Synced: 2025-04-21T02:15:54.821Z (about 1 year ago)
- Topics: inkview, pocketbook
- Language: Rust
- Homepage:
- Size: 383 KB
- Stars: 6
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Rust bindings for pocketbook E-Reader devices (inkview)
This repo contains bindings for libinkview, which is used by pocketbook devices.
We load libinkview dynamically rather than linking it so that users of this
crate don't have to setup the pocketbook SDK. Instead you just need to
cross-compile to `armv7-unknown-linux-gnueabi.2.23` (`cargo zigbuild` works well
for this) and your binary will run on a pocketbook E-Reader.
Also in this repo is `inkview-slint` which provides a slint `Backend` that works
with inkview. And a demo application `inkview-slint-demo`.
`inkview-eg` is a [embedded-graphics-core](https://crates.io/crates/embedded-graphics-core) driver for inkview-rs.
## Prerequisites
[Zig](https://ziglang.org/learn/getting-started/#installing-zig) must be installed.
To run recipes from the justfile, install the [just](https://github.com/casey/just) command runner.
Available recipes can be listed with:
```bash
just --list
```
Then execute the following to install the `armv7-unknown-linux-gnueabi` rustc target and `cargo-zigbuild`:
```bash
just prerequisites
```
## Build
To build a binary crate located in this repo, run:
```bash
just pb_sdk_version= build-app
```
To build an example:
```bash
just pb_sdk_version= build-example
```
## Transfer a binary
To transfer a built binary to the device over USB, run the following,
assuming the device is connected and appears in path `/run/media/$USER/`:
The path argument is the relative path from `target/armv7-unknown-linux-gnueabi/`,
so for example: `examples/hello_world`
```bash
just pb_device= transfer-app-usb
```
## Generate bindings
Clone the SDK from here: https://github.com/pocketbook/SDK_6.3.0 and place it next to the `inkview-rs` folder.
There are currently bindings for the following SDK versions:
- `v5.19` : accessed by switching to the `5.19` branch
- `v6.5` : accessed by switching to the `6.5` branch
- `v6.8` : accessed by downloading the archive from the releases of the repository
Execute the following from the `inkview-rs` directory to regenerate the bindings.
```bash
just pb_sdk_version= generate-bindings
```