Overview
| Comment: | getting rid of direct tokio dependancy properly |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk | v0.5.4 |
| Files: | files | file ages | folders |
| SHA3-256: |
8ea7b79fca20b6ab24918da2a095d7b4 |
| User & Date: | arcade on 2026-01-02 06:38:43.283 |
| Other Links: | manifest | tags |
Context
|
2026-01-07
| ||
| 07:50 | Create new branch named "release" check-in: 2f3e033caa user: arcade tags: release | |
|
2026-01-02
| ||
| 06:52 | update/fix workflows check-in: d9d438563e user: arcade tags: trunk | |
| 06:38 | getting rid of direct tokio dependancy properly check-in: 8ea7b79fca user: arcade tags: trunk, v0.5.4 | |
|
2026-01-01
| ||
| 08:47 | add proper tokio runtime, clean up junk about short headers, add api_gateway support check-in: 14ef340959 user: arcade tags: trunk, v0.5.3 | |
Changes
Modified Cargo.lock
from [8f52ff6ce7]
to [85ace371bd].
| ︙ | ︙ | |||
1514 1515 1516 1517 1518 1519 1520 | "lazy_static", "mail-parser", "mailin-embedded", "regex", "smol", "stacked_errors", "tgbot", | < | 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 | "lazy_static", "mail-parser", "mailin-embedded", "regex", "smol", "stacked_errors", "tgbot", ] [[package]] name = "socket2" version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17129e116933cf371d018bb80ae557e889637989d8638274fb25622827b03881" |
| ︙ | ︙ | |||
1678 1679 1680 1681 1682 1683 1684 | checksum = "ff360e02eab121e0bc37a2d3b4d4dc622e6eda3a8e5253d5435ecf5bd4c68408" dependencies = [ "bytes", "libc", "mio", "pin-project-lite", "socket2", | < < < < < < < < < < < < | 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 | checksum = "ff360e02eab121e0bc37a2d3b4d4dc622e6eda3a8e5253d5435ecf5bd4c68408" dependencies = [ "bytes", "libc", "mio", "pin-project-lite", "socket2", "windows-sys 0.61.2", ] [[package]] name = "tokio-rustls" version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" dependencies = [ "rustls", |
| ︙ | ︙ | |||
2265 2266 2267 2268 2269 2270 2271 | "proc-macro2", "quote", "syn", ] [[package]] name = "zmij" | | | | 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 | "proc-macro2", "quote", "syn", ] [[package]] name = "zmij" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de9211a9f64b825911bdf0240f58b7a8dac217fe260fc61f080a07f61372fbd5" |
Modified Cargo.toml
from [b085dca268]
to [f7be24f9e9].
| ︙ | ︙ | |||
12 13 14 15 16 17 18 |
lazy_static = "1.5.0"
mail-parser = { version = "0.11", features = ["serde"] }
mailin-embedded = "^0"
regex = "1.11.1"
smol = "2.0.2"
stacked_errors = "0.7.1"
tgbot = "0.40"
| < | 12 13 14 15 16 17 18 19 20 21 22 |
lazy_static = "1.5.0"
mail-parser = { version = "0.11", features = ["serde"] }
mailin-embedded = "^0"
regex = "1.11.1"
smol = "2.0.2"
stacked_errors = "0.7.1"
tgbot = "0.40"
[profile.release]
lto = true
codegen-units = 1
|
Modified src/main.rs
from [e405a4dd11]
to [09f799d36f].
1 2 3 4 5 6 7 8 9 10 11 12 13 | //! Simple SMTP-to-Telegram gateway. Can parse email and send them as telegram //! messages to specified chats, generally you specify which email address is //! available in configuration, everything else is sent to default address. mod mail; mod telegram; mod utils; #[cfg(test)] mod tests; use crate::mail::MailServer; | | < < > > > > > > > | > > > | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
//! Simple SMTP-to-Telegram gateway. Can parse email and send them as telegram
//! messages to specified chats, generally you specify which email address is
//! available in configuration, everything else is sent to default address.
mod mail;
mod telegram;
mod utils;
#[cfg(test)]
mod tests;
use crate::mail::MailServer;
use async_compat::Compat;
use just_getopt::{
OptFlags,
OptSpecs,
OptValue,
};
use smol::{
fs::metadata,
};
use stacked_errors::{
Result,
StackableErr,
bail,
};
use std::{
io::Cursor,
os::unix::fs::PermissionsExt,
path::Path,
};
fn main () -> Result<()> {
smol::block_on(Compat::new(async {
async_main().await.unwrap()
}));
Ok(())
}
async fn async_main () -> Result<()> {
let specs = OptSpecs::new()
.option("help", "h", OptValue::None)
.option("help", "help", OptValue::None)
.option("config", "c", OptValue::Required)
.option("config", "config", OptValue::Required)
.flag(OptFlags::OptionsEverywhere);
let mut args = std::env::args();
|
| ︙ | ︙ |