digitalmars.D.learn - Again, ask help with Dlang program footprint
- dangbinghoo (12/12) Apr 07 2022 hi,
- dangbinghoo (5/17) Apr 07 2022 PS: I need the program link Phobos statically, don't want to use
- dangbinghoo (3/9) Apr 08 2022 hi, please help with this, can we reduce the footprint?
- dangbinghoo (7/17) Apr 08 2022 OK, I just put on another git repo, which is the simpley
- dangbinghoo (6/25) Apr 08 2022 OK, talked in Discord.
hi, I just asked for help about this before, on that time, my solution is to remove whatever dub dependencies which are optional. now, I'm re-examining the dlang program footprint size, and I put a github example repo here: https://github.com/dangbinghoo/dlang_footprint_test.git the example is simply a json ser/deser test depends on ASDF, on my machine it generates a binary about 914K using LDC2. Note: as I'm focused on embedded system development, what I want help with is only for the situation using LDC compiler. thanks!
Apr 07 2022
On Friday, 8 April 2022 at 03:20:29 UTC, dangbinghoo wrote:hi, I just asked for help about this before, on that time, my solution is to remove whatever dub dependencies which are optional. now, I'm re-examining the dlang program footprint size, and I put a github example repo here: https://github.com/dangbinghoo/dlang_footprint_test.git the example is simply a json ser/deser test depends on ASDF, on my machine it generates a binary about 914K using LDC2. Note: as I'm focused on embedded system development, what I want help with is only for the situation using LDC compiler. thanks!PS: I need the program link Phobos statically, don't want to use .so except the basic C library. so I added option `-link-defaultlib-shared=false` in dub.json by default, this should not be changed.
Apr 07 2022
On Friday, 8 April 2022 at 03:26:29 UTC, dangbinghoo wrote:On Friday, 8 April 2022 at 03:20:29 UTC, dangbinghoo wrote:hi, please help with this, can we reduce the footprint? thanks![...]PS: I need the program link Phobos statically, don't want to use .so except the basic C library. so I added option `-link-defaultlib-shared=false` in dub.json by default, this should not be changed.
Apr 08 2022
On Saturday, 9 April 2022 at 02:19:52 UTC, dangbinghoo wrote:On Friday, 8 April 2022 at 03:26:29 UTC, dangbinghoo wrote:OK, I just put on another git repo, which is the simpley helloworld in D, and it generates 849KB for print a single line! https://github.com/dangbinghoo/hello_world_d so, maybe there's something wrong with D compiling? thanks!On Friday, 8 April 2022 at 03:20:29 UTC, dangbinghoo wrote:hi, please help with this, can we reduce the footprint? thanks![...]PS: I need the program link Phobos statically, don't want to use .so except the basic C library. so I added option `-link-defaultlib-shared=false` in dub.json by default, this should not be changed.
Apr 08 2022
On Saturday, 9 April 2022 at 02:56:50 UTC, dangbinghoo wrote:On Saturday, 9 April 2022 at 02:19:52 UTC, dangbinghoo wrote:OK, talked in Discord. answer is clear: 1. D runtime is about 400KB on amd64 stripped. 2. phobos is set of big templates, writeln is expensive. betterC print a helloworld only costs 6.3KB stripped. thanks!On Friday, 8 April 2022 at 03:26:29 UTC, dangbinghoo wrote:OK, I just put on another git repo, which is the simpley helloworld in D, and it generates 849KB for print a single line! https://github.com/dangbinghoo/hello_world_d so, maybe there's something wrong with D compiling? thanks!On Friday, 8 April 2022 at 03:20:29 UTC, dangbinghoo wrote:hi, please help with this, can we reduce the footprint? thanks![...]PS: I need the program link Phobos statically, don't want to use .so except the basic C library. so I added option `-link-defaultlib-shared=false` in dub.json by default, this should not be changed.
Apr 08 2022