Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump MSRV (1.54.0) #252

Merged
merged 4 commits into from
Jan 11, 2022
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
2 changes: 1 addition & 1 deletion 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.48.0"
msrv="1.54.0"

new_func() {
echo
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 @@ -23,7 +23,7 @@ rustup component add rustfmt
rustup component add clippy

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

Expand Down
1 change: 0 additions & 1 deletion src/rust/iced-x86-fzgt/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[package]
name = "iced-x86-fzgt"
version = "0.1.0"
authors = ["iced project and contributors <https://github.com/icedland>"]
license = "MIT"
description = "Test FuzzerGen output"
edition = "2018"
Expand Down
1 change: 0 additions & 1 deletion src/rust/iced-x86-js/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
name = "iced-x86"
# The version number can't be the same as iced-x86's version number or cargo build will fail
version = "1.15.1000"
authors = ["iced project and contributors <https://github.com/icedland>"]
license = "MIT"
description = "iced-x86 is a blazing fast and correct x86/x64 disassembler, assembler and instruction decoder written in Rust and compiled to WebAssembly"
homepage = "https://github.com/icedland/iced"
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.48.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.54.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
1 change: 0 additions & 1 deletion src/rust/iced-x86-py/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[package]
name = "iced-x86-py"
version = "1.15.0"
authors = ["iced project and contributors <https://github.com/icedland>"]
edition = "2018"
publish = false

Expand Down
4 changes: 1 addition & 3 deletions src/rust/iced-x86/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[package]
name = "iced-x86"
version = "1.15.0"
authors = ["iced project and contributors <https://github.com/icedland>"]
edition = "2018"
license = "MIT"
description = "iced-x86 is a blazing fast and correct x86/x64 disassembler, assembler and instruction decoder written in Rust"
Expand Down Expand Up @@ -51,8 +50,7 @@ static_assertions = "1.1.0"
lazy_static = { version = "1.4.0", optional = true }

# if: no_std and serde
# 0.11.0 requires MSRV 1.49.0 but we support 1.48.0
hashbrown = { version = ">=0.9.0, <100.0.0", optional = true }
hashbrown = { version = "0.11.2", optional = true }

# If: serde
[dependencies.serde]
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.48.0+-blue.svg)](#minimum-supported-rustc-version)
[![Minimum rustc version](https://img.shields.io/badge/rustc-1.54.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.48.0` or later
- 👍 Supports `rustc` `1.54.0` or later
- 👍 Few dependencies (`static_assertions` and `lazy_static`)
- 👍 License: MIT

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

## Minimum supported `rustc` version

iced-x86 supports `rustc` `1.48.0` or later.
iced-x86 supports `rustc` `1.54.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.
4 changes: 2 additions & 2 deletions src/rust/iced-x86/src/decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1431,9 +1431,9 @@ impl<'a> Decoder<'a> {
// SAFETY:
// - the instruction has only primitive integer types, nothing needs to be dropped
// - private method: no caller passes in a null ptr, a non-writable ptr or an unaligned ptr
ptr::write(instruction, Instruction::default());
unsafe { ptr::write(instruction, Instruction::default()) };
// SAFETY: private method: the only callers pass in their `&mut arg` or their own stack-allocated `MaybeUninit` instruction
let instruction = &mut *instruction;
let instruction = unsafe { &mut *instruction };

self.state.extra_register_base = 0;
self.state.extra_index_register_base = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/rust/iced-x86/src/formatter/fast/tests/not_fast_fmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ impl SpecializedFormatterTraitOptions for NotFastFormatterTraitOptions {
const ENABLE_SYMBOL_RESOLVER: bool = DefaultFastFormatterTraitOptions::ENABLE_SYMBOL_RESOLVER;
const ENABLE_DB_DW_DD_DQ: bool = DefaultFastFormatterTraitOptions::ENABLE_DB_DW_DD_DQ;
unsafe fn verify_output_has_enough_bytes_left() -> bool {
DefaultFastFormatterTraitOptions::verify_output_has_enough_bytes_left()
unsafe { DefaultFastFormatterTraitOptions::verify_output_has_enough_bytes_left() }
}
fn space_after_operand_separator(options: &FastFormatterOptions) -> bool {
DefaultFastFormatterTraitOptions::space_after_operand_separator(options)
Expand Down
7 changes: 3 additions & 4 deletions src/rust/iced-x86/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
// SPDX-License-Identifier: MIT
// Copyright (C) 2018-present iced project and contributors

// This requires Rust 1.54.0 or later. The double cfg_attr is required so older versions can compile it.
#![cfg_attr(doc, cfg_attr(doc, doc = include_str!("../README.md")))]
#![cfg_attr(not(doc), doc = "Run cargo doc to see the docs (needs Rust 1.54.0 or later)")]
#![doc = include_str!("../README.md")]
#![doc(html_logo_url = "https://raw.githubusercontent.com/icedland/iced/master/logo.png")]
#![allow(unknown_lints)]
#![warn(absolute_paths_not_starting_with_crate)]
#![warn(anonymous_parameters)]
#![warn(elided_lifetimes_in_paths)]
#![warn(explicit_outlives_requirements)]
#![warn(invalid_html_tags)]
#![warn(keyword_idents)]
#![warn(meta_variable_misuse)]
#![warn(missing_copy_implementations)]
Expand All @@ -19,12 +16,14 @@
#![warn(non_ascii_idents)]
#![warn(trivial_casts)]
#![warn(trivial_numeric_casts)]
#![warn(unsafe_op_in_unsafe_fn)]
#![warn(unused_extern_crates)]
#![warn(unused_import_braces)]
#![warn(unused_lifetimes)]
#![warn(unused_must_use)]
#![warn(unused_qualifications)]
#![warn(unused_results)]
#![warn(rustdoc::invalid_html_tags)]
#![allow(clippy::bool_assert_comparison)]
#![allow(clippy::branches_sharing_code)]
#![allow(clippy::cast_lossless)]
Expand Down