Pagefind in termux
I am quite lost because I don't understand how binary packages work i think
https://pagefind.app/docs/installation/
this doesn't work with npx command
i checked the binary releases from https://github.com/CloudCannon/pagefind/releases in that error, it seems to have an aarch64 linux? but I don't know what to do with that or if that would even actually work. (I spent some time figuring out that my android is aarch64, or so i think)
there is also information about using rust and cargo or something in the installation page but I don't know if that would be any different than using npm, it seems python version is also a wrapper so i gues rust would be a wrapper as well. if anyone that understands binary releases and packages could guide me and let me know if this would work at all with some method, that would be helpful. or whether i should give up on pagefind in termux.
for context i was using this with astro, but this doesn't work without as well. same result (that error)
thanks for your time
GitHub
Releases · CloudCannon/pagefind
Static low-bandwidth search at scale. Contribute to CloudCannon/pagefind development by creating an account on GitHub.
Solution:Jump to solution
As for this application in particular.
It's a Rust application, it's written in Rust.
They seem to also be providing an interface library for Python and NodeJS/JavaScript but the core application is written in Rust.
The
npm
/npx
package probably contains the API for NodeJS....8 Replies
Right, so Android, is not exactly desktop Linux.
And neither does Termux provide quite a conventional Linux userspace.
I've forwarded the tag we have on the topic above.
To recap that, in short Linux applications aren't necessarily going to run on Termux.
Packages need to be built against the proper dependencies available on Android/Termux, and more often than not need some patches on top of that to be compatible.
You might have better luck getting desktop linux applications running in
proot-distro
, but that isn't a magic bullet either and it can't give you additional permissions from the host system.tl;dr the project need to be built for native android platform.
Solution
As for this application in particular.
It's a Rust application, it's written in Rust.
They seem to also be providing an interface library for Python and NodeJS/JavaScript but the core application is written in Rust.
The
npm
/npx
package probably contains the API for NodeJS.
Same for the pip
package and the Python API.
Although both probably also ship the main package in binary form.pagefind
unfortunately doesn't seem to meet the general packaging requirements we have for Termux packages.
As it doesn't seem to have packages in distros.wow okay, that was a quick response
wait so does this mean if i install rust (pkg install rust? or rustc) and use that cargo method, this thing could work? i don't really know rust yet, but is that possible? or does rust work a bit different than python? (pkg install python seems to just work without much so)
Theoretically, yes it could work.
Practically there's no way to predict if it will.
ah alright, tyy, that's enough of a direction. tbh i have mostly given up on pagefind. let's just try rust and see what happens
i was indeed confused why termux has its own packages, but that explanation makes sense
👋 Not a Termux user, but Pagefind creator here. I haven't done this directly myself, but am aware of someone who has!
They did a write-up here: https://trinbagotechie.blogspot.com/2023/06/using-pagefind-with-11ty-in-termux.html
Posting in case it helps get something going for ya 🙂
Using Pagefind with 11ty in Termux
A nooby book writer from Trinidad in the Caribbean