Files
hakorune/plugins/nyash-fixture-plugin
Selfhosting Dev 824ca600ea refactor: 大規模ファイル分割とプラグインリファクタリング
## 🎯 プラグイン整理
-  **nyash-json-plugin**: プロバイダー抽象化、NodeRep統一
-  **nyash-string-plugin**: TLVヘルパー整理
-  **nyash-net-plugin**: HTTPヘルパー分離、ソケット管理改善
-  **nyash-counter-plugin/fixture-plugin**: 基本構造整理

## 📂 mir_interpreter分割
-  **mir_interpreter.rs → mir_interpreter/ディレクトリ**
  - mod.rs: メイン構造体定義
  - execution.rs: 実行エンジン
  - memory.rs: メモリ管理
  - instructions/: 命令別実装

## 🔧 その他の改善
- テストファイル群の最適化
- LLVMコンパイラのメイン関数整理
- 不要なインポート削除

1000行超のファイルを適切なモジュール構造に分割完了!

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-25 01:09:48 +09:00
..

Nyash Fixture Plugin

Minimal, deterministic plugin for smoke tests. Provides FixtureBox with:

  • Methods

    • birth (id=0): creates an instance; returns instance id as raw u32 (4 bytes)
    • echo (id=1): returns the input string (TLV tag=6)
    • get (id=2): returns constant string "ok"
    • fini (id=0xFFFF_FFFF): destroys the instance
  • TypeBox FFI symbol: nyash_typebox_FixtureBox

  • Legacy entry (compat): nyash_plugin_invoke

  • Spec file: nyash_box.toml (type_id=101, method ids)

Build

cargo build --release -p nyash-fixture-plugin

Resulting artifacts (by platform):

  • Linux: target/release/libnyash_fixture_plugin.so
  • macOS: target/release/libnyash_fixture_plugin.dylib
  • Windows: target/release/nyash_fixture_plugin.dll

Copy the built file to the project plugin folder (platform name preserved):

  • Linux: plugins/nyash-fixture-plugin/libnyash_fixture_plugin.so
  • macOS: plugins/nyash-fixture-plugin/libnyash_fixture_plugin.dylib
  • Windows: plugins/nyash-fixture-plugin/nyash_fixture_plugin.dll

Use in smokes

  • Profile: tools/smokes/v2/run.sh --profile plugins
  • Test: Fixture autoload is auto-detected and run when the platform file is present
    • The smoke script auto-detects extension: .so (Linux), .dylib (macOS), .dll (Windows)

Notes

  • On Windows, plugin filenames do not start with lib.
  • The plugins smoke uses using kind="dylib" autoload; it is safe by default and only enabled when NYASH_USING_DYLIB_AUTOLOAD=1 is set (the runner handles this).