about summary refs log tree commit diff stats
path: root/src/bindings
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-05-27 17:10:31 +0200
committerbptato <nincsnevem662@gmail.com>2023-06-01 13:01:40 +0200
commite38f831d4d369eacc7e721f4f82e4124003cc61e (patch)
tree86ed57b658cdff554dd42acff469ab3ec7466be6 /src/bindings
parent2c4f1b5a9a879bbefdfa6f9cf8bb72c12cd486d7 (diff)
downloadchawan-e38f831d4d369eacc7e721f4f82e4124003cc61e.tar.gz
Add module loading to client
Files only, for now.
Diffstat (limited to 'src/bindings')
-rw-r--r--src/bindings/quickjs.nim3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/bindings/quickjs.nim b/src/bindings/quickjs.nim
index ed2cc15d..97aefcc7 100644
--- a/src/bindings/quickjs.nim
+++ b/src/bindings/quickjs.nim
@@ -350,6 +350,7 @@ proc JS_NewFloat64*(ctx: JSContext, val: cdouble): JSValue
 proc JS_NewAtomLen*(ctx: JSContext, str: cstring, len: csize_t): JSAtom
 proc JS_ValueToAtom*(ctx: JSContext, val: JSValue): JSAtom
 proc JS_AtomToValue*(ctx: JSContext, atom: JSAtom): JSValue
+proc JS_AtomToCString*(ctx: JSContext, atom: JSAtom): cstring
 proc JS_FreeAtom*(ctx: JSContext, atom: JSAtom)
 proc JS_FreeAtomRT*(rt: JSRuntime, atom: JSAtom)
 
@@ -432,6 +433,8 @@ proc JS_ThrowInternalError*(ctx: JSContext, fmt: cstring): JSValue {.varargs, di
 proc JS_SetModuleLoaderFunc*(rt: JSRuntime,
   module_normalize: JSModuleNormalizeFunc, module_loader: JSModuleLoaderFunc,
   opaque: pointer)
+proc JS_GetImportMeta*(ctx: JSContext, m: JSModuleDef): JSValue
+proc JS_GetModuleName*(ctx: JSContext, m: JSModuleDef): JSAtom
 
 proc JS_EnqueueJob*(ctx: JSContext, job_func: JSJobFunc, argc: cint, argv: ptr JSValue): cint
 proc JS_IsJobPending*(rt: JSRuntime): JS_BOOL