aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon THOBY <git@nightmared.fr>2023-01-09 19:32:26 +0100
committerSimon THOBY <git@nightmared.fr>2023-01-09 19:47:07 +0100
commitc3e3773cccd01f80f2d72a7691e0654d304e6b2d (patch)
tree369eb90e8a2da307d7cd8f0b15a3318bbdba0003
parent12a055ca570d814e5b213191e3847d5bffc8b9d5 (diff)
version bump + prepare the crate for publication on crates.iov0.8.0
-rw-r--r--.gitignore2
-rw-r--r--Cargo.nix19
-rw-r--r--Cargo.toml8
-rw-r--r--build.rs5
-rw-r--r--macros/Cargo.toml5
-rw-r--r--src/sys.rs3
6 files changed, 24 insertions, 18 deletions
diff --git a/.gitignore b/.gitignore
index 6cd2fce..6aa1064 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,3 @@
-src/sys.rs
-tests/sys.rs
/target/
**/*.rs.bk
Cargo.lock
diff --git a/Cargo.nix b/Cargo.nix
index 2b83f63..c4a4522 100644
--- a/Cargo.nix
+++ b/Cargo.nix
@@ -951,9 +951,9 @@ rec {
};
"regex" = rec {
crateName = "regex";
- version = "1.7.0";
+ version = "1.7.1";
edition = "2018";
- sha256 = "12l6if07cb6fa6nigql90qrw0happnbnzqvr6jpg4hg2z2g5axp0";
+ sha256 = "0czp6hxg02lm02hvlhp9xjkd65cjcagw119crnaznwd5idsabaj8";
authors = [
"The Rust Project Developers"
];
@@ -1009,7 +1009,7 @@ rec {
};
"rustables" = rec {
crateName = "rustables";
- version = "0.7.0";
+ version = "0.8.0";
edition = "2021";
# We can't filter paths with references in Nix 2.4
# See https://github.com/NixOS/nix/issues/5410
@@ -1017,7 +1017,9 @@ rec {
then lib.cleanSourceWith { filter = sourceFilter; src = ./.; }
else ./.;
authors = [
- "lafleur@boum.org, Simon Thoby, Mullvad VPN"
+ "lafleur@boum.org"
+ "Simon Thoby"
+ "Mullvad VPN"
];
dependencies = [
{
@@ -1072,12 +1074,11 @@ rec {
crateName = "rustables-macros";
version = "0.1.0";
edition = "2021";
- # We can't filter paths with references in Nix 2.4
- # See https://github.com/NixOS/nix/issues/5410
- src = if (lib.versionOlder builtins.nixVersion "2.4pre20211007")
- then lib.cleanSourceWith { filter = sourceFilter; src = ./macros; }
- else ./macros;
+ sha256 = "093ygmvwd4w69qiry4p99xvyzm2g4ywf8zx0hxrqhyrwy1fldqxm";
procMacro = true;
+ authors = [
+ "Simon Thoby"
+ ];
dependencies = [
{
name = "proc-macro-error";
diff --git a/Cargo.toml b/Cargo.toml
index 292a606..c72fa39 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,14 +1,14 @@
[package]
name = "rustables"
-version = "0.7.0"
-resolver = "2"
-authors = ["lafleur@boum.org, Simon Thoby, Mullvad VPN"]
+version = "0.8.0"
+authors = ["lafleur@boum.org", "Simon Thoby", "Mullvad VPN"]
license = "GPL-3.0-or-later"
description = "Safe abstraction for libnftnl. Provides low-level userspace access to the in-kernel nf_tables subsystem"
repository = "https://gitlab.com/rustwall/rustables"
readme = "README.md"
keywords = ["nftables", "nft", "firewall", "iptables", "netfilter"]
categories = ["network-programming", "os::unix-apis", "api-bindings"]
+resolver = "2"
edition = "2021"
[features]
@@ -20,7 +20,7 @@ log = "0.4"
libc = "0.2.43"
nix = "0.23"
ipnetwork = { version = "0.20", default-features = false }
-rustables-macros = { path = "macros" }
+rustables-macros = "0.1.0"
[dev-dependencies]
env_logger = "0.9"
diff --git a/build.rs b/build.rs
index b92653d..32778d4 100644
--- a/build.rs
+++ b/build.rs
@@ -3,12 +3,12 @@
use bindgen;
use regex::{Captures, Regex};
use std::borrow::Cow;
+use std::env;
use std::fs::File;
use std::io::Write;
use std::path::PathBuf;
const SYS_HEADER_FILE: &str = "include/wrapper.h";
-const SYS_BINDINGS_FILE: &str = "src/sys.rs";
fn main() {
generate_sys();
@@ -25,7 +25,6 @@ fn generate_sys() {
.prepend_enum_name(false)
.layout_tests(false)
.derive_partialeq(true)
- .raw_line("#![allow(non_camel_case_types, dead_code)]\n\n")
// Tell cargo to invalidate the built crate whenever any of the
// included header files changed.
.parse_callbacks(Box::new(bindgen::CargoCallbacks))
@@ -39,7 +38,7 @@ fn generate_sys() {
let s = reformat_units(&s);
// Write the bindings to the rust header file.
- let out_path = PathBuf::from(SYS_BINDINGS_FILE);
+ let out_path = PathBuf::from(env::var("OUT_DIR").unwrap()).join("sys.rs");
File::create(out_path)
.expect("Error: could not create rust header file.")
.write_all(&s.as_bytes())
diff --git a/macros/Cargo.toml b/macros/Cargo.toml
index 82c8ad6..5d0f297 100644
--- a/macros/Cargo.toml
+++ b/macros/Cargo.toml
@@ -1,6 +1,11 @@
[package]
name = "rustables-macros"
version = "0.1.0"
+authors = ["Simon Thoby"]
+license = "GPL-3.0-or-later"
+description = "Internal macros for generation netlink structures for the rustables project"
+repository = "https://gitlab.com/rustwall/rustables"
+resolver = "2"
edition = "2021"
[lib]
diff --git a/src/sys.rs b/src/sys.rs
new file mode 100644
index 0000000..4384a1c
--- /dev/null
+++ b/src/sys.rs
@@ -0,0 +1,3 @@
+#![allow(non_camel_case_types, dead_code)]
+
+include!(concat!(env!("OUT_DIR"), "/sys.rs"));