Skip to content

Commit

Permalink
Merge pull request #63 from rodrimati1992/0_10_patch
Browse files Browse the repository at this point in the history
0.10.3 patch release
  • Loading branch information
rodrimati1992 authored Oct 29, 2021
2 parents 3cc100c + ec2638d commit dae5ba3
Show file tree
Hide file tree
Showing 291 changed files with 29,905 additions and 33,577 deletions.
33 changes: 31 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,39 @@ jobs:
strategy:
max-parallel: 2
matrix:
rust: [stable, beta, nightly, 1.41.0]
rust: [nightly]
os: [ubuntu-latest, windows-latest, macOS-latest]
include:
- rust: stable
os: ubuntu-latest

- rust: beta
os: ubuntu-latest

- rust: 1.46.0
os: ubuntu-latest

- rust: 1.51.0
os: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: ci-format
if: matrix.rust == 'stable'
run: |
rustup override set ${{ matrix.rust }}
rustup component add rustfmt
cd "${{github.workspace}}/"
cargo fmt -- --check
- name: enable-rust-stable
if: matrix.rust == '1.51.0'
run: echo "rustv=rust_1_51" >> $GITHUB_ENV

- name: enable-rust-stable
if: matrix.rust == 'stable' || matrix.rust == 'beta' || matrix.rust == 'nightly'
run: echo "rustv=rust_latest_stable" >> $GITHUB_ENV

- uses: actions/checkout@v2
- name: ci-all-versions
run: |
Expand Down Expand Up @@ -79,7 +108,7 @@ jobs:
cargo test
cd "${{github.workspace}}/abi_stable"
cargo test --features "testing"
cargo test --features "${{ env.rustv }} testing"
cd "${{github.workspace}}/examples/0_modules_and_interface_types/impl/"
cargo test
Expand Down
65 changes: 64 additions & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,70 @@
This is the changelog,summarising changes in each version(some minor changes may be ommited).
This is the changelog,summarising changes in each version

Minor changes may be ommited, as well as improvements to documentation.

# 0.10

### 0.10.3


Bumped Minimum Supported Rust Version to 1.46.0 because fixing support for Rust nightly caused Internal Compiler Errors in older Rust versions.

Added `StableAbi` impls for `f32` and `f64`.

Fixed error in `StableAbi` derive caused by using the derive inside a function with the `proc_macro_derive_resolution_fallback` lint enabled (deny-by-default in nightly).

Deprecated `abi_stable::library::mangled_root_module_loader_name` function.

Superceeded the `mangled_root_module_loader_name` function (and uses of it) with these `abi_stable::library` constants:
- `ROOT_MODULE_LOADER_NAME`
- `ROOT_MODULE_LOADER_NAME_WITH_NUL`
- `ROOT_MODULE_LOADER_NAME_NULSTR`

Added `NulStr::{as_ptr, try_from_str}` associated functions.

Added `ǸulStrError`, returned by `NulStr::try_from_str`

Added `PartialEq` impls for comparing `str` and `NulStr` in both directions.

Added Default, PartialOrd, and Ord impls for NulStr.

Made `NulStr::from_str` safe, by not requiring no internal nul bytes.

Deprecated `nul_str` macro.

Added `nulstr` and `nulstr_trunc` macros.

Added "rust_latest_stable" feature.

Added `LibHeader::ensure_layout` method.

Fixed `StaticRef::as_prefix` doc example.

Added `for_examples::PhantModule` struct

Added `RHashMap::{keys, values}` methods for iterating over the map, which return the `Keys` and `Values` iterators respectively.

Added `Index` and `IndexMut` impls for `RSliceMut` and `RVec`

Added `Index` impl for `RSlice`

Changed these methods to use `R: RangeBounds<usize>` instead of `[T]: Index<I, Output = [T]>` or `Index<I, Output = [T]>`:
- `RVec::slice`
- `RVec::slice_mut`
- `RVec::drain`

Replaced all `Into` implementations converting from `abi_stable` types with `From` impls converting in the same direction.

Rewrote `staticref` macro to support more cases of static promotion, this breaks non-inherent-impl uses of the macro(it was documented that this breaking change could happen).

Made libraries loaded with `RootModule` never be unloaded, previously they were unloaded when the type layout of the root module isn't compatible (this was possibly unsound?).

Formatted documentation examples (all doc examples up to `sabi_types` were formatted with `rustfmt`, every one from `std_types` up to the last module were manually formatted).

Added dependency on `paste` 1.0

Enabled the "macro_utils" feature of `core_extensions`

### 0.10.1

Fixed support for building in ARM, from this pull request: https://github.com/rodrimati1992/abi_stable_crates/pull/50
Expand Down
16 changes: 11 additions & 5 deletions abi_stable/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "abi_stable"
version = "0.10.2"
version = "0.10.3"
authors = ["rodrimati1992 <[email protected]>"]
edition="2018"
license = "MIT/Apache-2.0"
Expand All @@ -26,9 +26,13 @@ default = ["channels","serde_json"]

rust_1_42=[]

rust_1_51=["rust_1_42", "const_params"]
rust_1_46=["rust_1_42"]

const_params=["rust_1_42"]
rust_1_51=["rust_1_46", "const_params"]

rust_latest_stable = ["rust_1_51"]

const_params=["rust_1_46"]

# Enables the `#![feature(min_const_generics)]` attribute in
nightly_const_params=["const_params"]
Expand All @@ -52,8 +56,8 @@ channels=["crossbeam-channel"]


[dependencies]
abi_stable_derive= {version="0.10.2",path="../abi_stable_derive"}
abi_stable_shared= {version="0.10.2",path="../abi_stable_shared"}
abi_stable_derive= {version="0.10.3",path="../abi_stable_derive"}
abi_stable_shared= {version="0.10.3",path="../abi_stable_shared"}
serde = { version = "1.0.127", features = ["derive"] }
repr_offset = { version = "0.2.1", default_features = false }
serde_derive = "1.0.127"
Expand All @@ -63,12 +67,14 @@ lock_api = "0.4.4"
generational-arena = "0.2.8"
crossbeam-channel = { version = "0.5.1", optional = true }
serde_json = { version = "1.0.66", features = ["raw_value"], optional = true }
paste = "1.0"

[dependencies.core_extensions]
default_features=false
features=[
"std",
"iterators",
"macro_utils",
"self_ops",
"type_asserts", "type_identity", "type_level_bool",
"void",
Expand Down
7 changes: 3 additions & 4 deletions abi_stable/build.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
use rustc_version::Channel;
// keeping the build.rs just in case that I want to detect
// newer language versions for soundness fixes that require them.

fn main() {
println!("cargo:rerun-if-changed=build.rs");
println!("cargo:rerun-if-changed=../readme.md");

let channel=rustc_version::version_meta().unwrap().channel;

let _channel = rustc_version::version_meta().unwrap().channel;
}
2 changes: 0 additions & 2 deletions abi_stable/rustfmt.toml

This file was deleted.

4 changes: 1 addition & 3 deletions abi_stable/src/_immovable_wrapper.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
Wrapper type to prevent moving the referent of a pointer out.
*/
//! Wrapper type to prevent moving the referent of a pointer out.
use std::{
fmt,
Expand Down
14 changes: 5 additions & 9 deletions abi_stable/src/abi_stability.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/*!
types and traits related to abi stability.
*/
//! types and traits related to abi stability.
#[doc(hidden)]
pub mod abi_checking;
Expand All @@ -11,12 +9,10 @@ pub mod stable_abi_trait;

pub use self::{
abi_checking::exported_check_layout_compatibility as check_layout_compatibility,
const_generics::{ConstGeneric,ConstGenericVTableFor},
get_static_equivalent::{GetStaticEquivalent_,GetStaticEquivalent},
stable_abi_trait::{StableAbi,PrefixStableAbi,AbiConsts,TypeLayoutCtor,GetTypeLayoutCtor},
const_generics::{ConstGeneric, ConstGenericVTableFor},
get_static_equivalent::{GetStaticEquivalent, GetStaticEquivalent_},
stable_abi_trait::{AbiConsts, GetTypeLayoutCtor, PrefixStableAbi, StableAbi, TypeLayoutCtor},
};

#[doc(no_inline)]
pub use self::{
extra_checks::{TypeChecker,ExtraChecks},
};
pub use self::extra_checks::{ExtraChecks, TypeChecker};
Loading

0 comments on commit dae5ba3

Please sign in to comment.