Skip to content

Commit

Permalink
Merge pull request #580 from icedland/updates-2024-07-02
Browse files Browse the repository at this point in the history
Update deps
  • Loading branch information
wtfsck authored Jul 2, 2024
2 parents bd4080b + 03f54e2 commit 0dc2733
Show file tree
Hide file tree
Showing 29 changed files with 100 additions and 104 deletions.
4 changes: 2 additions & 2 deletions build/build-rust
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ cov_out_rust_tmp=$cov_out_rust/tmp
cov_out_rust_merged=$cov_out_rust/merged

# Minimum supported Rust version
msrv="1.60.0"
msrv="1.63.0"

new_func() {
echo
Expand Down Expand Up @@ -195,7 +195,7 @@ cargo_test_cov() {
cov_test_dir=$1
shift
if [ "$gen_cov" = "y" ]; then
test_exe=$(cargo test --color always --no-run --message-format=json "$@" | grep -- '"name":"iced-x86"' | tail -1 | sed -e 's/.*"executable":"\([^"]\+\)".*/\1/')
test_exe=$(cargo test --color always --no-run --message-format=json "$@" | grep -- 'iced/src/rust/iced-x86' | tail -1 | sed -e 's/.*"executable":"\([^"]\+\)".*/\1/')
if [ ! -x "$test_exe" ]; then
echo "Couldn't get the test executable name, got '$test_exe'"
echo "json output:"
Expand Down
2 changes: 1 addition & 1 deletion build/ci-install-rust.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if [[ "$OSTYPE" = "darwin"* ]]; then
fi

# It fails on Windows so disable auto self update
rustup toolchain install 1.60.0 --no-self-update
rustup toolchain install 1.63.0 --no-self-update
rustup target add wasm32-unknown-unknown
rustup update --no-self-update

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ static bool IsNormalEnum(EnumType enumType) {
}
writer.WriteLine("}");
writer.WriteLine($"assert!(<{enumTypeName} as TryFrom<{tryFromType}>>::try_from({icedConstValue}{castToFromType}).is_err());");
writer.WriteLine($"assert!(<{enumTypeName} as TryFrom<{tryFromType}>>::try_from(core::{tryFromType}::MAX).is_err());");
writer.WriteLine($"assert!(<{enumTypeName} as TryFrom<{tryFromType}>>::try_from({tryFromType}::MAX).is_err());");
}
writer.WriteLine("}");
}
Expand Down
8 changes: 4 additions & 4 deletions src/java/iced-x86/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.3.2</version>
<version>3.4.0</version>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
Expand All @@ -82,11 +82,11 @@
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.2.5</version>
<version>3.3.0</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.4.1</version>
<version>3.4.2</version>
<configuration>
<archive>
<manifest>
Expand Down Expand Up @@ -114,7 +114,7 @@
</plugin>
<plugin>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.5.0</version>
<version>3.6.1</version>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion src/rust/iced-x86-fzgt/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ license = "MIT"
description = "Test FuzzerGen output"
edition = "2021"
publish = false
rust-version = "1.60.0"
rust-version = "1.63.0"

[dependencies.iced-x86]
path = "../iced-x86"
Expand Down
2 changes: 1 addition & 1 deletion src/rust/iced-x86-js/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ keywords = ["disassembler", "javascript", "assembler", "x86", "amd64"]
categories = ["wasm", "development-tools::debugging", "encoding", "hardware-support"]
edition = "2021"
publish = false
rust-version = "1.60.0"
rust-version = "1.63.0"

[lib]
# Adding "rlib" increases the wasm file size, so ... don't do it
Expand Down
2 changes: 1 addition & 1 deletion src/rust/iced-x86-js/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
iced-x86 JavaScript bindings (Rust -> WebAssembly) [![npm](https://img.shields.io/npm/v/iced-x86.svg)](https://www.npmjs.com/package/iced-x86) [![GitHub builds](https://github.com/icedland/iced/workflows/GitHub%20CI/badge.svg)](https://github.com/icedland/iced/actions) ![Minimum rustc version](https://img.shields.io/badge/rustc-1.60.0+-blue.svg) ![License](https://img.shields.io/crates/l/iced-x86.svg)
iced-x86 JavaScript bindings (Rust -> WebAssembly) [![npm](https://img.shields.io/npm/v/iced-x86.svg)](https://www.npmjs.com/package/iced-x86) [![GitHub builds](https://github.com/icedland/iced/workflows/GitHub%20CI/badge.svg)](https://github.com/icedland/iced/actions) ![Minimum rustc version](https://img.shields.io/badge/rustc-1.63.0+-blue.svg) ![License](https://img.shields.io/crates/l/iced-x86.svg)

iced-x86 is a blazing fast and correct x86 (16/32/64-bit) disassembler for JavaScript (WebAssembly).

Expand Down
2 changes: 1 addition & 1 deletion src/rust/iced-x86-lua/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "iced-x86-lua"
version = "1.21.0"
edition = "2021"
publish = false
rust-version = "1.60.0"
rust-version = "1.63.0"

[lib]
name = "iced_x86"
Expand Down
4 changes: 2 additions & 2 deletions src/rust/iced-x86-py/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "iced-x86-py"
version = "1.21.0"
edition = "2021"
publish = false
rust-version = "1.60.0"
rust-version = "1.63.0"

[lib]
name = "_iced_x86_py"
Expand All @@ -13,7 +13,7 @@ crate-type = ["cdylib"]
bincode = "1.3.3"

[dependencies.pyo3]
version = "0.21.0"
version = "0.22.0"
default-features = false
features = ["macros", "extension-module", "abi3-py38"]

Expand Down
2 changes: 1 addition & 1 deletion src/rust/iced-x86-py/build-wheels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ while [ "$#" -gt 0 ]; do
done

# Build with minimum supported Rust version since later versions require a later GLIBC
msrv="1.60.0"
msrv="1.63.0"
curl https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain=$msrv
export PATH="$HOME/.cargo/bin:$PATH"

Expand Down
6 changes: 3 additions & 3 deletions src/rust/iced-x86-py/src/instruction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,13 @@ impl Instruction {
/// Args:
/// state (Any): unpickled state
#[pyo3(text_signature = "($self, state)")]
fn __setstate__(&mut self, py: Python<'_>, state: PyObject) -> PyResult<()> {
match state.extract::<&PyBytes>(py) {
fn __setstate__(&mut self, state: &Bound<'_, PyAny>) -> PyResult<()> {
match state.downcast::<PyBytes>() {
Ok(s) => {
self.instr = deserialize(s.as_bytes()).map_err(to_value_error)?;
Ok(())
}
Err(e) => Err(e),
Err(e) => Err(to_value_error(e)),
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/rust/iced-x86/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ keywords = ["disassembler", "assembler", "x86", "amd64", "x86_64"]
categories = ["no-std", "development-tools::debugging", "encoding", "hardware-support", "wasm"]
# Don't include the tests when uploading to crates.io
exclude = ["/src/**/test/", "/src/**/tests/", "/src/**/test_utils/"]
rust-version = "1.60.0"
rust-version = "1.63.0"

# These features are documented in README.md / lib.rs
[features]
Expand Down
6 changes: 3 additions & 3 deletions src/rust/iced-x86/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
iced-x86
[![Latest version](https://img.shields.io/crates/v/iced-x86.svg)](https://crates.io/crates/iced-x86)
[![Documentation](https://docs.rs/iced-x86/badge.svg)](https://docs.rs/iced-x86)
[![Minimum rustc version](https://img.shields.io/badge/rustc-1.60.0+-blue.svg)](#minimum-supported-rustc-version)
[![Minimum rustc version](https://img.shields.io/badge/rustc-1.63.0+-blue.svg)](#minimum-supported-rustc-version)
![License](https://img.shields.io/crates/l/iced-x86.svg)

iced-x86 is a blazing fast and correct x86 (16/32/64-bit) instruction decoder, disassembler and assembler written in Rust.
Expand All @@ -16,7 +16,7 @@ iced-x86 is a blazing fast and correct x86 (16/32/64-bit) instruction decoder, d
- 👍 The encoder can be used to re-encode decoded instructions at any address
- 👍 API to get instruction info, eg. read/written registers, memory and rflags bits; CPUID feature flag, control flow info, etc
- 👍 Supports `#![no_std]` and `WebAssembly`
- 👍 Supports `rustc` `1.60.0` or later
- 👍 Supports `rustc` `1.63.0` or later
- 👍 Few dependencies (`lazy_static`)
- 👍 License: MIT

Expand Down Expand Up @@ -1280,7 +1280,7 @@ Output:

## Minimum supported `rustc` version

iced-x86 supports `rustc` `1.60.0` or later.
iced-x86 supports `rustc` `1.63.0` or later.
This is checked in CI builds where the minimum supported version and the latest stable version are used to build the source code and run tests.

Bumping the minimum supported version of `rustc` is considered a minor breaking change. The minor version of iced-x86 will be incremented.
2 changes: 1 addition & 1 deletion src/rust/iced-x86/src/block_enc/enums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ fn test_relockind_try_from_usize() {
assert_eq!(converted, value);
}
assert!(<RelocKind as TryFrom<usize>>::try_from(IcedConstants::RELOC_KIND_ENUM_COUNT).is_err());
assert!(<RelocKind as TryFrom<usize>>::try_from(core::usize::MAX).is_err());
assert!(<RelocKind as TryFrom<usize>>::try_from(usize::MAX).is_err());
}
#[cfg(feature = "serde")]
#[rustfmt::skip]
Expand Down
2 changes: 1 addition & 1 deletion src/rust/iced-x86/src/code.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44476,7 +44476,7 @@ fn test_code_try_from_usize() {
assert_eq!(converted, value);
}
assert!(<Code as TryFrom<usize>>::try_from(IcedConstants::CODE_ENUM_COUNT).is_err());
assert!(<Code as TryFrom<usize>>::try_from(core::usize::MAX).is_err());
assert!(<Code as TryFrom<usize>>::try_from(usize::MAX).is_err());
}
#[cfg(feature = "serde")]
#[rustfmt::skip]
Expand Down
10 changes: 3 additions & 7 deletions src/rust/iced-x86/src/decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ fn test_decodererror_try_from_usize() {
assert_eq!(converted, value);
}
assert!(<DecoderError as TryFrom<usize>>::try_from(IcedConstants::DECODER_ERROR_ENUM_COUNT).is_err());
assert!(<DecoderError as TryFrom<usize>>::try_from(core::usize::MAX).is_err());
assert!(<DecoderError as TryFrom<usize>>::try_from(usize::MAX).is_err());
}
#[cfg(feature = "serde")]
#[rustfmt::skip]
Expand Down Expand Up @@ -426,18 +426,14 @@ impl StateFlags {
// It could fit in a `u8` but then it wouldn't be cleared at the same time as the other fields since the
// compiler would move other `u32` fields above it to align the fields.
#[repr(u32)]
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
#[derive(Default, Debug, Copy, Clone, Eq, PartialEq)]
enum DecoderMandatoryPrefix {
#[default]
PNP = 0,
P66 = 1,
PF3 = 2,
PF2 = 3,
}
impl Default for DecoderMandatoryPrefix {
fn default() -> Self {
DecoderMandatoryPrefix::PNP
}
}

#[derive(Default)]
#[allow(dead_code)]
Expand Down
2 changes: 1 addition & 1 deletion src/rust/iced-x86/src/encoder/enums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,7 @@ fn test_repprefixkind_try_from_usize() {
assert_eq!(converted, value);
}
assert!(<RepPrefixKind as TryFrom<usize>>::try_from(IcedConstants::REP_PREFIX_KIND_ENUM_COUNT).is_err());
assert!(<RepPrefixKind as TryFrom<usize>>::try_from(core::usize::MAX).is_err());
assert!(<RepPrefixKind as TryFrom<usize>>::try_from(usize::MAX).is_err());
}
#[cfg(feature = "serde")]
#[rustfmt::skip]
Expand Down
34 changes: 17 additions & 17 deletions src/rust/iced-x86/src/enums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ fn test_codesize_try_from_usize() {
assert_eq!(converted, value);
}
assert!(<CodeSize as TryFrom<usize>>::try_from(IcedConstants::CODE_SIZE_ENUM_COUNT).is_err());
assert!(<CodeSize as TryFrom<usize>>::try_from(core::usize::MAX).is_err());
assert!(<CodeSize as TryFrom<usize>>::try_from(usize::MAX).is_err());
}
#[cfg(feature = "serde")]
#[rustfmt::skip]
Expand Down Expand Up @@ -239,7 +239,7 @@ fn test_roundingcontrol_try_from_usize() {
assert_eq!(converted, value);
}
assert!(<RoundingControl as TryFrom<usize>>::try_from(IcedConstants::ROUNDING_CONTROL_ENUM_COUNT).is_err());
assert!(<RoundingControl as TryFrom<usize>>::try_from(core::usize::MAX).is_err());
assert!(<RoundingControl as TryFrom<usize>>::try_from(usize::MAX).is_err());
}
#[cfg(feature = "serde")]
#[rustfmt::skip]
Expand Down Expand Up @@ -526,7 +526,7 @@ fn test_opkind_try_from_usize() {
assert_eq!(converted, value);
}
assert!(<OpKind as TryFrom<usize>>::try_from(IcedConstants::OP_KIND_ENUM_COUNT).is_err());
assert!(<OpKind as TryFrom<usize>>::try_from(core::usize::MAX).is_err());
assert!(<OpKind as TryFrom<usize>>::try_from(usize::MAX).is_err());
}
#[cfg(feature = "serde")]
#[rustfmt::skip]
Expand Down Expand Up @@ -757,7 +757,7 @@ fn test_encodingkind_try_from_usize() {
assert_eq!(converted, value);
}
assert!(<EncodingKind as TryFrom<usize>>::try_from(IcedConstants::ENCODING_KIND_ENUM_COUNT).is_err());
assert!(<EncodingKind as TryFrom<usize>>::try_from(core::usize::MAX).is_err());
assert!(<EncodingKind as TryFrom<usize>>::try_from(usize::MAX).is_err());
}
#[cfg(feature = "serde")]
#[cfg(any(feature = "decoder", feature = "encoder", feature = "instr_info", feature = "op_code_info"))]
Expand Down Expand Up @@ -956,7 +956,7 @@ fn test_tupletype_try_from_usize() {
assert_eq!(converted, value);
}
assert!(<TupleType as TryFrom<usize>>::try_from(IcedConstants::TUPLE_TYPE_ENUM_COUNT).is_err());
assert!(<TupleType as TryFrom<usize>>::try_from(core::usize::MAX).is_err());
assert!(<TupleType as TryFrom<usize>>::try_from(usize::MAX).is_err());
}
#[cfg(feature = "serde")]
#[cfg(any(feature = "decoder", feature = "encoder", feature = "op_code_info"))]
Expand Down Expand Up @@ -1128,7 +1128,7 @@ fn test_flowcontrol_try_from_usize() {
assert_eq!(converted, value);
}
assert!(<FlowControl as TryFrom<usize>>::try_from(IcedConstants::FLOW_CONTROL_ENUM_COUNT).is_err());
assert!(<FlowControl as TryFrom<usize>>::try_from(core::usize::MAX).is_err());
assert!(<FlowControl as TryFrom<usize>>::try_from(usize::MAX).is_err());
}
#[cfg(feature = "serde")]
#[cfg(feature = "instr_info")]
Expand Down Expand Up @@ -1605,7 +1605,7 @@ fn test_opcodeoperandkind_try_from_usize() {
assert_eq!(converted, value);
}
assert!(<OpCodeOperandKind as TryFrom<usize>>::try_from(IcedConstants::OP_CODE_OPERAND_KIND_ENUM_COUNT).is_err());
assert!(<OpCodeOperandKind as TryFrom<usize>>::try_from(core::usize::MAX).is_err());
assert!(<OpCodeOperandKind as TryFrom<usize>>::try_from(usize::MAX).is_err());
}
#[cfg(feature = "serde")]
#[cfg(all(feature = "encoder", feature = "op_code_info"))]
Expand Down Expand Up @@ -1756,7 +1756,7 @@ fn test_mvexehbit_try_from_usize() {
assert_eq!(converted, value);
}
assert!(<MvexEHBit as TryFrom<usize>>::try_from(IcedConstants::MVEX_EHBIT_ENUM_COUNT).is_err());
assert!(<MvexEHBit as TryFrom<usize>>::try_from(core::usize::MAX).is_err());
assert!(<MvexEHBit as TryFrom<usize>>::try_from(usize::MAX).is_err());
}
#[cfg(feature = "serde")]
#[cfg(feature = "mvex")]
Expand Down Expand Up @@ -2471,7 +2471,7 @@ fn test_cpuidfeature_try_from_usize() {
assert_eq!(converted, value);
}
assert!(<CpuidFeature as TryFrom<usize>>::try_from(IcedConstants::CPUID_FEATURE_ENUM_COUNT).is_err());
assert!(<CpuidFeature as TryFrom<usize>>::try_from(core::usize::MAX).is_err());
assert!(<CpuidFeature as TryFrom<usize>>::try_from(usize::MAX).is_err());
}
#[cfg(feature = "serde")]
#[cfg(feature = "instr_info")]
Expand Down Expand Up @@ -2677,7 +2677,7 @@ fn test_opaccess_try_from_usize() {
assert_eq!(converted, value);
}
assert!(<OpAccess as TryFrom<usize>>::try_from(IcedConstants::OP_ACCESS_ENUM_COUNT).is_err());
assert!(<OpAccess as TryFrom<usize>>::try_from(core::usize::MAX).is_err());
assert!(<OpAccess as TryFrom<usize>>::try_from(usize::MAX).is_err());
}
#[cfg(feature = "serde")]
#[cfg(feature = "instr_info")]
Expand Down Expand Up @@ -2869,7 +2869,7 @@ fn test_conditioncode_try_from_usize() {
assert_eq!(converted, value);
}
assert!(<ConditionCode as TryFrom<usize>>::try_from(IcedConstants::CONDITION_CODE_ENUM_COUNT).is_err());
assert!(<ConditionCode as TryFrom<usize>>::try_from(core::usize::MAX).is_err());
assert!(<ConditionCode as TryFrom<usize>>::try_from(usize::MAX).is_err());
}
#[cfg(feature = "serde")]
#[cfg(feature = "instr_info")]
Expand Down Expand Up @@ -3024,7 +3024,7 @@ fn test_mandatoryprefix_try_from_usize() {
assert_eq!(converted, value);
}
assert!(<MandatoryPrefix as TryFrom<usize>>::try_from(IcedConstants::MANDATORY_PREFIX_ENUM_COUNT).is_err());
assert!(<MandatoryPrefix as TryFrom<usize>>::try_from(core::usize::MAX).is_err());
assert!(<MandatoryPrefix as TryFrom<usize>>::try_from(usize::MAX).is_err());
}
#[cfg(feature = "serde")]
#[cfg(all(feature = "encoder", feature = "op_code_info"))]
Expand Down Expand Up @@ -3192,7 +3192,7 @@ fn test_opcodetablekind_try_from_usize() {
assert_eq!(converted, value);
}
assert!(<OpCodeTableKind as TryFrom<usize>>::try_from(IcedConstants::OP_CODE_TABLE_KIND_ENUM_COUNT).is_err());
assert!(<OpCodeTableKind as TryFrom<usize>>::try_from(core::usize::MAX).is_err());
assert!(<OpCodeTableKind as TryFrom<usize>>::try_from(usize::MAX).is_err());
}
#[cfg(feature = "serde")]
#[cfg(all(feature = "encoder", feature = "op_code_info"))]
Expand Down Expand Up @@ -3333,7 +3333,7 @@ fn test_instrscale_try_from_usize() {
assert_eq!(converted, value);
}
assert!(<InstrScale as TryFrom<usize>>::try_from(4).is_err());
assert!(<InstrScale as TryFrom<usize>>::try_from(core::usize::MAX).is_err());
assert!(<InstrScale as TryFrom<usize>>::try_from(usize::MAX).is_err());
}
#[cfg(feature = "serde")]
#[rustfmt::skip]
Expand Down Expand Up @@ -3513,7 +3513,7 @@ fn test_mvexconvfn_try_from_usize() {
assert_eq!(converted, value);
}
assert!(<MvexConvFn as TryFrom<usize>>::try_from(IcedConstants::MVEX_CONV_FN_ENUM_COUNT).is_err());
assert!(<MvexConvFn as TryFrom<usize>>::try_from(core::usize::MAX).is_err());
assert!(<MvexConvFn as TryFrom<usize>>::try_from(usize::MAX).is_err());
}
#[cfg(feature = "serde")]
#[cfg(feature = "mvex")]
Expand Down Expand Up @@ -3706,7 +3706,7 @@ fn test_mvexregmemconv_try_from_usize() {
assert_eq!(converted, value);
}
assert!(<MvexRegMemConv as TryFrom<usize>>::try_from(IcedConstants::MVEX_REG_MEM_CONV_ENUM_COUNT).is_err());
assert!(<MvexRegMemConv as TryFrom<usize>>::try_from(core::usize::MAX).is_err());
assert!(<MvexRegMemConv as TryFrom<usize>>::try_from(usize::MAX).is_err());
}
#[cfg(feature = "serde")]
#[cfg(feature = "mvex")]
Expand Down Expand Up @@ -3890,7 +3890,7 @@ fn test_mvextupletypelutkind_try_from_usize() {
assert_eq!(converted, value);
}
assert!(<MvexTupleTypeLutKind as TryFrom<usize>>::try_from(IcedConstants::MVEX_TUPLE_TYPE_LUT_KIND_ENUM_COUNT).is_err());
assert!(<MvexTupleTypeLutKind as TryFrom<usize>>::try_from(core::usize::MAX).is_err());
assert!(<MvexTupleTypeLutKind as TryFrom<usize>>::try_from(usize::MAX).is_err());
}
#[cfg(feature = "serde")]
#[cfg(feature = "mvex")]
Expand Down
Loading

0 comments on commit 0dc2733

Please sign in to comment.