mirror of
https://github.com/chatmail/core.git
synced 2026-05-07 08:56:30 +03:00
Apply suggestions from code review: Typo & wording fixes
Co-authored-by: iequidoo <117991069+iequidoo@users.noreply.github.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
# Delta Chat REPL
|
# Delta Chat REPL
|
||||||
|
|
||||||
This is a simple [REPL](https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop) frontend build on top of delta chat core.
|
This is a simple [REPL](https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop) frontend built on top of Delta Chat core.
|
||||||
It's purpose is to help with quick testing during development, it is not meant for end users.
|
Its purpose is to help with quick testing during development, it is not meant for end users.
|
||||||
|
|
||||||
Dependencies:
|
Dependencies:
|
||||||
- if you want to use `getqr` you need `qrencode` (macOS: `brew install qrencode`)
|
- if you want to use `getqr` you need `qrencode` (macOS: `brew install qrencode`)
|
||||||
@@ -16,14 +16,14 @@ Type in `help` to learn about what comands are available.
|
|||||||
|
|
||||||
## Usage with `tokio-console`
|
## Usage with `tokio-console`
|
||||||
|
|
||||||
Tokio is the async runtime that delta chat core uses.
|
Tokio is an async runtime that Delta Chat core uses.
|
||||||
Core uses tokio tasks, which is something similar to a thread.
|
Core uses Tokio tasks, which are something similar to threads.
|
||||||
`tokio-console` is like a task manager for these tokio-tasks.
|
`tokio-console` is like a task manager for these Tokio tasks.
|
||||||
|
|
||||||
Examples of tasks:
|
Examples of tasks:
|
||||||
- The event loop in the repl tool which processes events received from core
|
- The event loop in the REPL tool which processes events received from core
|
||||||
- The repl loop itself which waits for and executes user commands
|
- The repl loop itself which waits for and executes user commands
|
||||||
- The imap task that manages imap connection in core
|
- The IMAP task that manages IMAP connection in core
|
||||||
|
|
||||||
```
|
```
|
||||||
RUSTFLAGS="--cfg tokio_unstable" cargo run <path to deltachat db>
|
RUSTFLAGS="--cfg tokio_unstable" cargo run <path to deltachat db>
|
||||||
@@ -34,7 +34,7 @@ You can install it via `cargo install tokio-console`.
|
|||||||
|
|
||||||
### Quick Example
|
### Quick Example
|
||||||
|
|
||||||
An example session in the repl tool.
|
An example session in the REPL tool:
|
||||||
|
|
||||||
```
|
```
|
||||||
RUSTFLAGS="--cfg tokio_unstable" cargo run test-db/db
|
RUSTFLAGS="--cfg tokio_unstable" cargo run test-db/db
|
||||||
@@ -45,10 +45,10 @@ listchats
|
|||||||
getqr
|
getqr
|
||||||
```
|
```
|
||||||
|
|
||||||
If it crashes you can just start it again and use the openpgp4fpr url instead of scanning the code from the terminal.
|
If it crashes you can just start it again and use the openpgp4fpr URL instead of scanning the code from the terminal.
|
||||||
Or install `qrencode` to fix the crash and run `getqr` again.
|
Or install `qrencode` to fix the crash and run `getqr` again.
|
||||||
|
|
||||||
Use the qrcode/openpgp4fpr link to setup the contact on deltachat.
|
Use the qrcode/openpgp4fpr link to setup the contact on Delta Chat.
|
||||||
Then write a message to that new contact, after that we can accept the chat in the repl tool and send a reply:
|
Then write a message to that new contact, after that we can accept the chat in the repl tool and send a reply:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -38,8 +38,8 @@ Run `deltachat-rpc-server --openrpc` to get [OpenRPC](https://open-rpc.org/) spe
|
|||||||
|
|
||||||
## Usage with `tokio-console`
|
## Usage with `tokio-console`
|
||||||
|
|
||||||
When build with `RUSTFLAGS="--cfg tokio_unstable"` console-subscriber is enabled.
|
When built with `RUSTFLAGS="--cfg tokio_unstable"`, console-subscriber is enabled.
|
||||||
That means that you can use [`tokio-console`](https://github.com/tokio-rs/console) to inspect active tokio tasks.
|
That means that you can use [`tokio-console`](https://github.com/tokio-rs/console) to inspect active Tokio tasks.
|
||||||
You can install it via `cargo install tokio-console`.
|
You can install it via `cargo install tokio-console`.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
|||||||
@@ -711,7 +711,7 @@ pub(crate) fn inc_and_check<T: PrimInt + AddAssign + std::fmt::Debug>(
|
|||||||
/// Spawns a named asynchronous task if the `tokio_unstable` feature is enabled.
|
/// Spawns a named asynchronous task if the `tokio_unstable` feature is enabled.
|
||||||
///
|
///
|
||||||
/// Spawns a new asynchronous task, returning a [tokio::task::JoinHandle] for it.
|
/// Spawns a new asynchronous task, returning a [tokio::task::JoinHandle] for it.
|
||||||
/// The provided future will start running in the background immediately when spawn is called, even if you don't await the returned JoinHandle.
|
/// The provided future will start running in the background immediately when the function is called, even if you don't await the returned JoinHandle.
|
||||||
/// See [tokio::task::spawn].
|
/// See [tokio::task::spawn].
|
||||||
///
|
///
|
||||||
/// If the rustflag `tokio_unstable` is active, the task will be given the specified `name`
|
/// If the rustflag `tokio_unstable` is active, the task will be given the specified `name`
|
||||||
@@ -720,7 +720,7 @@ pub(crate) fn inc_and_check<T: PrimInt + AddAssign + std::fmt::Debug>(
|
|||||||
///
|
///
|
||||||
/// # Parameters
|
/// # Parameters
|
||||||
///
|
///
|
||||||
/// - `name`: The name of the task (used only if `tokio_unstable` is enabled).
|
/// - `name`: The name of the task.
|
||||||
/// - `future`: The future to be executed, which must implement `Future`, be `Send`, and `'static`.
|
/// - `future`: The future to be executed, which must implement `Future`, be `Send`, and `'static`.
|
||||||
///
|
///
|
||||||
/// # Returns
|
/// # Returns
|
||||||
@@ -774,7 +774,7 @@ macro_rules! spawn_named_task {
|
|||||||
/// Spawns a named blocking task if the `tokio_unstable` feature is enabled.
|
/// Spawns a named blocking task if the `tokio_unstable` feature is enabled.
|
||||||
///
|
///
|
||||||
/// Spawns a new blocking task, returning a [tokio::task::JoinHandle] for it.
|
/// Spawns a new blocking task, returning a [tokio::task::JoinHandle] for it.
|
||||||
/// The provided future will start running in the background immediately when spawn is called, even if you don't await the returned JoinHandle.
|
/// The provided future will start running in the background immediately when the function is called, even if you don't await the returned JoinHandle.
|
||||||
/// See [tokio::task::spawn_blocking].
|
/// See [tokio::task::spawn_blocking].
|
||||||
///
|
///
|
||||||
/// If the rustflag `tokio_unstable` is active, the task will be given the specified `name`
|
/// If the rustflag `tokio_unstable` is active, the task will be given the specified `name`
|
||||||
@@ -783,7 +783,7 @@ macro_rules! spawn_named_task {
|
|||||||
///
|
///
|
||||||
/// # Parameters
|
/// # Parameters
|
||||||
///
|
///
|
||||||
/// - `name`: The name of the task (used only if `tokio_unstable` is enabled).
|
/// - `name`: The name of the task
|
||||||
/// - `future`: The future to be executed, which must implement `Future`, be `Send`, and `'static`.
|
/// - `future`: The future to be executed, which must implement `Future`, be `Send`, and `'static`.
|
||||||
///
|
///
|
||||||
/// # Returns
|
/// # Returns
|
||||||
|
|||||||
Reference in New Issue
Block a user