-
Notifications
You must be signed in to change notification settings - Fork 14
Closed
Description
Given a folder of Wit, some of the wit may import other files.
For example, wit in wasi-http has imports: https://github.com/WebAssembly/wasi-http/tree/main/wit
When you include this in the project you will get:
Executing wit-bindgen...
EXEC : error : interface or world `imports` not found in package [C:\Users\jstur\projects\component\dotnet9-wasi-http-example\App.csproj]
--> wit\deps\cli\command.wit:4:11
|
4 | include imports;
| ^------
C:\Users\jstur\projects\component\dotnet9-wasi-http-example\.packages\bytecodealliance.componentize.dotnet.witbindgen\0.1.0-preview00003\buil
d\ByteCodeAlliance.Componentize.DotNet.WitBindgen.targets(79,9): error MSB3073: The command "C:\Users\jstur\projects\component\dotnet9-wasi-h
ttp-example\.packages\bytecodealliance.componentize.dotnet.witbindgen\0.1.0-preview00003\build\..\tools\win-x64\wit-bindgen.exe c-sharp wit\d
eps\cli\command.wit --runtime native-aot --out-dir obj\Debug\net8.0\wasi-wasm\wit_bindgen\" exited with code 1. [C:\Users\jstur\projects\com
ponent\dotnet9-wasi-http-example\App.csproj]
This is because currently all files are executed individually
componentize-dotnet/src/WitBindgen/build/ByteCodeAlliance.Componentize.DotNet.WitBindgen.props
Line 27 in f33ea43
| <Wit Include="**\*.wit" /> |
Ideally, we could execute the wit-bindgen command on a folder and only once.
This was found when trying out https://github.com/dicej/dotnet9-wasi-http-example.
See example in https://github.com/dicej/dotnet9-wasi-http-example/compare/main...jsturtevant:dotnet9-wasi-http-example:use-wasm-sdk?expand=1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels