15 breaking releases

new 0.16.0 Feb 16, 2025
0.14.0 Jan 28, 2025
0.13.0 Dec 14, 2024
0.10.0 Nov 16, 2024

#855 in Network programming

Download history 547/week @ 2024-10-29 77/week @ 2024-11-05 102/week @ 2024-11-12 30/week @ 2024-11-19 107/week @ 2024-11-26 112/week @ 2024-12-03 331/week @ 2024-12-10 59/week @ 2024-12-17 1/week @ 2024-12-24 16/week @ 2025-01-07 1/week @ 2025-01-14 235/week @ 2025-01-28 124/week @ 2025-02-04 98/week @ 2025-02-11

457 downloads per month
Used in yoda

MIT license

64KB
1.5K SLoC

ggemini

Build Documentation crates.io

Glib/Gio-oriented network API for Gemini protocol

[!IMPORTANT] Project in development!

GGemini (or G-Gemini) library written as the client extension for Yoda, it also could be useful for other GTK-based applications dependent of glib / gio (2.66+) backend.

Requirements

Debian
sudo apt install libglib2.0-dev
Fedora
sudo dnf install glib2-devel

Install

cargo add ggemini

Usage

Example

use gio::*;
use glib::*;

use ggemini::client::{
    connection::{Request, Response},
    Client,
};

fn main() -> ExitCode {
    Client::new().request_async(
        Request::Gemini { // or `Request::Titan`
            uri: Uri::parse("gemini://geminiprotocol.net/", UriFlags::NONE).unwrap(),
        },
        Priority::DEFAULT,
        Cancellable::new(),
        None, // optional `GTlsCertificate`
        |result| match result {
            Ok((response, _connection)) => match response {
                Response::Success(success) => match success.mime() {
                    "text/gemini" => todo!(),
                    _ => todo!(),
                },
                _ => todo!(),
            },
            Err(_) => todo!(),
        },
    );
    ExitCode::SUCCESS
}

Other crates

Dependencies

~7–15MB
~216K SLoC