Skip to content

Commit 2539a0f

Browse files
authored
Merge pull request #58 from shiguredo/feature/fix-transcode-wasm-link-error
GitHub Pages Deploy で transcode_wasm のリンクエラーを修正する
2 parents 4798290 + 53fc43c commit 2539a0f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

examples/transcode_wasm/src/wasm.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ pub struct Encoded {
3333
pub data: Vec<u8>,
3434
}
3535

36+
// Rust 1.96.0 以降、未定義シンボルのリンクが厳格化されたため、
37+
// JS 側から提供される関数を "env" モジュールからインポートすることを明示する。
38+
#[link(wasm_import_module = "env")]
3639
unsafe extern "C" {
3740
pub fn consoleLog(msg: *const u8, msg_len: i32);
3841

0 commit comments

Comments
 (0)