mirror of
https://github.com/bspeice/aeron-rs
synced 2024-12-21 21:38:09 -05:00
Merge #23
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>
This commit is contained in:
commit
871556edd1
6
.gitmodules
vendored
6
.gitmodules
vendored
@ -1,3 +1,3 @@
|
|||||||
[submodule "aeron_driver-sys/aeron"]
|
[submodule "aeron-driver-sys/aeron"]
|
||||||
path = aeron_driver-sys/aeron
|
path = aeron-driver-sys/aeron
|
||||||
url = https://github.com/real-logic/aeron
|
url = https://github.com/real-logic/aeron.git
|
||||||
|
31
.travis.yml
31
.travis.yml
@ -1,33 +1,38 @@
|
|||||||
language: rust
|
language: rust
|
||||||
rust:
|
|
||||||
- stable
|
jobs:
|
||||||
os:
|
include:
|
||||||
- linux
|
- rust: stable
|
||||||
- osx
|
os: linux
|
||||||
- windows
|
- rust: 1.34.0
|
||||||
|
os: linux
|
||||||
|
- rust: stable
|
||||||
|
os: osx
|
||||||
|
- rust: stable-msvc
|
||||||
|
os: windows
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
- cargo
|
- cargo
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- rustup set profile minimal
|
- rustup show
|
||||||
- rustup update
|
# 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 clippy
|
||||||
- rustup component add rustfmt
|
- rustup component add rustfmt
|
||||||
|
|
||||||
script:
|
script:
|
||||||
|
- cargo clippy --all
|
||||||
|
- cargo fmt --all -- --check
|
||||||
|
|
||||||
- cargo test --no-run
|
- cargo test --no-run
|
||||||
- cargo test
|
- cargo test
|
||||||
- cargo test --release --no-run
|
- cargo test --release --no-run
|
||||||
- cargo test --release
|
- cargo test --release
|
||||||
|
|
||||||
- cd aeron_driver-sys/
|
- cd aeron-driver-sys/
|
||||||
- cargo test --features "static"
|
- cargo test --features "static"
|
||||||
|
|
||||||
- cd ..
|
|
||||||
- cargo clippy --all
|
|
||||||
- cargo fmt --all -- --check
|
|
||||||
|
|
||||||
branches:
|
branches:
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
[workspace]
|
[workspace]
|
||||||
members = [
|
members = [
|
||||||
"aeron_driver-sys",
|
"aeron-driver-sys",
|
||||||
"aeron-rs"
|
"aeron-rs"
|
||||||
]
|
]
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "aeron_driver-sys"
|
name = "aeron-driver-sys"
|
||||||
version = "0.1.0+1.22.0"
|
version = "1.0.0+1.25.0"
|
||||||
authors = ["Bradlee Speice <bradlee@speice.io>"]
|
authors = ["Bradlee Speice <bradlee@speice.io>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
links = "aeron_driver"
|
links = "aeron_driver"
|
1
aeron-driver-sys/aeron
Submodule
1
aeron-driver-sys/aeron
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 977bda6f9e9ef3c5b502c8a8c741262147d7f464
|
@ -93,12 +93,15 @@ pub fn main() {
|
|||||||
|
|
||||||
println!("cargo:include={}", header_path.display());
|
println!("cargo:include={}", header_path.display());
|
||||||
let bindings = bindgen::Builder::default()
|
let bindings = bindgen::Builder::default()
|
||||||
.clang_arg(&format!("-I{}", header_path.display()))
|
.clang_arg(format!("-I{}", header_path.display()))
|
||||||
.header("bindings.h")
|
.header("bindings.h")
|
||||||
.whitelist_function("aeron_.*")
|
.whitelist_function("aeron_.*")
|
||||||
.whitelist_type("aeron_.*")
|
.whitelist_type("aeron_.*")
|
||||||
.whitelist_var("AERON_.*")
|
.whitelist_var("AERON_.*")
|
||||||
.constified_enum_module("aeron_.*_enum")
|
.constified_enum_module("aeron_.*_enum")
|
||||||
|
// Some padding structures use arrays > 120 elements,
|
||||||
|
// so we can't derive Debug implementations
|
||||||
|
.derive_debug(false)
|
||||||
.generate()
|
.generate()
|
||||||
.expect("Unable to generate aeron_driver bindings");
|
.expect("Unable to generate aeron_driver bindings");
|
||||||
|
|
@ -13,7 +13,7 @@ mod tests {
|
|||||||
let minor = unsafe { crate::aeron_version_minor() };
|
let minor = unsafe { crate::aeron_version_minor() };
|
||||||
let patch = unsafe { crate::aeron_version_patch() };
|
let patch = unsafe { crate::aeron_version_patch() };
|
||||||
assert_eq!(major, 1);
|
assert_eq!(major, 1);
|
||||||
assert_eq!(minor, 23);
|
assert_eq!(minor, 25);
|
||||||
assert_eq!(patch, 1);
|
assert_eq!(patch, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -12,7 +12,7 @@ travis-ci = { repository = "bspeice/aeron-rs", branch = "master" }
|
|||||||
maintenance = { status = "actively-developed" }
|
maintenance = { status = "actively-developed" }
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
aeron_driver-sys = { path = "../aeron_driver-sys" }
|
aeron-driver-sys = { path = "../aeron-driver-sys" }
|
||||||
memmap = "0.7"
|
memmap = "0.7"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
|
@ -103,7 +103,8 @@ mod tests {
|
|||||||
.expect("Unable to memory map CnC file")
|
.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);
|
assert_eq!(metadata.cnc_version, CNC_VERSION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -190,12 +190,7 @@ mod tests {
|
|||||||
// cause an issue because the new media driver must wait for a heartbeat timeout.
|
// cause an issue because the new media driver must wait for a heartbeat timeout.
|
||||||
let driver_res = DriverContext::default().set_aeron_dir(&dir).build();
|
let driver_res = DriverContext::default().set_aeron_dir(&dir).build();
|
||||||
|
|
||||||
// TODO: Why is the error message behavior different on Windows?
|
let expected_message = format!("could not recreate aeron dir {}: ", dir.display());
|
||||||
let expected_message = if cfg!(target_os = "windows") {
|
|
||||||
String::new()
|
|
||||||
} else {
|
|
||||||
format!("could not recreate aeron dir {}: ", dir.display())
|
|
||||||
};
|
|
||||||
|
|
||||||
assert!(driver_res.is_err());
|
assert!(driver_res.is_err());
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
|
@ -1 +0,0 @@
|
|||||||
Subproject commit 02c5015f2c72c232b9cd840ca4726dca7bfe0d0e
|
|
Loading…
Reference in New Issue
Block a user