Skip to content

Commit

Permalink
add bgpfu-netconf crate
Browse files Browse the repository at this point in the history
  • Loading branch information
benmaddison committed Nov 8, 2023
1 parent 1791d45 commit cf18aed
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 1 deletion.
7 changes: 7 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[workspace]
members = ["lib", "cli", "junos-agent"]
members = ["lib", "cli", "junos-agent", "netconf"]
resolver = "2"

[workspace.package]
Expand All @@ -16,6 +16,7 @@ categories = ["network-programming", "database"]
[workspace.dependencies]
# internal
bgpfu-lib = { path = "./lib", version = "0.1.0-alpha.2" }
bgpfu-netconf = { path = "./netconf", version = "0.1.0-alpha.2" }
# external
anyhow = "^1.0"
clap = {version = "^4.0", features = ["derive"]}
Expand Down
17 changes: 17 additions & 0 deletions netconf/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[package]
name = "bgpfu-netconf"
version.workspace = true
edition.workspace = true
authors.workspace = true
description.workspace = true
license.workspace = true
repository.workspace = true
readme.workspace = true
keywords.workspace = true
categories.workspace = true

[lib]
name = "netconf"

[dev-dependencies]
version-sync.workspace = true
50 changes: 50 additions & 0 deletions netconf/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
//! Netconf client library
#![doc(html_root_url = "https://docs.rs/bgpfu-netconf/0.1.0-alpha.2")]
// clippy lints
#![warn(clippy::pedantic)]
#![warn(clippy::cargo)]
#![warn(clippy::nursery)]
#![allow(clippy::redundant_pub_crate)]
#![allow(clippy::multiple_crate_versions)]
// rustc lints
#![allow(box_pointers)]
#![warn(absolute_paths_not_starting_with_crate)]
#![warn(deprecated_in_future)]
#![warn(elided_lifetimes_in_paths)]
#![warn(explicit_outlives_requirements)]
#![warn(keyword_idents)]
#![warn(macro_use_extern_crate)]
#![warn(meta_variable_misuse)]
#![warn(missing_abi)]
#![warn(missing_copy_implementations)]
#![warn(missing_debug_implementations)]
#![warn(missing_docs)]
#![warn(non_ascii_idents)]
#![warn(noop_method_call)]
#![warn(pointer_structural_match)]
#![warn(rust_2021_incompatible_closure_captures)]
#![warn(rust_2021_incompatible_or_patterns)]
#![warn(rust_2021_prefixes_incompatible_syntax)]
#![warn(rust_2021_prelude_collisions)]
#![warn(single_use_lifetimes)]
#![warn(trivial_casts)]
#![warn(trivial_numeric_casts)]
#![warn(unreachable_pub)]
#![warn(unsafe_code)]
#![warn(unsafe_op_in_unsafe_fn)]
#![warn(unstable_features)]
#![warn(unused_crate_dependencies)]
#![warn(unused_extern_crates)]
#![warn(unused_import_braces)]
#![warn(unused_lifetimes)]
#![warn(unused_qualifications)]
#![warn(unused_results)]
#![warn(variant_size_differences)]
// docs.rs build config
#![cfg_attr(docsrs, feature(doc_auto_cfg))]

// silence unused dev-dependency warnings
#[cfg(test)]
mod deps {
use version_sync as _;
}
4 changes: 4 additions & 0 deletions netconf/tests/versions.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#[test]
fn test_html_root_url() {
version_sync::assert_html_root_url_updated!("src/lib.rs");
}

0 comments on commit cf18aed

Please sign in to comment.