2025-08-09 15:14:44 +09:00
|
|
|
|
[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"]
|
|
|
|
|
|
|
2025-08-13 05:06:43 +00:00
|
|
|
|
# Default features - minimal CLI only
|
|
|
|
|
|
[features]
|
2025-08-20 05:57:18 +09:00
|
|
|
|
default = ["cli", "plugins"]
|
2025-09-03 20:03:45 +09:00
|
|
|
|
e2e = []
|
2025-08-13 05:06:43 +00:00
|
|
|
|
cli = []
|
2025-09-04 03:41:02 +09:00
|
|
|
|
plugins-only = []
|
|
|
|
|
|
builtin-core = []
|
2025-09-06 12:20:27 +09:00
|
|
|
|
## 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 = []
|
2025-08-13 05:06:43 +00:00
|
|
|
|
gui = ["dep:egui", "dep:eframe", "dep:egui_extras", "dep:image"]
|
|
|
|
|
|
gui-examples = ["gui"]
|
|
|
|
|
|
all-examples = ["gui-examples"]
|
2025-08-19 03:48:44 +09:00
|
|
|
|
dynamic-file = []
|
2025-08-19 16:56:44 +09:00
|
|
|
|
wasm-backend = ["dep:wasmtime", "dep:wabt"]
|
2025-08-20 05:57:18 +09:00
|
|
|
|
# プラグイン機構の有効化(ネイティブ環境のみ推奨)
|
|
|
|
|
|
plugins = ["dep:libloading"]
|
2025-08-23 19:27:02 +09:00
|
|
|
|
# MIR instruction diet PoC flags (scaffolding only; off by default)
|
|
|
|
|
|
mir_typeop_poc = []
|
|
|
|
|
|
mir_refbarrier_unify_poc = []
|
2025-09-14 00:44:28 +09:00
|
|
|
|
# LLVM features split
|
|
|
|
|
|
# - llvm-harness: Python/llvmlite harness only(inkwell不要)
|
|
|
|
|
|
# - 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"]
|
2025-09-03 05:04:56 +09:00
|
|
|
|
# (removed) Optional modular MIR builder feature
|
2025-08-27 03:16:57 +09:00
|
|
|
|
cranelift-jit = [
|
|
|
|
|
|
"dep:cranelift-codegen",
|
|
|
|
|
|
"dep:cranelift-frontend",
|
|
|
|
|
|
"dep:cranelift-module",
|
2025-08-29 08:36:07 +09:00
|
|
|
|
"dep:cranelift-jit",
|
|
|
|
|
|
"dep:cranelift-object",
|
|
|
|
|
|
"dep:cranelift-native"
|
2025-08-27 03:16:57 +09:00
|
|
|
|
]
|
2025-09-07 07:36:15 +09:00
|
|
|
|
aot-plan-import = []
|
2025-08-13 05:06:43 +00:00
|
|
|
|
|
2025-08-09 15:14:44 +09:00
|
|
|
|
[lib]
|
|
|
|
|
|
name = "nyash_rust"
|
|
|
|
|
|
path = "src/lib.rs"
|
|
|
|
|
|
crate-type = ["cdylib", "rlib"]
|
|
|
|
|
|
|
2025-08-13 05:06:43 +00:00
|
|
|
|
# Main CLI binary - always available
|
2025-08-09 15:14:44 +09:00
|
|
|
|
[[bin]]
|
|
|
|
|
|
name = "nyash"
|
|
|
|
|
|
path = "src/main.rs"
|
|
|
|
|
|
|
2025-08-19 03:48:44 +09:00
|
|
|
|
# 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"]
|
|
|
|
|
|
|
2025-08-13 05:06:43 +00:00
|
|
|
|
# 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"]
|
2025-08-10 07:54:03 +09:00
|
|
|
|
|
2025-08-11 17:51:16 +09:00
|
|
|
|
|
|
|
|
|
|
|
2025-08-09 15:14:44 +09:00
|
|
|
|
[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"
|
2025-08-20 05:57:18 +09:00
|
|
|
|
libloading = { version = "0.8", optional = true }
|
2025-08-18 11:07:03 +09:00
|
|
|
|
toml = "0.8"
|
2025-09-06 22:08:31 +09:00
|
|
|
|
which = "6"
|
2025-08-09 15:14:44 +09:00
|
|
|
|
|
|
|
|
|
|
# 日時処理
|
|
|
|
|
|
chrono = "0.4"
|
|
|
|
|
|
|
2025-08-10 03:21:24 +00:00
|
|
|
|
# HTTP通信(HttpClientBox用)
|
2025-08-10 13:18:21 +09:00
|
|
|
|
# reqwest = { version = "0.11", features = ["blocking"] } # Temporarily disabled
|
2025-08-10 03:21:24 +00:00
|
|
|
|
|
|
|
|
|
|
# 正規表現(RegexBox用)
|
|
|
|
|
|
regex = "1.0"
|
|
|
|
|
|
|
2025-08-09 15:14:44 +09:00
|
|
|
|
# WebAssembly対応
|
|
|
|
|
|
wasm-bindgen = "0.2"
|
|
|
|
|
|
console_error_panic_hook = "0.1"
|
|
|
|
|
|
js-sys = "0.3"
|
|
|
|
|
|
|
2025-08-27 03:16:57 +09:00
|
|
|
|
# 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 }
|
2025-08-29 08:36:07 +09:00
|
|
|
|
cranelift-object = { version = "0.103", optional = true }
|
|
|
|
|
|
cranelift-native = { version = "0.103", optional = true }
|
2025-08-27 03:16:57 +09:00
|
|
|
|
|
2025-08-19 16:56:44 +09:00
|
|
|
|
# WASM backend dependencies (Phase 8) - optional for faster builds
|
|
|
|
|
|
wabt = { version = "0.10", optional = true }
|
|
|
|
|
|
wasmtime = { version = "35.0.0", optional = true }
|
2025-08-13 13:05:49 +00:00
|
|
|
|
|
2025-08-13 05:06:43 +00:00
|
|
|
|
# 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 }
|
2025-08-10 07:54:03 +09:00
|
|
|
|
|
2025-08-31 06:22:48 +09:00
|
|
|
|
# LLVM backend deps (optional)
|
2025-09-01 23:44:34 +09:00
|
|
|
|
# Move to LLVM 18.1.x toolchains
|
|
|
|
|
|
inkwell = { version = "0.6.0", features = ["llvm18-1"], optional = true }
|
2025-08-18 09:14:39 +00:00
|
|
|
|
|
2025-08-10 07:54:03 +09:00
|
|
|
|
# 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",
|
|
|
|
|
|
] }
|
|
|
|
|
|
|
2025-08-09 15:14:44 +09:00
|
|
|
|
[dependencies.web-sys]
|
|
|
|
|
|
version = "0.3"
|
|
|
|
|
|
features = [
|
|
|
|
|
|
"console",
|
|
|
|
|
|
"Document",
|
|
|
|
|
|
"Element",
|
|
|
|
|
|
"HtmlElement",
|
|
|
|
|
|
"Window",
|
|
|
|
|
|
"DomTokenList",
|
|
|
|
|
|
"CssStyleDeclaration",
|
|
|
|
|
|
"HtmlCanvasElement",
|
|
|
|
|
|
"CanvasRenderingContext2d",
|
|
|
|
|
|
"ImageData",
|
|
|
|
|
|
"TextMetrics",
|
|
|
|
|
|
"CanvasGradient",
|
|
|
|
|
|
"CanvasPattern",
|
|
|
|
|
|
"Path2d",
|
2025-08-20 07:33:18 +09:00
|
|
|
|
"Performance",
|
|
|
|
|
|
"MouseEvent",
|
|
|
|
|
|
"TouchEvent",
|
|
|
|
|
|
"KeyboardEvent",
|
|
|
|
|
|
"AudioContext",
|
|
|
|
|
|
"AudioContextState",
|
|
|
|
|
|
"AudioBuffer",
|
|
|
|
|
|
"AudioBufferSourceNode",
|
|
|
|
|
|
"GainNode",
|
|
|
|
|
|
"AnalyserNode",
|
|
|
|
|
|
"AudioDestinationNode",
|
|
|
|
|
|
"PeriodicWave",
|
|
|
|
|
|
"OscillatorNode",
|
2025-08-09 15:14:44 +09:00
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
[dev-dependencies]
|
|
|
|
|
|
# テスト・ベンチマークツール
|
|
|
|
|
|
criterion = "0.5"
|
2025-09-05 05:16:21 +09:00
|
|
|
|
tempfile = "3"
|
2025-08-09 15:14:44 +09:00
|
|
|
|
|
2025-09-02 17:12:51 +09:00
|
|
|
|
[build-dependencies]
|
|
|
|
|
|
once_cell = "1.20"
|
|
|
|
|
|
|
2025-08-09 15:14:44 +09:00
|
|
|
|
# Benchmark configuration (will be added later)
|
|
|
|
|
|
# [[bench]]
|
|
|
|
|
|
# name = "box_performance"
|
|
|
|
|
|
# harness = false
|
|
|
|
|
|
|
2025-09-05 13:29:17 +09:00
|
|
|
|
[workspace]
|
|
|
|
|
|
members = [
|
|
|
|
|
|
"crates/*",
|
|
|
|
|
|
"plugins/*",
|
|
|
|
|
|
]
|
|
|
|
|
|
|
2025-08-09 15:14:44 +09:00
|
|
|
|
[profile.release]
|
|
|
|
|
|
# 最適化設定
|
|
|
|
|
|
opt-level = 3
|
|
|
|
|
|
lto = true
|
|
|
|
|
|
codegen-units = 1
|
|
|
|
|
|
panic = "abort"
|
|
|
|
|
|
|
|
|
|
|
|
[profile.dev]
|
|
|
|
|
|
# 開発用設定
|
|
|
|
|
|
opt-level = 0
|
|
|
|
|
|
debug = true
|