digitalmars.D.bugs - [Issue 15950] New: Wish: __compressed_import("file.ext");
- via Digitalmars-d-bugs (28/28) Apr 22 2016 https://issues.dlang.org/show_bug.cgi?id=15950
https://issues.dlang.org/show_bug.cgi?id=15950 Issue ID: 15950 Summary: Wish: __compressed_import("file.ext"); Product: D Version: D2 Hardware: x86_64 OS: Windows Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: aliloko gmail.com I've an idea for a practical quality-of-life but non-orthogonal feature. __compressed_import("file.ext") would be like import("file.ext"), but instead giving the file ZIP-compressed or any other friendly format. The use case is that using multiple import("file.exe") are really practical to bundle resources with a program(fonts, images, any data). It really does make builds easier and with less redundancy and it is cross-platform alternatives to PE resources, Mac bundle resources, or something else on *nix. But the size of these resources can be critical for binary size. On Apple platforms they could be duplicated within each executable of an Universal Binary. I've considered using CTFE to ZIP imported resources, but was advised not to. It may be prohibitive and use a lot of memory. It's an option though, perhaps the reasonable one. --
Apr 22 2016