1 /**********************************************************************
6 created at: Fri Aug 19 13:19:58 JST 1994
8 Copyright (C) 1993-2007 Yukihiro Matsumoto
10 **********************************************************************/
13 * \mainpage Developers' documentation for Ruby
15 * This documentation is produced by applying Doxygen to
16 * <a href="https://github.com/ruby/ruby">Ruby's source code</a>.
17 * It is still under construction (and even not well-maintained).
18 * If you are familiar with Ruby's source code, please improve the doc.
23 #include "internal/sanitizers.h"
28 #if defined RUBY_DEVEL && !defined RUBY_DEBUG_ENV
29 # define RUBY_DEBUG_ENV 1
31 #if defined RUBY_DEBUG_ENV && !RUBY_DEBUG_ENV
32 # undef RUBY_DEBUG_ENV
36 rb_main(int argc
, char **argv
)
40 return ruby_run_node(ruby_options(argc
, argv
));
43 #if defined(__wasm__) && !defined(__EMSCRIPTEN__)
44 int rb_wasm_rt_start(int (main
)(int argc
, char **argv
), int argc
, char **argv
);
45 #define rb_main(argc, argv) rb_wasm_rt_start(rb_main, argc, argv)
49 main(int argc
, char **argv
)
51 #if defined(RUBY_DEBUG_ENV) || USE_RUBY_DEBUG_LOG
52 ruby_set_debug_option(getenv("RUBY_DEBUG"));
55 setlocale(LC_CTYPE
, "");
58 ruby_sysinit(&argc
, &argv
);
59 return rb_main(argc
, argv
);
62 #ifdef RUBY_ASAN_ENABLED
63 /* Compile in the ASAN options Ruby needs, rather than relying on environment variables, so
64 * that even tests which fork ruby with a clean environment will run ASAN with the right
67 __asan_default_options(void)
69 return "use_sigaltstack=0:detect_leaks=0";