feat: Linux/cloud platform stack (TLS, registry, static/cross, selfhost PM)
ci / build (ubuntu) (push) Has been cancelled
ci / macos smoke (push) Has been cancelled
ci / windows smoke (push) Has been cancelled
selfhost-loop / bootstrap determinism (push) Has been cancelled
ci / unit + fmt (push) Has been cancelled
ci / examples (push) Has been cancelled
ci / goldens + tools (push) Has been cancelled
ci / apps (push) Has been cancelled
ci / selfhost smoke (push) Has been cancelled
ci / CI gate (push) Has been cancelled
ci / build (ubuntu) (push) Has been cancelled
ci / macos smoke (push) Has been cancelled
ci / windows smoke (push) Has been cancelled
selfhost-loop / bootstrap determinism (push) Has been cancelled
ci / unit + fmt (push) Has been cancelled
ci / examples (push) Has been cancelled
ci / goldens + tools (push) Has been cancelled
ci / apps (push) Has been cancelled
ci / selfhost smoke (push) Has been cancelled
ci / CI gate (push) Has been cancelled
Ship the QUALITY_PLAN platform focus: thin/minimal runtime, --static/--target, Nexus HTTPS/mTLS with graceful stop, lock checksums + install --locked, selfhost registry (search/add/HTTP), containers, and CI smokes for cloud path.
This commit is contained in:
+44
-14
@@ -20,7 +20,7 @@ On macOS:
|
||||
brew install nim gcc make openssl
|
||||
```
|
||||
|
||||
> **Note:** The `Std::Crypto` module requires OpenSSL (`-lcrypto`). The build system links it automatically.
|
||||
> **Note:** Crypto + TLS require OpenSSL (`-lssl -lcrypto`). The build system links both automatically on the full (POSIX) runtime.
|
||||
|
||||
---
|
||||
|
||||
@@ -107,23 +107,51 @@ Output = "Bin"
|
||||
|
||||
Build output goes to `build/` by default.
|
||||
|
||||
### Cross-Compilation
|
||||
### Cross-Compilation, static, and thin runtime (Linux-first)
|
||||
|
||||
Use `--target <triple>` to cross-compile for a different platform. Bux generates C code and uses `clang` with the `-target` flag for cross-compilation.
|
||||
Bux targets **Linux** (primary), **cloud/containers**, and **embedded/cross**. Windows is not a product focus.
|
||||
|
||||
```bash
|
||||
# Cross-compile for ARM Linux
|
||||
./buxc build --target aarch64-linux-gnu
|
||||
# Thin runtime (no pthread / OpenSSL / sockets) — good for CLI & embed
|
||||
BUX_RUNTIME=minimal ./buxc build
|
||||
|
||||
# Cross-compile for x86_64 Linux (explicit)
|
||||
./buxc build --target x86_64-linux-gnu
|
||||
# Fully-static binary (implies minimal runtime; container / distroless friendly)
|
||||
./buxc --static --release build
|
||||
# same: BUX_STATIC=1 ./buxc --release build
|
||||
|
||||
# Cross-compile and run project build
|
||||
./buxc project --target x86_64-linux-gnu
|
||||
./buxc run --target aarch64-linux-gnu
|
||||
# Cross-compile for ARM64 Linux (prefers aarch64-linux-gnu-gcc, else clang -target)
|
||||
./buxc --static --release --target aarch64-linux-gnu build
|
||||
|
||||
# Override C compiler
|
||||
BUX_CC=aarch64-linux-gnu-gcc ./buxc --static --target aarch64-linux-gnu build
|
||||
|
||||
# musl fully-static (Alpine-friendly; needs musl-tools or zig)
|
||||
BUX_CC=musl-gcc BUX_RUNTIME=minimal ./buxc --static --release build
|
||||
# or: BUX_CC='zig cc -target x86_64-linux-musl' … (use a wrapper script)
|
||||
make test-musl-static # SKIP if no musl-gcc/zig
|
||||
```
|
||||
|
||||
> **Note:** `clang` must be installed for cross-compilation. Without `--target`, Bux uses the system `cc` compiler.
|
||||
| Switch / env | Effect |
|
||||
|--------------|--------|
|
||||
| `BUX_RUNTIME=full` | `rt/runtime.c` — POSIX + OpenSSL (default on Unix) |
|
||||
| `BUX_RUNTIME=minimal` / `thin` / `embed` | `rt/runtime_minimal.c` — thin single-threaded |
|
||||
| `BUX_RUNTIME=win` | `rt/runtime_win.c` — historical MinGW smoke only |
|
||||
| `--static` / `BUX_STATIC=1` | `-static` link; defaults to minimal runtime |
|
||||
| `--target <triple>` | Cross compile; defaults to minimal runtime |
|
||||
| `BUX_CC` | Force C compiler binary |
|
||||
| `BUX_CFLAGS` | Extra flags appended to the C line |
|
||||
|
||||
```bash
|
||||
# Smoke all of the above (+ CTFE CRC example)
|
||||
make test-linux-targets
|
||||
|
||||
# Build static hello for Docker scratch/distroless
|
||||
./tools/build_static_hello.sh
|
||||
docker build -f examples/docker/Dockerfile.static \
|
||||
--build-arg BIN=build/hello_static -t bux-hello-static .
|
||||
```
|
||||
|
||||
> **Note:** Full runtime + fully-static OpenSSL is intentionally not the default (painful). Use minimal for static containers; keep full runtime for servers that need net/crypto (`nexus`).
|
||||
|
||||
---
|
||||
|
||||
@@ -137,6 +165,7 @@ make test-stdlib # stdlib golden packages
|
||||
make test-registry # package registry (local + HTTP index)
|
||||
make test-apps # showcase apps build + simpledb/jwt CLI smoke (in `make test`)
|
||||
make test-dwarf # #line maps + .debug_info + --release (in `make test`)
|
||||
make test-linux-targets # minimal runtime + static + aarch64 cross + CTFE CRC
|
||||
make test-registry # package registry local + HTTP (in `make test`)
|
||||
make test-selfhost-smoke # buxc2: move_field + multi-file #line (in `make test`)
|
||||
make test-lsp # hover + references/rename + call hierarchy
|
||||
@@ -205,7 +234,7 @@ make test # full sequential suite (local)
|
||||
| `build` | ubuntu | `make build` → upload `buxc` artifact |
|
||||
| `unit` | ubuntu | `fmt-check` + `test-unit` (reuse artifact) |
|
||||
| `examples` | ubuntu | `test-examples` (full list) |
|
||||
| `goldens` | ubuntu | `test-errors` + `test-stdlib` + `test-registry` + `test-dwarf` + `test-drop-move` |
|
||||
| `goldens` | ubuntu | `test-errors` + `test-stdlib` + `test-registry` + `test-dwarf` + `test-drop-move` + `test-linux-targets` |
|
||||
| `apps` | ubuntu | `test-apps` |
|
||||
| `selfhost` | ubuntu | `test-selfhost-smoke` |
|
||||
| `macos` | macos-14 | rebuild + `test-unit` + `test-examples-smoke` (subset) |
|
||||
@@ -331,8 +360,9 @@ bux/
|
||||
│ ├── Task.bux
|
||||
│ └── Channel.bux
|
||||
├── rt/ # C runtime
|
||||
│ ├── runtime.c # full POSIX + OpenSSL (Unix)
|
||||
│ ├── runtime_win.c # MinGW minimal (Windows / BUX_RUNTIME=win)
|
||||
│ ├── runtime.c # full POSIX + OpenSSL (Unix default)
|
||||
│ ├── runtime_minimal.c # thin: no pthread/net/crypto (static/embed)
|
||||
│ ├── runtime_win.c # MinGW historical (BUX_RUNTIME=win)
|
||||
│ └── io.c
|
||||
├── examples/ # Example programs
|
||||
├── tests/ # Unit tests (Nim)
|
||||
|
||||
+28
-6
@@ -877,9 +877,30 @@ return p.items; // same as (*p).items
|
||||
Nested paths work the same: `p.inner.items` resolves `p → outer` then path
|
||||
`inner.items`.
|
||||
|
||||
#### Cross-function pointer transfer (session 76)
|
||||
|
||||
When the **caller** passes `&bag` (or a pointer alias) into a function whose
|
||||
parameter is `*Bag`, and the **callee** moves fields of that param
|
||||
(`return p.items` / `let x = p.items`), the call site marks `bag` the same way
|
||||
as a local partial move — parent `Bag_Drop` is skipped; remaining fields Drop.
|
||||
|
||||
```bux
|
||||
func TakeItems(p: *Bag) -> Array<int> {
|
||||
return p.items;
|
||||
}
|
||||
|
||||
func Caller() {
|
||||
let bag: Bag = …;
|
||||
let items: Array<int> = TakeItems(&bag);
|
||||
// bag.items transferred; Tracked_Drop(&bag.tag) still runs
|
||||
}
|
||||
```
|
||||
|
||||
Analysis is **same-module / known callee body** only (bootstrap HIR today).
|
||||
|
||||
Golden smoke: `make test-drop-move` / `examples/move_field_partial.bux` /
|
||||
`examples/move_field_remaining.bux` / `examples/move_field_nested.bux` /
|
||||
`examples/move_field_ptr.bux`.
|
||||
`examples/move_field_ptr.bux` / `examples/move_cross_fn.bux`.
|
||||
|
||||
#### Manual Drop and non-Drop types
|
||||
|
||||
@@ -891,10 +912,11 @@ Golden smoke: `make test-drop-move` / `examples/move_field_partial.bux` /
|
||||
#### Limits (honest)
|
||||
|
||||
- Partial field moves skip the **parent** `Type_Drop` and drop **remaining**
|
||||
droppable fields individually, including nested paths `a.b.c` and pointer
|
||||
aliases `p = &owner` (sessions 70/73/74).
|
||||
- Pointer aliases are tracked for **local** `p = &local` only (not parameters
|
||||
that point at caller-owned data across function boundaries).
|
||||
droppable fields individually, including nested paths `a.b.c`, local pointer
|
||||
aliases `p = &owner`, and **cross-function** `&owner` args when the callee
|
||||
body is visible (sessions 70/73/74/76).
|
||||
- Local pointer aliases (`p = &local`) are tracked in-function; cross-function
|
||||
uses callee-body scan of pointer params (not full borrow checking).
|
||||
- Interface Drop uses a static `TypeName_Drop` symbol (zero cost), not dynamic
|
||||
dispatch through a vtable.
|
||||
- Double-free bugs in **unchecked** code that manually free *and* auto-drop are
|
||||
@@ -1262,7 +1284,7 @@ macro! with_acc {
|
||||
|------|---------|
|
||||
| `expr` | any expression |
|
||||
| `ident` | bare identifier (`ekIdent`) |
|
||||
| `tt` | token-tree (MVP: same as `expr`) |
|
||||
| `tt` | token-tree: any single call-site AST fragment (expr/ident/lit/block/stmt/pat); broader than `expr` |
|
||||
| `literal` / `lit` | int/float/string/char/bool literal only |
|
||||
| `block` | block expression `{ … }` |
|
||||
| `stmt` | one statement (`let`/`if`/… or expression-stmt) |
|
||||
|
||||
+39
-3
@@ -50,12 +50,15 @@ Default locations (first hit wins):
|
||||
2. `~/.bux/registry.toml`
|
||||
3. `config/registry.toml` next to the Bux repo / compiler
|
||||
|
||||
HTTP indices are fetched with `curl` (or `wget`) into
|
||||
HTTP(S) indices are fetched with `curl` (or `wget`) into
|
||||
`~/.bux/cache/registry_http.toml`. Set `BUX_REGISTRY_REFRESH=1` to force
|
||||
re-download. Relative `file:` / `path:` entries in a remote index resolve
|
||||
against the cache directory — prefer **absolute paths** or **git URLs** for
|
||||
HTTP-served registries.
|
||||
|
||||
Self-signed HTTPS registries (dev/smoke): `BUX_REGISTRY_INSECURE=1` adds
|
||||
`curl -k` / `wget --no-check-certificate`. **Do not** use this in production.
|
||||
|
||||
Format:
|
||||
|
||||
```toml
|
||||
@@ -100,12 +103,45 @@ bux add greet 0.1.1
|
||||
bux add utils --path "../utils"
|
||||
bux add network --git "https://github.com/bux-lang/network"
|
||||
|
||||
# Resolve + write bux.lock
|
||||
# Resolve + write bux.lock (includes Checksum of package *.bux sources)
|
||||
bux install
|
||||
|
||||
# CI: verify lock only (no re-resolve; fails if missing or checksum mismatch)
|
||||
bux install --locked
|
||||
```
|
||||
|
||||
### Lockfile (`bux.lock`)
|
||||
|
||||
Generated by `bux install`. Each entry:
|
||||
|
||||
```toml
|
||||
[[Package]]
|
||||
Name = "greet"
|
||||
Version = "0.1.1"
|
||||
Source = "/abs/path/or/git-url"
|
||||
Checksum = "sha1-of-sorted-bux-sources"
|
||||
```
|
||||
|
||||
- **Reproducible:** running `install` twice with the same deps yields the same lock.
|
||||
- **`--locked`:** cloud/CI mode — does not rewrite the lock; verifies paths exist
|
||||
and `Checksum` still matches. Fail-closed if the lock is missing or corrupt.
|
||||
|
||||
Demo package in this monorepo: `registry/packages/greet` (registered in
|
||||
`config/registry.toml`). Smoke test: `tools/smoke_registry.sh`.
|
||||
`config/registry.toml`). Smoke test: `tools/smoke_registry.sh`
|
||||
(local + lock + `--locked` + HTTP + HTTPS).
|
||||
|
||||
Selfhost (`buxc2`) package manager parity (sessions 80–81):
|
||||
|
||||
```bash
|
||||
buxc2 search [query]
|
||||
buxc2 add greet # registry resolve
|
||||
buxc2 add greet 0.1.1
|
||||
buxc2 install / install --locked
|
||||
make test-selfhost-install
|
||||
make test-selfhost-registry # search + add + HTTP index + run
|
||||
```
|
||||
|
||||
`$BUX_REGISTRY` / HTTP(S) cache / `BUX_REGISTRY_INSECURE` match bootstrap.
|
||||
|
||||
---
|
||||
|
||||
|
||||
+199
-7
@@ -1,8 +1,10 @@
|
||||
# Bux — План към „добър“ език (v0.5 → v1.0)
|
||||
|
||||
> **Дата:** 2026-07-21
|
||||
> **Текущо:** v0.5.x — macros, field-move via pointers, Windows hello
|
||||
> **Цел:** Език, с който се пишат реални проекти комфортно, безопасно (по избор) и с надежден toolchain.
|
||||
> **Дата:** 2026-07-23
|
||||
> **Текущо:** v0.5.x — CI cloud smokes + registry path cleanup (session 82)
|
||||
> **Цел:** Език, с който се пишат реални проекти комфортно, безопасно (по избор) и с надежден toolchain.
|
||||
> **Платформен фокус:** **Linux** (primary) · **cloud-native** (servers, containers, HTTP) · **embedded** (cross, freestanding-ish, CTFE).
|
||||
> **Не-цел:** MS Windows като product platform (исторически CI/hello smoke остават; няма roadmap investment).
|
||||
|
||||
---
|
||||
|
||||
@@ -33,8 +35,9 @@
|
||||
3. **Selfhost като dogfood** — компилаторът и apps (`nexus`, `boko`) са proof.
|
||||
4. **Инструменти** — fmt, test, LSP, package install без ръчна магия.
|
||||
5. **Стабилна спецификация** — LanguageRef = реалното поведение.
|
||||
6. **Целеви среди** — Linux servers/containers, cloud HTTP services, embedded/cross (ARM/RISC-V), не desktop Windows.
|
||||
|
||||
Не целим „по-добър Rust“. Целим **единствения език с gradual safety + Go-стил concurrency без GC**.
|
||||
Не целим „по-добър Rust“. Целим **единствения език с gradual safety + Go-стил concurrency без GC**, удобен за **cloud + systems на Linux**.
|
||||
|
||||
---
|
||||
|
||||
@@ -1207,8 +1210,197 @@ A (stdlib ergonomics) → B (compiler holes) → C (ownership depth)
|
||||
|
||||
---
|
||||
|
||||
## Платформен фокус (v0.5 → v1.0)
|
||||
|
||||
| Ниша | Какво значи за Bux | Статус / посока |
|
||||
|------|--------------------|-----------------|
|
||||
| **Linux** | Host + CI + full `rt/runtime.c` (pthread, ucontext, sockets, OpenSSL) | ✅ primary; macOS secondary smoke only |
|
||||
| **Cloud-native** | HTTP/HTTPS, registry (lock+HTTPS), containers, musl docs | ✅ sessions 75–79 |
|
||||
| **Embedded** | Cross (`--target`), CTFE tables, **thin runtime**, no-GC story | ✅ minimal + aarch64 + ctfe_crc (75); 🔧 riscv / bare-metal spike |
|
||||
| **Windows** | Не е product target | ⛔ no further investment (existing MinGW hello = historical) |
|
||||
|
||||
**Правило:** нов runtime / stdlib / CI effort отива към Linux + cloud + embedded. Windows-only work не влиза в следващи сесии.
|
||||
|
||||
---
|
||||
|
||||
## Сесия 75 (Linux / cloud / embedded foundation)
|
||||
|
||||
1. **`rt/runtime_minimal.c`** — thin runtime (no pthread / ucontext / sockets / OpenSSL);
|
||||
same feature surface as historical `runtime_win.c`, documented for Linux static/embed.
|
||||
2. **Bootstrap CLI** (`bootstrap/cli.nim`):
|
||||
- `BUX_RUNTIME=full|minimal|thin|embed|win`
|
||||
- `--static` / `BUX_STATIC=1` → fully-static link; defaults to minimal runtime
|
||||
- `--target <triple>` → prefers `<triple>-gcc`, else `clang -target`; defaults minimal
|
||||
- `BUX_CC` override; thin link uses `-ffunction-sections -Wl,--gc-sections -lm`
|
||||
3. **CTFE bitwise + hex** (`bootstrap/sema.nim`):
|
||||
- `^` `&` `|` `<<` `>>` in const eval
|
||||
- `0x` / `0b` / `0o` integer literals in CTFE
|
||||
4. **Example** `examples/ctfe_crc.bux` — recursive CRC-8 table cells + `Pow2(8)` size
|
||||
5. **Smoke** `tools/smoke_linux_targets.sh` / `make test-linux-targets`:
|
||||
- minimal hello run
|
||||
- `--static --release` + `file` statically linked
|
||||
- `--target aarch64-linux-gnu` when cross-gcc present
|
||||
- ctfe_crc under minimal
|
||||
6. **Container** `examples/docker/Dockerfile.static` + `tools/build_static_hello.sh`
|
||||
7. **CI** goldens job installs `gcc-aarch64-linux-gnu` and runs `test-linux-targets`
|
||||
8. Docs: BuildAndTest + QUALITY_PLAN platform section
|
||||
|
||||
**Verified:** smoke 4/4 PASS; CRC_1=`#define 7`; aarch64 static ELF.
|
||||
|
||||
---
|
||||
|
||||
## Сесия 76 (P0: ownership + macros + selfhost parity)
|
||||
|
||||
1. **Cross-function pointer ownership** (`bootstrap/hir_lower.nim`):
|
||||
- `TakeItems(&bag)` where callee does `return p.items` / `let x = p.items`
|
||||
- Call site marks owner `bag` + partial path `items`; remaining fields still Drop
|
||||
- Example `examples/move_cross_fn.bux` + smoke in `test-drop-move`
|
||||
2. **Macro `$x:tt`** — broader than `expr`: any single call-site AST fragment
|
||||
(bootstrap + selfhost); example `examples/macro_tt.bux`
|
||||
3. **Selfhost link parity** (`src/cli.bux`):
|
||||
- `--static`, `--target`, `BUX_RUNTIME`, `BUX_CC`, `BUX_STATIC`
|
||||
- `Cli_LinkProgram` shared by single-file + project builds
|
||||
- Thin runtime → no pthread/OpenSSL; full → POSIX as before
|
||||
4. Docs: LanguageRef tt + QUALITY_PLAN
|
||||
|
||||
**Verified:** move_cross_fn PASS; macro_tt PASS; smoke_drop_move; buxc2 `--static project` → static ELF + `Hello, Bux!`.
|
||||
|
||||
---
|
||||
|
||||
## Сесия 77 (selfhost cross-fn + Nexus production polish)
|
||||
|
||||
1. **Selfhost cross-fn ownership** (`src/c_backend.bux`):
|
||||
- `CBE_MarkCrossFuncFromCall` scans callee HIR for `p.field` moves
|
||||
- Call site `TakeItems(&bag)` → partial move on `bag` (no double-free)
|
||||
- Verified: `buxc2 run move_cross_fn` → `cross_fn_drops=2` PASS
|
||||
2. **Runtime stop handlers** (`rt/runtime.c`):
|
||||
- `bux_install_stop_handlers` / `bux_should_stop` / `bux_set_stop_listen_fd`
|
||||
- SIGINT/SIGTERM set flag + close listen fd (unblock accept)
|
||||
- Thin/win runtimes: no-op stubs
|
||||
3. **Stdlib** `Os_InstallStopHandlers` / `Os_ShouldStop` / `Os_SetStopListenFd`
|
||||
4. **Nexus 0.4.0**:
|
||||
- Graceful stop: main=acceptor; poison workers (`fd=-1`); exit on SIGTERM
|
||||
- Access log: `METHOD path status ms` (`NEXUS_ACCESS_LOG`)
|
||||
- Max body: `NEXUS_MAX_BODY` (default 1 MiB) → 413
|
||||
- Config fields + `/api/health` version 0.4.0
|
||||
5. TLS deferred (needs SSL context in runtime — not this session)
|
||||
|
||||
**Verified:** SIGTERM exits nexus; health JSON 0.4.0; access log lines; selfhost cross_fn.
|
||||
|
||||
---
|
||||
|
||||
## Сесия 78 (Nexus TLS + container story)
|
||||
|
||||
1. **Runtime TLS** (`rt/runtime.c` + OpenSSL `libssl`):
|
||||
- `bux_tls_server_ctx` / `accept` / `send` / `recv` / `close` / `error`
|
||||
- Thin/win: stubs; full POSIX links **`-lssl -lcrypto`**
|
||||
2. **Stdlib** `Std::Net` — `Tls_ServerCtx`, `Tls_Accept`, `Tls_Send`, `Tls_Recv`, …
|
||||
3. **Nexus 0.5.0**:
|
||||
- `NEXUS_TLS=1` + `NEXUS_TLS_CERT` / `NEXUS_TLS_KEY` (PEM)
|
||||
- `ConnectionTask.tls` handle; `ConnRecv`/`ConnSend` dual plain/TLS
|
||||
- Banner `https://` when TLS; SIGTERM still graceful
|
||||
4. **Smoke** `tools/smoke_nexus_tls.sh` / `make test-nexus-tls` (openssl self-signed + curl -k)
|
||||
5. **Containers**:
|
||||
- `examples/docker/Dockerfile.nexus` (debian-slim + libssl3)
|
||||
- `examples/http_health.bux` + `Dockerfile.health` + `tools/build_health_bin.sh`
|
||||
6. CLI link flags bootstrap + selfhost: `-lssl -lcrypto`
|
||||
|
||||
**Verified:** `curl -k https://…/api/health` → 0.5.0; SIGTERM exit; health binary HTTP.
|
||||
|
||||
---
|
||||
|
||||
## Сесия 79 (registry lock/HTTPS + musl path)
|
||||
|
||||
1. **`bux install` lock checksums** — sha1 of sorted `*.bux` sources per package
|
||||
2. **`bux install --locked`** — CI mode: verify paths + checksums; no re-resolve
|
||||
3. **`BUX_REGISTRY_INSECURE=1`** — self-signed HTTPS registry fetch (`curl -k`)
|
||||
4. **Smoke** `tools/smoke_registry.sh`:
|
||||
- lock deterministic (diff two installs)
|
||||
- `--locked` ok / missing fail / checksum mismatch fail
|
||||
- HTTP + **HTTPS** self-signed index
|
||||
5. **musl path** `tools/smoke_musl_static.sh` / `make test-musl-static`
|
||||
- `BUX_CC=musl-gcc` or zig musl wrapper + `BUX_RUNTIME=minimal --static`
|
||||
- SKIP when toolchain absent (documented)
|
||||
6. Docs: Packages.md lock section; BuildAndTest musl; Dockerfile.alpine-health
|
||||
|
||||
**Verified:** registry smoke full PASS; musl SKIP (no toolchain on host).
|
||||
|
||||
---
|
||||
|
||||
## Сесия 80 (selfhost install --locked + Nexus mTLS)
|
||||
|
||||
1. **Selfhost `install` / `install --locked`** (`src/cli.bux`):
|
||||
- Write `bux.lock` with sha1 checksums (shell `sha1sum` of sorted `*.bux`)
|
||||
- `--locked` verifies paths + checksums (CI parity with bootstrap session 79)
|
||||
- Manifest: parse `[Dependencies]` + `{ Path = "..." }` inline tables
|
||||
2. **mTLS** (`rt/runtime.c` `bux_tls_server_ctx_ex`):
|
||||
- Optional client CA → `SSL_VERIFY_PEER | FAIL_IF_NO_PEER_CERT`
|
||||
- `Tls_ServerCtxMtls` in `Std::Net`
|
||||
- Nexus `NEXUS_TLS_CLIENT_CA` → require client certs (v0.6.0)
|
||||
3. **Smokes**: `tools/smoke_selfhost_install.sh`, `tools/smoke_nexus_mtls.sh`
|
||||
- `make test-selfhost-install` / `make test-nexus-mtls`
|
||||
|
||||
**Verified:** selfhost lock/locked/mismatch; mTLS reject without cert + accept with cert.
|
||||
|
||||
---
|
||||
|
||||
## Сесия 81 (selfhost full registry)
|
||||
|
||||
1. **`src/registry.bux`** — load index from `$BUX_REGISTRY` / `~/.bux` / `config/registry.toml`
|
||||
- HTTP(S) fetch via curl/wget → `~/.bux/cache/registry_http.toml`
|
||||
- `BUX_REGISTRY_REFRESH`, `BUX_REGISTRY_INSECURE` (parity with bootstrap)
|
||||
2. **CLI** `search` / `add <name>` / `add <name> <version|url>`
|
||||
3. **Build path deps** — merge `depUrl` absolute/relative package `src/` (not only `deps/`)
|
||||
4. **Runtime discovery** — `BUX_STDLIB/../rt` when building outside the monorepo tree
|
||||
5. **Smoke** `tools/smoke_selfhost_registry.sh` / `make test-selfhost-registry`
|
||||
|
||||
**Verified:** search greet; add+install+run Hello, Bux!; HTTP registry search.
|
||||
|
||||
---
|
||||
|
||||
## Сесия 82 (CI cloud/selfhost smokes + polish)
|
||||
|
||||
1. **CI apps job** — `test-nexus-tls` + `test-nexus-mtls` (openssl + curl)
|
||||
2. **CI selfhost job** — `test-selfhost-install` + `test-selfhost-registry`
|
||||
3. **Registry paths** — `expandFilename` for file:/path: sources (no `..` in lock)
|
||||
4. Docs already cover sessions 75–81 platform stack
|
||||
|
||||
**Verified:** local smokes previously green; CI wiring ready for GHA.
|
||||
|
||||
---
|
||||
|
||||
## Следващи стъпки
|
||||
|
||||
1. Windows: more examples (strings/ownership) on MinGW; optional Win OpenSSL
|
||||
2. Macro: true token-tree `tt` / nested pattern rewrite depth
|
||||
3. Cross-function pointer ownership transfer (callee `*Bag` param)
|
||||
### P0 — Compiler / language
|
||||
|
||||
1. ~~Cross-function pointer ownership~~ ✅ session 76
|
||||
2. ~~Selfhost `--static` / `BUX_RUNTIME` / `--target`~~ ✅ session 76
|
||||
3. ~~Macro `tt` broader than expr~~ ✅ session 76 (raw delimiter-balanced tokens still open)
|
||||
4. Macro: raw token-tree delimiter balancing / deeper nested rewrite edge cases
|
||||
5. ~~Selfhost cross-fn moves~~ ✅ session 77
|
||||
|
||||
### P1 — Linux / cloud-native
|
||||
|
||||
6. ~~**Static path**~~ ✅ session 75–76
|
||||
7. ~~**Multi-arch Linux smoke**~~ ✅ session 75
|
||||
8. ~~**Nexus production polish**~~ ✅ session 77
|
||||
9. ~~**Nexus TLS**~~ ✅ session 78
|
||||
10. ~~**Container story**~~ ✅ session 78
|
||||
11. ~~**Registry + deploy**~~ ✅ session 79 (HTTPS + lock checksum + `--locked`)
|
||||
12. ~~**musl path**~~ ✅ session 79 (smoke + docs; SKIP without toolchain)
|
||||
13. ~~**mTLS / client certs**~~ ✅ session 80 (`NEXUS_TLS_CLIENT_CA`)
|
||||
14. ~~**Selfhost install --locked**~~ ✅ session 80
|
||||
15. ~~**Selfhost full registry**~~ ✅ session 81 (search / add / HTTP / path-dep build)
|
||||
16. **Language P0 leftovers** — raw macro `tt` delimiter balancing (optional)
|
||||
|
||||
### P2 — Embedded / cross
|
||||
|
||||
12. ~~**Cross / thin / CTFE**~~ ✅ session 75
|
||||
13. **riscv64 cross smoke** (when toolchain available)
|
||||
14. **no-libc / bare-metal research** (spike only) — Cortex-M / qemu-system; not v1.0 blocker
|
||||
|
||||
### Изрично **не** правим
|
||||
|
||||
- Повече Windows examples / Win OpenSSL / Win sockets
|
||||
- Windows като required CI gate за product features (остава optional historical smoke ако CI вече го има)
|
||||
- Desktop GUI / Win32 APIs
|
||||
|
||||
Reference in New Issue
Block a user