Merge selfhosting-dev into main (Core-13 pure CI/tests + LLVM bridge) (#126)

* WIP: sync before merging origin/main

* fix: unify using/module + build CLI; add missing helper in runner; build passes; core smokes green; jit any.len string now returns 3

* Apply local changes after merging main; keep docs/phase-15 removed per main; add phase-15.1 docs and tests

* Remove legacy docs/phase-15/README.md to align with main

* integration: add Core-13 pure CI, tests, and minimal LLVM execute bridge (no docs) (#125)

Co-authored-by: Tomoaki <tomoaki@example.com>

---------

Co-authored-by: Selfhosting Dev <selfhost@example.invalid>
Co-authored-by: Tomoaki <tomoaki@example.com>
This commit is contained in:
moe-charm
2025-09-07 07:36:15 +09:00
committed by GitHub
parent 07350c5dd9
commit b8bdb867d8
70 changed files with 2010 additions and 57 deletions

View File

@ -57,6 +57,10 @@ pub struct CliConfig {
// Phase-15: JSON IR v0 bridge
pub ny_parser_pipe: bool,
pub json_file: Option<String>,
// Using/module resolution helpers (MVP)
pub using: Option<String>,
pub using_path: Option<String>,
pub modules: Option<String>,
// Build system (MVP)
pub build_path: Option<String>,
pub build_app: Option<String>,
@ -103,6 +107,24 @@ impl CliConfig {
.value_name("FILE")
.help("Read Ny JSON IR v0 from a file and execute via MIR Interpreter")
)
.arg(
Arg::new("using")
.long("using")
.value_name("LIST")
.help("Declare namespaces or aliases (comma-separated). Ex: 'acme.util, acme.math as M' or '\"apps/x.nyash\" as X'")
)
.arg(
Arg::new("using-path")
.long("using-path")
.value_name("PATHS")
.help("Search paths for using (':' separated). Ex: 'apps:lib:.'")
)
.arg(
Arg::new("module")
.long("module")
.value_name("MAP")
.help("Namespace to path mapping (comma-separated). Ex: 'acme.util=apps/acme/util.nyash'")
)
.arg(
Arg::new("debug-fuel")
.long("debug-fuel")
@ -405,6 +427,10 @@ impl CliConfig {
parser_ny: matches.get_one::<String>("parser").map(|s| s == "ny").unwrap_or(false),
ny_parser_pipe: matches.get_flag("ny-parser-pipe"),
json_file: matches.get_one::<String>("json-file").cloned(),
using: matches.get_one::<String>("using").cloned(),
using_path: matches.get_one::<String>("using-path").cloned(),
modules: matches.get_one::<String>("module").cloned(),
// Build system (MVP)
build_path: matches.get_one::<String>("build").cloned(),
build_app: matches.get_one::<String>("build-app").cloned(),
build_out: matches.get_one::<String>("build-out").cloned(),
@ -479,6 +505,15 @@ mod tests {
parser_ny: false,
ny_parser_pipe: false,
json_file: None,
using: None,
using_path: None,
modules: None,
build_path: None,
build_app: None,
build_out: None,
build_aot: None,
build_profile: None,
build_target: None,
};
assert_eq!(config.backend, "interpreter");