Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
fad97ea
[Phase 1] Adds subprocess execution and management to IoClient
logbie Dec 4, 2025
19574aa
[Phase 2] Adds scaffolding for subprocess management
logbie Dec 4, 2025
f95a7d7
[Phase 3] Introduce subprocess management capabilities
logbie Dec 4, 2025
14e65f2
[Phase 4] Implements subprocess execution and management
logbie Dec 4, 2025
a31de20
[Phase 5] Add granular error handling for processes and commands
logbie Dec 4, 2025
705c392
[Phase 6] Improve subprocess execution and error handling
logbie Dec 4, 2025
4bf74ff
[Phase 7] Adds comprehensive test for subprocess functionality
logbie Dec 4, 2025
282cf38
[Phase 8} Docs: Document subprocess execution feature
logbie Dec 4, 2025
67f4208
Merge main into subp: Resolve conflicts in settings.local.json
logbie Dec 4, 2025
4dc880a
Format subprocess implementation code with cargo fmt
logbie Dec 4, 2025
10c0403
Fix test_command_not_found for shell execution behavior
logbie Dec 4, 2025
ee75266
Refactors code to be more idiomatic
logbie Dec 5, 2025
40ea56b
Stabilize wflhash timing security test
logbie Dec 5, 2025
eb11847
Fix cross-platform compatibility in subprocess tests
claude[bot] Dec 5, 2025
78209ae
Fortify subprocess handling with security and resource limits
logbie Dec 5, 2025
ca2c62d
Merge origin/subp: Resolve conflicts in subprocess test signatures
logbie Dec 5, 2025
5f16f81
Updates subprocess test to align with API changes
logbie Dec 5, 2025
2e11068
Format command_sanitizer.rs with cargo fmt
logbie Dec 5, 2025
bd75804
Fix clippy warning: unused variable in cleanup test
logbie Dec 5, 2025
ca8025d
Docs: Detail new features and technical specifications
logbie Dec 5, 2025
02fd82d
Implements shell-like command argument parser
logbie Dec 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .claude/settings.local.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,14 @@
"Bash(for file in \"G:\\Logbie\\wfl\\Docs\"/**/*.md)",
"Bash(do wc:*)",
"Bash(done)",
"Bash(powershell -Command \"Get-Content ''G:\\Logbie\\wfl\\src\\interpreter\\mod.rs'' | Select-Object -Last 50\")",
"Bash(cargo check:*)",
"Bash(cargo report:*)",
"Bash(cargo tree:*)",
"Bash(cargo update:*)",
"Bash(git log:*)",
"Bash(grep:*)",
"Bash(xargs grep:*)",
"Bash(cargo tree:*)",
"Bash(cargo report:*)",
"WebSearch",
"Bash(cargo --version:*)",
"Bash(rustc:*)",
Expand Down
62 changes: 59 additions & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ cargo clippy --all-targets --all-features -- -D warnings
# Run WFL program
wfl program.wfl

# Start interactive REPL
wfl

# Lint WFL code
wfl --lint program.wfl

Expand All @@ -51,6 +54,12 @@ wfl --parse program.wfl

# Check configuration
wfl --configCheck

# Run with execution timing
wfl --time program.wfl

# Run in single-step debug mode
wfl --step program.wfl
```

### VSCode Extension
Expand All @@ -74,12 +83,30 @@ Source Code → Lexer → Parser → Analyzer → Type Checker → Interpreter

- **Lexer** (`src/lexer/`): High-performance tokenization using Logos crate
- **Parser** (`src/parser/`): Recursive descent parser with natural language constructs and error recovery
- Includes specialized parsers for containers and AST generation
- Maintains contextual keyword handling for natural language syntax
- **Analyzer** (`src/analyzer/`): Semantic validation and static analysis
- **Type Checker** (`src/typechecker/`): Static type analysis with intelligent inference
- **Interpreter** (`src/interpreter/`): Async-capable direct AST execution using Tokio runtime
- **Standard Library** (`src/stdlib/`): Built-in modules (core, math, text, list, filesystem, crypto, etc.)
- Includes subprocess handling with security sanitization
- Web server support with HTTP request/response handling
- Environment management with scope control
- **Pattern Module** (`src/pattern/`): Pattern matching engine with bytecode VM
- Compiler for pattern expressions
- VM-based execution for regex-like patterns
- Unicode support and advanced pattern features
- **Standard Library** (`src/stdlib/`): Built-in modules
- Core functions (print, typeof, etc.)
- Math operations (abs, round, random, etc.)
- Text manipulation (length, uppercase, substring, etc.)
- List operations (push, pop, contains, etc.)
- Filesystem I/O with async support
- Crypto module with WFLHASH (custom hash function)
- Time functions
- Random number generation
- **LSP Server** (`wfl-lsp/`): Language Server Protocol implementation for IDE integration
- **Development Tools**: Linter, code fixer, analyzer with real-time error checking
- **REPL** (`src/repl.rs`): Interactive Read-Eval-Print Loop for experimentation

### Workspace Structure
- Root crate `wfl` contains the main compiler/interpreter
Expand All @@ -88,6 +115,7 @@ Source Code → Lexer → Parser → Analyzer → Type Checker → Interpreter
- `TestPrograms/` contains WFL test programs that MUST all pass
- `tests/` contains Rust unit and integration tests
- `Docs/` contains all user-facing documentation
- `Dev diary/` contains development history and progress notes

## Critical Development Rules

Expand Down Expand Up @@ -123,12 +151,16 @@ WFL uses `.wflcfg` files for project configuration:
- **Async Support**: Built-in async/await using Tokio runtime
- **Error Handling**: Comprehensive try/when/otherwise error handling
- **Standard Library**: Math, text, list, filesystem, crypto, and web modules
- **Container System**: Object-oriented programming with containers (classes)
- **Pattern Matching**: Powerful pattern matching engine with Unicode support
- **Subprocess Execution**: Secure subprocess spawning with command sanitization

### Memory and Performance
- Uses WFLHASH custom cryptographic hash function (see security reviews)
- Optional heap profiling with dhat feature flags
- Optional heap profiling with dhat feature flags (`dhat-heap`, `dhat-ad-hoc`)
- Async-capable interpreter for concurrent operations
- Memory optimization for large programs
- Pattern VM for efficient regex-like operations

### Documentation Standards
- All documentation in `Docs/` folder
Expand All @@ -141,4 +173,28 @@ The codebase includes Cursor IDE rules in `.cursor/rules/wfl-rules.mdc`:
- Always read README.md first
- Update documentation with changes
- All test programs must pass
- Update bytecode when modifying parser
- Update bytecode when modifying parser

## Technical Requirements

### Rust Environment
- **Rust Edition**: 2024
- **Minimum Rust Version**: 1.75+
- **Current Development**: Rust 1.91.1+
- **Build System**: Cargo with workspace support

### Key Dependencies
- `logos`: Lexer generation
- `tokio`: Async runtime
- `reqwest`: HTTP client
- `sqlx`: Database support (SQLite, MySQL, PostgreSQL)
- `warp`: Web server framework
- `tower-lsp`: LSP server implementation (wfl-lsp)
- `codespan-reporting`: Error diagnostics
- `zeroize`, `subtle`: Cryptographic security
- `hkdf`, `sha2`: Key derivation for crypto

### Version Scheme
WFL uses calendar-based versioning: **YY.MM.BUILD**
- Example: `25.12.3` = Year 2025, December, Build 3
- Major version always < 256 (Windows MSI compatibility)
Loading