Skip to content

Commit

Permalink
Merge pull request #49 from rodrimati1992/0_9_3_patch
Browse files Browse the repository at this point in the history
Added `#[doc(cfg(....))]` attributes. Bumped release to 0.9.3

Fixed documentation badge in readme.
  • Loading branch information
rodrimati1992 authored Jan 9, 2021
2 parents ed2c95d + 9498349 commit 5fc89e5
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 9 deletions.
9 changes: 7 additions & 2 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.9.2"
version = "0.9.3"
authors = ["rodrimati1992 <[email protected]>"]
edition="2018"
license = "MIT/Apache-2.0"
Expand Down Expand Up @@ -48,6 +48,8 @@ nonexhaustive_examples=[]
# https://github.com/rust-lang/rust/pull/80243#event-4161720040
no_fn_promotion = []

docsrs = []

channels=["crossbeam-channel"]


Expand Down Expand Up @@ -80,4 +82,7 @@ fnv = "1.0.7"


[build-dependencies]
rustc_version = "0.2.3"
rustc_version = "0.2.3"

[package.metadata.docs.rs]
features = ["docsrs", "const_params"]
6 changes: 6 additions & 0 deletions abi_stable/src/abi_stability/stable_abi_trait.rs
Original file line number Diff line number Diff line change
Expand Up @@ -842,12 +842,18 @@ where
#[cfg(feature = "const_params")]
macro_rules! impl_stable_abi_array {
()=>{
/// When the "const_params" feature is disabled,
/// this trait is implemented for arrays of up to 32 elements.
#[cfg_attr(feature = "docsrs", doc(cfg(feature = "const_params")))]
unsafe impl<T, const N: usize> GetStaticEquivalent_ for [T; N]
where T:GetStaticEquivalent_
{
type StaticEquivalent=[T::StaticEquivalent; N];
}

/// When the "const_params" feature is disabled,
/// this trait is implemented for arrays of up to 32 elements.
#[cfg_attr(feature = "docsrs", doc(cfg(feature = "const_params")))]
unsafe impl<T, const N: usize> StableAbi for [T; N]
where T:StableAbi
{
Expand Down
8 changes: 2 additions & 6 deletions abi_stable/src/external_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,13 @@ The modules here are named after the crates whose types are being wrapped.
*/

#[cfg(feature="crossbeam-channel")]
#[cfg_attr(feature = "docsrs", doc(cfg(feature = "channels")))]
pub mod crossbeam_channel;

#[cfg(not(feature="crossbeam-channel"))]
/// This is disabled,
/// enable the "channels" feature to get ffi-safe wrappers for crossbeam channels.
pub mod crossbeam_channel{}


pub mod parking_lot;

#[cfg(feature="serde_json")]
#[cfg_attr(feature = "docsrs", doc(cfg(feature = "serde_json")))]
pub mod serde_json;


Expand Down
2 changes: 2 additions & 0 deletions abi_stable/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ https://github.com/rodrimati1992/abi_stable_crates/blob/master/readme.md#readme_
feature(min_const_generics)
)]

#![cfg_attr(feature = "docsrs", feature(doc_cfg))]

#[allow(unused_imports)]
#[cfg(test)]
use abi_stable_shared::file_span;
Expand Down
3 changes: 2 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
[![Build Status](https://travis-ci.org/rodrimati1992/abi_stable_crates.svg?branch=master)](https://travis-ci.org/rodrimati1992/abi_stable_crates) [![Join the chat at https://gitter.im/abi_stable_crates/community](https://badges.gitter.im/abi_stable_crates/community.svg)](https://gitter.im/abi_stable_crates/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![](https://img.shields.io/crates/v/abi_stable.svg)][crates-io]
[![api-docs](https://docs.rs/abi_stable/badge.svg)][Documentation]

[crates-io]: https://crates.io/crates/abi_stable

[Documentation.](https://docs.rs/abi_stable)
[Documentation]: https://docs.rs/abi_stable

For Rust-to-Rust ffi,
with a focus on creating libraries loaded at program startup,
Expand Down

0 comments on commit 5fc89e5

Please sign in to comment.