Crate to parse and emit EDN

Overview

edn-rs

Near Stable no breaking changes expected.

Crate to parse and emit EDN Build Status

  • This lib does not make effort to conform the EDN received to EDN Spec. The lib that generated this EDN should be responsible for this. For more information on Edn Spec please visit: https://github.com/edn-format/edn.

Current example usage in:

Usage

Cargo.toml

[dependencies]
edn-rs = "0.16.11"

Simple time-only benchmarks of edn-rs agains Clojure Edn

  • Link to benchmarks implementation here
Method\Lang Rust --release Rust --debug Clojure
parse string 77.57µs 266.479µs 4.712235 milis
get-in/navigate (3 blocks) 4.224µs 22.861µs 26.333 µs
Deserialize to struct 110.358µs 357.054µs 4.712235 milis
parse with criterium 11.348µs - 23.230µs

Quick reference

Parse an EDN token into a Edn with edn! macro:

use edn_rs::{
    edn, Edn, List
};

fn main() {
    let edn = edn!((sym 1.2 3 false :f nil 3/4));
    let expected = Edn::List(
        List::new(
            vec![
                Edn::Symbol("sym".to_string()),
                Edn::Double(1.2.into()),
                Edn::Int(3),
                Edn::Bool(false),
                Edn::Key(":f".to_string()),
                Edn::Nil,
                Edn::Rational("3/4".to_string())
            ]
        )
    );

    println!("{:?}", edn);
    assert_eq!(edn, expected);
}

Parse an EDN String with Edn::from_str:

use edn_rs::{
    set, map,
    Edn, Map, Vector, Set,
};
use std::str::FromStr;

fn main() -> Result<(), String> {
    let edn_str = "{:a \"2\" :b [true false] :c #{:A {:a :b} nil}}";
    // std::str::FromStr
    let edn: Edn = Edn::from_str(edn_str);

    assert_eq!(
        edn,
        Edn::Map(Map::new(
            map!{
                ":a".to_string() => Edn::Str("2".to_string()),
                ":b".to_string() => Edn::Vector(Vector::new(vec![Edn::Bool(true), Edn::Bool(false)])),
                ":c".to_string() => Edn::Set(Set::new(
                    set!{
                        Edn::Map(Map::new(map!{":a".to_string() => Edn::Key(":b".to_string())})),
                        Edn::Key(":A".to_string()),
                        Edn::Nil}))}
        ))
    );

    assert_eq!(edn[":b"][0], Edn::Bool(true));

    Ok(())
}

To navigate through Edn data you can just use get and get_mut:

use edn_rs::{
    edn,
    Edn, List, Map
};

fn main() {
    let edn = edn!((sym 1.2 3 {false :f nil 3/4}));

    println!("{:?}", edn);
    assert_eq!(edn[1], edn!(1.2));
    assert_eq!(edn[1], Edn::Double(1.2f64.into()));
    assert_eq!(edn[3]["false"], edn!(:f));
    assert_eq!(edn[3]["false"], Edn::Key(":f".to_string()));
}

Serializes Rust Types into EDN with edn-derive::Serialize

use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet};
use edn_rs::{
   map, set, hmap, hset
};
use edn_derive::Serialize;

#[derive(Debug, Clone, Serialize)]
struct ExampleEdn {
   btreemap: BTreeMap<String, Vec<String>>,
   btreeset: BTreeSet<i64>,
   hashmap: HashMap<String, Vec<String>>,
   hashset: HashSet<i64>,
   tuples: (i32, bool, char),
   nothing: (),
}

fn main() {
   let edn = ExampleEdn {
       btreemap: map!{"this is a key".to_string() => vec!["with".to_string(), "many".to_string(), "keys".to_string()]},
       btreeset: set!{3i64, 4i64, 5i64},
       hashmap: hmap!{"this is a key".to_string() => vec!["with".to_string(), "many".to_string(), "keys".to_string()]},
       hashset: hset!{3i64},
       tuples: (3i32, true, 'd'),
       nothing: (),
   };

   println!("{}", edn_rs::to_string(edn));
   // { :btreemap {:this-is-a-key [\"with\", \"many\", \"keys\"]}, :btreeset #{3, 4, 5}, :hashmap {:this-is-a-key [\"with\", \"many\", \"keys\"]}, :hashset #{3}, :tuples (3, true, \\d), :nothing nil, }
}

Deserializes Strings into Rust Types:

For now you have to implement the conversion yourself with the Deserialize trait. Soon you'll be able to have that implemented for you via edn-derive crate.

use edn_rs::{Deserialize, Edn, EdnError};

#[derive(Debug, PartialEq)]
struct Person {
   name: String,
   age: usize,
}

impl Deserialize for Person {
   fn deserialize(edn: &Edn) -> Result<Self, EdnError> {
       Ok(Self {
           name: edn_rs::from_edn(&edn[":name"])?,
           age: edn_rs::from_edn(&edn[":age"])?,
       })
   }
}

fn main() -> Result<(), EdnError> {
   let edn_str = "{:name \"rose\" :age 66}";
   let person: Person = edn_rs::from_str(edn_str)?;

   assert_eq!(
       person,
       Person {
           name: "rose".to_string(),
           age: 66,
       }
   );

   println!("{:?}", person);
   // Person { name: "rose", age: 66 }

   let bad_edn_str = "{:name \"rose\" :age \"some text\"}";
   let person: Result<Person, EdnError> = edn_rs::from_str(bad_edn_str);

   assert_eq!(
       person,
       Err(EdnError::Deserialize(
           "couldn't convert `some text` into `uint`".to_string()
       ))
   );

   Ok(())
}

Deserializes Edn types into Rust Types:

  • Deserialization to std::collection::* is currently unsafe.

For now you have to implement the conversion yourself with the Deserialize trait. Soon you'll be able to have that implemented for you via edn-derive crate.

use edn_rs::{map, Deserialize, Edn, EdnError, Map};

#[derive(Debug, PartialEq)]
struct Person {
   name: String,
   age: usize,
}

impl Deserialize for Person {
   fn deserialize(edn: &Edn) -> Result<Self, EdnError> {
       Ok(Self {
           name: edn_rs::from_edn(&edn[":name"])?,
           age: edn_rs::from_edn(&edn[":age"])?,
       })
   }
}

fn main() -> Result<(), EdnError> {
   let edn = Edn::Map(Map::new(map! {
       ":name".to_string() => Edn::Str("rose".to_string()),
       ":age".to_string() => Edn::UInt(66)
   }));
   let person: Person = edn_rs::from_edn(&edn)?;

   println!("{:?}", person);
   // Person { name: "rose", age: 66 }

   assert_eq!(
       person,
       Person {
           name: "rose".to_string(),
           age: 66,
       }
   );

   let bad_edn = Edn::Map(Map::new(map! {
       ":name".to_string() => Edn::Str("rose".to_string()),
       ":age".to_string() => Edn::Str("some text".to_string())
   }));
   let person: Result<Person, EdnError> = edn_rs::from_edn(&bad_edn);

   assert_eq!(
       person,
       Err(EdnError::Deserialize(
           "couldn't convert `\"some text\"` into `uint`".to_string()
       ))
   );

   Ok(())
}

Emits EDN format from a Json:

  • This function requires feature json to be activated. To enable this feature add to your Cargo.toml dependencies the following line edn-rs = { version = 0.16.11", features = ["json"] }.
use edn_rs::json_to_edn;

fn main() {
   let json = String::from(r#"{"hello": "world"}"#);
   let edn = String::from(r#"{:hello "world"}"#);

   println!("{:?}", json_to_edn(json.clone()));
   assert_eq!(edn, json_to_edn(json));

   let complex_json = String::from(r#"{
           "people": 
           [
               {
                   "name": "otavio",
                   "age": 22
               },
               {
                   "name": "Julia",
                   "age": 32.0
               }
           ],
           "country or origin": "Brazil",
           "queerentener": true,
           "brain": null
       }"#);

   println!("{:?}", json_to_edn(complex_json.clone()).replace("  ", "").replace("\n", " "));
   // "{ :people  [ { :name \"otavio\", :age 22 }, { :name \"Julia\", :age 32.0 } ], :country-or-origin \"Brazil\", :queerentener true, :brain nil }"
}

Emits a JSON from type edn_rs::Edn.

  • The associated emthod is to_json(&self) and it requires feature json to be activated. To enable this feature add to your Cargo.toml dependencies the following line edn-rs = { version = 0.16.11", features = ["json"] }.
use std::str::FromStr;
fn complex_json() {
    let edn = "{ 
        :people-list [ 
            { :first-name \"otavio\", :age 22 }, 
            { :first-name \"Julia\", :age 32.0 } 
        ], 
        :country-or-origin \"Brazil\", 
        :queerentener true, 
        :brain nil }";
    let parsed_edn : edn_rs::Edn = edn_rs::Edn::from_str(edn).unwrap();
    let actual_json = parsed_edn.to_json();
    let expected = String::from(
        "{\"brain\": null, 
          \"countryOrOrigin\": \"Brazil\", 
          \"peopleList\": [
              {\"age\": 22, \"firstName\": \"otavio\"}, 
              {\"age\": 32.0, \"firstName\": \"Julia\"}
            ], 
          \"queerentener\": true}",
    );
    assert_eq!(
        actual_json,
        expected
    );
}

to_string/to_debug

to_debug emits a Debug version of Edn type.

use edn_rs::edn::{Edn, Vector};

let edn = Edn::Vector(Vector::new(vec![Edn::Int(5), Edn::Int(6), Edn::Int(7)]));
let expected = "Vector(Vector([Int(5), Int(6), Int(7)]))";

assert_eq!(edn.to_debug(), expected);

to_string emits a valid edn.

use edn_rs::edn::{Edn, Vector};

let edn = Edn::Vector(Vector::new(vec![Edn::Int(5), Edn::Int(6), Edn::Int(7)]));
let expected = "[5, 6, 7, ]";

assert_eq!(edn.to_string(), expected);

Larger to_string example:

fn complex_ok() -> Result<(), EdnError> {
    use std::str::FromStr;
    let edn_str = "{ :list [{:name \"rose\" :age 66 :cool true}, {:name \"josh\" :age 33 :cool false}, {:name \"eva\" :age 296 :cool true}] }";

    let edn = Edn::from_str(edn_str)?;
    println!("{:?}", edn.to_string());
//    "{:list: [{:age 66, :cool true, :name \"rose\", }, {:age 33, :cool false, :name \"josh\", }, {:age 296, :cool true, :name \"eva\", }, ], }"

    Ok(())
}

Using async/await with Edn type

Edn supports futures by using the feature async. To enable this feature add to your Cargo.toml dependencies the following line edn-rs = { version = 0.16.11", features = ["async"] } and you can use futures as in the following example.

use edn_rs::{edn, Double, Edn, Vector};
use futures::prelude::*;
use futures::Future;
use tokio::prelude::*;

async fn foo() -> impl Future<Output = Edn> + Send {
    edn!([1 1.5 "hello" :key])
}

#[tokio::main]
async fn main() {
    let edn = foo().await.await;

    println!("{}", edn.to_string());
    assert_eq!(edn, edn!([1 1.5 "hello" :key]));

    assert_eq!(edn[1].to_float(), Some(1.5f64));
}

The objective of foo is to show that Edn can be wrapped with a Future. If you want to return an Edn from an async function just use:

async fn foo() -> Edn {
    edn!([1 1.5 "hello" :key])
}

Edn-rs Current Features

  • Define struct to map EDN info EdnNode
  • Define EDN types, EdnType
    • Edn Type into primitive: Edn::Bool(true).into() -> true. This was done by to_float, to_bool, to_int, to_vec.
    • implement futures::Future trait to Edn
    • to_string() for Edn.
    • to_debug() for Edn.
  • Parse EDN data from_str:
    • nil ""
    • String "\"string\""
    • Numbers "324352", "3442.234", "3/4"
    • Keywords :a
    • Symbol sym-bol-s with a maximum of 200 chars
    • Vector "[1 :2 \"d\"]"
    • List "(1 :2 \"d\")"
    • Set "#{1 2 3}"
    • Map "{:a 1 :b 2 }"
    • Inst #inst \"yyyy-mm-ddTHH:MM:ss\"
    • Nested structures "{:a \"2\" :b [true false] :c #{:A {:a :b} nil}}"
  • Simple data structures in one another edn!:
    • Vec in Vec "[1 2 [:3 \"4\"]]"
    • Set in Vec "[1 2 #{:3 \"4\"}]"
    • List in List "(1 2 (:3 \"4\"))"
    • List in Set "'#{1 2 (:3 \"4\")}"
    • Maps in general "{:a 2 :b {:3 \"4\"}}", "{:a 2 :b [:3 \"4\"]}"
    • Namespaced Maps ":abc{0 5 1 "hello"}, unfortunately now this is misinterpreted as a keyword
  • Multiple simple data structures in one another (Map and Set in a vector)
  • Multi deepen data structures (Map in a Set in a List in a Vec in a Vec)
  • Navigate through Edn Data
    • Navigate through Sets. DOne by set_iter
  • Json to Edn
    • Json String to EDN String
    • macro to process Structs and Enums to EDN
  • trait Deserialize EDN to Struct
  • trait Serialize struct to EDN

edn-derive

edn-derive is a proc-macro crate to (De)serialize Edn values, currently it is pre-alpha and it can be found at crates.io or at github.

Usage

Just add to your Cargo.toml the following:

[dependencies]
edn-derive = "<version>"
edn-rs = "0.16.11"

Examples

Serialize

use edn_derive::Serialize;

#[derive(Serialize)]
pub struct Person {
    name: String,
    age: usize,
}

fn main() {
    let person = Person {
        name: "joana".to_string(),
        age: 290000,
    };
    assert_eq!(
        edn_rs::to_string(person),
        "{ :name \"joana\", :age 290000, }"
    );
}

Deserialization

use edn_derive::Deserialize;
use edn_rs::EdnError;

// The `Debug` and `PartialEq` are only necessary because of `assert_eq`, you don't need them
#[derive(Deserialize, Debug, PartialEq)]
pub struct Person {
    name: String,
    age: usize,
}

fn main() -> Result<(), EdnError> {
    let edn_person = "{ :name \"joana\", :age 290000, }";

    let person: Person = edn_rs::from_str(edn_person)?;

    assert_eq!(
        person,
        Person {
            name: "joana".to_string(),
            age: 290000,
        }
    );

    Ok(())
}

Current Features

  • derive Serialize
  • edn_rs::to_string
  • derive Deserialize
  • let val: YourStruct = edn_rs::from_str(&str)
Comments
  • Restrictive license

    Restrictive license

    Great work! Would really love to use this but, with all due respect to GNU software, it's quite restrictive to include this crate in a BSD2/MIT project. Any possibility to see a more open license?

    Cheers!

    LICENSE 
    opened by sinkingsugar 8
  • Attempt to implement comments parsing for deserialize

    Attempt to implement comments parsing for deserialize

    This change attempts to handle the following case:

    "If a ; character is encountered outside of a string, that character and all subsequent characters to the next newline should be ignored."

    as described in https://github.com/edn-format/edn#comments

    opened by jollm 7
  • Compile error when using edn-rs as dependency

    Compile error when using edn-rs as dependency

    Hi!

    I'm new to rust, so please bear with me if I'm being stupid.

    I get the following error when trying to use this crate:

    Compiling edn-rs v0.16.12
    error[E0277]: the trait bound `std::string::String: std::convert::From<char>` is not satisfied
       --> /Users/divyansh/.cargo/registry/src/github.com-1ecc6299db9ec823/edn-rs-0.16.12/src/deserialize/parse.rs:119:22
        |
    119 |     let mut symbol = String::from(a);
        |                      ^^^^^^^^^^^^ the trait `std::convert::From<char>` is not implemented for `std::string::String`
        |
        = help: the following implementations were found:
                  <std::string::String as std::convert::From<&std::string::String>>
                  <std::string::String as std::convert::From<&str>>
                  <std::string::String as std::convert::From<std::borrow::Cow<'a, str>>>
                  <std::string::String as std::convert::From<std::boxed::Box<str>>>
        = note: required by `std::convert::From::from`
    
    error: aborting due to previous error
    
    For more information about this error, try `rustc --explain E0277`.
    error: could not compile `edn-rs`.
    
    To learn more, run the command again with --verbose.
    

    This is my code for reference:

    use edn_rs::{Edn};
    use std::str::FromStr;
    
    fn main() {
        let edn: Edn = Edn::from_str("[1 2]");
    
        println!("{:?}", edn);
    }
    

    What am I doing wrong?

    opened by divs1210 7
  • Add context and cause to parse error messages

    Add context and cause to parse error messages

    Currently, parsing errors are not useful - most simply return a string {} could not be parsed without any context. This requires bisecting the input to identify the line that is causing the problem, then reading the source to guess at the actual cause.

    Ideally the Error type would include a line number and character number along with an ErrorType enum uniquely specifying the cause of the failure, but even updating the error string to include the line number and a more descriptive message would be very helpful.

    opened by jcsoo 6
  • Convert from edn to JSON (or to any serde format)

    Convert from edn to JSON (or to any serde format)

    edn-rs currently has the ability to convert from json to edn, but not the other way around. It would be really nice to be able to convert from edn to json. Other formats would be really nice too - perhaps Edn could implement serde's Serialize trait?

    P.S. is the reason serde isn't used right now because the data model of the two is different? If so, could you elaborate a bit on the details? Related: https://github.com/otaviopace/edn-derive/issues/29

    opened by TheButlah 6
  • String with hash sign parsed incorrectly

    String with hash sign parsed incorrectly

    println!("{}", Edn::from_str("\"#{}\"").unwrap());
    

    Prints:

    "@}"
    

    Expected output:

    "#{}"
    

    I'm only getting started with Rust, so my apologies in advance if this is a rookie mistake.

    opened by eerohele 5
  • Improve performance

    Improve performance

    By not using replace we could improve performance to somewhere around 25µs. Currently the parse performance is around 140µs:

    use std::time::{Instant};
    use edn_rs;
    use std::str::FromStr;
    
    fn main() {
        let edn = edn_str();
    
        let start = Instant::now();
        let value = edn_rs::Edn::from_str(&edn);
        let duration = start.elapsed();
    
        if value.is_ok() {
            println!("Time elapsed in edn_rs::from_str is: {:?}", duration);
    
            let start_nav = Instant::now();
            let role = value.unwrap()[":associates"][0][":role"].clone();
            let duration_nav = start_nav.elapsed();
    
            println!("Time elapsed to navigate to role_0 \"{}\": {:?}", role, duration_nav);
        } else {
            println!("Parse failed. Duration {:?}", duration);
        }
    }
    
    fn edn_str() -> String {
        "{
            :type :human
            :first-name \"bench\"
            :last-name \"mark\"
            :age 13
            :version 0.13
            :associates [
                {
                    :name :julia
                    :role :adm
                }
                {
                    :name :otavio
                    :role :contributor
                }
                {
                    :name :juxt
                    :role :great-ideas
                }
            ]
        }".to_string()
    }
    
    enhancement parse 
    opened by naomijub 4
  • Try to implement discard sequence #_ for deserialize

    Try to implement discard sequence #_ for deserialize

    See https://github.com/naomijub/edn-rs/issues/94

    Noticed your issue post after PR #93 Hope it's okay I tried to implement this one, seemed maybe fun to try

    opened by jollm 3
  • Deserialization should be more strict

    Deserialization should be more strict

    If you deserialize a struct like this:

    use edn_derive::Deserialize;
    
    #[derive(Derive)]
    struct A {
        amount: usize,
    }
    
    let a: A = edn_rs::from_str("{ :amount -10 }").unwrap(); // A { amount: 18446744073709551606 }
    let a: A = edn_rs::from_str("{ :amount "123" }").unwrap(); // A { amount: 123 }
    

    The second one is more acceptable, but IMO we should be strict about deserialization conversions.

    Maybe we can offer a loose one and a strict one.

    opened by evaporei 3
  • Handling numbers with an exponent

    Handling numbers with an exponent

    Thanks for the library.

    I was using it today and discovered that numbers with an exponent, like this:

    5.01122771367421E15
    

    …are valid according to the spec but aren't handled correctly by this library.

    Thought y'all might like to know. Cheers.

    bug enhancement 
    opened by kyptin 2
  • Symbols beginning with the characters 't', 'f' or 'n' cannot be parsed.

    Symbols beginning with the characters 't', 'f' or 'n' cannot be parsed.

    use edn_rs::Edn;
    use std::str::FromStr;
    
    fn main() {
        let _: Edn = Edn::from_str("nTEST").unwrap();
    

    results in thread 'main' panicked at 'calledResult::unwrap()on anErrvalue: ParseEdn("n could not be parsed")', } src/main.rs:5:41.

    use edn_rs::Edn;
    use std::str::FromStr;
    
    fn main() {
        let _: Edn = Edn::from_str("tTEST").unwrap();
    }
    

    results in thread 'main' panicked at 'calledResult::unwrap()on anErrvalue: ParseEdn("provided string was nottrueorfalse")', src/main.rs:5:41.

    use edn_rs::Edn;
    use std::str::FromStr;
    
    fn main() {
        let _: Edn = Edn::from_str("fTEST").unwrap();
    }
    

    results in thread 'main' panicked at 'calledResult::unwrap()on anErrvalue: ParseEdn("provided string was nottrueorfalse")', src/main.rs:5:41.

    opened by jcsoo 2
  • Review equality rules

    Review equality rules

    Spec: https://github.com/edn-format/edn#equality Current code: https://github.com/naomijub/edn-rs/blob/master/src/edn/mod.rs

    Also, review if any changes need to be made to sets and maps

    help wanted good first issue 
    opened by naomijub 0
  • [1.0.0] Set cannot be called as inner value of Data Structures (macro edn!)

    [1.0.0] Set cannot be called as inner value of Data Structures (macro edn!)

    The macro edn! fails when we try to call a Set inside any other structure.

    edn!([ 1 2 3 #{4 5 6}])
    

    Gets an error of expected[, found end of macro arguments. Same is valid for set in set, #{ 1 2 3 #{4 5 6}}.

    bug help wanted Set parse 
    opened by naomijub 0
Owner
Julia Naomi
Rust, Games, Kotlin, Elixir
Julia Naomi
A series of compact encoding schemes for building small and fast parsers and serializers

A series of compact encoding schemes for building small and fast parsers and serializers

Manfred Kröhnert 2 Feb 5, 2022
Encoding and decoding support for BSON in Rust

bson-rs Encoding and decoding support for BSON in Rust Index Overview of BSON Format Usage BSON Values BSON Documents Modeling BSON with strongly type

mongodb 304 Dec 30, 2022
Rust library for reading/writing numbers in big-endian and little-endian.

byteorder This crate provides convenience methods for encoding and decoding numbers in either big-endian or little-endian order. Dual-licensed under M

Andrew Gallant 811 Jan 1, 2023
Fast and compact sets of bytes or ASCII characters

bset Fast and compact sets of bytes and ASCII characters, useful for searching, parsing and determining membership of a given byte in the given set. T

null 26 Jul 19, 2022
Variable-length signed and unsigned integer encoding that is byte-orderable for Rust

ordered-varint Provides variable-length signed and unsigned integer encoding that is byte-orderable. This crate provides the Variable trait which enco

Khonsu Labs 7 Dec 6, 2022
Astro Format is a library for efficiently encoding and decoding a set of bytes into a single buffer format.

Astro Format is a library for efficiently transcoding arrays into a single buffer and native rust types into strings

Stelar Labs 1 Aug 13, 2022
Decode SCALE bytes into custom types using a scale-info type registry and a custom Visitor impl.

scale-decode This crate attempts to simplify the process of decoding SCALE encoded bytes into a custom data structure given a type registry (from scal

Parity Technologies 6 Sep 20, 2022
Free Rust-only Xbox ADPCM encoder and decoder

XbadPCM Safe (and optionally no-std) Rust crate for encoding and decoding Xbox ADPCM blocks. Decoding example Here is example code for decoding stereo

Snowy 5 Nov 20, 2022
Decode Mode S and ADS-B signals in Rust

rs1090 rs1090 is a Rust library to decode Mode S and ADS-B messages. It takes its inspiration from the Python pyModeS library, and uses deku in order

Xavier Olive 6 Mar 1, 2024
Emit ETW events in tracing-enabled Rust applications.

tracing-etw Emit ETW events in tracing-enabled Rust applications. This crate depends on rust_win_etw. There are four ETW events. fn NewSpan(span_id: u

Microsoft 11 Aug 10, 2022
A Rust proc-macro crate which derives functions to compile and parse back enums and structs to and from a bytecode representation

Bytecode A simple way to derive bytecode for you Enums and Structs. What is this This is a crate that provides a proc macro which will derive bytecode

null 4 Sep 3, 2022
A crate providing a tracing-subscriber layer for formatting events so Datadog can parse them

Datadog Formatting Layer A crate providing a tracing-subscriber layer for formatting events so Datadog can parse them. Features Provides a layer for t

Open Schnick 4 Jun 22, 2023
A KISS Rust crate to parse Windows kernel crash-dumps created by Windows & its debugger.

kdmp-parser A KISS Rust crate to parse Windows kernel crash-dumps created by Windows & its debugger. This is a cross-platform crate that parses Window

Axel Souchet 30 Jul 11, 2024
pem-rs pem PEM jcreekmore/pem-rs [pem] — A Rust based way to parse and encode PEM-encoded data

pem A Rust library for parsing and encoding PEM-encoded data. Documentation Module documentation with examples Usage Add this to your Cargo.toml: [dep

Jonathan Creekmore 30 Dec 27, 2022
parse command-line arguments into a hashmap and vec of positional args

parse command-line arguments into a hashmap and vec of positional args This library doesn't populate custom structs, format help messages, or convert types.

James Halliday 17 Aug 11, 2022
A CLI command to parse kustomize build result and notify it to GitLab

ksnotify A CLI command to parse kustomize build result and notify it to GitLab Caution This repository is under development status. What ksnotify does

null 7 Jan 2, 2023
mach-dump can parse Mach-O core dumps taken with lldb from macOS and iOS devices.

mach-dump mach-dump can parse Mach-O core dumps taken with lldb from macOS and iOS devices. It has no external dependencies. Example use std::path::Pa

Tobi 8 Sep 16, 2022
Generate and parse UUIDs.

uuid Here's an example of a UUID: 67e55044-10b1-426f-9247-bb680e5fe0c8 A UUID is a unique 128-bit value, stored as 16 octets, and regularly formatted

Rust Uuid 754 Jan 6, 2023
Rust library to parse, deparse and normalize SQL queries using the PostgreSQL query parser

This Rust library uses the actual PostgreSQL server source to parse SQL queries and return the internal PostgreSQL parse tree.

pganalyze 37 Dec 18, 2022
Parse and encoding of data using the SCTE-35 standard.

SCTE-35 lib and parser for Rust Work in progress! This library provide access to parse and encoding of data using the SCTE-35 standard. This standard

Rafael Carício 4 May 6, 2022