1. 02 11月, 2022 2 次提交
    • A
      Revert "[wasm] browser profiler (#77449)" (#77759) · d3a3eda6
      Ankit Jain 提交于
      This reverts commit 0e24ea7c.
      
      It broke all the perf pipeline wasm builds. It happens with v8 `10.9.130`:
      
      ```
      Error: Invalid 'startMark' argument: No numeric 'startTime' field
          at pe (/home/helixbot/work/B2E7090F/w/A520093B/e/performance/artifacts/bin/for-running/MicroBenchmarks/659adab0-5c86-4e74-8913-672bd56fd58e/bin/net7.0/browser-wasm/AppBundle/dotnet.js:3:12994)
          at /home/helixbot/work/B2E7090F/w/A520093B/e/performance/artifacts/bin/for-running/MicroBenchmarks/659adab0-5c86-4e74-8913-672bd56fd58e/bin/net7.0/browser-wasm/AppBundle/dotnet.js:5:95874
      exiting due to exception: Error: Invalid 'startMark' argument: No numeric 'startTime' field
      ```
      
      - It works fine with older versions like `10.7.193` (current stable).
      - It wasn't caught in the CI checks because those are using an older version of v8.
      d3a3eda6
    • P
      [wasm] browser profiler (#77449) · 0e24ea7c
      Pavel Savara 提交于
      * wip
      
      * wip
      
      * cleanup
      
      * feedback
      
      * feedback
      0e24ea7c
  2. 20 10月, 2022 1 次提交
  3. 06 10月, 2022 1 次提交
  4. 31 8月, 2022 1 次提交
  5. 24 8月, 2022 1 次提交
    • P
      [wasm] improve samples (#74371) · e714888c
      Pavel Savara 提交于
      - new sample for DLLImport on wasm
      - license headers
      - refactor withModuleConfig to advanced sample
      - removed withConsoleForwarding from samples
      e714888c
  6. 22 8月, 2022 1 次提交
  7. 15 8月, 2022 1 次提交
    • P
      [wasm] cleanup testing and host support in templatest and tests (#73785) · 906ec1d3
      Pavel Savara 提交于
      * wip
      
      * wip
      
      * wip
      
      * Single instance in create method.
      
      * withMainAssembly
      
      * withAsyncFlushOnExit
      
      * Fix exporting INTERNAL api.
      
      Move all legacy API object creation to dotnet.es6.post.js where module export is created.
      
      * fix release build
      
      * Move virtualWorkingDirectory initialization to the create method, so it is used in both scenarios (run & create).
      
      * Fix applicationArguments in templates.
      
      * Update WBT.
      
      * Fix ENVIRONMENT_IS_*.
      
      * Move pthreadPoolSize to MonoConfig (from internal).
      
      Fix merge error.
      
      * Fix ConsolePublishAndRun.
      
      * Update readme.md in templates.
      
      * Update WasmAppHost to always pass application arguments as query string.
      
      Add API for parsing applications arguments passed by the WasmAppHost.
      Co-authored-by: NMarek Fišera <mara@neptuo.com>
      906ec1d3
  8. 10 8月, 2022 1 次提交
  9. 04 8月, 2022 1 次提交
  10. 28 7月, 2022 1 次提交
  11. 26 7月, 2022 1 次提交
    • P
      [wasm] improve startup (#72275) · 73374e8e
      Pavel Savara 提交于
      - streaming wasm instantiation
      - more parallel download of DLLs
      - new hook `downloadResource` and `config.assets[].resolvedUrl `
      - improved `locateFile` allows to run dotnet with another working directory
      - call `init_crypto` in blazor startup sequence
      Co-authored-by: NMarek Fišera <mara@neptuo.com>
      73374e8e
  12. 11 7月, 2022 1 次提交
  13. 24 6月, 2022 1 次提交
  14. 13 1月, 2022 1 次提交
    • P
      [wasm] Load assets earlier (#63623) · c7630198
      Pavel Savara 提交于
      - allow Module.config to have assets with buffer instead of url
      - change sample to show how emscripten callbacks are triggered
      - pass config into onConfigLoaded and made it async
      - split asset download from copying it into memory
      - moved startup sequence to configure_emscripten_startup and documented it there
      - diagnostic_tracing as CLI parameter for tests
      - throttle parallel download of assets
      - move tests which fail on V8 to browser or nodeJS scenarios
      c7630198
  15. 22 12月, 2021 1 次提交
  16. 02 12月, 2021 1 次提交
    • P
      [Wasm] JS modularization (#61313) · 1bd36302
      Pavel Savara 提交于
      Modularized dotnet.js
      * By using emcc options MODULARIZE and EXPORT_ES6, depending on WasmEnableES6 to produce ES6 or CommonJS modules respectively.
      * WasmEnableES6 enables WasmBuildNative because dotnet.js need to be re-linked
      * CommonJS version is able to be loaded into global namespace and behaves as before this change.
      * Added new es6/*.js and es6/*.js files which are included in dotnet.js creation. 
      * Key aspects are documented in src/mono/wasm/runtime/modularize-dotnet.md of this PR.
      * Improved dotnet.d.ts it is now generated into version control too, so that we could observe how it evolves.
      * Removed legacy --testing argument and simplified is_testing logic in the the samples.
      * Added browser-es6 sample app, which uses WasmEnableES6=true to compile dotnet.js as ES6 module.
      * Added browser-legacy sample, which uses dotnet.js CommonJS module and loads it into global namespace.
      * Added package.json into the nupkg
      Co-authored-by: NAnkit Jain <radical@gmail.com>
      Co-authored-by: NKatelyn Gadd <kg@luminance.org>
      Co-authored-by: NMarek Fišera <mara@neptuo.com>
      1bd36302
  17. 17 11月, 2021 1 次提交
    • P
      [wasm] renames and cleanup before modularization (#61596) · da0e0f73
      Pavel Savara 提交于
      - no imports from outer scope
      - move dotnet to -extern-pre-js
      - re-enable JS minification with ES2018
      - rename main javaScript files to main.js and test-main.js
      - sample and test script cleanup
      - rename set_exit_code method
      - rewrite test start as async method
      - improve script loading via script element on page in test
      - use BINDING.bind_static_method instead of INTERNAL where possible
      - better .d.ts exports
      - formatted html files
      - renamed modules.ts to imports.ts which makes more sense
      - improved error propagation
      - renamed __initializeImportsAndExports
      - delayed exit and stdout flush
      da0e0f73
  18. 03 11月, 2021 1 次提交
    • P
      [wasm] simplify startup configuration (#61072) · 39503818
      Pavel Savara 提交于
      * added configSrc - path to MonoConfig json file
      * added Module.onConfigLoaded callback
      * added Module.onDotNetReady replacing MonoConfig.loaded_cb
      * removed loaded_cb, assembly_list, runtime_assets, runtime_asset_sources from MonoConfig
      * simplified all sample and test projects
      * renamed no_global_exports to disableDotNet6Compatibility
      * implement default Module.preInit and Module.onRuntimeInitialized which could be overriden by user code (like Blazor)
      
      * re-enable the interp lane
      39503818
  19. 14 10月, 2021 1 次提交
    • P
      [wasm] rationalize internal exports (#60075) · a546fa48
      Pavel Savara 提交于
      - introduce globalThis.INTERNAL and move all exported methods which we only use internally or for testing
      - reduce BINDING and MONO exports to minimal scope necessary - as used by Blazor
      - fix all internal usages in tests
      - produce dotnet.d.ts and include it in the workload
      - moved Module.config to MONO.config
      - added mono_load_runtime_and_bcl_args into MONO export
      - removed obsolete debugger test InvalidScopeId
      - introduced INTERNAL.mono_wasm_set_main_args
      - add mono_wasm_new_root_buffer, mono_wasm_new_root, mono_wasm_release_roots to the MONO interface
      a546fa48
  20. 06 8月, 2021 1 次提交
    • F
      Add runtimeconfig.json support for WebAssembly (#56486) · 13f80656
      Fan Yang 提交于
      * Initial change for adding runtimeconfig to wasm
      
      * Add runtimeconfig support to wasm
      
      * Move test folder and update runtimeconifg task name
      
      * Fix test
      
      * Fix test csproj file
      
      * Use the right var for main dll name
      
      * Resolve review feedback part 1
      
      * Resolve review feedbacks part 2
      
      * Add doc for updating dependencies when adding new tasks
      
      * Remove redundant condition and redundant copy
      
      * There is no runtimeconfig.json file to parse, when OutputType is library. So skip it.
      
      * Skip for Android tests as well.
      
      * Remove the wrong locatioin of WasmFilesToIncludeInFileSystem
      
      * Update runtimeconfig file path
      
      * Add RuntimeConfigParserTasksAssemblyPath to linker test project template
      
      * Fix test failures on WASM EAT and AOT lanes
      
      * [wasm] Add a test for reading runtimeconfig.json
      
      * improve error reporting slightly
      
      * Enable tests
      
      * One more thing to enable tests
      
      * Run target _WasmGenerateRuntimeConfig when runtimeconfig.json file exists
      
      * Add a test for configure runtime using msbuild properties
      
      * Fix runtime test failures
      
      * Update tests base on feedback
      
      * Add missing ")"
      
      * Add one more condition
      
      * More format changes
      
      * Better error handling
      
      * [wasm] Fix build for a test support project
      
      This fixes the build for ApplyUpdateReferencedAssembly.csproj, which is
      a support project for HotReload wasm functional test.
      
      ```
      D:\workspace\_work\1\s\src\mono\wasm\build\WasmApp.targets(131,5): error : Could not find
          D:\workspace\_work\1\s\artifacts\bin\ApplyUpdateReferencedAssembly\net6.0-Release\browser-wasm\publish\ApplyUpdateReferencedAssembly.runtimeconfig.json
          for D:\workspace\_work\1\s\artifacts\bin\ApplyUpdateReferencedAssembly\net6.0-Release\browser-wasm\publish\ApplyUpdateReferencedAssembly.dll.
      
          [D:\workspace\_work\1\s\src\tests\FunctionalTests\WebAssembly\Browser\HotReload\ApplyUpdateReferencedAssembly\ApplyUpdateReferencedAssembly.csproj]
      ```
      
      The wasm targets should be run at all for this project. But they are run
      because they get imported by tests.wasm.targets, which gets imported because
      `$(IsTestProject)=true`.
      
      The csproj has `$(IsTestProject)=false`, and `$(IsTestSupportProject)=true`,
      which should mean that the test.props/targets don't get imported. But the
      import is conditioned on `$(EnableTestSupport)`, which gets set in
      `src/libraries/Directory.Build.props`. And that means setting
      `$(IsTestProject)=true` in the csproj is too late.
      
      So, instead, set that in a `Directory.Build.props`. And also, ensure that the
      `Directory.Build.props` for functional tests doesn't override the value!
      Co-authored-by: NAnkit Jain <radical@gmail.com>
      13f80656
  21. 24 6月, 2021 1 次提交
  22. 21 6月, 2021 1 次提交
    • D
      [WASM] Converted mono-config.js to mono-config.json (#53606) · a3f0e2be
      Daniel Genkin 提交于
      * converted mono-config.js to mono-config.json
      
      * Fixed test
      
      * fixed handling of case where Module isn't defined
      
      * Fixed remaining failing tests
      
      * Replaced alerts with console.log to fix Helix test
      
      * replaced all vars with consts
      
      * use fetch
      
      * clean syntax
      
      * prevent timeouts when the mono-config file fails to load
      
      * Moved config file loading to preInit
      
      * Fixed tests
      
      * Adjusted file linking
      
      * removed the unnecessary js_support.js
      
      * cleaned up function
      
      * updated samples
      
      * removed lingering pre-js flag
      
      * Fixed trimming tests
      
      * addressed PR comments
      
      * removed useless function
      a3f0e2be
  23. 05 2月, 2021 1 次提交
  24. 19 12月, 2020 1 次提交
    • M
      Run Wasm browser sample on Helix (#46144) · ae144f2d
      Maxim Lipnin 提交于
      This is a continuation of #45768 for the browser sample.  
      Which sample to run depends on the Helix scenario:  
      - the console sample runs under normal scenario;
      - the browser sample runs under WasmTestOnBrowser scenario.
      
      Relates to #43865
      ae144f2d
  25. 08 8月, 2020 1 次提交