Skip to content

Consider disabling Ref.Emit in System.Linq.Expressions on WASM #38439

Open
@MichalStrehovsky

Description

@MichalStrehovsky

I was surprised the default Blazor WASM template depends on Reflection.Emit. This is because of System.Linq.Expressions.

System.Linq.Expressions can be compiled in a way that removes the Ref.Emit dependency (use interpreter only) - to do this set the IsInterpreting property in System.Linq.Expressions.csproj to true.

Compiling without Ref.Emit support saves 112 kB uncompressed and 44 kB compressed on System.Linq.Expressions.dll alone. I expect there will be more savings possible in CoreLib (the Ref.Emit implementation).

#38438 fixes some bitrot in System.Linq.Expressions that is necessary to build this way.

Cc @marek-safar @eerhardt

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions