feat: expose JIT compiler via CLI command
Add `lux compile <file>` command that compiles and runs Lux code using the Cranelift JIT compiler. Includes --benchmark flag for timing. - Add compile_file() function in main.rs - Add jit_test.lux example with fib(30) + factorial(10) - Update VISION.md status Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -128,11 +128,11 @@ fn retry<F>(action: F, times: Int): Result
|
||||
|
||||
| Feature | Effort | Why It Matters |
|
||||
|---------|--------|----------------|
|
||||
| **Module System** | 2-3 weeks | Can't build real apps without imports |
|
||||
| **Module System** | Done | Imports, exports, aliases, selective imports |
|
||||
| **Standard Library** | Done | List.map, String.split, Option.map, etc. |
|
||||
| **File/Network Effects** | 1-2 weeks | Real IO beyond Console |
|
||||
| **Better Error Messages** | 2-3 weeks | Elm-quality diagnostics |
|
||||
| **JS/WASM Compilation** | 4-6 weeks | Deploy to browsers/servers |
|
||||
| **Full Compilation** | 4-6 weeks | Cranelift JIT exists for numeric code; needs strings, ADTs, effects |
|
||||
|
||||
### Needed for Full Vision (Phase 3: Differentiation)
|
||||
|
||||
@@ -245,7 +245,7 @@ Hint: Maybe you need to parse the string?
|
||||
## Immediate Next Steps
|
||||
|
||||
1. ~~**Standard Library**~~ - Done! List, String, Option, Result operations
|
||||
2. **Module System** - `import`, `export`, namespaces
|
||||
2. ~~**Module System**~~ - Done! Imports, exports, aliases, selective imports
|
||||
3. **File Effect** - `FileSystem.read`, `FileSystem.write`
|
||||
4. **Error Message Overhaul** - Source snippets, suggestions, colors
|
||||
5. **JavaScript Backend** - Compile to runnable JS
|
||||
|
||||
Reference in New Issue
Block a user