nscript: load script view

This allows you to open and run scripts for testing purposes, but only
from external links such as nostr:nscript...
This commit is contained in:
William Casarin
2023-07-04 11:42:16 -07:00
parent 640fbf23ea
commit a04a401292
10 changed files with 261 additions and 25 deletions

View File

@@ -837,4 +837,14 @@ static INLINE struct callframe *top_callframes(struct cursor *cur, int top)
return (struct callframe*)cursor_topn(cur, sizeof(struct callframe), top);
}
static INLINE int was_section_parsed(struct module *module,
enum section_tag section)
{
if (section == section_custom)
return module->custom_sections > 0;
return module->parsed & (1 << section);
}
#endif /* PROTOVERSE_WASM_H */