#configuration #serde-default #networking #netplan

netplan-types

Netplan configuration types as Rust structs and enums

10 releases

0.4.1 Nov 14, 2023
0.4.0 Jul 21, 2023
0.3.4 Jul 21, 2023
0.3.3 Mar 18, 2023
0.1.0 Apr 20, 2022

#87 in Configuration

Download history 173/week @ 2023-12-06 280/week @ 2023-12-13 418/week @ 2023-12-20 202/week @ 2023-12-27 384/week @ 2024-01-03 398/week @ 2024-01-10 1058/week @ 2024-01-17 840/week @ 2024-01-24 1149/week @ 2024-01-31 1223/week @ 2024-02-07 969/week @ 2024-02-14 1156/week @ 2024-02-21 912/week @ 2024-02-28 1167/week @ 2024-03-06 1235/week @ 2024-03-13 1304/week @ 2024-03-20

4,791 downloads per month

MIT/Apache

105KB
1K SLoC

netplan-types

Motivation

This crate attempts to map the entire netplan configuration into Rust structs and enums. The 'layout' is as close to what you'd write in your netplan YAML files.

The intented use of this crate is to allow for easy editing of the network configuration via the netplan configuration files from a Rust program.

Based on the documentation from netplan, which can be found here Please note that I do not check the docs often for updates, if anything is missing or incorrect in the future, please open an issue or a pull-request so the issue can be addressed.

Features

  • serde [Default] Add serde support
  • derive_builder Enable the derive_builder crate for an automatically generated builder pattern API
  • schemars Allow generation of a JSON schema

License

This crate is licensed under the MIT license, or the Apache 2.0 license, at your discretion.


lib.rs:

netplan-types

Motivation

This crate attempts to map the entire netplan configuration into Rust structs and enums. The 'layout' is as close to what you'd write in your netplan YAML files.

The intented use of this crate is to allow for easy editing of the network configuration via the netplan configuration files from a Rust program.

Based on the documentation from netplan, which can be found here Please note that I do not check the docs often for updates, if anything is missing or incorrect in the future, please open an issue or a pull-request so the issue can be addressed.

Features

  • serde: [Default] Add serde support
  • derive_builder Enable the derive_builder crate for an automatically generated builder pattern API
  • schemars: Enable the schemars crate for generating a JSON schema from the structs

Dependencies

~0.4–1.2MB
~27K SLoC