-
So, I am still experimenting with using icu4x in .Net, as mentioned in this previous post: #2810. Right now, I have a rust library where I have put in a stubs for all the APIs we need, and a very tiny amount of actual code. I was trying to see what size of datafile I would get with by analyzing the binary with icu_datagen (I followed directions here: https://github.com/unicode-org/icu4x/blob/main/docs/tutorials/data_management.md). The actual library itself is here: https://github.com/naricc/runtime/tree/naricc/icu4x/src/mono/mono/icu-bridge. I used this command after building it:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
Are you sure that your When you run icu4x-datagen, what keys does the output say it is exporting?
|
Beta Was this translation helpful? Give feedback.
-
@sffc I definately did not make a specific effort to do dead code elimination. Is DCE elimination only possible on a complete executable? Or is there some way to do it conservatively on a library (like, eliminating parts that can never be used by any executable)? Because for the scenario I have in mind, doing it on a complete executable is going to be quite hard. Basically, I am using this library as a replacement icu library for the Mono runtime (runs .net code). Mono itself is often just a library that is DL opened on some platforms. When a user of mono finally writes some C# code and builds it, we do get a binary executable out at the end, which has the whole runtime and everything linked (possibly dynamically, depending on the platform). I can probably do an experiment where I run something on a final executable for some sample program manually, but its a lot of plumbing to automate. Would it even be possible to do DCE elimination on that thing, which is mostly written in C? How would I go about doing that? Here is the list of keys it ended up using, I can see that there are many unneeded ones:
|
Beta Was this translation helpful? Give feedback.
@sffc I definately did not make a specific effort to do dead code elimination. Is DCE elimination only possible on a complete executable? Or is there some way to do it conservatively on a library (like, eliminating parts that can never be used by any executable)?
Because for the scenario I have in mind, doing it on a complete executable is going to be quite hard. Basically, I am using this library as a replacement icu library for the Mono runtime (runs .net code). Mono itself is often just a library that is DL opened on some platforms. When a user of mono finally writes some C# code and builds it, we do get a binary executable out at the end, which has the whole runtime and everything lin…