Skip to content

Commit

Permalink
fix: remove "bindings" local dependency to fix crates.io publishing
Browse files Browse the repository at this point in the history
When running "cargo publish --dry-run" an error is reported due to the
lack of the "bindings" crate in the package registry.

error: all dependencies must have a version specified when publishing.
dependency `bindings` does not specify a version
Note: The published dependency will use the version from crates.io,
the `path` specification will be removed from the dependency declaration.

Refer to: rust-lang/cargo#7237
  • Loading branch information
EstebanBorai committed Jun 19, 2021
1 parent 2b586f2 commit 22e03d9
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 26 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ jobs:
steps:
- uses: actions/checkout@v1

- name: Cargo Publish Dry Run
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- run: cargo publish --dry-run

- name: publish crate
run: cargo publish

- uses: actions-rs/toolchain@v1
with:
profile: minimal
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ thiserror = "1"
[target.'cfg(target_os = "windows")'.dependencies]
windows = "0.11.0"
memalloc = "0.1"
bindings = { path = "src/windows/bindings" }
bindings = { path = "./src/windows/bindings" }
6 changes: 3 additions & 3 deletions src/windows/mod.rs → src/windows.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use libc::{wchar_t, wcslen};
use memalloc::{allocate, deallocate};
use std::net::{IpAddr, Ipv4Addr, Ipv6Addr};
use bindings::Windows::Win32::System::Diagnostics::Debug::{ERROR_BUFFER_OVERFLOW, NO_ERROR};
use bindings::Windows::Win32::Networking::WinSock::{SOCKADDR_IN, SOCKADDR_IN6};
use bindings::Windows::Win32::NetworkManagement::IpHelper::{
use windows::Windows::Win32::System::Diagnostics::Debug::{ERROR_BUFFER_OVERFLOW, NO_ERROR};
use windows::Windows::Win32::Networking::WinSock::{SOCKADDR_IN, SOCKADDR_IN6};
use windows::Windows::Win32::NetworkManagement::IpHelper::{
ADDRESS_FAMILY, AF_INET, AF_INET6, AF_UNSPEC, GET_ADAPTERS_ADDRESSES_FLAGS,
IP_ADAPTER_ADDRESSES_LH, GetAdaptersAddresses,
};
Expand Down
12 changes: 0 additions & 12 deletions src/windows/bindings/Cargo.toml

This file was deleted.

9 changes: 0 additions & 9 deletions src/windows/bindings/build.rs

This file was deleted.

1 change: 0 additions & 1 deletion src/windows/bindings/src/lib.rs

This file was deleted.

0 comments on commit 22e03d9

Please sign in to comment.