This means they'll be shipped to clients, but still filtered out of
the device builds on Android (via having two separate libraries on
disk) and iOS (by not being included in non-simulator builds). The
biggest benefit of this is dropping the :android:makeTestJniLibraries
step for running libsignal's Android tests.
Unlike Java, just bundle it into the exiting signal_node shared library. We
don't care as much about code size here and splitting it into a separate
library is significantly more complicated (though it might be worth it some
day).
- For local development, this built the Rust library automatically
when you invoked `yarn install`, whether you wanted it to or not.
- For the published package, this either did nothing (if the correct
prebuilds were present) or produced a weird error (if they weren't).
You can't use the published package without prebuilds, so maybe this
was useful, but you'd find that out pretty quickly when loading the
module failed.
- If you used the "link" feature to build Signal Desktop with a local
checkout of libsignal, this would build the Rust library
automatically when you `install`ed in the *Desktop* directory,
whether you wanted it to or not.
- If you pointed Signal Desktop at a local checkout by copy instead of
link, this would just fail, because the Rust parts wouldn't be
copied with it.
Overall, it's simpler to just have this step be explicit.
The main benefit of this is not our *own* type-checking; it's that
mypy will error out if you try to use a too-new Python API. And in
fact, we were already relying on Python 3.9 and didn't realize.
check_code_size.py works with JSON, so it still uses Any a fair bit.
Remove the special handling code that detects EOF now that the upstream crate
has fixed the bug that was being worked around. This also fixes a bug where EOF
was being incorrectly detected when the provided buffer was empty. Add a test
case to prevent regression in the future.