kekyo / IL2C

IL2C - A translator for ECMA-335 CIL/MSIL to C language.
Apache License 2.0
403 stars 36 forks source link

Integrated libcache #121

Open kekyo opened 2 years ago

kekyo commented 2 years ago

The new build engine builds the IL2C runtime library on the fly (#79). This is placed in the directory of the runtime library (the directory where IL2C.Runtime is placed in the case of project builds, or in the case of nuget, probably under ~/.nuget/) with the name libcache/.

Initially, libcache was prepared only for placement of the runtime library. However, we found out that we could share the following scenario:

In the case of assemblies referenced by project reference that are built simultaneously in the same solution, there are directories specific to each project, so it is sufficient to place the build results directly there.

If we decide to place the build result libraries in some way, such as a hash value, in a unique directory (such as $HOME/.il2c/libcache/), we will be able to reference them in another project as well, in the same nuget assemblies and builds of directly referenced assemblies can also be referenced efficiently.

It is not possible now, but once we establish a way to make linking more efficient by referencing lib*.a, we may be able to achieve the fast linking of assembly libraries that we had in mind when we conceived of IL2C in this way.