17 Commits

Author SHA1 Message Date
ea3a7ca2dd chore: bump version to 0.1.8 2026-02-20 16:45:49 -05:00
018a799c05 chore: bump version to 0.1.7 2026-02-20 10:38:37 -05:00
fd5ed53b29 chore: bump version to 0.1.6 2026-02-19 15:22:32 -05:00
52dcc88051 chore: bump version to 0.1.5 2026-02-19 03:47:28 -05:00
b0ccde749c chore: bump version to 0.1.4 2026-02-19 02:48:56 -05:00
6a2e4a7ac1 chore: bump version to 0.1.3 2026-02-18 23:06:10 -05:00
bb0a288210 chore: bump version to 0.1.2 2026-02-18 21:16:44 -05:00
0ee3050704 chore: bump version to 0.1.1 2026-02-18 20:41:43 -05:00
d76aa17b38 feat: static binary builds and automated release script
Switch reqwest from native-tls (openssl) to rustls-tls for a pure-Rust
TLS stack, enabling fully static musl builds. Add `nix build .#static`
for portable Linux binaries and `scripts/release.sh` for automated
Gitea releases with changelog generation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 19:09:32 -05:00
49ab70829a feat: add comprehensive benchmark suite with flake commands
- Add nix flake commands: bench, bench-poop, bench-quick
- Add hyperfine and poop to devShell
- Document benchmark results with hyperfine/poop output
- Explain why Lux matches C (gcc's recursion optimization)
- Add HTTP server benchmark files (C, Rust, Zig)
- Add Zig versions of all benchmarks

Key findings:
- Lux (compiled): 28.1ms - fastest
- C (gcc -O3): 29.0ms - 1.03x slower
- Rust: 41.2ms - 1.47x slower
- Zig: 47.0ms - 1.67x slower

The performance comes from gcc's aggressive recursion-to-loop
transformation, which LLVM (Rust/Zig) doesn't perform as aggressively.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 05:53:10 -05:00
ba3b713f8c Disable tests in package build for flake consumption
Some tests require network access or specific environment conditions
that aren't available during Nix build sandboxing. Skip tests in the
package derivation to allow consuming this flake as a dependency.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 16:59:37 -05:00
26d340b5a3 chore: fix flake.nix rebuild detection
Better source change detection using find instead of single file check.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 03:54:36 -05:00
cdc4f47272 fix: fix REST API and HTTP server examples
- Fix string interpolation issues: escape curly braces with \{ and \}
  since unescaped { triggers string interpolation
- Fix effectful function invocation: use "let _ = run main() with {}"
  instead of bare "main()" calls
- Use inline record types instead of type aliases (structural typing)
- Fix flake.nix to show build progress instead of suppressing output

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 23:11:51 -05:00
5edd8aea77 feat: add lux to PATH on shell entry
- Build release binary when entering nix shell
- Add target/release to PATH automatically
- Update shell help to show lux commands

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 22:22:08 -05:00
d8e01fd174 feat: implement Cranelift JIT compiler for native code execution
Add a JIT compiler using Cranelift that compiles Lux functions to native
machine code. Achieves ~160x speedup over the tree-walking interpreter
(fib(30): 11.59ms JIT vs 1.87s interpreter).

Supports: arithmetic, comparisons, conditionals, let bindings, function
calls, and recursion. Compile time overhead is minimal (~500µs).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 17:11:19 -05:00
296686de17 feat: add HTTP client support
Add Http effect for making HTTP requests:
- Http.get(url) - GET request
- Http.post(url, body) - POST with string body
- Http.postJson(url, json) - POST with JSON body
- Http.put(url, body) - PUT request
- Http.delete(url) - DELETE request

Returns Result<HttpResponse, String> where HttpResponse contains
status code, body, and headers.

Includes reqwest dependency with blocking client, OpenSSL support
in flake.nix, and example at examples/http.lux demonstrating
API requests with JSON parsing.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 16:30:48 -05:00
15e5ccb064 init lux 2026-02-13 02:57:01 -05:00