Switch to a non-functional Rust skeleton

This commit is contained in:
2021-04-10 00:40:10 +01:00
parent cff109abb5
commit 6237b9421d
11 changed files with 3974 additions and 921 deletions

View File

@@ -13,24 +13,27 @@ Delta has:
* An electron [desktop application](https://github.com/deltachat/deltachat-desktop)
This project is a [libpurple](https://developer.pidgin.im/wiki/WhatIsLibpurple)
plugin that wraps `deltachat-core`, allowing a number of existing desktop and
plugin that wraps `deltachat-core-rust`, allowing a number of existing desktop and
mobile clients to send and receive IMs over SMTP+IMAP. It may be useful for
[Linux-based mobile devices](https://source.puri.sm/Librem5/chatty), for
GUI desktop usage **without** an Electron dependency, or console desktop usage.
GUI desktop usage **without** an Electron dependency, or desktop usage.
Current status is probably best described as "skunkworks", although connecting
to an account and sending / receiving text and image messages should work
reliably in pidgin. Chatty supports text messages, and can be coaxed into using
this plugin, but there's a long way to go with that yet.
## Current status
A big refactoring to use "proper" purple IM structures is necessary to make
further progress, I think.
Starting again from scratch in Rust. So currently, nothing works. TODO list:
- [~] Connect to email account
- [ ] Full settings support
- [ ] Show buddy list
- [ ] Send/receive text messages to single contact
- [ ] Send/receive text messages to group chat
- [ ] IMEX setup
- [ ] Send/receive image messages
- [ ] Send/receive audio messages
- [ ] Send/receive video messages
- [ ] Send/receive arbitrary attachments
I also need to implement support for the buddy list.
We currrently build against deltachat v1.50.0. You'll need to build and install
deltachat-ffi separately and ensure that it's available via `pkg-config` for
deltachat to install.
## Build
@@ -47,17 +50,17 @@ There's no point to `purple-plugin-delta` adding the OpenSSL exemption because
`libpurple` lacks it, and in any event, it will be unnecessary with the next
major version of OpenSSL. So, time should resolve this for us one way or another.
Significant code using the WTFPL includes the [libpurple-rust bindings](https://github.com/sbwtw/libpurple-rust)
and the [pidgin-wechat plugin](https://github.com/sbwtw/pidgin-wechat), which
I'm taking a lot of inspiration from. WTF I like happens to include building it
against this mess.
## Use
The easiest way to use this is to copy the `libdelta.so` file into
`~/.purple/plugins`. When running pidgin, you'll now have the option to add
a "Delta Chat" account.
If it doesn't show up, chances are pidgin can't find the various shared
libraries the .so depends on. You can run `ldd ~/.purple/plugins/libdelta.so`
to confirm. I'll document fixing this after the build and install system is
settled.
At present, the "Username" and "Password" account fields correspond to email
address and password, respectively. Many important settings also show up on the
"Advanced" tab - if left blank, the plugin will attempt to automatically detect