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

Changes for nng v1.4.0 #32

Merged
merged 2 commits into from
Apr 10, 2021
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 Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "nng-sys"
version = "1.3.1-rc.1"
version = "1.4.0-rc.0"
authors = ["Nathan Kent <[email protected]>", "Jake W <[email protected]>"]

description = "Bindings to NNG (Nanomsg-Next-Generation) aka Nanomsg2"
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ Rust FFI bindings to [NNG](https://github.com/nanomsg/nng):

Version of this crate tracks NNG: `<NNG_version>-rc.<crate_version>` (e.g. `1.1.1-rc.2`).

To use the __latest crate__ for the most recent __stable version of NNG__ (1.3.x), in `Cargo.toml`:
To use the __latest crate__ for the most recent __stable version of NNG__ (1.4.x), in `Cargo.toml`:
```toml
[dependencies]
nng-sys = "1.3.0-rc"
nng-sys = "1.4.0-rc"
```

Requirements:
Expand All @@ -42,13 +42,13 @@ Requirements:
_Example_) Re-generate FFI bindings with bindgen:
```toml
[dependencies]
nng-sys = { version = "1.3.0-rc", features = ["build-bindgen"] }
nng-sys = { version = "1.4.0-rc", features = ["build-bindgen"] }
```

_Example_) Disable stats and use Ninja cmake generator:
```toml
[dependencies.nng-sys]
version = "1.3.0-rc"
version = "1.4.0-rc"
default-features = false
features = ["cmake-ninja"]
```
Expand Down
4 changes: 4 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ fn build_bindgen() {
.constified_enum("nng_pipe_ev")
.use_core()
.parse_callbacks(Box::new(BindgenCallbacks::default()))
.size_t_is_usize(true)
// Layout tests are non-portable; 64-bit tests are "wrong" size on 32-bit and always fail.
// Don't output tests if we're regenerating `src/bindings.rs` (shared by all platforms when bindgen not used)
.layout_tests(!cfg!(feature = "source-update-bindings"));
Expand Down Expand Up @@ -155,6 +156,9 @@ impl bindgen::callbacks::ParseCallbacks for BindgenCallbacks {
// We want to exclude it so it doesn't need to be included for `match` to be exhaustive.
if original_variant_name == "NNG_PIPE_EV_NUM" {
Some(bindgen::callbacks::EnumVariantCustomBehavior::Hide)
// NNG abstract sockets are only supported on Linux and non-portable
} else if original_variant_name == "NNG_AF_ABSTRACT" {
Some(bindgen::callbacks::EnumVariantCustomBehavior::Hide)
} else {
None
}
Expand Down
2 changes: 1 addition & 1 deletion nng
Submodule nng updated 318 files
Empty file modified scripts/build.ps1
100644 → 100755
Empty file.
Loading