use a thread in the build script of serde_codegen to allow env vars to control the stack size
This commit is contained in:
parent
d120539310
commit
8bd7acc9fc
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "serde_codegen"
|
||||
version = "0.8.0"
|
||||
version = "0.8.1"
|
||||
authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>"]
|
||||
license = "MIT/Apache-2.0"
|
||||
description = "Macros to auto-generate implementations for the serde framework"
|
||||
|
@ -4,14 +4,17 @@ mod inner {
|
||||
|
||||
use std::env;
|
||||
use std::path::Path;
|
||||
use std::thread::spawn;
|
||||
|
||||
pub fn main() {
|
||||
let out_dir = env::var_os("OUT_DIR").unwrap();
|
||||
// put everything into a thread, so users can use `RUST_MIN_STACK` to increase the amount of stack
|
||||
spawn(|| {
|
||||
let out_dir = env::var_os("OUT_DIR").unwrap();
|
||||
|
||||
let src = Path::new("src/lib.rs.in");
|
||||
let dst = Path::new(&out_dir).join("lib.rs");
|
||||
|
||||
quasi_codegen::expand(&src, &dst).unwrap();
|
||||
let src = Path::new("src/lib.rs.in");
|
||||
let dst = Path::new(&out_dir).join("lib.rs");
|
||||
quasi_codegen::expand(&src, &dst).unwrap();
|
||||
}).join().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "serde_macros"
|
||||
version = "0.8.0"
|
||||
version = "0.8.1"
|
||||
authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>"]
|
||||
license = "MIT/Apache-2.0"
|
||||
description = "Macros to auto-generate implementations for the serde framework"
|
||||
@ -28,7 +28,7 @@ skeptic = { version = "^0.6.0", optional = true }
|
||||
|
||||
[dependencies]
|
||||
clippy = { version = "^0.*", optional = true }
|
||||
serde_codegen = { version = "=0.8.0", default-features = false, features = ["unstable"] }
|
||||
serde_codegen = { version = "=0.8.1", default-features = false, features = ["unstable"] }
|
||||
skeptic = { version = "^0.6.0", optional = true }
|
||||
serde_json = { version = "0.8.0", optional = true }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user