From 5ef1d8481430614a00a8868619e9500ec99ed102 Mon Sep 17 00:00:00 2001 From: rawdaGastan Date: Tue, 29 Oct 2024 11:53:59 +0300 Subject: [PATCH] set a stack size for running docker2fl --- docker2fl/src/main.rs | 13 +++++++++++-- rfs/src/main.rs | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/docker2fl/src/main.rs b/docker2fl/src/main.rs index 2895190..dc91cb9 100644 --- a/docker2fl/src/main.rs +++ b/docker2fl/src/main.rs @@ -3,6 +3,7 @@ use bollard::auth::DockerCredentials; use clap::{ArgAction, Parser}; use rfs::fungi; use rfs::store::parse_router; +use tokio::runtime::Builder; use uuid::Uuid; mod docker2fl; @@ -53,8 +54,16 @@ struct Options { registry_token: Option, } -#[tokio::main] -async fn main() -> Result<()> { +fn main() -> Result<()> { + let rt = Builder::new_multi_thread() + .thread_stack_size(8 * 1024 * 1024) + .enable_all() + .build() + .unwrap(); + rt.block_on(run()) +} + +async fn run() -> Result<()> { let opts = Options::parse(); simple_logger::SimpleLogger::new() diff --git a/rfs/src/main.rs b/rfs/src/main.rs index 3b36875..14d4a00 100644 --- a/rfs/src/main.rs +++ b/rfs/src/main.rs @@ -9,7 +9,7 @@ use anyhow::{Context, Result}; use clap::{ArgAction, Args, Parser, Subcommand}; use rfs::fungi; -use rfs::store::{self, Router, Stores}; +use rfs::store::{self}; use rfs::{cache, config}; mod fs;