bump version, since @torkleyy provided some major improvements, also a breaking change (FnRegister -> RegisterFn); fix typo in readme
This commit is contained in:
parent
c1a0312432
commit
13f7f43f98
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "rhai"
|
name = "rhai"
|
||||||
version = "0.7.1"
|
version = "0.8.0"
|
||||||
authors = ["Jonathan Turner", "Lukáš Hozda"]
|
authors = ["Jonathan Turner", "Lukáš Hozda"]
|
||||||
description = "Embedded scripting for Rust"
|
description = "Embedded scripting for Rust"
|
||||||
homepage = "https://github.com/jonathandturner/rhai"
|
homepage = "https://github.com/jonathandturner/rhai"
|
||||||
|
12
README.md
12
README.md
@ -12,7 +12,7 @@ Rhai's current feature set:
|
|||||||
* No additional dependencies
|
* No additional dependencies
|
||||||
* No unsafe code
|
* No unsafe code
|
||||||
|
|
||||||
**Note:** Currently, the version is 0.7.1, so the language and APIs may change before they stabilize.*
|
**Note:** Currently, the version is 0.8.0, so the language and APIs may change before they stabilize.*
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
@ -20,7 +20,7 @@ You can install Rhai using crates by adding this line to your dependences:
|
|||||||
|
|
||||||
```
|
```
|
||||||
[dependencies]
|
[dependencies]
|
||||||
rhai = "0.7.1"
|
rhai = "0.8.0"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Related
|
## Related
|
||||||
@ -96,7 +96,7 @@ Rhai's scripting engine is very lightweight. It gets its ability from the funct
|
|||||||
|
|
||||||
```rust
|
```rust
|
||||||
extern crate rhai;
|
extern crate rhai;
|
||||||
use rhai::{Engine, FnRegister};
|
use rhai::{Engine, RegisterFn};
|
||||||
|
|
||||||
fn add(x: i64, y: i64) -> i64 {
|
fn add(x: i64, y: i64) -> i64 {
|
||||||
x + y
|
x + y
|
||||||
@ -121,7 +121,7 @@ Generic functions can be used in Rhai, but you'll need to register separate inst
|
|||||||
use std::fmt::Display;
|
use std::fmt::Display;
|
||||||
|
|
||||||
extern crate rhai;
|
extern crate rhai;
|
||||||
use rhai::{Engine, FnRegister};
|
use rhai::{Engine, RegisterFn};
|
||||||
|
|
||||||
fn showit<T: Display>(x: &mut T) -> () {
|
fn showit<T: Display>(x: &mut T) -> () {
|
||||||
println!("{}", x)
|
println!("{}", x)
|
||||||
@ -144,7 +144,7 @@ Here's an more complete example of working with Rust. First the example, then w
|
|||||||
|
|
||||||
```rust
|
```rust
|
||||||
extern crate rhai;
|
extern crate rhai;
|
||||||
use rhai::{Engine, FnRegister};
|
use rhai::{Engine, RegisterFn};
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
struct TestStruct {
|
struct TestStruct {
|
||||||
@ -395,7 +395,7 @@ number = -5 - +5;
|
|||||||
let booly = !true;
|
let booly = !true;
|
||||||
```
|
```
|
||||||
|
|
||||||
## Compount assignment operators
|
## Compound assignment operators
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
let number = 5;
|
let number = 5;
|
||||||
|
Loading…
Reference in New Issue
Block a user