mautrix / signal

A Matrix-Signal puppeting bridge
GNU Affero General Public License v3.0
499 stars 75 forks source link

Question: what is status of libsignal-ffi? #455

Closed Marcool04 closed 7 months ago

Marcool04 commented 7 months ago

Hi there,

Congratulations on getting the go rewrite out there! It is great that you have been able to decouple mautrix-signal from signald which was a considerable resource drain for me at least.

I simply have a kind of background question: I maintain the Arch Linux AUR package for mautrix-signal, and while I was transitioning it over to the go build I noticed that you start by pulling in libsignal and then use cargo to build the libsignal_ffi.a file (a big chunk at over 300Mb). I imagine that's where a lot of the API is located?

Because I wanted to keep package separation neat, I checked out libsignal separately. It's a bit of a mysterious repo really isn't it, with all kinds of different bindings plonked in there together! There was already a libsignal-client package available in AUR for instance, but it builds only the Java part, and does not provide libsignal_ffi.a

I built this and put it in the AUR so the component is now available there: libsignal-ffi.

Do I understand things correctly that this is a rust library that is designed to be "consumed in languages that understand C, such as Swift, as it says here: https://github.com/signalapp/libsignal/tree/main/rust/bridge/ffi. Because then, if I do, regarding that Swift build, this page here: https://github.com/signalapp/libsignal/tree/main/swift says that

...
Development as a package is supported as a lightweight convenience
(as well as a cross-platform one), but the CocoaPods build is considered
the canonical one.

Does this mean that Signal Messenger LLC might decide to drop that libsignal_ffi part? Or would they still keep the C API available for other reasons? Or are there clear indications from them that they are going to keep that part going?

Just asking out of curiosity and to make sure I have understood the architecture of the rebuild. Thanks for any info and for your time working on this bridge (and all the others!)

Regards, Mark.

tulir commented 7 months ago

libsignal handles all the signal crypto, libsignal-ffi is an FFI/C interface for libsignal, not much more to it than that. No way to predict what signal will or will not do (they don't develop software in the open, they just publish sources when making releases)

Marcool04 commented 7 months ago

Ok. Thanks for that. Keep up the good work 👏