windjammer 0.48.0

A simple language inspired by Go, Ruby, and Elixir that transpiles to Rust - 80% of Rust's power with 20% of the complexity
Documentation
// Allow recursive functions that use self only for recursion
// This is common in AST traversal code
#![allow(clippy::only_used_in_recursion)]

use clap::ValueEnum;

pub mod agent_index;
pub mod analyzer;
pub mod auto_clone;
pub mod auto_fix;
pub mod cargo_toml;
pub mod codegen;
pub mod component_analyzer;
pub mod config;
pub mod error;
pub mod error_codes;
pub mod errors;
pub mod fuzzy_matcher;
pub mod ide_analysis;
pub mod inference;
pub mod interpreter;
pub mod lexer;
pub mod linter;
pub mod metadata;
pub mod module_system;
pub mod parser;
pub mod parser_impl;
pub mod project_paths;
pub mod source_map;
pub mod stdlib_scanner;
#[cfg(feature = "highlighting")]
pub mod syntax_highlighter;
#[cfg(not(feature = "highlighting"))]
pub mod syntax_highlighter_stub;
#[cfg(not(feature = "highlighting"))]
pub use syntax_highlighter_stub as syntax_highlighter;
pub mod compiler;
pub mod compiler_database;
pub mod decorator_registry;
pub mod ejector;
pub mod error_mapper;
pub mod lib_rs_generator;
pub mod shader;
pub mod test_utils;
pub mod type_classification;
pub mod type_display;
pub mod type_inference;
pub mod type_registry;
pub mod wjsl;

// CLI-related modules (required for wj binary)
#[cfg(feature = "cli")]
pub mod build_utils;
#[cfg(feature = "cli")]
pub mod cargo_integration; // Cargo build system integration
#[cfg(feature = "cli")]
pub mod cli;
#[cfg(feature = "cli")]
pub mod cli_execution; // CLI execution (run, interpret, REPL)
#[cfg(feature = "cli")]
mod compilation_error_handling;
#[cfg(feature = "cli")]
pub mod error_catalog;
#[cfg(feature = "cli")]
pub mod error_handling; // Error handling and linting
#[cfg(feature = "cli")]
pub mod error_statistics;
#[cfg(feature = "cli")]
mod file_compilation_pipeline;
#[cfg(feature = "cli")]
pub mod file_compiler; // Single-file compilation
#[cfg(feature = "cli")]
mod output_generation;
#[cfg(feature = "cli")]
pub mod plugin;
pub mod rust_integration_tests;
pub mod test_module_gate;
#[cfg(feature = "cli")]
pub mod test_runner;

/// Build a Windjammer project - compiles .wj files to Rust.
/// Used by integration tests and CLI.
pub use compiler::{build_project, build_project_ext};

pub use rust_integration_tests::sync_rust_integration_tests;

// CLI exports (used by cli/build.rs, cli/test.rs, wj binary)
#[cfg(feature = "cli")]
pub use build_utils::{generate_mod_file, strip_main_functions};
#[cfg(feature = "cli")]
pub use test_runner::run_tests;

#[derive(Debug, Clone, Copy, PartialEq, Eq, ValueEnum)]
pub enum CompilationTarget {
    /// Native Rust binary
    Rust,
    /// Go source code (experimental)
    Go,
    /// WebAssembly
    Wasm,
    /// Node.js native modules (future)
    Node,
    /// Python FFI via PyO3 (future)
    Python,
    /// C FFI (future)
    C,
}