Skip to content

Commit 5aa7780

Browse files
committed
[WIP] Stack size
1 parent 191e2f3 commit 5aa7780

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

c2rust/src/bin/c2rust-transpile.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use clap::{Parser, ValueEnum};
22
use log::LevelFilter;
33
use regex::Regex;
4-
use std::{fs, path::PathBuf, collections::HashSet};
4+
use std::{fs, path::PathBuf, collections::HashSet, thread};
55

66
use c2rust_transpile::{Derive, Diagnostic, ReplaceMode, TranspilerConfig};
77

@@ -191,7 +191,17 @@ impl ExtraDerive {
191191
}
192192
}
193193

194+
const STACK_SIZE: usize = 40 * 1024 * 1024;
195+
194196
fn main() {
197+
let child = thread::Builder::new()
198+
.stack_size(STACK_SIZE)
199+
.spawn(run)
200+
.unwrap();
201+
child.join().unwrap();
202+
}
203+
204+
fn run() {
195205
let args = Args::parse();
196206

197207
// Build a TranspilerConfig from the command line

0 commit comments

Comments
 (0)