23: Rename to aeron-driver-sys, update to 1.25.0 release r=bspeice a=bspeice

If this goes well, going to go ahead and release the aeron-driver-sys crate, no reason to hold that back.

Co-authored-by: Bradlee Speice <bradlee@speice.io>
pull/24/head
bors[bot] 2020-01-13 02:20:18 +00:00 committed by GitHub
commit 871556edd1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 35 additions and 31 deletions

6
.gitmodules vendored
View File

@ -1,3 +1,3 @@
[submodule "aeron_driver-sys/aeron"]
path = aeron_driver-sys/aeron
url = https://github.com/real-logic/aeron
[submodule "aeron-driver-sys/aeron"]
path = aeron-driver-sys/aeron
url = https://github.com/real-logic/aeron.git

View File

@ -1,33 +1,38 @@
language: rust
rust:
- stable
os:
- linux
- osx
- windows
jobs:
include:
- rust: stable
os: linux
- rust: 1.34.0
os: linux
- rust: stable
os: osx
- rust: stable-msvc
os: windows
cache:
- cargo
before_script:
- rustup set profile minimal
- rustup update
- rustup show
# CMake doesn't like the `sh.exe` provided by Git being in PATH
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then rm "C:/Program Files/Git/usr/bin/sh.exe"; fi
- rustup component add clippy
- rustup component add rustfmt
script:
- cargo clippy --all
- cargo fmt --all -- --check
- cargo test --no-run
- cargo test
- cargo test --release --no-run
- cargo test --release
- cd aeron_driver-sys/
- cd aeron-driver-sys/
- cargo test --features "static"
- cd ..
- cargo clippy --all
- cargo fmt --all -- --check
branches:
only:
- master

View File

@ -1,5 +1,5 @@
[workspace]
members = [
"aeron_driver-sys",
"aeron-driver-sys",
"aeron-rs"
]

View File

@ -1,6 +1,6 @@
[package]
name = "aeron_driver-sys"
version = "0.1.0+1.22.0"
name = "aeron-driver-sys"
version = "1.0.0+1.25.0"
authors = ["Bradlee Speice <bradlee@speice.io>"]
edition = "2018"
links = "aeron_driver"

@ -0,0 +1 @@
Subproject commit 977bda6f9e9ef3c5b502c8a8c741262147d7f464

View File

@ -93,12 +93,15 @@ pub fn main() {
println!("cargo:include={}", header_path.display());
let bindings = bindgen::Builder::default()
.clang_arg(&format!("-I{}", header_path.display()))
.clang_arg(format!("-I{}", header_path.display()))
.header("bindings.h")
.whitelist_function("aeron_.*")
.whitelist_type("aeron_.*")
.whitelist_var("AERON_.*")
.constified_enum_module("aeron_.*_enum")
// Some padding structures use arrays > 120 elements,
// so we can't derive Debug implementations
.derive_debug(false)
.generate()
.expect("Unable to generate aeron_driver bindings");

View File

@ -13,7 +13,7 @@ mod tests {
let minor = unsafe { crate::aeron_version_minor() };
let patch = unsafe { crate::aeron_version_patch() };
assert_eq!(major, 1);
assert_eq!(minor, 23);
assert_eq!(patch, 1);
assert_eq!(minor, 25);
assert_eq!(patch, 0);
}
}

View File

@ -12,7 +12,7 @@ travis-ci = { repository = "bspeice/aeron-rs", branch = "master" }
maintenance = { status = "actively-developed" }
[dependencies]
aeron_driver-sys = { path = "../aeron_driver-sys" }
aeron-driver-sys = { path = "../aeron-driver-sys" }
memmap = "0.7"
[dev-dependencies]

View File

@ -103,7 +103,8 @@ mod tests {
.expect("Unable to memory map CnC file")
};
let metadata: &MetaDataDefinition = unsafe { &*(mmap.as_ptr().cast()) };
let metadata: &MetaDataDefinition =
unsafe { &*(mmap.as_ptr() as *const MetaDataDefinition) };
assert_eq!(metadata.cnc_version, CNC_VERSION);
}
}

View File

@ -190,12 +190,7 @@ mod tests {
// cause an issue because the new media driver must wait for a heartbeat timeout.
let driver_res = DriverContext::default().set_aeron_dir(&dir).build();
// TODO: Why is the error message behavior different on Windows?
let expected_message = if cfg!(target_os = "windows") {
String::new()
} else {
format!("could not recreate aeron dir {}: ", dir.display())
};
let expected_message = format!("could not recreate aeron dir {}: ", dir.display());
assert!(driver_res.is_err());
assert_eq!(

@ -1 +0,0 @@
Subproject commit 02c5015f2c72c232b9cd840ca4726dca7bfe0d0e