Skip to content

Commit

Permalink
docs: add cargo entry example
Browse files Browse the repository at this point in the history
  • Loading branch information
kkent030315 committed Aug 2, 2023
1 parent 2517794 commit 035adf7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ Rust implementation of [lazy_importer](https://github.com/JustasMasiulis/lazy_im

# Usage

```toml
razy-importer = "0.3.2"
razy-importer-macros = "0.3.1"
```

Function prototype must be explicitly declared on the variable and this is by Rust design that Rust does not allow constants to be used where known type information is needed at compile time.

Since the implementation of the `ri_fn` macro takes `func_type` as an `Expr` type, this is treated as an expression that is resolved at runtime. However, types such as `extern "system" fn()`, which represents a function pointer, require known type information at compile time. Therefore, the type `Expr`, which is resolved at runtime, cannot be used directly as such a function type.
Expand Down
2 changes: 1 addition & 1 deletion razy-importer-macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "razy-importer-macros"
description = "Proc macros for razy-importer"
version = "0.3.1"
version = "0.3.2"
readme = "../README.MD"
edition = { workspace = true }
license = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion razy-importer/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "razy-importer"
description = "Rust implementation of lazy_importer"
version = "0.3.2"
version = "0.3.3"
readme = "../README.MD"
edition = { workspace = true }
license = { workspace = true }
Expand Down

0 comments on commit 035adf7

Please sign in to comment.