• Stars
    star
    656
  • Rank 68,675 (Top 2 %)
  • Language
    Rust
  • License
    Other
  • Created over 5 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Delta Chat Rust Core library, used by Android/iOS/desktop apps, bindings and bots ๐Ÿ“ง

Delta Chat Logo

Rust CI

The core library for Delta Chat, written in Rust

Installing Rust and Cargo

To download and install the official compiler for the Rust programming language, and the Cargo package manager, run the command in your user environment:

$ curl https://sh.rustup.rs -sSf | sh

On Windows, you may need to also install Perl to be able to compile deltachat-core.

Using the CLI client

Compile and run Delta Chat Core command line utility, using cargo:

$ RUST_LOG=deltachat_repl=info cargo run -p deltachat-repl -- ~/deltachat-db

where ~/deltachat-db is the database file. Delta Chat will create it if it does not exist.

Optionally, install deltachat-repl binary with

$ cargo install --path deltachat-repl/

and run as

$ deltachat-repl ~/deltachat-db

Configure your account (if not already configured):

Delta Chat Core is awaiting your commands.
> set addr [email protected]
> set mail_pw yourpassword
> configure

Connect to your mail server (if already configured):

> connect

Create a contact:

> addcontact [email protected]
Command executed successfully.

List contacts:

> listcontacts
Contact#10: <name unset> <[email protected]>
Contact#1: Me โˆšโˆš <[email protected]>

Create a chat with your friend and send a message:

> createchat 10
Single#10 created successfully.
> chat 10
Single#10: [email protected] [[email protected]]
> send hi
Message sent.

If [email protected] uses DeltaChat, but does not receive message just sent, it is advisable to check Spam folder. It is known that at least gmx.com treat such test messages as spam, unless told otherwise with web interface.

List messages when inside a chat:

> chat

For more commands type:

> help

Installing libdeltachat system wide

$ git clone https://github.com/deltachat/deltachat-core-rust.git
$ cd deltachat-core-rust
$ cmake -B build . -DCMAKE_INSTALL_PREFIX=/usr
$ cmake --build build
$ sudo cmake --install build

Development

# run tests
$ cargo test --all
# build c-ffi
$ cargo build -p deltachat_ffi --release

Debugging environment variables

  • DCC_MIME_DEBUG: if set outgoing and incoming message will be printed

  • RUST_LOG=deltachat_repl=info,async_imap=trace,async_smtp=trace: enable IMAP and SMTP tracing in addition to info messages.

Expensive tests

Some tests are expensive and marked with #[ignore], to run these use the --ignored argument to the test binary (not to cargo itself):

$ cargo test -- --ignored

Fuzzing

Install cargo-bolero with

$ cargo install cargo-bolero

Run fuzzing tests with

$ cd fuzz
$ cargo bolero test fuzz_mailparse --release=false -s NONE

Corpus is created at fuzz/fuzz_targets/corpus, you can add initial inputs there. For fuzz_mailparse target corpus can be populated with ../test-data/message/*.eml.

To run with AFL instead of libFuzzer:

$ cargo bolero test fuzz_format_flowed --release=false -e afl -s NONE

Features

  • vendored: When using Openssl for TLS, this bundles a vendored version.
  • nightly: Enable nightly only performance and security related features.

Update Provider Data

To add the updates from the provider-db to the core, run:

./src/provider/update.py ../provider-db/_providers/ > src/provider/data.rs

Language bindings and frontend projects

Language bindings are available for:

The following "frontend" projects make use of the Rust-library or its language bindings:

Footnotes

  1. Out of date / unmaintained, if you like those languages feel free to start maintaining them. If you have questions we'll help you, please ask in the issues. โ†ฉ โ†ฉ2

More Repositories

1

deltachat-android

Email-based instant messaging for Android.
Java
1,081
star
2

deltachat-desktop

Email-based instant messaging for Desktop.
TypeScript
911
star
3

deltachat-ios

Email-based instant messaging for iOS.
Swift
317
star
4

deltachat-core

Delta.Chat C-Library with e2e chat-over-email functionality & Python bindings
C
304
star
5

chatmail

chatmail service deployment scripts and docs
Python
127
star
6

deltachat-pages

Delta Chat Website
HTML
67
star
7

provider-db

Database of Email Providers and how well they work with DeltaChat
HTML
47
star
8

deltachat-node

Email-based instant messaging for Node.js.
C
45
star
9

yerpc

An ergonomic JSON-RPC server library in Rust with autocreated TypeScript client and OpenRPC specification
Rust
26
star
10

deltachat-cli

Delta Chat on the command line.
JavaScript
13
star
11

mailadm

mail account administration tool for temporary and other account creation/modification
Python
12
star
12

delta.chat-kaiOs

[WIP] Client for rooted KaiOS / GerdaROM devices
TypeScript
11
star
13

message-parser

Parsing of Links, Email adresses, simple text formatting (markdown subset), user mentions, hashtags and more in DeltaChat messages.
Rust
11
star
14

spec

E-mail-chat protocol specification
10
star
15

AndroidYggmail

Java
10
star
16

invite

Invite links for deltachat
TypeScript
9
star
17

eppdperf

This repository measures the performance of different email providers.
Python
8
star
18

dc40

Experimental deltachat client
Rust
8
star
19

deltachat-rpc-client-go

Delta Chat bindings for Golang
Go
7
star
20

interface

General and shared components and discussions relating to deltachat user interface
7
star
21

cosmos

Links to various neighbourhoods in the Delta Chat universe
HTML
7
star
22

deltachat-fp

Free Pascal bindings for Delta Chat
Pascal
7
star
23

webxdc-dev

Webxdc Development Tool
JavaScript
5
star
24

playground

scripts and experiments related to deltachat
Python
5
star
25

notifiers

Notify devices
Rust
5
star
26

deltachat-neon

Very experimental neon bindings for deltachat-core-rust
JavaScript
4
star
27

deltachat-jsonrpc

[WIP Prototype] webserver that wraps the core so you can talk json-rpc with it over websocket, now lives in core repo:
Rust
4
star
28

webxdc_docs

WIP documentation/guide website for webxdc
4
star
29

openrpc_type

A Rust crate to parse OpenRPC documents.
Rust
3
star
30

pingpong

Delta Chat bot to send ping-pong messages back and forth and measure latency
Python
3
star
31

napi-jsonrpc

use jsonrpc over napi.rs in nodejs
JavaScript
3
star
32

login-demo

This repository is outdated. You can find the better version of this repository here: https://github.com/deltachat-bot/discourse-login-bot
JavaScript
3
star
33

deltachat-desktop-dev-env

a wip/protoype of an deltachat desktop development enviroment
Shell
3
star
34

docker-images

Dockerfile
2
star
35

deltachat-emoji

An emoji collection for DeltaChat
2
star
36

workshops

Workshop resources
2
star
37

maps

JavaScript
2
star
38

deltachat-node-legacy

[WIP] Node bindings for deltachat-core
C++
2
star
39

docker-mailadm

Local testing environment for Delta Chat based on mailadm (https://github.com/deltachat/mailadm)
Dockerfile
1
star
40

deltachat-qt

Experimental Python/Qt GUI
Python
1
star
41

pyinfra-xdcstore

A pyinfra module for deploying xdcstore and xdcget.
Python
1
star
42

mail-server-tester

Mail server setup for testing
Dockerfile
1
star
43

pyinfra-acmetool

pyinfra deploy for acmetool
Python
1
star
44

pyinfra-borgbackup

pyinfra deploy for borgbackup
Python
1
star