whisperfish / presage

A high-level Rust library to help write clients for the Signal Messenger.
GNU Affero General Public License v3.0
98 stars 15 forks source link

Feature request: python bindings #247

Open truenicoco opened 3 months ago

truenicoco commented 3 months ago

This lib looks great and I'd be thrilled to use it to replace signald in my XMPP/signal bridge.

Would you consider adding some (possibly autogenerated) python bindings? Looks like pyo3-asyncio would make that possible. I'd do it but I'd have to learn rust first. xD

gferon commented 3 months ago

I could give it a try but I'm really not sure how this would turn out. I suppose it would be relatively easy to expose some functions and types of the public API, but I'm mostly worried about having to deal with pip 😂

truenicoco commented 3 months ago

Oh, it’s super cool if you have a look! For dealing with pip, it’s not that bad, the hard part is actually that there’s too much choice and it’s overwhelming to pick a tool amongst the different ones with overlapping functionality. I usually use poetry, but if the idea is just to upload to PYPI then I think twine does just that. There’s also hatch, which looks promising… Yeah I know this is not helpful, sorry. xD

I like poetry: https://python-poetry.org/

A contributor of slidge made a rust-based text parser https://github.com/BluebonnetField/slidge-style-parser to be called from python and they used Maturin apparently, so maybe that’s better. https://www.maturin.rs/

Thanks for considering it. :)

Le 6 avr. 2024 à 14:58, Gabriel Féron @.***> a écrit :

I could give it a try but I'm really not sure how this would turn out. I suppose it would be relatively easy to expose some functions and types of the public API, but I'm mostly worried about having to deal with pip 😂 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>