For use cases described in this comment, need to have the capability to truncate the decorator data when serializing MAST.
This comment describes one approach for implementing this feature.
Should probably introduce CLI flag for the compile command to write the compiled program with truncated optional data.
Why is this feature needed?
Per the comment on Pull Request #1531 :
... general idea is that producers, e.g. the compiler, will emit a fully-fleshed out package containing all the things that could be useful for interacting with that package (e.g. debug info, documentation, sources in some caes, etc.), and the MAST contained in the package would have all of the decorators (naturally required to support debugging, etc.). There are contexts where all of that stuff is simply dead weight though, or you want to optimize for binary size, in which case you can strip all of that, resulting in a minimal package that only contains exactly what is needed to execute what it contains. One such potential use case, would be publishing packages on-chain, which would only be feasible if they are as small as possible.
Feature description
For use cases described in this comment, need to have the capability to truncate the decorator data when serializing MAST.
This comment describes one approach for implementing this feature.
Should probably introduce CLI flag for the compile command to write the compiled program with truncated optional data.
Why is this feature needed?
Per the comment on Pull Request #1531 : ... general idea is that producers, e.g. the compiler, will emit a fully-fleshed out package containing all the things that could be useful for interacting with that package (e.g. debug info, documentation, sources in some caes, etc.), and the MAST contained in the package would have all of the decorators (naturally required to support debugging, etc.). There are contexts where all of that stuff is simply dead weight though, or you want to optimize for binary size, in which case you can strip all of that, resulting in a minimal package that only contains exactly what is needed to execute what it contains. One such potential use case, would be publishing packages on-chain, which would only be feasible if they are as small as possible.