230 releases

new 0.7.69 Jun 10, 2025
0.7.66 May 27, 2025
0.7.57 Mar 25, 2025
0.7.45 Dec 11, 2024
0.1.4 Jul 26, 2022

#1288 in Network programming

Download history 431/week @ 2025-02-19 434/week @ 2025-02-26 400/week @ 2025-03-05 281/week @ 2025-03-12 354/week @ 2025-03-19 164/week @ 2025-03-26 534/week @ 2025-04-02 211/week @ 2025-04-09 232/week @ 2025-04-16 241/week @ 2025-04-23 202/week @ 2025-04-30 506/week @ 2025-05-07 294/week @ 2025-05-14 242/week @ 2025-05-21 255/week @ 2025-05-28 336/week @ 2025-06-04

1,343 downloads per month
Used in divviup-cli

MPL-2.0 license

425KB
10K SLoC

A DAP client

This library implements the client role of the DAP-PPM protocol. It uploads measurements to two DAP aggregator servers which in turn compute a statistical aggregate over data from many clients, while preserving the privacy of each client's data.

Examples

use url::Url;
use prio::vdaf::prio3::Prio3Histogram;
use janus_messages::{Duration, TaskId};
use std::str::FromStr;

#[tokio::main]
async fn main() {
    let leader_url = Url::parse("https://leader.example.com/").unwrap();
    let helper_url = Url::parse("https://helper.example.com/").unwrap();
    let vdaf = Prio3Histogram::new_histogram(
        2,
        12,
        4
    ).unwrap();
    let taskid = "rc0jgm1MHH6Q7fcI4ZdNUxas9DAYLcJFK5CL7xUl-gU";
    let task = TaskId::from_str(taskid).unwrap();

    let client = janus_client::Client::new(
        task,
        leader_url,
        helper_url,
        Duration::from_seconds(300),
        vdaf
    )
    .await
    .unwrap();
    client.upload(&5).await.unwrap();
}

janus_client

Build Status latest version docs badge

janus_client is a self-contained implementation of the Distributed Aggregation Protocol's client role. It is intended for use with Janus and Divvi Up, ISRG's privacy-respecting metrics service. janus_client is published to crates.io by a GitHub Action that runs when a janus release is created.

Dependencies

~106MB
~2.5M SLoC