Async Module Loader

Open
#351 0 comments 4 reactions 0 assignees View on GitHub

Maintainers usually reply within 5 days

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
c, javascript

Research direction

Start with den-core/src/loader/http.rs around line 109 and the linked rquickjs issue. Then trace QuickJS's module-loader and dynamic import entry points. Done means remote HTTP modules can load asynchronously without blocking the execution flow, including await import(...).

Written by the indexing model from the issue text.

Description

Per the request of https://github.com/DelSkayn/rquickjs/issues/125, this is currently a problem for Den to load HTTP files remotely and asynchronously in the sense that I have to block the entire thread for the task to run:

https://github.com/stevefan1999-personal/den/blob/25672db84c93b7d36fb70e514dbe5f92b2e63188/den-core/src/loader/http.rs#L109

While async reqwest and parallel download of HTTP scripts should work as intended, but the whole execution flow has to be stopped, even in case with dynamic import aka await import(...).

Dominant language
C
Stars
11.1k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from bellard/quickjs

All issues in bellard/quickjs

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.