DelSkayn / rquickjs

High level bindings to the quickjs javascript engine
MIT License
429 stars 59 forks source link

Fetch API #326

Open Sytten opened 1 week ago

Sytten commented 1 week ago

I was thinking about building a fetch API to the utils crate (once it is merged) since it seems like the direction the community is moving (node has as experimental). Thoughts?

gc-victor commented 1 week ago

I like the idea of the utils crate. There was a similar discussion in LLRT. An approach could be to copy some of the APIs from LLRT to this utils crate.

Sytten commented 1 week ago

I started work on the utils crate in #319, mind linking LLRT?

gc-victor commented 1 week ago

I started work on the utils crate in #319, mind linking LLRT?

Ups, sorry. https://github.com/awslabs/llrt

Sytten commented 1 week ago

Damn this is so cool @gc-victor ! I will try to talk to the devs to see how we can avoid duplicating the effort and allow everybody to benefit from it.

Sytten commented 5 days ago

I also found https://github.com/HiRoFa/GreenCopperRuntime today which has a few good implementations too that I might lift into our extension crate.

ahaoboy commented 3 days ago

Fetch is a very complex API, relying on at least the following modules

  'node:assert',
  'node:http',
  'node:stream',
  'node:net',
  'node:buffer',
  'node:util',
  'node:querystring',
  'node:events',
  'node:zlib',
  'node:perf_hooks',
  'node:util/types',
  'node:crypto',
  'node:diagnostics_channel',
  'node:tls',
  'node:http2'

One possible implementation is rquickjs-ext https://github.com/awslabs/llrt/issues/430