When building a component intended for composition with other components, it may make sense to target the spin-imports world defined in the src/spin_sdk/wit/spin.wit file in this repo. However, that currently won't work because spin_sdk.http unconditionally imports spin_sdk.wit.exports, which won't exist when targeting spin-imports. One possible solution would be to wrap that import in a try/except block and then skip any code that requires it.
When building a component intended for composition with other components, it may make sense to target the
spin-imports
world defined in thesrc/spin_sdk/wit/spin.wit
file in this repo. However, that currently won't work becausespin_sdk.http
unconditionally importsspin_sdk.wit.exports
, which won't exist when targetingspin-imports
. One possible solution would be to wrap that import in atry/except
block and then skip any code that requires it.