aboutsummaryrefslogtreecommitdiff
path: root/client-native-rift
diff options
context:
space:
mode:
Diffstat (limited to 'client-native-rift')
-rw-r--r--client-native-rift/Cargo.toml7
-rw-r--r--client-native-rift/src/main.rs30
2 files changed, 36 insertions, 1 deletions
diff --git a/client-native-rift/Cargo.toml b/client-native-rift/Cargo.toml
index f87cf16..1693422 100644
--- a/client-native-rift/Cargo.toml
+++ b/client-native-rift/Cargo.toml
@@ -5,3 +5,10 @@ edition = "2021"
[dependencies]
client-native-lib = { path = "../client-native-lib" }
+
+clap = { version = "3.2.21", features = ["derive"] }
+env_logger = "0.8"
+log = "0.4"
+
+tokio = { version = "1.21", features = ["full"] }
+bytes = "1.2.1"
diff --git a/client-native-rift/src/main.rs b/client-native-rift/src/main.rs
index e7a11a9..e5415d9 100644
--- a/client-native-rift/src/main.rs
+++ b/client-native-rift/src/main.rs
@@ -1,3 +1,31 @@
+use clap::{Parser, Subcommand};
+use log::error;
+
fn main() {
- println!("Hello, world!");
+ env_logger::init_from_env("LOG");
+ tokio::runtime::Builder::new_multi_thread()
+ .enable_all()
+ .build()
+ .unwrap()
+ .block_on(run())
+}
+
+#[derive(Parser)]
+pub struct Args {
+ #[clap(long, default_value = "meet.metamuffin.org")]
+ signaling_host: String,
+ #[clap(short, long)]
+ secret: String,
+ #[clap(subcommand)]
+ action: Action,
+}
+#[derive(Subcommand)]
+pub enum Action {
+ Send {},
+ Receive {},
+}
+
+async fn run() {
+ tokio::signal::ctrl_c().await.unwrap();
+ error!("interrupt received, exiting");
}