]>
git.proxmox.com Git - rustc.git/blob - src/libcore/rt/env.rs
1 // Copyright 2013 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
11 //! Runtime environment settings
13 use libc
::{size_t, c_char, c_int}
;
15 pub struct Environment
{
16 /// The number of threads to use by default
17 num_sched_threads
: size_t
,
18 /// The minimum size of a stack segment
19 min_stack_size
: size_t
,
20 /// The maximum amount of total stack per task before aborting
21 max_stack_size
: size_t
,
22 /// The default logging configuration
24 /// Record and report detailed information about memory leaks
26 /// Seed the random number generator
28 /// Poison allocations on free
30 /// The argc value passed to main
32 /// The argv value passed to main
34 /// Print GC debugging info
38 /// Get the global environment settings
40 /// This will abort the process if run outside of task context
41 pub fn get() -> &Environment
{
42 unsafe { rust_get_rt_env() }
46 fn rust_get_rt_env() -> &Environment
;