update README for publishing

This commit is contained in:
Cadey Ratio 2020-07-05 21:07:38 -04:00
parent ab1eef2cf5
commit b312eab937
3 changed files with 36 additions and 9 deletions

View File

@ -1,15 +1,21 @@
[package] [package]
name = "mlua_serde" name = "mlua_serde"
version = "0.4.0" version = "0.5.0"
authors = ["zrkn <zrkn@email.su>"] authors = ["zrkn <zrkn@email.su>", "Christine Dodrill <me@christine.website>"]
description = "Serde (De)serializer implementation for mlua Value" description = "Serde (De)serializer implementation for mlua Value"
repository = "https://tulpa.dev/lua/mlua_serde/" repository = "https://tulpa.dev/lua/mlua_serde/"
readme = "README.md" readme = "README.md"
keywords = ["lua", "serde"] keywords = ["lua", "serde"]
license = "MIT" license = "MIT"
[features]
default = []
lua53 = ["mlua/lua53"]
lua54 = ["mlua/lua54"]
vendored = ["mlua/vendored"]
[dependencies] [dependencies]
mlua = { version = "0.4", features = ["lua53"] } mlua = "0.4"
serde = "1.0" serde = "1.0"
[dev-dependencies] [dev-dependencies]

View File

@ -18,7 +18,23 @@ To use `mlua_serde`, first add this to your `Cargo.toml`:
```toml ```toml
[dependencies] [dependencies]
mlua_serde = "0.4" mlua_serde = { version = "0.5", features = ["lua53"] }
```
You must choose between Lua 5.3 and Lua 5.4. To use Lua 5.4, change `lua53` for
`lua54` like this:
```toml
[dependencies]
mlua_serde = { version = "0.5", features = ["lua54"] }
```
If you don't have lua installed on your system for some reason, use the `vendored`
feature:
```toml
[dependencies]
mlua_serde = { version = "0.5", features = ["lua53", "vendored"] }
``` ```
Next, you can use `to_value`/`from_value` functions to serialize/deserialize: Next, you can use `to_value`/`from_value` functions to serialize/deserialize:

View File

@ -1,8 +1,13 @@
let let pkgs = import <nixpkgs> { };
pkgs = import <nixpkgs> {}; in pkgs.mkShell {
in
pkgs.mkShell {
buildInputs = with pkgs; [ buildInputs = with pkgs; [
rustc cargo rls lua5_3 pkg-config rustfmt rustc
cargo
rls
rustfmt
# lua
pkg-config
lua5_3
]; ];
} }