View Single Post
Old 03-11-2025, 08:11 AM   #1
RedOnion
Junior Member
RedOnion began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Mar 2025
Device: Kindle PW
Compile Zig programs for Kindle?

I hacked my old kindle (10th gen) and jailbreaked (jailbroken?) it. I cross compiled the hello world program using:

Code:
zig build-exe .\tiny-hello.zig -O ReleaseSmall -fstrip -fsingle-threaded -target arm-linux-gnueabi
It worked as expected. I used this guide here

With this success I went on to compile the following HTTP client:

https://zig.news/andrewgossage/easy-...lientfetch-k43

It however failed with the following error:

Code:
[root@kindle apps]# ./hello-web

URL: https://jsonplaceholder.typicode.com/posts/1 GET
Sending request...
error: CertificateBundleLoadFailure

curl works for the same URL, which rules out the device and network.

Code:
[root@kindle us]# curl -s https://jsonplaceholder.typicode.com/posts/1
{
  "userId": 1,
  "id": 1,
  "title": "sunt aut facere repellat provident occaecati excepturi optio reprehenderit",
  "body": "quia et suscipit\nsuscipit recusandae consequuntur expedita et cum\nreprehenderit molestiae ut ut quas totam\nnostrum rerum est autem sunt rem eveniet architecto"
}

Zig people told me to check if I can use strace to debug. Is there a way this could work?
RedOnion is offline   Reply With Quote