Sakura Lang

V8004 target_unsupported_external

A user package declares an @external(js, …) function, and --target wasm has no JavaScript to call: the WASM backend runs std's host operations through the runtime's own imports only.

An error from the package phase. sakura explain V8004 prints this explanation offline.

A user package declares an @external(js, …) function, and --target wasm has no JavaScript to call: the WASM backend runs std's host operations through the runtime's own imports only. --target native (experimental) refuses it the same way: the native host is Rust with no JavaScript engine, and it never bridges to Node. Build with --target js, or write the function in Sakura Lang.

Wrong program

No fixture in compiler/tests/ui reports this code yet.

Fixed program

No fixed program yet; the explanation above describes the repair.

Edit on GitHub

Last updated

On this page