Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 94 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ jobs:
- "--features testing-environ,no_closure,serde,metadata,internals,debugging"
- "--features testing-environ,sync,no_time,no_function,no_float,no_position,no_optimize,no_module,no_closure,no_custom_syntax,metadata,serde,unchecked,debugging"
- "--features testing-environ,no_time,no_function,no_float,no_position,no_index,no_object,no_optimize,no_module,no_closure,no_custom_syntax,unchecked"
- "--tests --features testing-environ,f32_float,only_i32,serde,metadata,internals,debugging"
- "--tests --features testing-environ,no_float,only_i32,no_object,no_index,no_module,no_function,sync"
toolchain: [stable]
experimental: [false]
include:
Expand Down Expand Up @@ -104,7 +106,7 @@ jobs:
include:
- {os: ubuntu-latest, flags: "--profile unix", experimental: false}
- {os: windows-latest, flags: "--profile windows", experimental: true}
#- {os: macos-latest, flags: "--profile macos", experimental: false}
- {os: macos-latest, flags: "--profile macos", experimental: false}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -126,8 +128,8 @@ jobs:
matrix:
flags:
- "--target wasm32-wasip1"
# These fail currently, future PR should fix them
# - "--target wasm32-unknown-unknown"
# The `wasm32-unknown-unknown` target is not supported by default as it requires `wasm_js`.
#- "--target wasm32-unknown-unknown"
- "--target wasm32-unknown-unknown --features wasm-bindgen"
- "--target wasm32-unknown-unknown --no-default-features --features std"
- "--target wasm32-unknown-unknown --no-default-features --features std,wasm-bindgen"
Expand Down Expand Up @@ -175,7 +177,7 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all -- -Aclippy::all -Dclippy::perf
args: --all -- -Aclippy::all -Dclippy::perf -Dclippy::correctness -Dclippy::suspicious

codegen_build:
name: Codegen Build
Expand Down Expand Up @@ -203,4 +205,91 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path=codegen/tests/custom_root/Cargo.toml ${{matrix.flags}}
args: --manifest-path=codegen/tests/custom_root/Cargo.toml ${{matrix.flags}}

# Security audit: check dependencies for known CVEs
audit:
name: Security Audit
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v4
- name: Install cargo-audit
run: cargo install cargo-audit --locked
- name: Run cargo audit
run: cargo audit

# Ensure all doc-comments compile cleanly with doc-relevant features
doc:
name: Check Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Build docs
uses: actions-rs/cargo@v1
env:
RUSTDOCFLAGS: "-D warnings"
with:
command: doc
args: --no-deps --features document-features,metadata,serde,internals,decimal,debugging

# 32-bit Linux: catch pointer/size assumptions for embedded targets
cross_32bit:
name: Cross-compile 32-bit Linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
target: i686-unknown-linux-gnu
- name: Install 32-bit libc
run: sudo apt-get update && sudo apt-get install -y gcc-multilib
- name: Build (32-bit)
uses: actions-rs/cargo@v1
with:
command: build
args: --target i686-unknown-linux-gnu --features testing-environ,serde,metadata,internals,debugging

# ARM64 cross-compile: common deployment target for embedded Rhai
cross_arm64:
name: Cross-compile ARM64
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
target: aarch64-unknown-linux-gnu
- name: Install cross-linker
run: sudo apt-get update && sudo apt-get install -y gcc-aarch64-linux-gnu
- name: Build (ARM64)
uses: actions-rs/cargo@v1
env:
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
with:
command: build
args: --target aarch64-unknown-linux-gnu --features testing-environ,serde,metadata,internals,debugging

miri:
name: MIRI
if: false
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
components: miri
- name: Run MIRI
env:
MIRIFLAGS: "-Zmiri-strict-provenance"
run: cargo miri test --features testing-environ -- --test-threads=1
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
Rhai Release Notes
==================

Version 1.25.1
==============

This is a patch release that reverses the change in `1.25.0` that removed certain exports from the
`rhai::plugin` module, which is a breaking change.

The exports are now re-added will only be removed in the next major version.

Thanks to [`@Abendrill`](https://github.com/Abendrill) [`#1099`](https://github.com/rhaiscript/rhai/pull/1099).


Version 1.25.0
==============

Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ members = [".", "codegen", "codegen/tests/custom_root"]

[package]
name = "rhai"
version = "1.25.0"
version = "1.25.1"
rust-version = "1.66.0"
edition = "2018"
resolver = "2"
Expand Down
4 changes: 2 additions & 2 deletions codegen/ui_tests/export_fn_raw_return.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ error[E0599]: `bool` is not an iterator
| ^^^^ `bool` is not an iterator
|
= note: the following trait bounds were not satisfied:
`bool: Iterator`
which is required by `&mut bool: Iterator`
`bool: std::iter::Iterator`
which is required by `&mut bool: std::iter::Iterator`
= note: this error originates in the attribute macro `export_fn` (in Nightly builds, run with -Z macro-backtrace for more info)
4 changes: 2 additions & 2 deletions codegen/ui_tests/export_mod_raw_return.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ error[E0599]: `bool` is not an iterator
| ^^^^ `bool` is not an iterator
|
= note: the following trait bounds were not satisfied:
`bool: Iterator`
which is required by `&mut bool: Iterator`
`bool: std::iter::Iterator`
which is required by `&mut bool: std::iter::Iterator`
= note: this error originates in the attribute macro `export_module` (in Nightly builds, run with -Z macro-backtrace for more info)
2 changes: 1 addition & 1 deletion src/func/call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

#[cfg(not(feature = "no_float"))]
#[cfg(feature = "no_std")]
use num_traits::Float;

Check warning on line 33 in src/func/call.rs

View workflow job for this annotation

GitHub Actions / NoStdBuild (ubuntu-latest, --profile unix, false)

unused import: `num_traits::Float`

Check warning on line 33 in src/func/call.rs

View workflow job for this annotation

GitHub Actions / NoStdBuild (macos-latest, --profile macos, false)

unused import: `num_traits::Float`

Check warning on line 33 in src/func/call.rs

View workflow job for this annotation

GitHub Actions / NoStdBuild (windows-latest, --profile windows, true)

unused import: `num_traits::Float`

/// Arguments to a function call, which is a list of [`&mut Dynamic`][Dynamic].
pub type FnCallArgs<'a> = [&'a mut Dynamic];
Expand Down Expand Up @@ -85,7 +85,7 @@
// We can do this here because, before the end of this scope, we'd restore the original
// reference via `restore_first_arg`. Therefore this shorter lifetime does not leak.
self.orig_mut = Some(mem::replace(&mut args[0], unsafe {
mem::transmute(&mut self.value_copy)
mem::transmute::<&mut Dynamic, &'a mut Dynamic>(&mut self.value_copy)
}));
}
/// This function restores the first argument that was replaced by `change_first_arg_to_copy`.
Expand Down
Loading