Skip to content

simmsb/inkview-rs

Repository files navigation

Inkview-rs

Rust bindings for pocketbook E-Reader devices (inkview)

Crates.io Version docs.rs Discord

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 driver for inkview-rs.

Prerequisites

Zig must be installed.

To run recipes from the justfile, install the just command runner.

Available recipes can be listed with:

just --list

Then execute the following to install the armv7-unknown-linux-gnueabi rustc target and cargo-zigbuild:

just prerequisites

Build

To build a binary crate located in this repo, run:

just pb_sdk_version=<sdk-version> build-app <name>

To build an example:

just pb_sdk_version=<sdk-version> build-example <crate> <name>

Deploy a binary

To deploy a built binary to the device over USB, run the following,
assuming the device is connected and appears in path /run/media/$USER/<pb-device>:

The path argument is the relative path from target/armv7-unknown-linux-gnueabi/<cargo-profile>,
so for example: examples/hello_world

just pb_device=<your-device> deploy-usb <path-to-binary> <target-name>

Generate bindings

See documentation for the generate-bindings just recipe.

About

Rust bindings and a Slint backend for libinkview

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages