- Allow trimming components via Cargo features to reduce binary size
Currently, even with the highest Rust optimization level in release mode (e.g., opt-level = "z" or "s" ), the compiled executable size still exceeds 100MB. For lightweight use cases (such as a simple HTTP server), many built-in components (like WebGPU, FFI, etc.) are completely unnecessary. It would be very helpful to introduce Cargo feature flags, allowing developers to selectively enable or disable specific components. This would make it much easier to tree-shake Deno and significantly reduce the final binary size.
- Support loading scripts from memory ( &str / &[u8] )
At present, libdeno only seems to support loading scripts from file system paths. However, in some scenarios (e.g., bundling JS/TS scripts directly into the Rust binary as embedded string resources), reading from the file system is not ideal. It would be great if an API could be provided to load and execute scripts directly from string slices or byte slices.
Currently, even with the highest Rust optimization level in release mode (e.g., opt-level = "z" or "s" ), the compiled executable size still exceeds 100MB. For lightweight use cases (such as a simple HTTP server), many built-in components (like WebGPU, FFI, etc.) are completely unnecessary. It would be very helpful to introduce Cargo feature flags, allowing developers to selectively enable or disable specific components. This would make it much easier to tree-shake Deno and significantly reduce the final binary size.
At present, libdeno only seems to support loading scripts from file system paths. However, in some scenarios (e.g., bundling JS/TS scripts directly into the Rust binary as embedded string resources), reading from the file system is not ideal. It would be great if an API could be provided to load and execute scripts directly from string slices or byte slices.