Coder Social home page Coder Social logo

inkview-rs's Introduction

Rust bindings for pocketbook ereader 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 ereader.

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>

Transfer 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/<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> transfer-app <path-to-binary>

Generate bindings

Clone the SDK from here: https://github.com/pocketbook/SDK_6.3.0 and place it next to the inkview-rs folder.
Check out the SDK version by switching branch. (currently: 5.19 or 6.5)

Execute the following from the inkview-rs directory to regenerate the bindings.

just pb_sdk_version=<sdk-version> generate-bindings

inkview-rs's People

Contributors

flxzt avatar simmsb avatar

Stargazers

 avatar Valera Andriyanov avatar  avatar

Watchers

 avatar

Forkers

flxzt

inkview-rs's Issues

document setup and process to generate bindings

I am trying to add features to select between SDK v.5.19 and v.6.5 but I am struggling a bit with regenerating the bindings. Can you add some documentation about your setup and process of generating the bindings?

Edit: I think I figured it out. I'll send a PR soon.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.