nanu-c / crayfish Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
This library currently partially replaces the nanu-c zkgroup
fork, a go library for the Signal Private Group System.
zkgroup is not yet replaced by crayfish but all the logic of zkgroup is also in libsignal-service-rs. So what we need to do is to re-write api-calls for that in crayfish.
Many of the crayfish dependencies have new versions released.
We should make sure to keep the dependencies up to date as to include recent work and avoid security issues.
During build, there are a few cargo warnings about unused variables, functions and fields.
I suggest to either address the warnings by either deleting unused code, or by adding linter excludes.
crayfish git:(main) cargo build
Compiling crayfish v0.2.0 (/home/olof/git/crayfish)
warning: unused variable: `config`
--> src/signal_service/sealedsender.rs:79:23
|
79 | async fn open_storage(config: &crate::config::SignalConfig) -> anyhow::Result<Storage> {
| ^^^^^^ help: if this is intentional, prefix it with an underscore: `_config`
|
= note: `#[warn(unused_variables)]` on by default
warning: unused variable: `keys`
--> src/store/mod.rs:152:19
|
152 | fn load_file_sync(keys: Option<[u8; 16 + 20]>, path: PathBuf) -> Result<Vec<u8>, anyhow::Error> {
| ^^^^ help: if this is intentional, prefix it with an underscore: `_keys`
warning: associated function `read_from_file` is never used
--> src/config/signalconfig.rs:44:12
|
44 | pub fn read_from_file() -> Result<Self, anyhow::Error> {
| ^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
warning: associated function `write_to_file` is never used
--> src/config/signalconfig.rs:58:12
|
58 | pub fn write_to_file(&self) -> Result<(), anyhow::Error> {
| ^^^^^^^^^^^^^
warning: associated function `get_share_dir` is never used
--> src/config/signalconfig.rs:81:12
|
81 | pub fn get_share_dir(&self) -> std::path::PathBuf {
| ^^^^^^^^^^^^^
warning: associated function `get_storage_dir` is never used
--> src/config/signalconfig.rs:86:12
|
86 | pub fn get_storage_dir(&self) -> std::path::PathBuf {
| ^^^^^^^^^^^^^^^
warning: associated function `default_attachment_dir` is never used
--> src/config/signalconfig.rs:90:12
|
90 | pub fn default_attachment_dir(&self) -> std::path::PathBuf {
| ^^^^^^^^^^^^^^^^^^^^^^
warning: associated function `get_identity_dir` is never used
--> src/config/signalconfig.rs:94:12
|
94 | pub fn get_identity_dir(&self) -> std::path::PathBuf {
| ^^^^^^^^^^^^^^^^
warning: associated function `get_tel_clone` is never used
--> src/config/signalconfig.rs:101:12
|
101 | pub fn get_tel_clone(&self) -> String {
| ^^^^^^^^^^^^^
warning: associated function `get_uuid_clone` is never used
--> src/config/signalconfig.rs:105:12
|
105 | pub fn get_uuid_clone(&self) -> String {
| ^^^^^^^^^^^^^^
warning: associated function `set_tel` is never used
--> src/config/signalconfig.rs:109:12
|
109 | pub fn set_tel(&self, tel: String) {
| ^^^^^^^
warning: associated function `set_uuid` is never used
--> src/config/signalconfig.rs:113:12
|
113 | pub fn set_uuid(&self, uuid: String) {
| ^^^^^^^^
warning: field `credential_cache` is never read
--> src/store/mod.rs:19:5
|
15 | pub struct Storage {
| ------- field in this struct
...
19 | credential_cache: Arc<Mutex<InMemoryCredentialsCache>>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `Storage` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis
warning: associated function `path` is never used
--> src/store/mod.rs:24:12
|
24 | pub fn path(&self) -> &Path {
| ^^^^
warning: associated function `signal_password` is never used
--> src/store/mod.rs:60:18
|
60 | pub async fn signal_password(&self) -> Result<String, anyhow::Error> {
| ^^^^^^^^^^^^^^^
warning: function `load_file_sync_encrypted` is never used
--> src/store/mod.rs:113:4
|
113 | fn load_file_sync_encrypted(keys: [u8; 16 + 20], path: PathBuf) -> Result<Vec<u8>, anyhow::Error> {
| ^^^^^^^^^^^^^^^^^^^^^^^^
warning: associated function `store_with_key` is never used
--> src/store/protocol_store.rs:30:18
|
30 | pub async fn store_with_key(
| ^^^^^^^^^^^^^^
warning: associated function `next_pre_key_ids` is never used
--> src/store/protocol_store.rs:100:18
|
100 | pub async fn next_pre_key_ids(&self) -> (u32, u32) {
| ^^^^^^^^^^^^^^^^
warning: associated function `delete_identity` is never used
--> src/store/protocol_store.rs:160:18
|
160 | pub async fn delete_identity(&self, addr: &ProtocolAddress) -> Result<(), SignalProtocolError> {
| ^^^^^^^^^^^^^^^
warning: `crayfish` (bin "crayfish") generated 19 warnings
This project does not specify a license.
Is the code licensed with a free license, including it with other projects can be possible.
This project does not have a readme.
Suggestions for content would be project purpose, instructions of how to build and integrate with other projects.
Trying to build the version mentioned in latest signal app release, i've got the following error:
root@487655ab2d33:/tmp/textsecure/cmd/textsecure/crayfish# cargo build
Updating crates.io index
Updating git repository `https://github.com/whisperfish/libsignal-service-rs.git`
Updating git repository `https://github.com/signalapp/libsignal-client`
error: failed to get `libsignal-protocol` as a dependency of package `libsignal-service v0.1.0 (https://github.com/whisperfish/libsignal-service-rs.git?rev=34b9e43#34b9e43d)`
... which is depended on by `crayfish v0.1.0 (/tmp/textsecure/cmd/textsecure/crayfish)`
Caused by:
failed to load source for dependency `libsignal-protocol`
Caused by:
Unable to update https://github.com/signalapp/libsignal-client
Caused by:
failed to find branch `master`
Caused by:
cannot locate remote-tracking branch 'origin/master'; class=Reference (4); code=NotFound (-3)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.