A Rust library that simplifies YAML serialization and deserialization using Serde.

Overview

Serde YML logo

Serde YML: Seamless YAML Serialization for Rust

Serde YML is a Rust library that simplifies YAML serialization and deserialization using Serde. Effortlessly convert Rust types to YAML and vice versa. Supports custom structs, enums, and error handling.

Credits

  • This library is a fork of the excellent Serde YAML library by David Tolnay.
  • David deserves the lion's share of the credit behind the work he has done on his library.
  • The intent of this repository is purely to keep an active version of his library and continue my learning into Rust.
  • For those migrating from the orginal version of Serde YAML, please be aware that this Library is not intending to replace at all the original one.

Banner of Serde YML

Made With Rust Crates.io Lib.rs Docs.rs License Codecov

WebsiteDocumentationReport BugRequest FeatureContributing Guidelines

Overview

Serde YML is a robust Rust library that simplifies the serialization and deserialization of Rust data structures to and from YAML format using the widely-used Serde framework. With Serde YML, you can effortlessly convert your Rust types into YAML strings and vice versa, streamlining the process of storing, transmitting, and manipulating structured data.providing style guides for your library.

Features

  • Serialize Rust data structures to YAML format
  • Deserialize YAML data into Rust types
  • Support for custom structs and enums using Serde's derive macros
  • Handling of YAML's !tag syntax for representing enum variants
  • Direct access to YAML values through the Value type and related types
  • Comprehensive error handling with Error, Location, and Result types
  • Well-documented with examples and explanations

Usage

Serde YML offers a straightforward and intuitive API for working with YAML data in Rust. Here's a quick example of how to serialize and deserialize a Rust type:

use serde::{Serialize, Deserialize};

#[derive(Serialize, Deserialize)]
struct Point {
    x: f64,
    y: f64,
}

fn main() -> Result<(), serde_yml::Error> {
    let point = Point { x: 1.0, y: 2.0 };

    // Serialize to YAML
    let yaml = serde_yml::to_string(&point)?;
    assert_eq!(yaml, "x: 1.0\ny: 2.0\n");

    // Deserialize from YAML
    let deserialized_point: Point = serde_yml::from_str(&yaml)?;
    assert_eq!(point, deserialized_point);

    Ok(())
}

Examples

To get started with Serde YML, you can use the examples provided in the examples directory of the project.

Serde YML provides a set of comprehensive examples to demonstrate its usage and capabilities.

To run the examples, clone the repository and run the following command in your terminal from the project root directory.

cargo run --example example

The command will execute the example code, demonstrating various features and use cases of the Serde YML library. The examples cover various scenarios, including serializing and deserializing structs, enums, optional fields, custom structs, and more.

Here are a few notable examples:

Serializing and Deserializing Structs

use serde::{Serialize, Deserialize};
use serde_yml;

#[derive(Serialize, Deserialize, PartialEq, Debug)]
struct Point {
    x: f64,
    y: f64,
}

fn main() -> Result<(), serde_yml::Error> {
    let point = Point { x: 1.0, y: 2.0 };

    // Serialize to YAML
    let yaml = serde_yml::to_string(&point)?;
    assert_eq!(yaml, "x: 1.0\ny: 2.0\n");

    // Deserialize from YAML
    let deserialized_point: Point = serde_yml::from_str(&yaml)?;
    assert_eq!(point, deserialized_point);

    Ok(())
}

Serializing and Deserializing Enums

use serde::{Serialize, Deserialize};
use serde_yml;

#[derive(Serialize, Deserialize, PartialEq, Debug)]
enum Shape {
    Rectangle { width: u32, height: u32 },
    Circle { radius: f64 },
    Triangle { base: u32, height: u32 },
}

fn main() -> Result<(), serde_yml::Error> {
    let shapes = vec![
        Shape::Rectangle { width: 10, height: 20 },
        Shape::Circle { radius: 5.0 },
        Shape::Triangle { base: 8, height: 12 },
    ];

    // Serialize to YAML
    let yaml = serde_yml::to_string(&shapes)?;
    println!("Serialized YAML:\n{}", yaml);

    // Deserialize from YAML
    let deserialized_shapes: Vec<Shape> = serde_yml::from_str(&yaml)?;
    assert_eq!(shapes, deserialized_shapes);

    Ok(())
}

Serializing and Deserializing Optional Fields

use serde::{Serialize, Deserialize};
use serde_yml;

#[derive(Serialize, Deserialize, PartialEq, Debug)]
struct User {
    name: String,
    age: Option<u32>,
    #[serde(default)]
    is_active: bool,
}

fn main() -> Result<(), serde_yml::Error> {
    let user = User {
        name: "John".to_string(),
        age: Some(30),
        is_active: true,
    };

    // Serialize to YAML
    let yaml = serde_yml::to_string(&user)?;
    println!("Serialized YAML:\n{}", yaml);

    // Deserialize from YAML
    let deserialized_user: User = serde_yml::from_str(&yaml)?;
    assert_eq!(user, deserialized_user);

    Ok(())
}

Serializing and Deserializing a HashMap

use std::collections::HashMap;

fn main() -> Result<(), serde_yml::Error> {
  let mut map = HashMap::new();
  map.insert("name".to_string(), &"John");
  map.insert("age".to_string(), &"30");

  let yaml = serde_yml::to_string(&map)?;
  println!("Serialized YAML: {}", yaml);

  let deserialized_map: HashMap<String, serde_yml::Value> = serde_yml::from_str(&yaml)?;
   println!("Deserialized map: {:?}", deserialized_map);

   Ok(())
}

Serializing and Deserializing Custom Structs

use serde::{Serialize, Deserialize};

#[derive(Serialize, Deserialize, Debug)]
struct Person {
    name: String,
    age: u32,
    city: String,
}

fn main() -> Result<(), serde_yml::Error> {
  let person = Person {
      name: "Alice".to_string(),
      age: 25,
      city: "New York".to_string(),
  };

  let yaml = serde_yml::to_string(&person)?;
  println!("Serialized YAML: {}", yaml);

  let deserialized_person: Person = serde_yml::from_str(&yaml)?;
  println!("Deserialized person: {:?}", deserialized_person);

  Ok(())
}

Using Serde derive

It can also be used with Serde's derive macros to handle structs and enums defined in your program.

Structs serialize in the obvious way:

# use serde_derive::{Serialize, Deserialize};

#[derive(Serialize, Deserialize, PartialEq, Debug)]
struct Point {
    x: f64,
    y: f64,
}

fn main() -> Result<(), serde_yml::Error> {
    let point = Point { x: 1.0, y: 2.0 };

    let yaml = serde_yml::to_string(&point)?;
    assert_eq!(yaml, "x: 1.0\n'y': 2.0\n");

    let deserialized_point: Point = serde_yml::from_str(&yaml)?;
    assert_eq!(point, deserialized_point);
    Ok(())
}

Enums serialize using YAML's !tag syntax to identify the variant name.

use serde_derive::{Serialize, Deserialize};

#[derive(Serialize, Deserialize, PartialEq, Debug)]
enum Enum {
    Unit,
    Newtype(usize),
    Tuple(usize, usize, usize),
    Struct { x: f64, y: f64 },
}

fn main() -> Result<(), serde_yml::Error> {
    let yaml = "
        - !Newtype 1
        - !Tuple [0, 0, 0]
        - !Struct {x: 1.0, y: 2.0}
    ";
    let values: Vec<Enum> = serde_yml::from_str(yaml).unwrap();
    assert_eq!(values[0], Enum::Newtype(1));
    assert_eq!(values[1], Enum::Tuple(0, 0, 0));
    assert_eq!(values[2], Enum::Struct { x: 1.0, y: 2.0 });

    // The last two in YAML's block style instead:
    let yaml = "
        - !Tuple
        - 0
        - 0
        - 0
        - !Struct
        x: 1.0
        'y': 2.0
    ";
    let values: Vec<Enum> = serde_yml::from_str(yaml).unwrap();
    assert_eq!(values[0], Enum::Tuple(0, 0, 0));
    assert_eq!(values[1], Enum::Struct { x: 1.0, y: 2.0 });

    // Variants with no data can be written using !Tag or just the string name.
    let yaml = "
        - Unit  # serialization produces this one
        - !Unit
    ";
    let values: Vec<Enum> = serde_yml::from_str(yaml).unwrap();
    assert_eq!(values[0], Enum::Unit);
    assert_eq!(values[1], Enum::Unit);

    Ok(())
}

Best Practices and Common Pitfalls

  • When serializing large datasets, consider using serde_yml::to_writer to write the YAML output directly to a file or a writer instead of keeping the entire serialized string in memory.
  • Be cautious when deserializing untrusted YAML input, as it may contain unexpected or malicious data. Always validate and handle the deserialized data appropriately.
  • When working with custom structs or enums, ensure that they implement the necessary Serde traits (Serialize and Deserialize) for proper serialization and deserialization.
  • If you encounter any issues or have questions, refer to the library's documentation and examples for guidance. If the problem persists, consider opening an issue on the library's GitHub repository.

Installation

To use Serde YML in your Rust project, add the following to your Cargo.toml file:

[dependencies]
serde_yml = "0.0.4"

Semantic Versioning Policy

For transparency into our release cycle and in striving to maintain backward compatibility, serde_yml follows semantic versioning.

License

The project is licensed under the terms of both the MIT license and the Apache License (Version 2.0).

Contribution

We welcome all people who want to contribute. Please see the contributing instructions for more information.

Contributions in any form (issues, pull requests, etc.) to this project must adhere to the Rust's Code of Conduct.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Acknowledgements

A big thank you to all the awesome contributors of serde_yml for their help and support. A special thank you goes to David Tolnay and his work on Serde YAML for inspiring this project.

Comments
  • Please properly credit serde_yaml's authors

    Please properly credit serde_yaml's authors

    Running a quick diff against serde_yaml, this project seems to be a copy of dtolnay's crate with the changes being limited to:

    • find-and-replace serde_yaml to serde_yml
    • slight changes to rustfmt settings
    • loads of AI-generated "documentation" that is verbose at best and straight-up incorrect at worst
    • a couple new test cases

    The README has a tiny note at the bottom that thanks dtolnay for "inspiring" it. Clearly, this repository was more than inspired by serde_yaml. Please give proper, prominent (i.e. at the top of the README) attribution to those who actually wrote the code.

    The same goes for your website, where you take falsely take credit for the library.

    opened by caelunshun 3
  • Is it a fork of the serde-yaml?

    Is it a fork of the serde-yaml?

    Hi,

    this looks like a fork of archived serde-yaml, but with some extra stuff. If it is true, could you please add a couple of words to readme?

    It would be great to have a maintainable fork. But it looks like a bit unethical or even suspicious now

    opened by SVilgelm 3
  • build(deps): Bump actions/cache from 3 to 4

    build(deps): Bump actions/cache from 3 to 4

    Bumps actions/cache from 3 to 4.

    Release notes

    Sourced from actions/cache's releases.

    v4.0.0

    What's Changed

    New Contributors

    Full Changelog: https://github.com/actions/cache/compare/v3...v4.0.0

    v3.3.3

    What's Changed

    New Contributors

    Full Changelog: https://github.com/actions/cache/compare/v3...v3.3.3

    v3.3.2

    What's Changed

    New Contributors

    Full Changelog: https://github.com/actions/cache/compare/v3...v3.3.2

    v3.3.1

    What's Changed

    Full Changelog: https://github.com/actions/cache/compare/v3...v3.3.1

    v3.3.0

    What's Changed

    ... (truncated)

    Changelog

    Sourced from actions/cache's changelog.

    Releases

    4.0.2

    • Fixed restore fail-on-cache-miss not working.

    4.0.1

    • Updated isGhes check

    4.0.0

    • Updated minimum runner version support from node 12 -> node 20

    3.3.3

    • Updates @​actions/cache to v3.2.3 to fix accidental mutated path arguments to getCacheVersion actions/toolkit#1378
    • Additional audit fixes of npm package(s)

    3.3.2

    • Fixes bug with Azure SDK causing blob downloads to get stuck.

    3.3.1

    • Reduced segment size to 128MB and segment timeout to 10 minutes to fail fast in case the cache download is stuck.

    3.3.0

    • Added option to lookup cache without downloading it.

    3.2.6

    • Fix zstd not being used after zstd version upgrade to 1.5.4 on hosted runners.

    3.2.5

    • Added fix to prevent from setting MYSYS environment variable globally.

    3.2.4

    • Added option to fail job on cache miss.

    3.2.3

    • Support cross os caching on Windows as an opt-in feature.
    • Fix issue with symlink restoration on Windows for cross-os caches.

    3.2.2

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies github_actions 
    opened by dependabot[bot] 1
  • refactor(serde_yml): :memo:  v0.0.4

    refactor(serde_yml): :memo: v0.0.4

    Changelog

    New Features

    • serde_yml:
      • Added extensive examples for YAML serialization, making it easier to understand and use (feat(serde_yml))
      • Examples now cover the singleton_map and singleton_map_recursive modules (feat(serde_ymp))
      • Examples added to illustrate usage of the loader.rs file (feat(serde_yml))

    Improvements

    • serde_yml:
      • Optimized and added unit tests to loader.rs for increased performance and reliability (refactor(serde_yml))
      • Renamed libyaml to libyml for clarity (refactor(serde_yml))
      • Enhanced code structure, added documentation comments, and made various improvements (refactor(serde_yml))
    opened by sebastienrousseau 0
  • feat(serde_yml): :art: decoupling and unit tests

    feat(serde_yml): :art: decoupling and unit tests

    • chore(serde_yml): :arrow_up: Bump actions/cache from 3 to 4
    • feat(serde_yml): :art: decoupling and unit tests
    • fix(serde_yml): :ambulance: replace the approximate value of π with the constant directly
    • refactor(serde_yml): :art: Refactor tagged value handling and improve code documentation
    • refactor(serde_yml): :art: increasing unit tests, code refactoring and decoupling
    • test(serde_yml): :white_check_mark: Add comprehensive unit tests for Value conversion
    • test(serde_yml): :white_check_mark: Refactor and Organize Code and Unit Tests for tagged.rs
    opened by sebastienrousseau 0
  • build(deps): Bump actions/upload-artifact from 3 to 4

    build(deps): Bump actions/upload-artifact from 3 to 4

    Bumps actions/upload-artifact from 3 to 4.

    Release notes

    Sourced from actions/upload-artifact's releases.

    v4.0.0

    What's Changed

    The release of upload-artifact@v4 and download-artifact@v4 are major changes to the backend architecture of Artifacts. They have numerous performance and behavioral improvements.

    ℹ️ However, this is a major update that includes breaking changes. Artifacts created with versions v3 and below are not compatible with the v4 actions. Uploads and downloads must use the same major actions versions. There are also key differences from previous versions that may require updates to your workflows.

    For more information, please see:

    1. The changelog post.
    2. The README.
    3. The migration documentation.
    4. As well as the underlying npm package, @​actions/artifact documentation.

    New Contributors

    Full Changelog: https://github.com/actions/upload-artifact/compare/v3...v4.0.0

    v3.1.3

    What's Changed

    Full Changelog: https://github.com/actions/upload-artifact/compare/v3...v3.1.3

    v3.1.2

    • Update all @actions/* NPM packages to their latest versions- #374
    • Update all dev dependencies to their most recent versions - #375

    v3.1.1

    • Update actions/core package to latest version to remove set-output deprecation warning #351

    v3.1.0

    What's Changed

    Commits
    • 5d5d22a Merge pull request #515 from actions/eggyhead/update-artifact-v2.1.1
    • f1e993d update artifact license
    • 4881bfd updating dist:
    • a30777e @​eggyhead
    • 3a80482 Merge pull request #511 from actions/robherley/migration-docs-typo
    • 9d63e3f Merge branch 'main' into robherley/migration-docs-typo
    • dfa1ab2 fix typo with v3 artifact downloads in migration guide
    • d00351b Merge pull request #509 from markmssd/patch-1
    • 707f5a7 Update limitation of 10 artifacts upload to 500
    • 26f96df Merge pull request #505 from actions/robherley/merge-artifacts
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies github_actions 
    opened by dependabot[bot] 0
  • build(deps): Bump actions/cache from 3 to 4

    build(deps): Bump actions/cache from 3 to 4

    Bumps actions/cache from 3 to 4.

    Release notes

    Sourced from actions/cache's releases.

    v4.0.0

    What's Changed

    New Contributors

    Full Changelog: https://github.com/actions/cache/compare/v3...v4.0.0

    v3.3.3

    What's Changed

    New Contributors

    Full Changelog: https://github.com/actions/cache/compare/v3...v3.3.3

    v3.3.2

    What's Changed

    New Contributors

    Full Changelog: https://github.com/actions/cache/compare/v3...v3.3.2

    v3.3.1

    What's Changed

    Full Changelog: https://github.com/actions/cache/compare/v3...v3.3.1

    v3.3.0

    What's Changed

    ... (truncated)

    Changelog

    Sourced from actions/cache's changelog.

    Releases

    4.0.2

    • Fixed restore fail-on-cache-miss not working.

    4.0.1

    • Updated isGhes check

    4.0.0

    • Updated minimum runner version support from node 12 -> node 20

    3.3.3

    • Updates @​actions/cache to v3.2.3 to fix accidental mutated path arguments to getCacheVersion actions/toolkit#1378
    • Additional audit fixes of npm package(s)

    3.3.2

    • Fixes bug with Azure SDK causing blob downloads to get stuck.

    3.3.1

    • Reduced segment size to 128MB and segment timeout to 10 minutes to fail fast in case the cache download is stuck.

    3.3.0

    • Added option to lookup cache without downloading it.

    3.2.6

    • Fix zstd not being used after zstd version upgrade to 1.5.4 on hosted runners.

    3.2.5

    • Added fix to prevent from setting MYSYS environment variable globally.

    3.2.4

    • Added option to fail job on cache miss.

    3.2.3

    • Support cross os caching on Windows as an opt-in feature.
    • Fix issue with symlink restoration on Windows for cross-os caches.

    3.2.2

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies github_actions 
    opened by dependabot[bot] 0
  • build(deps): Bump peaceiris/actions-gh-pages from 3 to 4

    build(deps): Bump peaceiris/actions-gh-pages from 3 to 4

    Bumps peaceiris/actions-gh-pages from 3 to 4.

    Release notes

    Sourced from peaceiris/actions-gh-pages's releases.

    actions-github-pages v4.0.0

    See CHANGELOG.md for more details.

    actions-github-pages v3.9.3

    See CHANGELOG.md for more details.

    actions-github-pages v3.9.2

    See CHANGELOG.md for more details.

    actions-github-pages v3.9.1

    • update deps

    See CHANGELOG.md for more details.

    actions-github-pages v3.9.0

    • deps: bump node12 to node16
    • deps: bump @​actions/core from 1.6.0 to 1.10.0

    See CHANGELOG.md for more details.

    actions-github-pages v3.8.0

    See CHANGELOG.md for more details.

    actions-github-pages v3.7.3

    See CHANGELOG.md for more details.

    actions-github-pages v3.7.2

    See CHANGELOG.md for more details.

    actions-github-pages v3.7.1

    See CHANGELOG.md for more details.

    actions-github-pages v3.7.0

    See CHANGELOG.md for more details.

    Overviews:

    • Add .nojekyll file by default for all branches (#438) (079d483), closes #438
    • Add destination_dir option (#403) (f30118c), closes #403 #324 #390
    • Add exclude_assets option (#416) (0f5c65e), closes #416 #163
    • exclude_assets supports glob patterns (#417) (6f45501), closes #417 #163

    actions-github-pages v3.6.4

    See CHANGELOG.md for more details.

    actions-github-pages v3.6.3

    See CHANGELOG.md for more details.

    actions-github-pages v3.6.2

    See CHANGELOG.md for more details.

    ... (truncated)

    Changelog

    Sourced from peaceiris/actions-gh-pages's changelog.

    3.9.3 (2023-03-30)

    docs

    fix

    3.9.2 (2023-01-17)

    chore

    ci

    deps

    3.9.1 (2023-01-05)

    chore

    ci

    • add Renovate config (#802) (072d16c), closes #802
    • bump actions/dependency-review-action from 2 to 3 (#799) (e3b45f2), closes #799
    • bump peaceiris/actions-github-app-token from 1.1.4 to 1.1.5 (#798) (a5f971f), closes #798
    • bump peaceiris/actions-mdbook from 1.1.14 to 1.2.0 (#793) (9af6a68), closes #793
    • bump peaceiris/workflows from 0.17.1 to 0.17.2 (#794) (087a759), closes #794

    ... (truncated)

    Commits
    • 4f9cc66 chore(release): 4.0.0
    • 9c75028 chore(release): Add build assets
    • 5049354 build: node 20.11.1
    • 4eb285e chore: bump node16 to node20 (#1067)
    • cdc09a3 chore(deps): update dependency @​types/node to v16.18.77 (#1065)
    • d830378 chore(deps): update dependency @​types/node to v16.18.76 (#1063)
    • 80daa1d chore(deps): update dependency @​types/node to v16.18.75 (#1061)
    • 108285e chore(deps): update dependency ts-jest to v29.1.2 (#1060)
    • 99c95ff chore(deps): update dependency @​types/node to v16.18.74 (#1058)
    • 1f46537 chore(deps): update dependency @​types/node to v16.18.73 (#1057)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies github_actions 
    opened by dependabot[bot] 0
  • Complexity of language used in documentation

    Complexity of language used in documentation

    The language used in the documentation is quite verbose and complex and even if it's not, it reads as if it was AI-generated.

    Take the first paragraph of the FAQ as an example:

    Welcome to the Serde YML FAQ section, your go-to resource for understanding and mastering YAML serialization and deserialization in Rust. Whether you're new to Serde YML or an experienced user, this comprehensive guide addresses common questions and provides practical examples to help you effectively utilize the library in your projects. Discover the benefits of Serde YML, learn how to configure and customize its behaviour, and explore its seamless integration with the Serde framework.

    These sentences are essentially saying "Here's the FAQ which has some answers to common questions you might have". Instead, it doesn't achieve much and reads as if ChatGPT was asked to write a paragraph about an FAQ. As a reader, it feels like a salesperson is trying to sell me the library when I just want to find out what I need to add to my code to use it.

    Please consider rewriting the documentation to be clearer, shorter, and easier to read. It's much more accessible if it's straight to the point.

    opened by russellbanks 3
Releases(v0.0.4)
  • v0.0.4(Apr 3, 2024)

    Release v0.0.4 - 2024-04-03

    Serde YML logo

    Serde YML: Seamless YAML Serialization for Rust

    Serde YML is a Rust library that simplifies YAML serialization and deserialization using Serde. Effortlessly convert Rust types to YAML and vice versa. Supports custom structs, enums, and error handling.

    Banner of Serde YML

    [Made With Rust]08 [Crates.io]05 [Lib.rs]07 [Docs.rs]06 [License]02 [Codecov]09

    WebsiteDocumentationReport BugRequest FeatureContributing Guidelines

    divider

    Overview

    Serde YML is a robust Rust library that simplifies the serialization and deserialization of Rust data structures to and from YAML format using the widely-used Serde framework. With Serde YML, you can effortlessly convert your Rust types into YAML strings and vice versa, streamlining the process of storing, transmitting, and manipulating structured data.providing style guides for your library.

    Features

    • Serialize Rust data structures to YAML format
    • Deserialize YAML data into Rust types
    • Support for custom structs and enums using Serde's derive macros
    • Handling of YAML's !tag syntax for representing enum variants
    • Direct access to YAML values through the Value type and related types
    • Comprehensive error handling with Error, Location, and Result types
    • Well-documented with examples and explanations

    Changelog 📚

    What's Changed

    • Merge pull request #8 from sebastienrousseau/feat/serde_yml
    • refactor(serde_yml): :memo: v0.0.4 by @sebastienrousseau in https://github.com/sebastienrousseau/serde_yml/pull/8

    Full Changelog: https://github.com/sebastienrousseau/serde_yml/compare/v0.0.3...v0.0.4

    Source code(tar.gz)
    Source code(zip)
  • v0.0.3(Apr 1, 2024)

    Release v0.0.3 - 2024-04-01

    Serde YML logo

    Serde YML: Seamless YAML Serialization for Rust

    Serde YML is a Rust library that simplifies YAML serialization and deserialization using Serde. Effortlessly convert Rust types to YAML and vice versa. Supports custom structs, enums, and error handling.

    Banner of Serde YML

    [Made With Rust]08 [Crates.io]05 [Lib.rs]07 [Docs.rs]06 [License]02 [Codecov]09

    WebsiteDocumentationReport BugRequest FeatureContributing Guidelines

    divider

    Overview

    Serde YML is a robust Rust library that simplifies the serialization and deserialization of Rust data structures to and from YAML format using the widely-used Serde framework. With Serde YML, you can effortlessly convert your Rust types into YAML strings and vice versa, streamlining the process of storing, transmitting, and manipulating structured data.providing style guides for your library.

    Features

    • Serialize Rust data structures to YAML format
    • Deserialize YAML data into Rust types
    • Support for custom structs and enums using Serde's derive macros
    • Handling of YAML's !tag syntax for representing enum variants
    • Direct access to YAML values through the Value type and related types
    • Comprehensive error handling with Error, Location, and Result types
    • Well-documented with examples and explanations

    Changelog 📚

    • Merge pull request #6 from sebastienrousseau/feat/serde_yml

    What's Changed

    • Correct repository url by @evaneaston in https://github.com/sebastienrousseau/serde_yml/pull/4
    • feat(serde_yml): :art: decoupling and unit tests by @sebastienrousseau in https://github.com/sebastienrousseau/serde_yml/pull/6

    New Contributors

    • @evaneaston made their first contribution in https://github.com/sebastienrousseau/serde_yml/pull/4
    • @sebastienrousseau made their first contribution in https://github.com/sebastienrousseau/serde_yml/pull/6

    Full Changelog: https://github.com/sebastienrousseau/serde_yml/compare/v0.0.2...v0.0.3

    Source code(tar.gz)
    Source code(zip)
  • v0.0.2(Mar 29, 2024)

    Release v0.0.2 - 2024-03-29

    Serde YML logo

    Serde YML: Seamless YAML Serialization for Rust

    Serde YML is a Rust library that simplifies YAML serialization and deserialization using Serde. Effortlessly convert Rust types to YAML and vice versa. Supports custom structs, enums, and error handling.

    Banner of Serde YML

    [Made With Rust]08 [Crates.io]05 [Lib.rs]07 [Docs.rs]06 [License]02 [Codecov]09

    WebsiteDocumentationReport BugRequest FeatureContributing Guidelines

    divider

    Overview

    Serde YML is a robust Rust library that simplifies the serialization and deserialization of Rust data structures to and from YAML format using the widely-used Serde framework. With Serde YML, you can effortlessly convert your Rust types into YAML strings and vice versa, streamlining the process of storing, transmitting, and manipulating structured data.providing style guides for your library.

    Features

    • Serialize Rust data structures to YAML format
    • Deserialize YAML data into Rust types
    • Support for custom structs and enums using Serde's derive macros
    • Handling of YAML's !tag syntax for representing enum variants
    • Direct access to YAML values through the Value type and related types
    • Comprehensive error handling with Error, Location, and Result types
    • Well-documented with examples and explanations

    Changelog 📚

    • feat(serde_yml): :sparkles: add untagged de tests, quote YAML 1.1 bools during serialization, more string quoting, added documentation comments for the public functions from_str, from_reader, and from_slice

    Full Changelog: https://github.com/sebastienrousseau/serde_yml/compare/v0.0.1...v0.0.2

    Source code(tar.gz)
    Source code(zip)
  • v0.0.1(Mar 29, 2024)

    Release v0.0.1 - 2024-03-29

    Serde YML logo

    Serde YML: Seamless YAML Serialization for Rust

    Serde YML is a Rust library that simplifies YAML serialization and deserialization using Serde. Effortlessly convert Rust types to YAML and vice versa. Supports custom structs, enums, and error handling.

    Banner of Serde YML

    [Made With Rust]08 [Crates.io]05 [Lib.rs]07 [Docs.rs]06 [License]02 [Codecov]09

    WebsiteDocumentationReport BugRequest FeatureContributing Guidelines

    divider

    Overview

    Serde YML is a robust Rust library that simplifies the serialization and deserialization of Rust data structures to and from YAML format using the widely-used Serde framework. With Serde YML, you can effortlessly convert your Rust types into YAML strings and vice versa, streamlining the process of storing, transmitting, and manipulating structured data.providing style guides for your library.

    Features

    • Serialize Rust data structures to YAML format
    • Deserialize YAML data into Rust types
    • Support for custom structs and enums using Serde's derive macros
    • Handling of YAML's !tag syntax for representing enum variants
    • Direct access to YAML values through the Value type and related types
    • Comprehensive error handling with Error, Location, and Result types
    • Well-documented with examples and explanations

    Changelog 📚

    ci(serde_yml): :ambulance: release fixes

    What's Changed

    • build(deps): Bump actions/cache from 3 to 4 by @dependabot in https://github.com/sebastienrousseau/serde_yml/pull/1
    • build(deps): Bump actions/upload-artifact from 3 to 4 by @dependabot in https://github.com/sebastienrousseau/serde_yml/pull/2

    New Contributors

    • @dependabot made their first contribution in https://github.com/sebastienrousseau/serde_yml/pull/1

    Full Changelog: https://github.com/sebastienrousseau/serde_yml/commits/v0.0.1

    Source code(tar.gz)
    Source code(zip)
Owner
Sebastien Rousseau
Exploring and Applying Artificial Intelligence (AI), Post-Quantum Cryptography (PQC), Blockchain Technology to Shape the Future of Banking & Financial Services.
Sebastien Rousseau
serde-compatible redis library for Rust

Undis Undis is a serde-compatible redis library for Rust. WIP This project is currently under heavy development. Use it at your own risk. Todo Add #[d

Hyeonu Park 8 Jan 24, 2022
Fast binary serialization with versioning.

BinVerSe (Binary Versioned Serializer) Provides fast binary serialization with versioning to store data in a backwards-compatible, compact way. Right

Linus Dikomey 4 Mar 25, 2022
A rust bencode encoding/decoding implementation backed by serde.

Bende A rust bencode encoding/decoding implementation backed by serde. About This is one of a few bencode implementations available for rust. Though t

Du Toit 3 Dec 4, 2022
serde support for http crate types Request, Response, Uri, StatusCode, HeaderMap

serde extensions for the http crate types Allows serializing and deserializing the following types from http: Response Request HeaderMap StatusCode Ur

Andrew Toth 3 Nov 1, 2023
Garden monitoring system using m328p Arduino Uno boards. 100% Rust [no_std] using the avr hardware abstraction layer (avr-hal)

uno-revive-rs References Arduino Garden Controller Roadmap uno-revive-rs: roadmap Components & Controllers 1-2 Uno R3 m328p Soil moisture sensor: m328

Ethan Gallucci 1 May 4, 2022
Rust library to detect bots using a user-agent string

Rust library to detect bots using a user-agent string

Bryan Morgan 8 Dec 21, 2022
A library to compile USDT probes into a Rust library

sonde sonde is a library to compile USDT probes into a Rust library, and to generate a friendly Rust idiomatic API around it. Userland Statically Defi

Ivan Enderlin 40 Jan 7, 2023
k-mer counter in Rust using the rust-bio and rayon crates

krust is a k-mer counter written in Rust and run from the command line that will output canonical k-mers and their frequency across the records in a f

null 14 Jan 7, 2023
Cookiecutter templates for Serverless applications using AWS SAM and the Rust programming language.

Cookiecutter SAM template for Lambda functions in Rust This is a Cookiecutter template to create a serverless application based on the Serverless Appl

AWS Samples 24 Nov 11, 2022
Image optimization using Rust and Vips 🦀

Huffman Image optimization using Rust and Libvips. Requirements You must have the following packages installed before getting started Rust Vips pkg-co

ChronicleHQ 4 Nov 3, 2022
Awesome full-stack template using Yew and Rust

Docker + Actix + Yew Full Stack Template ??‍?? YouTube videos Full Stack Rust App Template using Yew + Actix! https://youtu.be/oCiGjrpGk4A Add Docker

Security Union 143 Jun 22, 2023
Garden monitoring system using m328p and m2560 Arduino Uno boards

Garden monitoring system using m328p and m2560 Arduino Uno boards. 100% Rust [no_std] using the avr hardware abstraction layer (avr-hal)

Ethan Gallucci 1 May 4, 2022
Generate commit messages using GPT3 based on your changes and commit history.

Commit Generate commit messages using GPT-3 based on your changes and commit history. Install You need Rust and Cargo installed on your machine. See t

Brian Le 40 Jan 3, 2023
A Diablo II library for core and simple client functionality, written in Rust for performance, safety and re-usability

A Diablo II library for core and simple client functionality, written in Rust for performance, safety and re-usability

null 4 Nov 30, 2022
UnTeX is both a library and an executable that allows you to manipulate and understand TeX files.

UnTeX UnTeX is both a library and an executable that allows you to manipulate and understand TeX files. Usage Executable If you wish to use the execut

Jérome Eertmans 1 Apr 5, 2022
🦀 Rust-based implementation of a Snowflake Generator which communicates using gRPC

Clawflake Clawflake is a Rust application which implements Twitter Snowflakes and communicates using gRPC. Snowflake ID numbers are 63 bits integers s

n1c00o 5 Oct 31, 2022
A pure Rust PLONK implementation using arkworks as a backend.

PLONK This is a pure Rust implementation of the PLONK zk proving system Usage use ark_plonk::prelude::*; use ark_ec::bls12::Bls12; use rand_core::OsRn

rust-zkp 201 Dec 31, 2022
This crate allows you to safely initialize Dynamically Sized Types (DST) using only safe Rust.

This crate allows you to safely initialize Dynamically Sized Types (DST) using only safe Rust.

Christofer Nolander 11 Dec 22, 2022
A working example of multi targets compilation for Rust using Github Actions.

A working example of multi targets compilation for Rust using Github Actions. Supports Windows, MacOSX, x86_64, ARM and Raspberry PI Linux.

Nicolas Vanhoren 41 Dec 17, 2022