Add new crate leon-macros that provide template! with identical syntax as runtime parsing (#946)

`leon_macros::template!` can parse template at compile-time.
It accepts a utf-8 string literal and uses `leon` internally to parse it, then generate code that evaluates to `Template<'static>`.

 - Exclude fuzz from crate leon when publishing
 - Impl fn-like proc-macro `leon_macros::template!`
 - Add dep `leon-macros` to binstalk
 - Use `leon_macros::template!` in `binstalk::fetchers::gh_crate_meta::hosting`
 - Add doc for `leon-macros` in `leon`
 - Improve `std::fmt::Display` impl for `leon::ParseError`
 - Fixed broken infra link in leon

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2023-04-17 14:50:58 +10:00 committed by GitHub
parent fa0455a417
commit 5683ca2476
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 373 additions and 91 deletions

View file

@ -22,6 +22,7 @@ home = "0.5.4"
itertools = "0.10.5"
jobslot = { version = "0.2.11", features = ["tokio"] }
leon = { version = "1.0.0", path = "../leon" }
leon-macros = { version = "0.0.0", path = "../leon-macros" }
maybe-owned = "0.3.4"
miette = "5.7.0"
normalize-path = { version = "0.2.0", path = "../normalize-path" }