svenstaro/miniserve

ARM support?

im-n1 opened this issue · 8 comments

im-n1 commented

Is there any chance to get ARM support? I'm trying to get this up on ARMv7 (Odroid HC2) but I'm getting this:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 1, kind: PermissionDenied, message: "Operation not permitted" }', library/std/src/sys/unix/time.rs:350:72
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Which binary did you use exactly?

im-n1 commented

Docker image from README file.

What exactly did you run?

Let's get rid of the Docker abstraction for the time being to be able to debug better. Can you run the appropriate binary directly from here?

im-n1 commented

Works like a charm.

odroidxu4:~:% ./miniserve-0.22.0-armv7-unknown-linux-gnueabihf
miniserve v0.22.0
12:46:40 [WARN] miniserve has been invoked without an explicit path so it will serve the current directory after a short delay.
12:46:40 [WARN] Invoke with -h|--help to see options or invoke as `miniserve .` to hide this advice.
Starting server in 3… 2… 1…
Bound to [::]:8080, 0.0.0.0:8080
Serving path /home/n1
Available at (non-exhaustive list):
    http://127.0.0.1:8080
    http://172.17.0.1:8080
    http://172.18.0.1:8080
    http://172.19.0.1:8080
    http://172.20.0.1:8080
    http://172.21.0.1:8080
    http://172.22.0.1:8080
    http://172.23.0.1:8080
    http://172.24.0.1:8080
    http://172.25.0.1:8080
    http://172.26.0.1:8080
    http://172.27.0.1:8080
    http://172.28.0.1:8080
    http://172.29.0.1:8080
    http://172.30.0.1:8080
    http://172.31.0.1:8080
    http://192.168.0.1:8080
    http://192.168.16.1:8080
    http://192.168.88.20:8080
    http://[::1]:8080

Quit by pressing CTRL-C
^C%

In this case I don't get what's wrong with the Docker image then.

I still can't reproduce. I used a Raspberry Pi 4 running on armv7l and ran the image via Podman and it works just fine. I'm closing this for the time being as I believe the image is fine. If you have more information to add or can give me a script to run this in QEMU then I'll investigate further.

im-n1 commented

Rpi 4 is 64 bit. HC-2 is 32-bit. Maybe thats the issue.

Rpi4 can run 32bit and 64bit and I made sure to test exactly your architecture. I did test using podman though so that's what I'd also recommend you do for the sake of testing.