I didn’t see anything in that doc about limiting instructions executed, or throwing an error if some limit is reached. Did you mean to say that capability is included? Can you share a specific reference?
We don't have a document that answers your question directly but the capabilities are all there. We're happy to help you get started - post an issue on our repository on GitHub. The "XS in C" describes the API you'll use from your C/C++ code to interact with XS (created a VM, implement native functions callable from JavaScript, etc). Most of the limits can be set using the manifest, which defines the virtual machine build. For example, to limit the memory used by a script or the modules available to a script (e.g. what classes and functions it can call), use the manifest's "creation" object which indicates the maximum number of bytes the VM can allocate. Here's the base manifest all our examples include, which define the VM size in the creation as 32 KB - https://github.com/Moddable-OpenSource/moddable/blob/public/.... The manifest also lists all the modules that are built into the virtual machine. These are the only modules a script can use (unless you add a module that can load other modules!). For example, manifest_net.json (https://github.com/Moddable-OpenSource/moddable/blob/public/...) includes a bunch of modules related to networking (socket, sntp, wifi).