Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is orjson supported on 32-bit Raspberian? #420

Open
timchurches opened this issue Jul 11, 2022 · 7 comments
Open

Is orjson supported on 32-bit Raspberian? #420

timchurches opened this issue Jul 11, 2022 · 7 comments

Comments

@timchurches
Copy link

Even after installing rust, cargo etc, orjson fails to build on a freshly-installed 32-bit Raspberian OS on an RPi Zero W. The rustc compiler runs, but never finishes (at least not in under 24 hours, I gave up after that). V4.4.0 of HAP-python installs fine.

@bdraco
Copy link
Contributor

bdraco commented Jul 11, 2022 via email

@timchurches
Copy link
Author

According to this post orjson will not work with 32-bit python on a 32-bit linux OS: https://medium.com/geekculture/python-orjson-cb046b47ab8c

If that is true, it means the current version of HAP-python can't be deployed on Raspberry Pi 2 or Pi Zero W hardware, of which there are a lot still in use. It should work using 64-bit Raspberry Pi OS on Pi 3 or 4 or Pi Zero 2 (I'll test that when my Pi Zero 2 arrives).

@timchurches
Copy link
Author

Would it be possible to substitute UltraJSON (json - see https://pypi.org/project/ujson/ ) for 32-bit deployment of HAP-python? ujson supports 32-bit builds, and although not as fast as orjson, it is still many, many times faster than the standard json in python, and faster than most other fast json libraries (with the exception of orjson).

@bdraco
Copy link
Contributor

bdraco commented Jul 14, 2022

There did used to be a problem with 32bit but Home assistant has 1000+ of deployments with it on 32bit Linux so I think that link is outdated.

@bdraco
Copy link
Contributor

bdraco commented Jul 14, 2022

orjson has been adding additional wheel builds lately, so they might accept a PR to add your arch to their build CI

ijl/orjson@3de9685

@bdraco
Copy link
Contributor

bdraco commented Jul 14, 2022

32 bit support was added via ijl/orjson#220

@bdraco
Copy link
Contributor

bdraco commented Jul 20, 2022

There is an issue that might help you build wheels on github instead ijl/orjson#278

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants