• This repository has been archived on 25/Nov/2022
  • Stars
    star
    304
  • Rank 137,274 (Top 3 %)
  • Language
    C
  • License
    Other
  • Created over 8 years ago
  • Updated about 2 years ago

Reviews

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

Repository Details

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

Deprecated Deltachat Core Library

This library is deprecated and outdated!

Please see https://github.com/deltachat/deltachat-core-rust for the current library, which also contains a largely compatible C API as well as Python bindings.

Old readme below:

Delta Chat Core Library

The Delta Chat Core Library is written in cross-platform C, documented at https://c.delta.chat.

The deltachat Python bindings can be found in the python subdirectory and are documented at https://py.delta.chat.

In the ci_scripts directory you'll find docker- and library-building scripts.

binary/distribution packages (work-in-progress)

There are work-in-progress efforts for creating (binary) packages which do not require that you build the library manually:

If you can help with advancing or adding to these efforts, please do contribute. Otherwise read on for how to get libdeltachat.so and deltachat.h installed into your system.

building your own libdeltachat.so

getting a recent enough meson for building

If you have installed meson in your environment check the version::

meson --version

You need to have version 0.47.2 at least. If the version is older there is a recommended way of getting a better version:

  1. uninstall your system-level meson package (if possible)

  2. ensure you have at least python3.5 installed and type:

        python3 -m pip
    

    to check that you have "pip" installed. If not available, you might get it as a python3-pip package or you could follow installing pip.

  3. then pip-install meson into your home-directory:

        python3 -u -m pip install meson
    

    the -u causes the pip-install to put a meson command line tool into ~/.local/ or %APPDATA%\Python on Windows.

  4. run meson --version to verify it's at at least version 0.48.0 now. If the meson command is not found, add ~/.local/bin to PATH and try again (export PATH=~/.local/bin:$PATH on many unix-y terminals).

installing "ninja-build"

On Linux and Mac you need to install 'ninja-build' (debian package name) to be able to actually build/compile things.

Note that most dependencies below are detected using pkg-config. Usually this just works automatically, provided the depending libraries are installed correctly.

installing c-level dependencies

The deltachat core library depends on a number of external libraries, which you may need to install (we have some fallbacks if you don't):

  • LibEtPan; Note that this library does not use pkg-config so the system-provided version will be looked up by using libetpan-config which must be in the PATH. Version 1.8 or newer is required. LibEtPan must be compiled with SASL support enabled.

  • OpenSSL

  • SQLite

  • zlib

  • libsasl

To install these on debian you can type:

    sudo apt install libetpan-dev libssl-dev libsqlite3-dev libsasl2-dev libbz2-dev zlib1g-dev

If you run into connection problems with IMAP (error #43) it might be the case that the libetpan version on your system is too old. In this case we recommend compiling libetpan with a minimum version of 1.9.1. See dinhviethoa/libetpan#330 for more details on why.

git clone https://github.com/dinhviethoa/libetpan.git
cd libetpan
./autogen.sh
./configure --disable-silent-rules \
            --enable-ipv6 \
            --enable-iconv \
            --disable-db \
            --with-openssl \
            --with-sasl \
            --with-zlib \
            --without-curl \
            --without-expat
make -j $(nproc)
sudo make install
sudo ldconfig -v

performing the actual build

Once all dependencies are installed, creating a build is as follows, starting from a deltachat-core github checkout:

mkdir builddir
cd builddir
meson
# Optionally configure some other parameters
# run `meson configure` to see the options, e.g.
#    meson configure --default-library=static
ninja
sudo ninja install  # if you run into problems, the sudo-flag -E might help
sudo ldconfig

The install keeps a log of which files were installed. Uninstalling is thus also supported:

sudo ninja uninstall

NOTE that the above assumes /usr/local/lib is configured somewhere in /etc/ld.so.conf or /etc/ld.so.conf.d/*, which is fairly standard. It is possible your system uses /usr/local/lib/x86_64-linux-gnu which should be auto-detected and just work as well.

The library is build using netpgp by default (shipped in /libs). By adding -Drpgp=true to the build command, rpgp is used instead (https://github.com/dignifiedquire/rpgp, needs to be installed on the system or available as a lib)

Building without system-level dependencies

By default stripped-down versions of the dependencies are bundled with Delta Chat Core and these will be used when a dependency is missing. You can choose to always use the bundled version of the dependencies by invoking meson with the --wrap-mode=forcefallback option. Likewise you can forbid using the bundled dependencies using --wrap-mode=nofallback.

There also is an experimental feature where you can build a version of the shared libdeltachat.so library with no further external dependencies. This can be done by passing the -Dmonolith=true option to meson. Note that this implies --wrap-mode=forcefallback since this will always use all the bundled dependencies.

Language bindings and frontend Projects

Language bindings are available for:

  • Node.js
  • Python
  • Java and Swift (contained in the Android/iOS repos)

The following "frontend" project make use of the C-library or its language bindings:

Testing program

After a successful build there is also a little testing program in builddir/cmdline. You start the program with ./delta <database-file> (if the database file does not exist, it is created). The program then shows a prompt and typing help gives some help about the available commands.

New tests are currently developed using Python, see https://github.com/deltachat/deltachat-core/tree/master/python/tests

License

Licensed under the MPL 2.0 see LICENSE file for details.

Copyright © 2017, 2018 Björn Petersen and Delta Chat contributors.

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-core-rust

Delta Chat Rust Core library, used by Android/iOS/desktop apps, bindings and bots 📧
Rust
656
star
4

deltachat-ios

Email-based instant messaging for iOS.
Swift
317
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