[Wasm] Support WASI target in K2

- Support WASI mode in CLI and test infrastructure
- Add external declaration checker
- Split Fir diagnostic lists into Base, JS and WASI

#KT-56849 Fixed
This commit is contained in:
Svyatoslav Kuzmich
2023-11-22 15:57:51 +01:00
committed by Space Team
parent f26b0a5be6
commit e901629cf0
20 changed files with 216 additions and 27 deletions
+11
View File
@@ -0,0 +1,11 @@
// FIR_IDENTICAL
import kotlin.wasm.WasmImport
<!WASI_EXTERNAL_FUNCTION_WITHOUT_IMPORT!>external fun foo(): Int<!>
external interface I {
<!WASI_EXTERNAL_NOT_TOP_LEVEL_FUNCTION!>fun foo(): Int<!>
}
@WasmImport("a", "b")
external fun importedFoo(): Int