Skip to content

Library that provides the core functionality needed by the different user interfaces.

License

Notifications You must be signed in to change notification settings

allareinsch/deltachat-core

 
 

Repository files navigation

Delta Chat Core Library

Build Status

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

Building the C-library

Delta Chat Core is built as a C-library using the meson build system. It depends on a number of external libraries, most of which are detected using pkg-config. Usually this just works automatically, provided the depending libraries are installed correctly. You may need to install "development" packages of these dependencies:

On Linux (e.g. Debian Stretch) you can install all these using:

sudo apt install libetpan-dev libssl-dev libsqlite3-dev libsasl2-dev libbz2-dev zlib1g-dev meson ninja-build.

Once all dependencies are installed, creating a build is as follows, starting from the project's root directory:

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
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.

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 GPLv3, see LICENSE file for details.

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

About

Library that provides the core functionality needed by the different user interfaces.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • C 90.7%
  • Perl 5.4%
  • C++ 1.7%
  • Assembly 0.8%
  • Objective-C 0.7%
  • DIGITAL Command Language 0.3%
  • Other 0.4%