From 3b8edc1cf93354988a80af53e24604a00b18715c Mon Sep 17 00:00:00 2001 From: Lenscas Date: Fri, 15 Nov 2024 10:02:13 +0100 Subject: [PATCH] update version --- Cargo.lock | 4 ++-- Cargo.toml | 4 ++-- README.md | 25 +++++++++++++++---------- tealr_derive/Cargo.toml | 2 +- tealr_derive/README.md | 7 ++++--- 5 files changed, 24 insertions(+), 18 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6289614..ea45786 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -974,7 +974,7 @@ dependencies = [ [[package]] name = "tealr" -version = "0.9.1" +version = "0.10.0" dependencies = [ "bstr", "itertools", @@ -986,7 +986,7 @@ dependencies = [ [[package]] name = "tealr_derive" -version = "0.9.1" +version = "0.10.0" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index b05cc1f..c2f2400 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0" name = "tealr" readme = "README.md" repository = "https://github.com/lenscas/tealr/" -version = "0.9.1" +version = "0.10.0" [workspace] members = ["tealr_derive"] @@ -46,7 +46,7 @@ itertools = "0.13.0" mlua = { version = "0.10.1", optional = true, default-features = false } serde = { version = "1.0.136", features = ["derive"] } serde_json = "1.0.132" -tealr_derive = { version = "0.9.1", optional = true, path = "./tealr_derive" } +tealr_derive = { version = "0.10.0", optional = true, path = "./tealr_derive" } #Mlua tests [[test]] diff --git a/README.md b/README.md index 1410f72..be78cd6 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,23 @@ # tealr -A crate to enhance the APIs provided by the [mlua](https://crates.io/crates/mlua) crates +A crate to enhance the APIs provided by [mlua](https://crates.io/crates/mlua) It aims to do this by improving the following: -- Allow the api to have easily accessible documentation embedded into it - Allow the documentation to be built to web pages (using [tealr_doc_gen](https://github.com/lenscas/tealr_doc_gen) ) -- To go along with the documentation, `tealr` also allow you to be more precise in the types your api works with. Think generic methods and typed lambdas. No more `Lua::Value` -- Add macros to make it easier to work with teal, a statically typed dialect of lua. -It does this by adding new traits and replacing/extending the existing ones from [mlua](https://crates.io/crates/mlua). As a result, the api that tealr exposes is as similar as the api from those 2 crates as possible. +- Generate definition files describing your API (using [tealr_doc_gen](https://github.com/lenscas/tealr_doc_gen) ) + +- Allow the api to have easily accessible documentation embedded into it + +- To go along with the documentation, `tealr` also allow you to be more precise in the types your api works with. Think generic methods and typed lambdas. -It also contains some macro's to easily generate new types to better express the API type wise. +- macro's to make new types easier to create. No more `mlua::Value`! + +- Add macros to make it easier to work with teal, a statically typed dialect of + lua. + +It does this by adding new traits and replacing/extending the existing ones from [mlua](https://crates.io/crates/mlua). As a result, the api that tealr exposes is as similar as the api from mlua as possible. ## Example of `instance.help()` @@ -27,7 +33,6 @@ Rendered html is also available at Exposing types to lua as userdata is almost the same using tealr as it is using mlua - #### Mlua: ```rust ignore @@ -73,7 +78,7 @@ Though it is perfectly possible to use the `lua::Value` from `mlua` it isn't the To help avoid `lua::Value` tealr comes with new types and macros that help you define your API better type wise. - [Simple Unions](#simple-unions) -- [Typed Function]() +- [Typed Function](#typed-functions) - [Generics](#generics) ### Simple unions: @@ -154,7 +159,7 @@ impl FromLua for Example { ## Teal integration -The [teal](https://github.com/teal-language/tl) language is basically just a statically typed variant of lua and can even be made to run in the lua vm without compiling to lua first. +The [teal](https://github.com/teal-language/tl) language is a statically typed variant of lua and can even be made to run in the lua vm without compiling to lua first. As a result of this and `tealr`'s focus on enabling a richer typed api causes the 2 projects to work well together. However, to further help bind the 2 projects, `tealr` contains some extra helpers for those that want to use teal. @@ -203,4 +208,4 @@ embed_compiler!(GitHub(version = "v0.13.1")); embed_compiler!(Luarocks(version = "v0.13.1")); ``` -You can find longer ones with comments on what each call does [here](https://github.com/lenscas/tealr/tree/master/tealr/examples) +You can find longer ones with comments on what each call does [here](https://github.com/lenscas/tealr/tree/master/examples) diff --git a/tealr_derive/Cargo.toml b/tealr_derive/Cargo.toml index ec0229d..3fb401e 100644 --- a/tealr_derive/Cargo.toml +++ b/tealr_derive/Cargo.toml @@ -9,7 +9,7 @@ keywords = ["derive", "macro", "teal", "lua", "tealr"] license = "MIT OR Apache-2.0" name = "tealr_derive" repository = "https://github.com/lenscas/tealr/" -version = "0.9.1" +version = "0.10.0" [features] compile = ["tempfile"] diff --git a/tealr_derive/README.md b/tealr_derive/README.md index b881dc2..3979ad6 100644 --- a/tealr_derive/README.md +++ b/tealr_derive/README.md @@ -1,6 +1,7 @@ # Tealr_derive -The derive macro used by [tealr](https://github.com/lenscas/tealr/tree/master/tealr). -Tealr is a crate that can generate `.d.tl` files for types that are exposed to `lua`/`teal` through [mlua](https://crates.io/crates/mlua) +The derive macro used by [tealr](https://github.com/lenscas/tealr/tree/master/). -Read the [README.md](https://github.com/lenscas/tealr/tree/master/tealr/README.md) in [tealr](https://github.com/lenscas/tealr/tree/master/tealr) for more information. +Tealr is a crate that can generate definition files and online documentation for types and functions that are exposed to `lua`/`teal` through [mlua](https://crates.io/crates/mlua) + +Read the [README.md](https://github.com/lenscas/tealr/tree/master/README.md) in [tealr](https://github.com/lenscas/tealr/tree/master) for more information.