Skip to content

Commit

Permalink
Switch to stable
Browse files Browse the repository at this point in the history
  • Loading branch information
Emik03 committed Feb 21, 2023
1 parent 2fa5fbd commit f3209d6
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 18 deletions.
14 changes: 8 additions & 6 deletions Rust/rhainterop/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,19 @@ authors = ["emik"]

[dependencies]
decimal = "2.1.0"
rhai = { version = "1.10.1", features = ["bin-features", "core-error", "debugging", "decimal", "hashbrown", "internals", "libm", "metadata", "rustyline", "serde", "serde_json"] }
rhai_codegen = { version = "1.4.2", features = ["metadata"] }
#rhai-doc = "0.2.3"
rhai-dylib = "0.1.0"
rhai-fs = { version = "0.0.1", features = ["metadata"] }
rhai = { version = "1.12.0", features = ["bin-features", "core-error", "debugging", "decimal", "hashbrown", "internals", "libm", "metadata", "rustyline", "serde", "serde_json"] }
rhai-autodocs = "0.1.0"
rhai_codegen = { version = "1.5.0", features = ["metadata"] }
rhai-doc = "0.2.4"
rhai-dylib = "0.1.4"
rhai-fs = { version = "0.1.2", features = ["metadata"] }
rhai-url = "0.0.1"
#rhai-memflow = "0.1.2"
rhai-rand = { version = "0.1.4", features = ["array", "float", "decimal", "metadata", "rust_decimal"] }
rhai-sci = { version = "0.1.7", features = ["csv-sniffer", "io", "metadata", "minreq", "polars", "temp-file", "url"] }
rmp = "0.8.11"
rmp-serde = "1.1.1"
serde = { version = "1.0.145", features = ["derive"] }
serde = { version = "1.0.152", features = ["derive"] }

[lib]
crate-type = ["cdylib"]
2 changes: 1 addition & 1 deletion Rust/rhainterop/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
rustup target add --toolchain nightly aarch64-unknown-linux-gnu i686-pc-windows-gnu i686-pc-windows-msvc i686-unknown-linux-gnu x86_64-apple-darwin x86_64-pc-windows-gnu x86_64-pc-windows-msvc x86_64-unknown-linux-gnu
rustup target add --toolchain stable aarch64-unknown-linux-gnu i686-pc-windows-gnu i686-pc-windows-msvc i686-unknown-linux-gnu x86_64-apple-darwin x86_64-pc-windows-gnu x86_64-pc-windows-msvc x86_64-unknown-linux-gnu
cargo build --target=aarch64-unknown-linux-gnu --release
cargo build --target=i686-pc-windows-gnu --release
cargo build --target=i686-pc-windows-msvc --release
Expand Down
22 changes: 11 additions & 11 deletions Rust/rhainterop/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ use std::collections::HashMap;
use std::num::Wrapping;
use std::sync::Mutex;

use rhai::{AST, Engine};
use rhai::plugin::RhaiResult;
use rhai::{Engine, AST};
use rmp_serde::Serializer;
use serde::Serialize;

Expand Down Expand Up @@ -57,9 +57,9 @@ pub extern "C" fn eval_file(raw: Raw) -> bool {
}

fn run<S, T, P>(src: S, buf: &'static mut [u8], fun: T) -> bool
where
T: FnOnce(&Engine, P) -> RhaiResult,
S: Into<P>,
where
T: FnOnce(&Engine, P) -> RhaiResult,
S: Into<P>,
{
engine(|e| {
let src = src.into();
Expand All @@ -69,9 +69,9 @@ where
}

fn write<E, T>(buf: &'static mut [u8], res: Result<T, E>) -> bool
where
E: ToString,
T: Serialize,
where
E: ToString,
T: Serialize,
{
let serializer = &mut Serializer::new(buf);
let ok = res.is_ok();
Expand All @@ -85,10 +85,10 @@ where
}

fn save<E, F, P>(src: &'static str, buf: &'static mut [u8], fun: F) -> u64
where
E: ToString,
F: FnOnce(&Engine, P) -> ASTResult<E>,
P: From<&'static str>,
where
E: ToString,
F: FnOnce(&Engine, P) -> ASTResult<E>,
P: From<&'static str>,
{
with(|a, e, i| {
let src = src.into();
Expand Down

0 comments on commit f3209d6

Please sign in to comment.