4 releases

Uses new Rust 2024

new 0.1.3 Apr 18, 2025
0.1.2 Apr 18, 2025
0.1.1 Apr 18, 2025
0.1.0 Apr 18, 2025

#606 in HTTP server

Download history

75 downloads per month

MIT/Apache

53KB
957 lines

Datastar Rust SDK

An implementation of the Datastar SDK in Rust with framework integration for Axum, Rocket and Rama.

Usage

use datastar::prelude::*;
use async_stream::stream;

Sse(stream! {
    // Merges HTML fragments into the DOM.
    yield MergeFragments::new("<div id='question'>What do you put in a toaster?</div>").into();

    // Merges signals into the signals.
    yield MergeSignals::new("{response: '', answer: 'bread'}").into();
})

Dependencies

~0.6–39MB
~561K SLoC