Make script.h the one include for everything duskscript-related

Folds what used to be duskscriptnative.h's includes (builtin/value/array/
struct/promise helpers a native function needs) directly into script.h,
alongside the runtime and VM includes already there. scriptnativeconsole.h
now just includes "script/script.h" instead of enumerating the same list
itself - any new native function bindings can do the same.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
YourWishesandClaude Sonnet 5 committed 2026-10-14 13:54:08 -05:00
1 parent 5d8337af7e
commit d878463ccb
2 files changed
+21 -16

No files matched your search

+1 -16
View File
@@ -6,22 +6,7 @@
*/
#pragma once
#include "dusk.h"
#include "duskscript.h"
#include "scripttypes.h"
#include "builtin/scriptbuiltin.h"
#include "builtin/scriptarg.h"
#include "builtin/scriptbuiltinregister.h"
#include "error/scriptraise.h"
#include "value/scriptvalueprimitive.h"
#include "string/scriptstringnew.h"
#include "array/scriptarraynew.h"
#include "array/scriptarraymodify.h"
#include "struct/scriptstruct.h"
#include "promise/scriptpromisenew.h"
#include "promise/scriptpromisesettle.h"
#include "promise/scripttimer.h"
#include "runtime/scriptruntimeload.h"
#include "script/script.h"
/**
* Registers the consolePrint(text) native, letting scripts write directly to
+20
View File
@@ -8,10 +8,30 @@
#pragma once
#include "dusk.h"
#include "error/error.h"
// Everything duskscript: values, the heap, the built in functions, running
// scripts, and the bytecode virtual machine that runs compiled ones.
#include "duskscript.h"
#include "image/scriptvmattach.h"
#include "image/scriptvmrun.h"
// What a native function needs: the types, the argument helpers and the value
// constructors. Include "script/script.h" for this, not these directly.
#include "scripttypes.h"
#include "builtin/scriptbuiltin.h"
#include "builtin/scriptarg.h"
#include "builtin/scriptbuiltinregister.h"
#include "error/scriptraise.h"
#include "value/scriptvalueprimitive.h"
#include "string/scriptstringnew.h"
#include "array/scriptarraynew.h"
#include "array/scriptarraymodify.h"
#include "struct/scriptstruct.h"
#include "promise/scriptpromisenew.h"
#include "promise/scriptpromisesettle.h"
#include "promise/scripttimer.h"
#include "runtime/scriptruntimeload.h"
// The whole memory budget of the script context. The runtime never asks the
// system for more than this, see scriptRuntimeCreate.
#define SCRIPT_MEMORY_SIZE (512 * 1024)