Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Runtime/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ export class SwiftRuntime {

setInstance(instance: WebAssembly.Instance) {
this._instance = instance;
if (typeof (this.exports as any)._start === "function") {
throw new Error(
`JavaScriptKit supports only WASI reactor ABI.
Please make sure you are building with:
-Xswiftc -Xclang-linker -Xswiftc -mexec-model=reactor
`
);
}
if (this.exports.swjs_library_version() != this.version) {
throw new Error(
`The versions of JavaScriptKit are incompatible.
Expand Down
6 changes: 6 additions & 0 deletions Sources/JavaScriptKit/Runtime/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions Sources/JavaScriptKit/Runtime/index.mjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.