acmcarther / space_coop

Wanna-be game engine for use in a SS13 clone
2 stars 0 forks source link

Syntex codegen issues on OSX #48

Open acmcarther opened 8 years ago

acmcarther commented 8 years ago
11:08 <rschifflin> cargo has plenty of stack space
11:08 <rschifflin> but looks like
11:08 <rschifflin> rustc main thread
11:08 <rschifflin> has none
11:08 <rschifflin> and thats where were doing heavy lifting 
                   now
11:09 <rschifflin> because of lack of compiler plugins
11:09 <rschifflin> so
11:09 <rschifflin> my advice
11:09 <rschifflin> find whatever env var holds the cargo 
                   stack space
11:10 <rschifflin> and run the codegen stuff in a thread with 
                   stack_size(THAT_ENV_VAR)

his fixed version of the build files

11:07 <rschifflin>   
std::thread::Builder::new().stack_size(32 * 1024 * 1024).spawn(move || {
     let out_dir = env::var_os("OUT_DIR").unwrap();
     (vec!["model.rs", "world.rs", "protocol.rs"]).into_iter().foreach(|path| {
       let full_src = "src/".to_owned() + path + ".in";
       let src = Path::new(&full_src);
       let dst = Path::new(&out_dir).join(path);
       serde_codegen::expand(&src, &dst).unwrap();
  })
}).unwrap().join();

11:07 <gSanders> woah
acmcarther commented 8 years ago

@rschifflin

acmcarther commented 8 years ago

Can you contribute back your fix for this @rschifflin ?