awslabs / llrt

LLRT (Low Latency Runtime) is an experimental, lightweight JavaScript runtime designed to address the growing demand for fast and efficient Serverless applications.
Apache License 2.0
8.09k stars 358 forks source link

move require to llrt_modules #645

Open ahaoboy opened 1 week ago

ahaoboy commented 1 week ago

llrt require is implemented in the llrt_core module

If it can be implemented in llrt_modules, it will make it easier for other rquickjs projects to use cjs modules.

use llrt_modules::{ require::{init}};

init(ctx)
require('fs')
nabetti1720 commented 1 week ago

It's a bit chaotic in vm::init() and could be a bit more organized. :)

ahaoboy commented 1 week ago

simd_json is also a great feature. If it can be moved into llrt_modules, more projects can benefit from it.

Sytten commented 6 days ago

Dont know if you saw @ahaoboy but I refactored the modules into individual ones, simd_json is already in llrt_json