I've started converting existing projects to Wasi. I always get this error first:
rich@Richs-Air count % dotnet run
WasmAppHost --runtime-config /Users/rich/git/convenience/wordcount/count/bin/Debug/net8.0/wasi-wasm/AppBundle/count.runtimeconfig.json
Error: no perHostConfigs found
I then remember that I need the following file:
% cat runtimeconfig.template.json
{
"wasmHostProperties": {
"perHostConfig": [
{
"name": "wasmtime",
"Host": "wasmtime"
}
]
}
}
It would be good if we could make wasmtime the default. I'm glad that this is configurable, however.
Ideally, we'd upgrade the current RuntimeIdentifier approach to be more like PublishWasi, just like PublishAot. And then have an optional WasmHost property.
<PropertyGroup>
<PublishWasi>true</PublishWasi>
<WasmHost>wasmtime</WasmHost>
</PropertyGroup>
We should also decide if parameters to the WasmHost should be handled here. I'd ideally like to be able to dotnet run a wasm app that requires directory mapping, for example.
I've started converting existing projects to Wasi. I always get this error first:
I then remember that I need the following file:
% cat runtimeconfig.template.json { "wasmHostProperties": { "perHostConfig": [ { "name": "wasmtime", "Host": "wasmtime" } ] } }It would be good if we could make
wasmtimethe default. I'm glad that this is configurable, however.Ideally, we'd upgrade the current
RuntimeIdentifierapproach to be more likePublishWasi, just likePublishAot. And then have an optionalWasmHostproperty.We should also decide if parameters to the
WasmHostshould be handled here. I'd ideally like to be able todotnet runa wasm app that requires directory mapping, for example.