From 23a7b089e4df70f7a2550506670c40b6b642b02a Mon Sep 17 00:00:00 2001 From: Cerber Ursi Date: Sat, 27 Nov 2021 19:10:28 +0700 Subject: [PATCH] v0.2.0 --- Cargo.toml | 2 +- README.md | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index c4e94e1..3d9d312 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "uneval" -version = "0.1.1" +version = "0.2.0" authors = ["k.bagrov "] edition = "2018" description = "Serde serializer to embed data as Rust code" diff --git a/README.md b/README.md index 88ef4eb..1606824 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,10 @@ This crate was inspired by the [Stack Overflow question](https://stackoverflow.c This crate is intended to be used from the build script. It will serialize anything you provide to it to any path you provide (or to the arbitrary [`io::Write`](https://doc.rust-lang.org/stable/std/io/trait.Write.html) implementation, or into `String`, if you want to). Then, you'll [`include!`](https://doc.rust-lang.org/stable/std/macro.include.html) the generated file wherever you want to use it. +### How does it work? + +See the [crate documentation](https://docs.rs/uneval) for details. In short, we use information provided by Serde to emit the code, which, when assigned to the variable of correct type, will provide all necessary conversions by using `Into` and iterators. + ### Is it really that simple? Well... not. There are several limitations.