0
0
mirror of https://github.com/signalapp/libsignal.git synced 2024-09-20 12:02:18 +02:00
Commit Graph

84 Commits

Author SHA1 Message Date
Jordan Rose
13af5a5429 Node: Build for M1 Macs too
This requires building on the macOS 11 GitHub runner; the 10.15 runner
isn't set up for cross-compiling when not using Xcode.
2021-12-03 11:47:34 -08:00
Jordan Rose
92564b8711 Fix NPM publishing for move to node/package.json 2021-11-09 10:47:19 -08:00
Jordan Rose
ba8e5b4d61 When publishing to NPM, build against the same Node we tested against
For N-API builds this shouldn't matter, but currently the latest Node
headers don't let us build correctly on Windows, so we need to pin
to *something*.
2021-11-09 10:24:00 -08:00
Jordan Rose
3fd42d7a60 Move package.json inside the node/ directory
Previously all APIs were available through the top-level index.ts, but
now the zkgroup APIs are in their own module. To access that in the
old packaging required writing

    import * from '@signalapp/signal-client/node/dist/zkgroup'

This commit moves the package root into the node/ directory to
eliminate the 'node/' component, then adds a top-level, precompiled
zkgroup.js/.d.ts so that clients can use

    import * from '@signalapp/signal-client/zkgroup'
2021-11-08 16:40:50 -08:00
Jordan Rose
a00cfd1e90 GitHub: When a release is tagged, build and publish JNI artifacts
This will be used to build a "testable" signal-client-java.jar that
includes native libraries for macOS and Windows in addition to Linux.
This is something zkgroup already has; in particular it allows
developers working on the server to use the zkgroup APIs even if they
run macOS or Windows on their individual machines.
2021-11-01 12:53:56 -07:00
Jordan Rose
9a569f2ffe Standardize license headers
...to have a period after "Signal Messenger, LLC."

...except for the Java sources, which still need a cleanup pass.
2021-10-28 17:27:30 -07:00
Jordan Rose
53338501a3 GitHub: update CI branch filters for master -> main change 2021-10-14 15:37:02 -07:00
Jordan Rose
d6fc73b27a Update dependencies
- cargo update
- But stay on our fork of curve25519-dalek (pinned at 3.0.0)
- Update x25519-dalek from 1.0 to 1.1 (instead of 1.2) to stay
  compatible with curve25519-dalek
- Update cpufeatures to 2.1 to match our dependencies
- Note that updating picky* resulted in more duplicate crates (rand*)
- Pin num-bigint-dig to a build that supports Cargo's -Zbuild-std,
  because xargo + autocfg has stopped working with the new toolchain
- Remove xargo in favor of -Zbuild-std
2021-10-06 10:58:44 -07:00
Jordan Rose
78bfc21a32 Bump rust-toolchain to nightly-2021-09-19 (same as zkgroup)
This provides newer armv8 intrinsics, as well as support for the
aarch64-apple-ios-sim target.
2021-10-05 18:01:50 -07:00
Jordan Rose
a1f45b0af2 Add bin/update_versions.py to make it easier to do a release
We were already *reading* all these files (to check that the versions
were in sync); might as well *write* all the files as well.
2021-10-01 16:55:33 -07:00
Jordan Rose
b56f02e8fa Add release instructions (for Signal engineers) 2021-09-30 12:32:15 -07:00
Jordan Rose
093d82115c GitHub: Make sure lockfiles don't get rewritten during testing
Otherwise, we're not testing what we think we're testing.
2021-09-27 14:44:12 -07:00
Graeme Connell
9aa79c0c59 Client-side rust-only HSM enclave library. 2021-09-21 12:07:27 -06:00
Ehren Kret
973f7545b0 Install proper NDK version to fix Java CI 2021-09-13 18:33:46 -05:00
Jordan Rose
e80339c15f protocol: Add a fuzz target that runs interactions between two clients
Based on the fuzzing input, this simulates message sends and receives,
out-of-order delivery, dropped messages, and session resets, solely to
find bugs in happy-path interaction between two clients.
2021-08-13 16:09:04 -07:00
Ruben De Smet
036661b60c
Add rust stable to tests 2021-08-03 11:31:36 +02:00
Jordan Rose
33128d5f45 GitHub: Run Rust tests for a 32-bit platform as well
While Desktop and iOS only support 64-bit platforms, both 32-bit and
64-bit Android are supported.
2021-07-02 10:29:20 -07:00
Nora Trapp
720d796f76 Add support for M1 and Catalyst architectures via cocoapods 2021-06-10 11:34:10 -07:00
Jordan Rose
f33c060f44 GitHub: add more paths that don't need PR testing 2021-05-18 16:01:28 -07:00
Jordan Rose
21f12c9197 GitHub: "Publish to NPM" action should always check out the same ref
Typo fix
2021-05-18 15:56:15 -07:00
Jordan Rose
c570d7fe00 GitHub: when publishing to NPM, allow custom tags (besides "latest") 2021-04-28 10:58:59 -07:00
Jordan Rose
8db505b4f7 GitHub: add a workflow to publish a tag to NPM
And remove the old copy_repo.sh used to generate
libsignal-client-node.
2021-04-28 10:50:27 -07:00
Jordan Rose
f3cece493a PR testing: only verify that Native.d.ts is up to date once 2021-04-28 10:49:58 -07:00
Jordan Rose
a9417bf323 GitHub: add FUNDING.yml to match other public repositories 2021-03-25 18:03:04 -07:00
Jordan Rose
1142c5f43c CI: Add a check for code size growth in the arm64 Android library
Sample output:

    current build is 0% larger than v0.3.4 (current: 1957208 bytes, v0.3.4: 1949016 bytes)
       0.1.5: *********** (1079472 bytes)
       0.1.6: *********** (1153216 bytes)
       0.1.7: *********** (1153216 bytes)
       0.2.0: ************ (1222832 bytes)
       0.2.2: ************* (1267888 bytes)
       0.2.2: ************** (1382592 bytes)
       0.2.3: *************** (1489088 bytes)
       0.3.4: ******************* (1949016 bytes)
     current: ******************* (1957208 bytes)
2021-03-15 18:40:47 -07:00
Jordan Rose
56afeb885c By default, skip Rust tests that take over 10s in debug builds
We'll still run them in CI, but we don't need to run them locally.
2021-03-10 09:54:49 -08:00
Jordan Rose
324f925717
Merge pull request #216 from signalapp/jrose/clippy-tests-fixup
GitHub: Fix Clippy invocation for real
2021-02-22 14:05:51 -08:00
Jordan Rose
9f4880ac8b
Merge pull request #204 from signalapp/jrose/swift-prebuild-rust-library-only
CocoaPods: Build the Rust library as part of installing the CocoaPod
2021-02-22 13:11:14 -08:00
Jordan Rose
9d895b119a GitHub: Fix Clippy invocation for real 2021-02-22 11:31:48 -08:00
Jordan Rose
21875d82f4 Fix or mark-as-allowed Clippy lints in tests
And tweak the GitHub Clippy enforcement so this doesn't regress.
2021-02-22 09:46:25 -08:00
Jordan Rose
cca1eccc17 GitHub: Fix output for duplicate dependency checking 2021-02-19 10:49:20 -08:00
Jordan Rose
319d20993b GitHub: install iOS device target for pod lib lint testing
This will run the prepare_command specified by the podspec, which
means it will try to build both simulator and device versions of
libsignal-ffi. This also means we don't need the separate "Build Rust
for iOS" test.
2021-02-18 17:02:32 -08:00
Jordan Rose
bfff69c962 Revert "Merge pull request #163 from signalapp/jrose/cocoapods-binary-compat"
This reverts commit 55a6ae7c83, reversing
changes made to 04202b28fd.
2021-02-18 15:56:07 -08:00
Dennis Ameling
5bfbe24c2d Fix typo in Actions workflow 2021-02-13 01:51:52 +01:00
Dennis Ameling
0042e0d60c Add Node multi-arch support 2021-02-13 01:45:37 +01:00
Jack Lloyd
4689606d63 Add a script to verify the crate and package versions match 2021-02-10 13:10:13 -05:00
Jordan Rose
afe2c3029e
Merge pull request #183 from signalapp/jrose/fix-duplicate-crate-checking
Fix our duplicate crate checking, then resolve duplicate crates
2021-02-05 09:56:06 -08:00
Jordan Rose
da1d0937c5 Fix our duplicate crate checking, then resolve duplicate crates
Updated the following crates to resolve duplication of cfg-if,
which is a macro-only crate anyway.

- backtrace
- getrandom
- log (relaxed the version on it as well)
- polyval (still not at latest because it uses a newer cpuid-bool than
  sha2 does)
- sha2
2021-02-04 17:31:47 -08:00
Jordan Rose
8385f6e73d GitHub: Fix Node tests by running yarn tsc
Previously taken care of by the "prepare" script, but that had to be
removed so that the same package.json worked here and in the artifact
repo.
2021-02-04 16:07:33 -08:00
Jordan Rose
42a3c1e7e3 Swift: Use CocoaLumberjack directly instead of SignalCoreKit's OWSLog
This removes the dependency on a CocoaPod that's not in the main
registry.
2021-02-02 12:04:50 -08:00
Jordan Rose
7210f6b86f Node: Autogenerate libsignal_client.d.ts like we do Native.java
This collects doc comments of the form "ts: <some TS declaration>",
which can be written manually *or* generated by the various "bridge"
macros. If the declaration looks like a function, it also does some
substitution of Rust types for TypeScript types, to make
autogeneration easier.
2021-01-26 15:48:13 -08:00
Jack Lloyd
3de3c72b93 Build benchmarks 2021-01-15 15:28:32 -05:00
Jack Lloyd
4dee42675e Pin cargo-ndk tool to 1.0.0 2021-01-11 15:33:55 -05:00
Jordan Rose
baba4519de Swift: Generate signal_ffi.h offline, like Native.java
- Verify its correctness with build_ffi.sh --verify-ffi
- Regenerate with build_ffi.sh --generate-ffi

This simplifies the header search logic for both SwiftPM and
CocoaPods, as well as saving on build time by avoiding cbindgen.

The tweak to cbindgen.toml to prefer typedef-based structs and enums
is sidestepping an incompatibility between cbindgen 0.15.0 (which
GitHub has installed) and 0.16.0 (which allows reusing a release build
directory as well as a debug one).
2021-01-04 13:41:07 -08:00
Jordan Rose
7b3093ddbb Add a --verify option to gen_java_decl.py
And bump the copyright years to 2021.
2021-01-04 12:08:26 -08:00
Jack Lloyd
fbcdbaf3c4 Cross build the Rust code for iOS
Hopefully avoiding bugs like #117
2020-12-14 13:36:27 -05:00
Jordan Rose
997c399884 Rust: Move deny-warnings behavior into CI
Warnings don't need to be immediately fixed locally, and they make it
harder to test with newer nightlies. CI is the place to enforce it.
2020-12-10 14:22:20 -08:00
Jordan Rose
24920e9d4d Start factoring out common parts of the FFI and JNI libraries 2020-12-10 11:16:19 -08:00
Jordan Rose
788a979895
Merge pull request #95 from signalapp/jrose/napi-runtime
Node: Switch to Neon's napi-runtime and JsBox
2020-12-08 12:28:51 -08:00
Jordan Rose
1c85744376 Swift: connect Rust's 'log' to SignalCoreKit's OWSLogger
We're not actually logging anything yet, but this will let us do so.
The logging is initialized using a static constructor so that clients
of SignalCoreKit don't have to do any additional setup. This requires
an ObjC file instead of a Swift one. (When running as a Swift package,
logs will just go to stderr via NSLog.)
2020-12-08 09:46:16 -08:00