From fadfa4a2d3b13ce09b41e60fa9e0e394164fd8c2 Mon Sep 17 00:00:00 2001 From: Alex Orlenko Date: Fri, 17 Apr 2020 22:30:15 +0100 Subject: [PATCH] Update README and bump version to 0.3 --- Cargo.toml | 6 +++--- README.md | 14 +++++++++++--- mlua_derive/Cargo.toml | 4 ++-- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index d635755..c436b72 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,13 +1,13 @@ [package] name = "mlua" -version = "0.2.2" +version = "0.3.0-alpha.1" authors = ["Aleksandr Orlenko ", "kyren "] edition = "2018" repository = "https://github.com/khvzak/mlua" documentation = "https://docs.rs/mlua" readme = "README.md" -keywords = ["lua", "luajit"] -categories = ["api-bindings"] +keywords = ["lua", "luajit", "async", "futures"] +categories = ["api-bindings", "asynchronous"] license = "MIT" links = "lua" build = "build/main.rs" diff --git a/README.md b/README.md index 921885f..7f5f946 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,14 @@ modules in Rust. ## Usage +### Async + +Starting from 0.3, mlua supports async/await for all Lua versions. This feature works using Lua [coroutines](https://www.lua.org/manual/5.3/manual.html#2.6) and require running [Thread](https://docs.rs/mlua/latest/mlua/struct.Thread.html). + +**Examples**: +- [HTTP Client](examples/async_http_client.rs) +- [TCP Server](examples/async_tcp_server.rs) + ### Choosing Lua version The following features could be used to choose Lua version: `lua53` (default), `lua52`, `lua51` and `luajit`. @@ -41,7 +49,7 @@ Add to `Cargo.toml` : ``` toml [dependencies] -mlua = "0.2" +mlua = "0.3" ``` `main.rs` @@ -73,8 +81,8 @@ Add to `Cargo.toml` : crate-type = ["cdylib"] [dependencies] -mlua = "0.2" -mlua_derive = "0.2" +mlua = "0.3" +mlua_derive = "0.3" ``` `lib.rs` : diff --git a/mlua_derive/Cargo.toml b/mlua_derive/Cargo.toml index c506884..9f37275 100644 --- a/mlua_derive/Cargo.toml +++ b/mlua_derive/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "mlua_derive" -version = "0.2.0" -authors = ["Aleksandr Orlenko "] +version = "0.3.0-alpha.1" +authors = ["Aleksandr Orlenko "] edition = "2018" description = "Procedural macros for the mlua crate." repository = "https://github.com/khvzak/mlua"