diff --git a/Cargo.toml b/Cargo.toml index 7730acc..b0cdff5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,15 +1,21 @@ [package] name = "mlua_serde" -version = "0.4.0" -authors = ["zrkn "] +version = "0.5.0" +authors = ["zrkn ", "Christine Dodrill "] description = "Serde (De)serializer implementation for mlua Value" repository = "https://tulpa.dev/lua/mlua_serde/" readme = "README.md" keywords = ["lua", "serde"] license = "MIT" +[features] +default = [] +lua53 = ["mlua/lua53"] +lua54 = ["mlua/lua54"] +vendored = ["mlua/vendored"] + [dependencies] -mlua = { version = "0.4", features = ["lua53"] } +mlua = "0.4" serde = "1.0" [dev-dependencies] diff --git a/README.md b/README.md index ce98201..c018576 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,23 @@ To use `mlua_serde`, first add this to your `Cargo.toml`: ```toml [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: diff --git a/shell.nix b/shell.nix index cf82601..f9d7b83 100644 --- a/shell.nix +++ b/shell.nix @@ -1,8 +1,13 @@ -let - pkgs = import {}; -in -pkgs.mkShell { +let pkgs = import { }; +in pkgs.mkShell { buildInputs = with pkgs; [ - rustc cargo rls lua5_3 pkg-config rustfmt + rustc + cargo + rls + rustfmt + + # lua + pkg-config + lua5_3 ]; }