Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
68 changes: 65 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,79 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
---

## [Unreleased]

## 1.16.0 — 2025-01-XX

### 🚀 Highlights

- **REPL is now the default mode**
Running `vix` starts the interactive shell automatically
(no more `vix repl`).

- **Modern runtime experience**
Behavior aligned with Python, Node.js, and Deno.

---

### ✨ Added

- Default interactive REPL when running `vix`
- Dedicated `README_REPL.md` with:
- Math expressions
- Variables
- JSON usage
- `print` / `println`
- Built-in `Vix` API examples
- Improved CLI documentation (`docs/modules/cli.md`)

---

### 🧠 Improved

- REPL argument evaluation:
- Correct handling of string literals
- Math expressions with variables
- Mixed arguments (`println("x =", x+1)`)
- REPL execution flow stability
- Error messages clarity in interactive mode
- Overall CLI UX consistency

---

### 🧹 Changed

- Removed `vix repl` as a required entry point
- REPL is now the primary interaction mode
- CLI documentation updated to reflect new behavior

---

### 🔧 Internal

- REPL flow refactoring and cleanup
- Better separation between CLI dispatcher and REPL runtime
- Documentation structure improvements

---

### ⚠️ Notes

- JSON literals must be **strictly valid JSON**
(`{"key":"value"}`, not `{key, value}`)

## [1.15.0] - 2025-12-20

### Added
-

-

### Changed
-

-

### Removed
-

-

## v1.15.0 — 2025-12-20

Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ cmake_minimum_required(VERSION 3.20)
# cmake --build build -j
# ====================================================================

project(vix VERSION 1.15.0 LANGUAGES CXX)
project(vix VERSION 1.16.0 LANGUAGES CXX)

# Make find_package honor *_ROOT hints (e.g. MYSQLCPPCONN_ROOT)
if (POLICY CMP0144)
Expand Down
76 changes: 75 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ using namespace Vix;
int main() {
App app;

app.get("/", [](Request, Request res) {
app.get("/", [](Request req, Response res) {
res.json({ "message", "Hello world" });
});

Expand All @@ -140,6 +140,80 @@ app.get("/users/{id}", [](Request req, Response res) {
});
```

# 🧠 Vix REPL — Interactive Runtime Shell

## ▶️ Starting the REPL

```bash
vix
```

Example startup:

```
Vix.cpp v1.x (CLI) — Modern C++ backend runtime
[GCC 13.3.0] on linux
Exit: Ctrl+C / Ctrl+D | Clear: Ctrl+L | Type help for help
vix>
```

---

## 🧮 Math Expressions

You can type expressions directly:

```text
1 + 2
10 * (3 + 4)
```

## 🧩 JSON Support

The REPL supports **strict JSON** using `nlohmann::json`.

### Objects

```text
user = {"name":"Gaspard","age":10}
user
```

### Arrays

```text
nums = [1,2,3,4]
nums
```

## 🖨️ print / println

### Basic output

```text
print("Hello")
println("Hello world")
```

### Mix strings and expressions

```text
x = 3
println("x =", x)
println("x+1 =", x+1)
```

## ⚙️ Built-in Vix API

The REPL exposes a built-in `Vix` object.

### Working directory

```text
cwd()
Vix.cwd()
```

### Minimal HTTP + WebSocket Server

This example shows the **smallest fully working HTTP + WS hybrid server**.
Expand Down
Loading
Loading