-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[wasm] deprecate legacy JS API and propose new #73068
Conversation
Tagging subscribers to 'arch-wasm': @lewing Issue Details
|
/azp run runtime-wasm |
Azure Pipelines successfully started running 1 pipeline(s). |
src/mono/wasm/debugger/tests/debugger-test/wasm-page-without-assets.html
Show resolved
Hide resolved
# Conflicts: # src/mono/wasm/runtime/dotnet.d.ts # src/mono/wasm/runtime/startup.ts # src/mono/wasm/runtime/types.ts
/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.
I think we could remove EXPORTS
and IMPORTS
. I like the API for getting assembly exports (getAssemblyExports
) and as imports are similar feature, we could provide a similar API for it, eg. setAssemblyImports(assembly: string, imports: any)
.
With this API we can remove EXPORTS
and IMPORTS
.
I'm still not sure if flatten API
object is the right choice. I know than by now we have only few functions, but it seems to me that adding more structure is good for future enhancements.
# Conflicts: # src/mono/wasm/runtime/cwraps.ts # src/mono/wasm/runtime/exports.ts # src/mono/wasm/runtime/startup.ts
/azp run runtime-wasm |
Azure Pipelines successfully started running 1 pipeline(s). |
After a discussion we have chosen a 100% flat API in root object returned from the |
/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). |
MONO
andBINDING
namespacesrunMain
,runMainAndExit
,setEnvironmentVariable
,getAssemblyExports
are just renamed existing APIgetConfig
will returnmono-config.json
typeMonoConfig
setHeapI64Big
,setHeapI32
,getHeapI32
, ... memory functionsMONO
andBINDING
namespaces obsoletedotnet-legacy.d.ts
snake_case
tocamelCase
namesDetails
mono-config.json
/MonoConfig
typeassembly_root
->assemblyRootFolder
debug_level
->debugLevel
enable_debugging
- removed in favor ofdebugLevel
isError
- removed, we throw exceptions as necessaryglobalization_mode
->globalizationMode
diagnostic_tracing
->diagnosticTracing
remote_sources
->remoteSources
environment_variables
->environmentVariables
runtime_options
->runtimeOptions
aot_profiler_options
->aotProfilerOptions
withwriteAt
&sendTo
coverage_profiler_options
->coverageProfilerOptions
withwriteAt
&sendTo
diagnostic_options
->diagnosticOptions
ignore_pdb_load_errors
->ignorePdbLoadErrors
wait_for_debugger
->waitForDebugger
AssetEntry
virtual_path
->virtualPath
load_remote
->loadRemote
is_optional
->isOptional
src\tasks\WasmAppBuilder\WasmAppBuilder.cs
DiagnosticServerOptions
connect_url
->connectUrl
UnnamedProviderConfiguration
keyword_mask
->keywordMask
Diagnostics
EventLevel
->eventLevel
--diagnostic_tracing
->--diagnostic-tracing
IMPORTS
withsetModuleImports
runtimeBuildInfo
&productVersion
&buildConfiguration
to first lowercase