- 
                Notifications
    You must be signed in to change notification settings 
- Fork 5.2k
[browser] legacy JS interop optional via WasmEnableLegacyJsInterop - managed #82826
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[browser] legacy JS interop optional via WasmEnableLegacyJsInterop - managed #82826
Conversation
| Tagging subscribers to 'arch-wasm': @lewing Issue DetailsAllow opt-in trimming of legacy interop from managed libraries by  Based on discussion with @marek-safar here #79622 (comment) 
 | 
5f07d4b    to
    9d86fac      
    Compare
  
            
          
                ...eropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSObject.References.cs
              
                Outdated
          
            Show resolved
            Hide resolved
        
      83c6417    to
    82f8b47      
    Compare
  
    | /azp run runtime-wasm | 
| Azure Pipelines successfully started running 1 pipeline(s). | 
| /azp run runtime-wasm | 
| Azure Pipelines successfully started running 1 pipeline(s). | 
209942f    to
    3afdb87      
    Compare
  
    | /azp run runtime-wasm | 
| Azure Pipelines successfully started running 1 pipeline(s). | 
| /azp run runtime-wasm | 
| Azure Pipelines successfully started running 1 pipeline(s). | 
| /azp run runtime-wasm | 
| Azure Pipelines successfully started running 1 pipeline(s). | 
| /azp run runtime-wasm | 
| Azure Pipelines successfully started running 1 pipeline(s). | 
| @radical please review, I think it's ready | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
        
          
                ...stem.Runtime.InteropServices.JavaScript/src/System.Runtime.InteropServices.JavaScript.csproj
          
            Show resolved
            Hide resolved
        
      | /azp run runtime-wasm | 
| Azure Pipelines successfully started running 1 pipeline(s). | 
Allow opt-in trimming of legacy interop from managed libraries
WasmEnableLegacyJsInteropMSBuild property. Default true for now.ILLink.Descriptors.LegacyJsInterop.xmland use is whenWasmEnableLegacyJsInterop==trueSystem.Runtime.InteropServices.JavaScript.LegacyExportsfrom trimmingmono_wasm_pthread_on_pthread_attachedlinking issue by reverting small part of [browser] legacy JS interop optional via WasmEnableLegacyJsInterop - native #82834This change doesn't disable the legacy interop for any scenario. There would be follow-up PR.
After Blazor change is merged, we could make the feature opt-out also for them.
See also discussion with @marek-safar