2012-12-10 15:44:02 -08:00
|
|
|
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
|
|
|
|
// file at the top-level directory of this distribution and at
|
|
|
|
// http://rust-lang.org/COPYRIGHT.
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
|
|
|
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
|
|
|
// option. This file may not be copied, modified, or distributed
|
|
|
|
// except according to those terms.
|
|
|
|
|
2012-04-02 22:18:01 -05:00
|
|
|
|
|
|
|
#ifndef RUST_ENV_H
|
|
|
|
#define RUST_ENV_H
|
|
|
|
|
|
|
|
#include "rust_globals.h"
|
|
|
|
|
2013-03-12 12:23:24 -07:00
|
|
|
// Avoiding 'bool' type here since I'm not sure it has a standard size
|
|
|
|
typedef uint8_t rust_bool;
|
|
|
|
|
2011-07-27 14:34:39 -07:00
|
|
|
struct rust_env {
|
|
|
|
size_t num_sched_threads;
|
|
|
|
size_t min_stack_size;
|
2012-01-11 12:37:09 -08:00
|
|
|
size_t max_stack_size;
|
2011-07-27 14:34:39 -07:00
|
|
|
char* logspec;
|
2013-03-12 12:23:24 -07:00
|
|
|
rust_bool detailed_leaks;
|
2011-07-27 14:34:39 -07:00
|
|
|
char* rust_seed;
|
2013-03-12 12:23:24 -07:00
|
|
|
rust_bool poison_on_free;
|
2012-10-03 14:41:53 -07:00
|
|
|
int argc;
|
|
|
|
char **argv;
|
2013-03-12 12:23:24 -07:00
|
|
|
rust_bool debug_mem;
|
2013-05-04 14:25:15 -04:00
|
|
|
rust_bool debug_borrow;
|
2011-07-27 14:34:39 -07:00
|
|
|
};
|
|
|
|
|
2012-10-03 14:41:53 -07:00
|
|
|
rust_env* load_env(int argc, char **argv);
|
2011-07-27 14:34:39 -07:00
|
|
|
void free_env(rust_env *rust_env);
|
2012-04-02 22:18:01 -05:00
|
|
|
|
|
|
|
#endif
|