llrt
llrt copied to clipboard
top-level await throws SyntaxError
basically the subject
// llrt-test.mjs
function foo() {
return Promise.resolve(42)
}
console.log(await foo())
$ ./llrt llrt-test.mjs
SyntaxError: unexpected 'await' keyword
at llrt-test.mjs:5:12
Thanks for reporting. Top-Level await is not yet supported. It's recently been added to QuickJS so will eventually be supported by LLRT.
Hi, @richarddavison ,
It seems that rquickjs
, which was just released last week, links quickjs
with top-level await support.
For your information, the latest version is v0.6.1 at this time.
Hi @nabetti1720 . Thanks for the info, I’m aware and already been working on a PR. This will also introduce ES2023 language support. The blocker I have now is synonymously wait for imports without blocking the async runtime. I have created a PR in rquickjs.
Hi @richarddavison , This has already been resolved, correct?