Commit Graph

12 Commits

Author SHA1 Message Date
Jordan Rose
0a156c4a5a CocoaPods: Skip build_ffi.sh when the pod is prebuilt
The plugin we use for prebuilding CocoaPods, cocoapods-binary, still
allows Pods to add script phases to the final build...but we don't
actually *want* to run our build script when the pod is prebuilt.
2021-02-02 12:04:50 -08:00
Jordan Rose
5ad7301c86 Swift: Move signal_ffi.h into SignalClient.framework
This makes the CocoaPod self-contained at the cost of using a module
layout that SwiftPM cannot replicate. To keep local SwiftPM builds
working, an unstable Swift compiler flag is used to auto-import a
separate SignalFfi module (the way it used to work).
2021-02-02 12:04:50 -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
32604e1d35 CocoaPods: Bump version to 0.1.1 2021-02-01 11:01:24 -08: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
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
Jordan Rose
e046d8514b Swift: Enable line table debug info for the Rust libraries 2020-11-25 15:41:35 -08:00
Jordan Rose
6bc0541c4d Fix quoting in Swift and Node build scripts 2020-11-16 11:02:39 -08:00
Jordan Rose
0908fa5939 Swift: preserve files needed for the Rust build in podspec 2020-11-12 11:15:26 -08:00
Jordan Rose
7b37cf0547 Fix CocoaPod build to respect rust-toolchain
Also stop checking out libsignal-ffi.git for no reason during PR
testing.
2020-11-11 11:47:30 -08:00
Jordan Rose
932d4a3438 Move wrapper-specific shell scripts into subfolders
And use bash instead of plain sh for stricter checking.
2020-11-11 11:15:25 -08:00
Jordan Rose
7923b3ae29 Add a Podspec for use as a CocoaPod
And test that the CocoaPod works just like the package works.
2020-11-02 15:06:19 -08:00