DelSkayn / rquickjs

High level bindings to the quickjs javascript engine
MIT License
431 stars 58 forks source link

How to set many loaders #327

Closed ahaoboy closed 6 days ago

ahaoboy commented 6 days ago

It seems that set_loader only allows a maximum of 8 loaders to be set

impl_to_js_function!(A, B, C, D, E, F, G, H);
ahaoboy commented 6 days ago

I should use chaining syntax here

        BuiltinLoader::default().with_module("inspect", INSPECT_MODULE),
        ModuleLoader::default()
            .with_module("os", modules::os::OsModule)
            .with_module("path", modules::path::PathModule)
            .with_module("buffer", modules::buffer::BufferModule)
            .with_module("util", modules::util::UtilModule)
            .with_module("uuid", modules::uuid::UuidModule)
            .with_module("fs", modules::fs::FsModule),