Files
hakorune/Cargo.toml
Selfhosting Dev d90216e9c4 📚 Phase 15 - セルフホスティング戦略の明確化とEXE-first実装
## 主な変更点

### 🎯 戦略の転換と明確化
- PyVMを開発ツールとして位置づけ(本番経路ではない)
- EXE-first戦略を明確に優先(build_compiler_exe.sh実装済み)
- Phase順序の整理: 15.2(LLVM)→15.3(コンパイラ)→15.4(VM)

### 🚀 セルフホスティング基盤の実装
- apps/selfhost-compiler/にNyashコンパイラMVP実装
  - compiler.nyash: メインエントリー(位置引数対応)
  - boxes/: parser_box, emitter_box, debug_box分離
- tools/build_compiler_exe.sh: ネイティブEXEビルド+dist配布
- Python MVPパーサーStage-2完成(local/if/loop/call/method/new)

### 📝 ドキュメント整備
- Phase 15 README/ROADMAP更新(Self-Hosting優先明記)
- docs/guides/exe-first-wsl.md: WSLクイックスタート追加
- docs/private/papers/: 論文G~L、爆速事件簿41事例収録

### 🔧 技術的改善
- JSON v0 Bridge: If/Loop PHI生成実装(ChatGPT協力)
- PyVM/llvmliteパリティ検証スイート追加
- using/namespace機能(gated実装、Phase 15では非解決)

## 次のステップ
1. パーサー無限ループ修正(未実装関数の実装)
2. EXEビルドとセルフホスティング実証
3. c0→c1→c1'ブートストラップループ確立

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-15 18:44:49 +09:00

253 lines
6.3 KiB
TOML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[package]
name = "nyash-rust"
version = "0.1.0"
edition = "2021"
authors = ["Claude Code <claude@anthropic.com>"]
description = "Everything is Box in Rust - Ultimate Memory Safe Nyash Implementation"
license = "MIT"
repository = "https://github.com/user/nyash"
keywords = ["language", "interpreter", "box", "memory-safe", "rust"]
categories = ["development-tools::parsing", "interpreters"]
# Default features - minimal CLI only
[features]
default = ["cli", "plugins"]
e2e = []
cli = []
plugins-only = []
builtin-core = []
## JIT-direct only mode: disable legacy VM-arg fallback and plugin-builtins branches
## (keeps code compiling; VM-integrated JIT paths remain but are inert)
jit-direct-only = []
gui = ["dep:egui", "dep:eframe", "dep:egui_extras", "dep:image"]
gui-examples = ["gui"]
all-examples = ["gui-examples"]
dynamic-file = []
wasm-backend = ["dep:wasmtime", "dep:wabt"]
# プラグイン機構の有効化(ネイティブ環境のみ推奨)
plugins = ["dep:libloading"]
# MIR instruction diet PoC flags (scaffolding only; off by default)
mir_typeop_poc = []
mir_refbarrier_unify_poc = []
# LLVM features split
# - llvm-harness: Python/llvmlite harness onlyinkwell不要
# - llvm-inkwell-legacy: historical Rust/inkwell backend参照用
# keep `llvm` as a compatibility alias to `llvm-harness`
llvm-harness = []
llvm-inkwell-legacy = ["dep:inkwell"]
llvm = ["llvm-harness"]
# (removed) Optional modular MIR builder feature
cranelift-jit = [
"dep:cranelift-codegen",
"dep:cranelift-frontend",
"dep:cranelift-module",
"dep:cranelift-jit",
"dep:cranelift-object",
"dep:cranelift-native"
]
aot-plan-import = []
[lib]
name = "nyash_rust"
path = "src/lib.rs"
crate-type = ["cdylib", "rlib"]
# Main CLI binary - always available
[[bin]]
name = "nyash"
path = "src/main.rs"
# Test binary for multi-box plugin loader
[[bin]]
name = "test-plugin-loader-v2"
path = "src/bin/test_plugin_loader_v2.rs"
required-features = ["dynamic-file"]
[[bin]]
name = "ny_mir_builder"
path = "src/bin/ny_mir_builder.rs"
# Examples for development - only available as examples, not bins
[[example]]
name = "gui_simple_notepad"
path = "examples/simple_notepad.rs"
required-features = ["gui-examples"]
[[example]]
name = "gui_simple_notepad_v2"
path = "examples/simple_notepad_v2.rs"
required-features = ["gui-examples"]
[[example]]
name = "gui_simple_notepad_ascii"
path = "examples/simple_notepad_ascii.rs"
required-features = ["gui-examples"]
[[example]]
name = "gui_debug_notepad"
path = "examples/debug_notepad.rs"
required-features = ["gui-examples"]
[[example]]
name = "gui_nyash_notepad_jp"
path = "examples/nyash_notepad_jp.rs"
required-features = ["gui-examples"]
[[example]]
name = "gui_nyash_explorer"
path = "examples/nyash_explorer.rs"
required-features = ["gui-examples"]
[[example]]
name = "gui_nyash_explorer_with_icons"
path = "examples/nyash_explorer_with_icons.rs"
required-features = ["gui-examples"]
[[example]]
name = "gui_test_icon_extraction"
path = "examples/test_icon_extraction.rs"
required-features = ["gui-examples"]
[[example]]
name = "gui_visual_node_prototype"
path = "development/egui_research/experiments/visual_node_prototype.rs"
required-features = ["gui-examples"]
[dependencies]
# エラーハンドリング
thiserror = "2.0"
anyhow = "1.0"
# シリアライゼーション将来のAST永続化用
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
# コマンドライン(将来の CLI用
clap = { version = "4.0", features = ["derive"] }
# 並行処理GlobalBox用
lazy_static = "1.5"
once_cell = "1.20"
# デバッグ・ログ
log = "0.4"
env_logger = "0.11"
libloading = { version = "0.8", optional = true }
toml = "0.8"
which = "6"
# 日時処理
chrono = "0.4"
# HTTP通信HttpClientBox用
# reqwest = { version = "0.11", features = ["blocking"] } # Temporarily disabled
# 正規表現RegexBox用
regex = "1.0"
# WebAssembly対応
wasm-bindgen = "0.2"
console_error_panic_hook = "0.1"
js-sys = "0.3"
# Cranelift JIT (optional; enabled via feature "cranelift-jit")
cranelift-codegen = { version = "0.103", optional = true }
cranelift-frontend = { version = "0.103", optional = true }
cranelift-module = { version = "0.103", optional = true }
cranelift-jit = { version = "0.103", optional = true }
cranelift-object = { version = "0.103", optional = true }
cranelift-native = { version = "0.103", optional = true }
# WASM backend dependencies (Phase 8) - optional for faster builds
wabt = { version = "0.10", optional = true }
wasmtime = { version = "35.0.0", optional = true }
# GUI フレームワーク - only when gui feature is enabled
egui = { version = "0.29", optional = true }
eframe = { version = "0.29", default-features = false, features = ["default_fonts", "glow"], optional = true }
egui_extras = { version = "0.29", features = ["image"], optional = true }
image = { version = "0.25", features = ["png", "ico"], optional = true }
# LLVM backend deps (optional)
# Move to LLVM 18.1.x toolchains
inkwell = { version = "0.6.0", features = ["llvm18-1"], optional = true }
# Windows API
[target.'cfg(windows)'.dependencies]
windows = { version = "0.60", features = [
"Win32_Foundation",
"Win32_Storage_FileSystem",
"Win32_UI_Shell",
"Win32_UI_WindowsAndMessaging",
"Win32_System_Com",
"Win32_Graphics_Gdi",
] }
[dependencies.web-sys]
version = "0.3"
features = [
"console",
"Document",
"Element",
"HtmlElement",
"Window",
"DomTokenList",
"CssStyleDeclaration",
"HtmlCanvasElement",
"CanvasRenderingContext2d",
"ImageData",
"TextMetrics",
"CanvasGradient",
"CanvasPattern",
"Path2d",
"Performance",
"MouseEvent",
"TouchEvent",
"KeyboardEvent",
"AudioContext",
"AudioContextState",
"AudioBuffer",
"AudioBufferSourceNode",
"GainNode",
"AnalyserNode",
"AudioDestinationNode",
"PeriodicWave",
"OscillatorNode",
]
[dev-dependencies]
# テスト・ベンチマークツール
criterion = "0.5"
tempfile = "3"
[build-dependencies]
once_cell = "1.20"
# Benchmark configuration (will be added later)
# [[bench]]
# name = "box_performance"
# harness = false
[workspace]
members = [
"crates/*",
"plugins/*",
]
[profile.release]
# 最適化設定
opt-level = 3
lto = true
codegen-units = 1
panic = "abort"
[profile.dev]
# 開発用設定
opt-level = 0
debug = true
[profile.release.package."nyash-net-plugin"]
opt-level = "z"
strip = true