mirror of
https://github.com/chatmail/core.git
synced 2026-04-18 05:56:31 +03:00
don't ignore core sourcefiles, prevented npm installation on architectures with no prebuild don't run lint checks on windows github actions don't like double quotes apparently minimize node.js CI update ubuntu runner to 22.04 README: update link to node bindings source simplify link in readme node: fix crash with invalid account id (throw error when getContext failed) fix typo in readme remove node specific changelog change prebuild machine back to ubuntu 18.04 move package.json to root level to include rust source in npm package change path in m1 patch github action to upload to download.delta.chat/node/ on tag try build with ubuntu 20.04 Update node/README.md try building it with newer ubuntu because it wants glibc 2.33 fix path for prebuildify script throw error when instanciating a wrapper class on `null` (Context, Message, Chat, ChatList and so on) try fix selecting the right cache to fix the strange glibc bug also revert back ubuntu version to 18.04 also bump package.json version with release script fix paths since we moved around package.json github action: fix path document npm release - it's so much easier now! there are no PR checks to post to if this action is executed on a tag github action: fix artifact names fix paths? wtf do I know, it's 3AM and I'm drunk fix syntax error don't upload preview if action is run on tag is the tag ID an empty string or null? node-package github action is done so far also include scripts in package only publish docs on push to master branch actually bump package.json version in set_core_version script prettify package.json fix test - we don't really need to assert that remove unnecessary ls statement from github action
146 lines
3.8 KiB
Markdown
146 lines
3.8 KiB
Markdown
# Delta Chat Rust
|
|
|
|
> Deltachat-core written in Rust
|
|
|
|
[](https://github.com/deltachat/deltachat-core-rust/actions/workflows/ci.yml)
|
|
|
|
## 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=repl=info cargo run --example repl --features repl -- ~/deltachat-db
|
|
```
|
|
where ~/deltachat-db is the database file. Delta Chat will create it if it does not exist.
|
|
|
|
Configure your account (if not already configured):
|
|
|
|
```
|
|
Delta Chat Core is awaiting your commands.
|
|
> set addr your@email.org
|
|
> set mail_pw yourpassword
|
|
> configure
|
|
```
|
|
|
|
Connect to your mail server (if already configured):
|
|
|
|
```
|
|
> connect
|
|
```
|
|
|
|
Create a contact:
|
|
|
|
```
|
|
> addcontact yourfriends@email.org
|
|
Command executed successfully.
|
|
```
|
|
|
|
List contacts:
|
|
|
|
```
|
|
> listcontacts
|
|
Contact#10: <name unset> <yourfriends@email.org>
|
|
Contact#1: Me √√ <your@email.org>
|
|
```
|
|
|
|
Create a chat with your friend and send a message:
|
|
|
|
```
|
|
> createchat 10
|
|
Single#10 created successfully.
|
|
> chat 10
|
|
Single#10: yourfriends@email.org [yourfriends@email.org]
|
|
> send hi
|
|
Message sent.
|
|
```
|
|
|
|
If `yourfriend@email.org` 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
|
|
|
|
```sh
|
|
# run tests
|
|
$ cargo test --all
|
|
# build c-ffi
|
|
$ cargo build -p deltachat_ffi --release
|
|
```
|
|
|
|
## Debugging environment variables
|
|
|
|
- `DCC_IMAP_DEBUG`: if set IMAP protocol commands and responses will be
|
|
printed
|
|
|
|
- `DCC_MIME_DEBUG`: if set outgoing and incoming message will be printed
|
|
|
|
- `RUST_LOG=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):
|
|
```sh
|
|
$ cargo test -- --ignored
|
|
```
|
|
|
|
## Features
|
|
|
|
- `vendored`: When using Openssl for TLS, this bundles a vendored version.
|
|
- `nightly`: Enable nightly only performance and security related features.
|
|
|
|
## Language bindings and frontend projects
|
|
|
|
Language bindings are available for:
|
|
|
|
- **C** \[[📂 source](./deltachat-ffi) | [📚 docs](https://c.delta.chat)\]
|
|
- **Node.js** \[[📂 source](./node) | [📦 npm](https://www.npmjs.com/package/deltachat-node) | [📚 docs](https://js.delta.chat)\]
|
|
- **Python** \[[📂 source](./python) | [📦 pypi](https://pypi.org/project/deltachat) | [📚 docs](https://py.delta.chat)\]
|
|
- **Go** \[[📂 source](https://github.com/deltachat/go-deltachat/)\]
|
|
- **Free Pascal** \[[📂 source](https://github.com/deltachat/deltachat-fp/)\]
|
|
- **Java** and **Swift** (contained in the Android/iOS repos)
|
|
|
|
The following "frontend" projects make use of the Rust-library
|
|
or its language bindings:
|
|
|
|
- [Android](https://github.com/deltachat/deltachat-android)
|
|
- [iOS](https://github.com/deltachat/deltachat-ios)
|
|
- [Desktop](https://github.com/deltachat/deltachat-desktop)
|
|
- [Pidgin](https://code.ur.gs/lupine/purple-plugin-delta/)
|
|
- [Telepathy](https://code.ur.gs/lupine/telepathy-padfoot/)
|
|
- several **Bots**
|