Lots more updates
Also begin adding rust building capabilities to be able to write rust binaries for some commands.
This commit is contained in:
parent
624508dd14
commit
dd1cfa79e7
52 changed files with 2509 additions and 150 deletions
13
rust/program/hetzner-ipv6/Cargo.toml
Normal file
13
rust/program/hetzner-ipv6/Cargo.toml
Normal file
|
@ -0,0 +1,13 @@
|
|||
[package]
|
||||
name = "hetzner-ipv6"
|
||||
edition = "2024"
|
||||
version = "1.0.0"
|
||||
metadata.crane.name = "hetzner-ipv6"
|
||||
|
||||
[dependencies]
|
||||
anyhow = { workspace = true }
|
||||
clap = { workspace = true }
|
||||
common = { path = "../../lib/common" }
|
||||
log = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
hakari = { version = "0.1", path = "../../lib/hakari" }
|
28
rust/program/hetzner-ipv6/src/main.rs
Normal file
28
rust/program/hetzner-ipv6/src/main.rs
Normal file
|
@ -0,0 +1,28 @@
|
|||
use clap::{Parser, Subcommand};
|
||||
fn main() {
|
||||
common::entrypoint(program);
|
||||
}
|
||||
|
||||
#[derive(Parser, Debug)]
|
||||
#[command(version, about, long_about = None)]
|
||||
pub struct Args {
|
||||
#[command(subcommand)]
|
||||
pub command: Commands,
|
||||
}
|
||||
|
||||
#[derive(Debug, Subcommand)]
|
||||
pub enum Commands {
|
||||
/// Configures the ipv6 address using instance metadata and iproute2
|
||||
Configure,
|
||||
}
|
||||
|
||||
fn program() -> anyhow::Result<()> {
|
||||
let args = Args::parse();
|
||||
match args.command {
|
||||
Commands::Configure => configure(),
|
||||
}
|
||||
}
|
||||
|
||||
fn configure() -> anyhow::Result<()> {
|
||||
Ok(())
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue