This is a prototyping language for considering languages for AI.
I plan to completely remake it. I'm not sure if this will be the repository.
An experimental programming language supporting multiple programming paradigms.
# Clone the repository
git clone https://github.com/mizchi/x-lang-proto.git
cd x-lang-proto
# Build and install
cargo build --release
cargo install --path x-cli
cargo install --path x-compilerx-parser- Text to AST conversion with S-expression syntaxx-checker- Type checking and semantic analysis with effect systemx-compiler- Code generation for multiple targetsx-editor- Language service with direct AST manipulation for AI
- Effect System - Algebraic effects and handlers for controlled side effects
- Type Inference - Automatic type deduction with constraints
- Visibility Modifiers - Module privacy (
pub,pub(crate), etc.)
The x-lang-editor crate provides a language service designed for AI integration:
use x_editor::{XLangEditor, EditOperation, AstQuery};
let mut editor = XLangEditor::new(config);
let session_id = editor.start_session(source_code)?;
// Direct AST manipulation
let operation = EditOperation::insert(path, new_node);
editor.apply_operation(session_id, operation)?;
// Query AST structure
let query = AstQuery::find_by_type("FunctionDef");
let results = editor.query_ast(session_id, query)?;# Compile source code
x-lang compile input.x --target typescript --output dist/
# Type check only
x-lang check input.x
# Parse and show AST
x-lang parse input.x --format json
# Show available targets
x-lang targets
# Create configuration file
x-lang init-config --output x-lang.toml
# Validate configuration
x-lang validate-config x-lang.tomlCreate x-lang.toml for project settings:
[default]
optimization_level = 2
debug_info = true
source_maps = true
[targets.typescript]
enabled = true
module_system = "es2020"
emit_types = true
strict = true
[targets.wasm-component]
enabled = true
with_wit = true
generate_bindings = true
wit_package = "my-component"Main compiler tool for x-lang.
x-lang compile <file> --target <target> --output <dir>
x-lang check <file>
x-lang parse <file>
x-lang targetsAST manipulation tool.
x convert <input> <output>
x show <file>
x query <file> <query>
x edit <file>
x rename <file> <old> <new>cargo testcargo doc --opencargo fmtcargo clippy- LSP Server - Full Language Server Protocol support
- Package System - Module management and distribution
- Debugger - Source-level debugging support
- REPL - Interactive development environment
- More Backends - LLVM, C, Go compilation targets
- Async/Await - Built-in concurrency primitives
- Macros - Compile-time code generation
Contributions are welcome! We need help in the following areas:
- Language Features - New syntax constructs, type system improvements
- Backends - Additional compilation targets
- Tooling - IDE plugins, debugger support
- Documentation - Examples, tutorials, API docs
To submit a Pull Request:
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by OCaml, Rust, and effect systems research
- Built with Rust and the amazing Rust ecosystem
- Thanks to all contributors