#post-hog #client #documentation

posthog-rs

The official Rust client for Posthog (https://posthog.com/)

15 releases

0.3.7 Jun 3, 2025
0.3.6 Jun 2, 2025
0.3.5 Feb 19, 2025
0.2.2 Oct 26, 2021
0.1.3 Apr 29, 2021

#204 in Web programming

Download history 1383/week @ 2025-02-19 1392/week @ 2025-02-26 1285/week @ 2025-03-05 1363/week @ 2025-03-12 809/week @ 2025-03-19 1202/week @ 2025-03-26 2388/week @ 2025-04-02 1471/week @ 2025-04-09 2113/week @ 2025-04-16 2855/week @ 2025-04-23 2211/week @ 2025-04-30 2406/week @ 2025-05-07 2396/week @ 2025-05-14 2447/week @ 2025-05-21 2772/week @ 2025-05-28 2589/week @ 2025-06-04

10,457 downloads per month
Used in 3 crates (2 directly)

MIT license

19KB
367 lines

PostHog Rust

Please see the main PostHog docs.

This crate is under development

Quickstart

Add posthog-rs to your Cargo.toml.

[dependencies]
posthog-rs = "0.3.7"
let client = posthog_rs::client(env!("POSTHOG_API_KEY"));

let mut event = posthog_rs::Event::new("test", "1234");
event.insert_prop("key1", "value1").unwrap();
event.insert_prop("key2", vec!["a", "b"]).unwrap();

client.capture(event).unwrap();

Dependencies

~6–18MB
~246K SLoC