Files
hakorune/docs/guides/wasm-guide/README.md
Moe Charm cc2a820af7 feat(plugin): Fix plugin BoxRef return and Box argument support
- Fixed deadlock in FileBox plugin copyFrom implementation (single lock)
- Added TLV Handle (tag=8) parsing in calls.rs for returned BoxRefs
- Improved plugin loader with config path consistency and detailed logging
- Fixed loader routing for proper Handle type_id/fini_method_id resolution
- Added detailed logging for TLV encoding/decoding in plugin_loader_v2

Test docs/examples/plugin_boxref_return.nyash now works correctly:
- cloneSelf() returns FileBox Handle properly
- copyFrom(Box) accepts plugin Box arguments
- Both FileBox instances close and fini correctly

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-21 00:41:26 +09:00

1.9 KiB
Raw Blame History

🌐 Nyash WASM ガイド

Nyash WebAssemblyWASM実行に関する包括的ガイド

📖 ドキュメント一覧

基本ガイド

技術仕様

🚀 クイックスタート

WASM コンパイル

# 基本コンパイル
./target/release/nyash --compile-wasm program.nyash

# AOT コンパイル(配布用)
./target/release/nyash --aot program.nyash

ブラウザー実行

<!DOCTYPE html>
<html>
<body>
    <script>
        WebAssembly.instantiateStreaming(fetch('program.wasm'), importObject)
            .then(instance => instance.exports.main());
    </script>
</body>
</html>

🎯 実行方式選択

用途 方式 コマンド
開発・テスト インタープリター nyash program.nyash
高速実行 VM nyash --backend vm program.nyash
Web配布 WASM nyash --compile-wasm program.nyash
ネイティブ配布 AOT nyash --aot program.nyash

📊 性能比較

バックエンド 実行速度 配布サイズ 依存関係
インタープリター 1x - Rust
VM 20.4x - Rust
WASM 13.5x なし
AOT 目標1000x+ なし

🔗 関連ドキュメント


最終更新: 2025-08-15