Commit f4cbfaa
Peter Huene
wit-bindgen-rust: link component type for imports. (#542)
* wit-bindgen-rust: link component type for imports.
This commit forces a reference to the component type in import sub-modules.
It fixes an issue when building bindings to a different crate and only
referencing an import binding.
As there was no reference to `__link_section`, the generated core module from
the LLVM toolchain was missing the component type custom section.
The fix simply performs what we're already doing for exports in the `export!`
macro, but adds the reference to each generated import submodule.
* Use `super` instead of `crate` for referencing `__link_section` in imports.1 parent 483f92e commit f4cbfaa
1 file changed
+7
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
| 233 | + | |
239 | 234 | | |
240 | 235 | | |
241 | 236 | | |
| |||
377 | 372 | | |
378 | 373 | | |
379 | 374 | | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
380 | 380 | | |
381 | 381 | | |
382 | | - | |
| 382 | + | |
383 | 383 | | |
384 | 384 | | |
385 | 385 | | |
| |||
0 commit comments