- 
                Notifications
    You must be signed in to change notification settings 
- Fork 5.2k
[wasi+browser] bundle timezones into .wasm #82250
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
Conversation
| Tagging subscribers to 'arch-wasm': @lewing Issue Detailswork in progress 
 | 
18e709c    to
    a45ecbf      
    Compare
  
    9c2f6d6    to
    3d4cfb7      
    Compare
  
    37a1350    to
    89d4f74      
    Compare
  
    …nix.NonAndroid.cs Co-authored-by: Ankit Jain <[email protected]>
…fferent asset types
| @radical do you have further feedback ? | 
        
          
                src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.Unix.NonAndroid.cs
          
            Show resolved
            Hide resolved
        
              
          
                src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.Unix.NonAndroid.cs
          
            Show resolved
            Hide resolved
        
      Co-authored-by: Ankit Jain <[email protected]>
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 👍
| <RunWithEmSdkEnv Command="$(EmccCmd) -xc -c @$(_WasmTimezonesSourcesRsp)" | ||
| WorkingDirectory="$(WasmObjDir)" | ||
| EmSdkPath="$(EMSDK_PATH)" | ||
| ConsoleToMsBuild="true" | ||
| IgnoreStandardErrorWarningFormat="true"> | ||
| </RunWithEmSdkEnv> | 
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.
For a follow up PR, consider using EmccCompile task which compiles in parallel.
| /azp run runtime-wasm | 
| Azure Pipelines successfully started running 1 pipeline(s). | 
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.
Looks good, I especially like the description ✨
| CI failures are unrelated. | 

Motivation
<WasmSingleFileBundle>Changes
browserandwasiOSTZDIRenv variable is setTZDIRis set it would fallback to unix-like file system approach (as before).mono_wasm_get_bundled_fileandmono_wasm_add_bundled_filemono_wasm_add_bundled_fileis called with file names from generatedmono_wasm_register_bundle_timezonesSystemNative_GetTimeZoneDatawhich calls newmono_wasm_get_bundled_file<WasmSingleFileBundle>we also generatemono_wasm_register_bundle_assembliesfor WASIdotnet.timezones.blatfrom runtime packwasm-bundled-timezones.ato workloadsTARGET_BROWSERdetection fornative/libsTZenv variable toUTCas that's not valid timezone anyway. dotnet will fallback to UTC.usr/shareon browser VFS because it's mapped toSpecialFolder.CommonApplicationDatawhich would not exist otherwise.EmitWasmBundleObjectFileas newEmitWasmBundleFilesclanginput stream or to files foremccGenerateTimezonesArchivein both wasi.proj and wasm.projEmitWasmBundleFilesTask_GenerateAssemblyObjectFilesto use newEmitWasmBundleFilestaskfuture work
BlazorEnableTimeZoneSupportwork again,