|
|
||
|---|---|---|
| src | ||
| .gitignore | ||
| build.zig | ||
| build.zig.zon | ||
| README.md | ||
Zig Pocketbook
Build applications for Pocketbook ereaders with Zig 0.14.x+
Introduction
The source of the SDK can be found on GitHub. This is using the version 6.5 of the SDK because the version 6.8 is released in a 7z file that the Zig build system cannot handle yet.
For now, an example is built with the module. This example is a manual rewrite in Zig of an hello world example by Pascal Martin.
Usage
Not very tested yet, but you should be able to add this as a dependency to your project:
zig fetch --save=pb git+https://forge.lunai.re/rodolphe/zig-pocketbook.zig
And in your build.zig:
const pb_dep = b.dependency("pb", .{});
const inkview = pb_dep.module("inkview");
// Assuming your executable's module is named exe_mod
exe_mod.addModule("inkview", inkview);
From there you should be able to use the module in your code:
const inkview = @import("inkview");
Please note that it is not possible to build an application for an OS other than Linux or a CPU architecture other than ARM. On my reader, a Pocketbook Touch HD3, the correct triplet to use for the target is arm-linux-gnueabi.2.23.