Giter VIP home page Giter VIP logo

iabgpp-rs's Introduction

iabgpp-rs

Rust implementation of the IAB Global Privacy Platform (GPP) consent string specification.

⚠️ This is work in progress.

Features

  • Eager or lazy decoding of GPP sections
  • Owning type (GPPString)
  • Reference type (GPPStr)
  • Read support for all current GPP sections

Usage example

Cargo.toml:

[dependencies]
iab-gpp = "0.1"

main.rs:

use std::error::Error;
use std::str::FromStr;
use iab_gpp::v1::GPPString;

fn main() -> Result<(), Box<dyn Error>> {
    let s = "DBABM~CPXxRfAPXxRfAAfKABENB-CgAAAAAAAAAAYgAAAAAAAA";
    let gpp_str = GPPString::from_str(s).expect("a valid GPP string");

    for &id in gpp_str.section_ids() {
        println!("Section id: {:?}", id);

        let section = gpp_str.decode_section(id).expect("a valid section");
        println!("Section: {:?}", &section);
    }
}

GPP Standard support

This crate intends to be in sync with the GPP specification, meaning that it should be able to read payloads with the versions specified here.

If the standard gets updated with new versions, this page should keep track of incompatibilities.

Legend:

  • ✅ complete support
  • 🧪 experimental or partial support
  • ❌ no support
Section Reading Writing
GPP string v1
US Privacy v1 (deprecated)
EU TCF v2.2
EU TCF v1 (deprecated)
Canadian TCF v1 (deprecated)
Canadian TCF v1.1
US - National v1
US - California v1
US - Virginia v1
US - Colorado v1
US - Utah v1
US - Connecticut v1

Development status

The current plan:

  • complete reader implementation for version 0.1
  • read + write support in version 0.2

iabgpp-rs's People

Contributors

noirotm avatar

Stargazers

 avatar Nick Jacob avatar oasis avatar Jijie LIU avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.