leftibot 08281a9d69
Fix #146: Add configuration to bypass the registering of 'built-in' functions. (#642)
* Fix #146: Add configuration options to selectively disable built-in functions

Add new Options enum values (No_Stdlib, No_IO, No_Prelude, No_JSON) that
allow users to control which parts of the standard library are registered.
Std_Lib::library() now accepts an options vector, and the ChaiScript
convenience class forwards its options to the library builder. This enables
use cases where only custom functions should be exposed to script users.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Address review: split Options into Options and Library_Options enums

Separate system-level options (No_Load_Modules, Load_Modules, No_External_Scripts,
External_Scripts) from library-level options (No_Stdlib, No_IO, No_Prelude, No_JSON)
into two distinct enum types. Add Library_Options as a parameter to the ChaiScript
constructor. Update tests to demonstrate both ChaiScript_Basic (explicit Std_Lib::library
call) and ChaiScript (library options via constructor parameter) usage.

Requested by @lefticus in PR #642 review.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Add cheatsheet documentation for Options and Library_Options

Documents the two-enum configuration system: Options (engine-level:
load_module, use, eval_file) and Library_Options (stdlib-level:
No_Stdlib, No_IO, No_Prelude, No_JSON), with usage examples for
both ChaiScript and ChaiScript_Basic constructors.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: leftibot <leftibot@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 16:49:13 -06:00
..
add_vs_add_global.chai Fix #554: Document the difference between add, add_global, and set_global (#649) 2026-04-11 11:17:46 -06:00
array_access.chai
array_types.chai
assign_const.chai
async_engine_lifetime_test.cpp Fix #655: Async issues with threads outliving the chaiscript engine (#656) 2026-04-11 16:12:41 -06:00
async_engine_lifetime.chai Fix #655: Async issues with threads outliving the chaiscript engine (#656) 2026-04-11 16:12:41 -06:00
bind2.chai
bind.chai
block_start.chai
bool_comparisons.chai
bool_not.chai
boxed_cast_test.cpp
break_for.chai
break_while.chai
c_linkage_test.cpp
catch.hpp Update catch.hpp to v2.13.9 2025-07-28 09:33:41 -04:00
char_init.chai
class_cheatsheet.chai Address review: remove issue number references from code 2026-04-10 11:31:59 -06:00
class_inheritance.chai Fix #201: Suggestion: class Inheritance (#641) 2026-04-10 19:12:06 -06:00
class_inside_scope.chai
class_missing_line_separator.chai Fix #592: Local variable saw_eol in Class_Statements() was always true (#646) 2026-04-11 08:32:27 -06:00
class.chai
classification.chai
clone_object.chai
collate.chai
compare_gt.chai
compare_lt.chai
compiled_tests.cpp Fix #146: Add configuration to bypass the registering of 'built-in' functions. (#642) 2026-04-11 16:49:13 -06:00
concat.chai
const_range_test.chai
const_var.chai Fix #17: Add const variables in ChaiScript (#643) 2026-04-10 22:12:13 -06:00
continue_for.chai
continue_while.chai
conversion_functions.chai Fix #459: Fill out the set of conversion functions for all POD types (#664) 2026-04-11 16:08:09 -06:00
conversion_to_bool.chai
convert_double_string.chai
convert_int_string.chai
convert_string_double.chai
convert_string_int.chai
deep_array_lookup.chai
dispatch_functions.chai
divide_by_zero_protection.chai
drop_while.chai
drop.chai
dynamic_object_assignment.chai
dynamic_object_dynamic_attrs_explicit.chai
dynamic_object_dynamic_attrs.chai
empty.chai
emscripten_eval_test.cpp Fix #472: Emscripten Frontend (#662) 2026-04-11 15:58:28 -06:00
equ_shortform.chai
eval_error.chai
eval_file_with_bom.chai
eval_file.chai
eval.chai
even.chai
exception_finally.chai
exception_typed.chai
exception.chai
execution_context.chai
explicit_this_capture.chai
failed_deep_include.chai
failed_deep_include.inc
file_with_bom.inc
filter.chai
float.chai
foldl.chai
for_each_range.chai
for_each_retro.chai
for_each.chai
for.chai
function_array_adjacent.chai
function_attributes.chai
function_introspection.chai
function_members.chai
function_reassignment.chai
function_redefinition.chai
future.chai
fuzz_unit_test.inc
fuzzy_tests-2017-07-20.tar.bz2
generate_range.chai
global_const_in_module.chai
global_in_script.chai
global_lcase.chai
global.chai
hashbang.chai
hex_escapes.chai
if_else.chai
if_elseif_else.chai
if_elseif.chai
if.chai
index_operator.chai
inheritance.chai
init_if.chai
instring_eval_more.chai
instring_eval_with_string.chai
instring_eval.chai
integer_literal_test.cpp
invalid_function_assignment.chai
invalid_function_reassignment.chai
is_undef.chai
join.chai
json_1.chai
json_2.chai
json_3.chai
json_4.chai
json_5.chai
json_6.chai
json_7.chai
json_8.chai
json_9.chai
json_10.chai
json_11.chai
json_12.chai
json_13.chai
json_14.chai
json_15.chai
json_roundtrip.chai
json_unicode_1.chai Add tests for JSON \u unicode escape sequences 2026-04-10 19:49:56 -06:00
json_unicode_2.chai Add tests for JSON \u unicode escape sequences 2026-04-10 19:49:56 -06:00
json_unicode_3.chai Add tests for JSON \u unicode escape sequences 2026-04-10 19:49:56 -06:00
json_unicode_4.chai Add tests for JSON \u unicode escape sequences 2026-04-10 19:49:56 -06:00
json_unicode_5.chai Add tests for JSON \u unicode escape sequences 2026-04-10 19:49:56 -06:00
json_unicode_6.chai Add tests for JSON \u unicode escape sequences 2026-04-10 19:49:56 -06:00
json_unicode_7.chai Add tests for JSON \u unicode escape sequences 2026-04-10 19:49:56 -06:00
json_unicode_8.chai Add tests for JSON \u unicode escape sequences 2026-04-10 19:49:56 -06:00
lambda.chai
list_push_back.chai
list_push_front.chai
list_resize.chai
load_module.chai
logical_short_circuiting.chai
loop_inner_outer.chai
malformed_inline_map.chai
map_access.chai
map_count.chai
map_inplace_init.chai
map.chai
math_add_mixed.chai
math_add.chai
math_dec.chai
math_div.chai
math_inc.chai
math_mod.chai
math_mult.chai
math_negate.chai
math_paren.chai
math_sub.chai
max.chai
member_variable_access.chai
memberscope.chai
method_missing.chai
method_sugar.chai
min.chai
mmd1.chai
mmd2.chai
move_async.chai
multifile_test_chai.cpp
multifile_test_chai.hpp
multifile_test_main.cpp
multifile_test_module.cpp
multifile_test_module.hpp
multiline_oper.chai
multiline.chai
multithreaded_test.cpp
multithreaded_work.inc
namespaces_nested_copy.chai
namespaces.chai
negative_numbers.chai
non_const_param.chai
now_function.chai Fix #660: Windows builds are broken (#661) 2026-04-11 15:06:33 -06:00
null_object_access.chai
number_formats.chai
number_suffixes.chai
object_attr_same_name.chai
object_attr.chai
object_clone.chai
object_constructor_guards.chai
object_method_guards.chai
octal_escapes.chai
odd.chai
operator_overload2.chai
operator_overload3.chai
operator_overload4.chai
operator_overload.chai
operator_parsing.chai
operator_scoping.chai
operators_float.chai
operators_int.chai
order_of_operations.chai
pair.chai
parser_test.chai
pass_by_reference.chai
performance.chai
pointer_passed_to_constructor.chai
precedence_1.chai
precedence_2.chai
precedence_3.chai
precedence_4.chai
precedence_eq.chai
product.chai
range_back.chai
range_contains.chai
range_find.chai
range_inplace.chai
range.chai
ranged_for_2.chai
ranged_for.chai
raw_string.chai Fix #284: Add raw string support to avoid instring_eval 2026-04-09 22:09:42 -06:00
reduce.chai
reflection_documentation.chai Fix #12: Document reflection and introspection capabilities 2026-04-09 21:43:56 -06:00
reflection_test.chai
retro.chai
retroretro.chai
return_value_assignment.chai
return.chai
runtime_error.chai
scoping.chai
shared_ptr_update.chai
shift.chai
static_chaiscript.cpp
string_charptr.chai
string_concat.chai
string_find_first_not_of.chai
string_find_first_of.chai
string_find_last_not_of.chai
string_find_last_of.chai
string_find.chai
string_init.chai
string_literal_access.chai
string_rfind.chai
string_size.chai
string_substr.chai
string_unicode_ascii.chai
string_unicode_parse.chai
string_unicode_unicode.chai
sum.chai
switch_break.chai
switch_default_2.chai
switch_default.chai
switch_empty.chai
switch_fallthru_and_break.chai
switch_fallthru.chai
switch_type_conversion.chai Add tests for #421: switch with type_conversion lifetime bug 2026-04-10 18:18:25 -06:00
system_introspection.chai
take_while.chai
take.chai
temporary_lifetime.chai
ternary_condition.chai
type_info_test.cpp
type_info.chai
unit_test.inc
use.chai
use.inc
user_defined_conversions_2.chai
user_defined_conversions.chai
var_decl.chai
var_ref_decl.chai
variable_redefinition.chai
vector_access.chai
vector_assignment_3.chai
vector_assignment.chai
vector_erase_at.chai
vector_inplace_init.chai
vector_insert_at.chai
vector_literal_acccess.chai
vector_of_one.chai
vector_of_suffixed_numbers.chai
vector_paren_literal_access.chai
vector_push_back.chai
vector_push_empty.chai
vector_reserve.chai
vector_resize.chai
zip_with.chai
zip.chai