This is the skeleton of a Signal chat application.
The UI and local storage are provided by the xous chat library.
Contributions to development of apps/sigchat and libs/chat are most welcome.
- clone
xous-core
:git clone https://github.com/betrusted-io/xous-core.git
- clone
sigchat
:git clone https://github.com/bunnie/sigchat.git
This creates a directory structure like this:
build directory
├── xous-core
└── sigchat
For now, the app manifest has to be set in xous-core by running this command in the xous-core
tree:
cargo xtask app-image sigchat
Note: this will fail. That is fine. This is just a matter of creating the manifest entry in the gam
.
TODO: modify dummy-template
to do the same thing without failing to avoid confustion.
In the sigchat
tree, build the binary:
- For hosted:
cargo build --release
- For renode/hardware:
cargo build --release --target riscv32imac-unknown-xous-elf
Note that you will need to have a GCC compiler installed to build the ring
stuff.
When this completes, you should have the ELF executable in target/release/sigchat
for hosted or target/riscv32imac-unknown-xous-elf/release/sigchat
for renode/hardware
Back in the xous-core
tree, finish linking in the binary:
- For hosted:
cargo xtask run sigchat:../sigchat/release/sigchat
- For renode/hardware:
cargo xtask app-image sigchat:../sigchat/target/riscv32imac-unknown-xous-elf/release/sigchat
Note: for development you may want to clean a copy of the pddb each time you run the app which can be done by running
cp tools/pddb-images/hosted_backup.bin tools/pddb-images/hosted.bin
This should pull the sigchat
ELF into the disk image, and attempt to launch it.
sigchat provides the following basic functionality: *
The sigchat
code is primarily concerned with the Signal specific protocols, while the Chat library handles the UI and pddb storage.
The Chat library provides the UI to display a series of Signal post (Posts) in a Signal group (Dialogue) stored in the pddb. Each Dialogue is stored in the pddb:dict
sigchat.dialogue
under a descriptive pddb:key
(ie ``).
sigchat
passes a menu to the Chat UI:
register
to register a new Signal account with a phone numberlink
this device to an existing Signal account.
The sigchat
servers is set to receive:
SigchatOp::Post
A memory msg containing an outbount user postSigchatOp::Event
A scalar msg containing important Chat UI eventssigchat::Menu
A scalar msg containing click on a sigchat MenuItemSigchatOp::Rawkeys
A scalar msg for each keystroke
This project is dual-licensed under the terms of the AGPL 3.0 license, as a derivative work; and under the terms of the Apache 2.0 license.
SPDX-License-Identifier: AGPL-3.0 OR Apache-2.0
You can choose between one of them if you use this work.
We have a desire to license Sigchat under Apache-2.0 so that elements may be readily incorporated into other future Xous related projects. We are required to license any derivative works of libsignal under the AGPL-3.0 licence.