Skip to content
Open
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
10 changes: 7 additions & 3 deletions ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,18 @@ The AlloyScript engine is a high-performance, secure JavaScript environment buil

1. **TypeScript Library**: Provides typed APIs for SQLite, Spawn, and SecureEval.
2. **C Host Program**: A native wrapper that initialises a [WebView](docs/webview.md) window and exposes a bridge to the JS context.
3. **Bridge**: Communication between JS and C via `window.Alloy`.
4. **Secure Evaluation**: `window.eval` is replaced with `secureEval` which runs [MicroQuickJS](https://github.com/bellard/mquickjs) within an OCI-compatible, chainguarded containerized Linux kernel for ultimate isolation.
3. **Bridge**: Communication between JS and C via `window.Alloy`. All communication is transparently encrypted using **End-to-End Encryption (E2EE)** with AES-256-GCM.
4. **Secure Evaluation**: `window.eval` is replaced with `secureEval` which runs [MicroQuickJS](https://github.com/bellard/mquickjs) for ultimate isolation. The main C process executes the MicroQuickJS runtime, while the WebView remains hidden and is used only for browser-specific APIs.
5. **SQLite Driver**: A high-performance driver with transactions, prepared statement caching, and `bigint` support.
6. **Native GUI Framework (`alloy:gui`)**: A declarative component framework (ASX) that wraps native OS controls (Win32/Cocoa/GTK) using the Yoga layout engine.

## Security

By default, the runtime replaces the browser's `eval` with a more restricted and secure version using MicroQuickJS. The original `eval` is renamed to `_forbidden_eval` to discourage its use.
The AlloyScript engine implements **Defense in Depth** by treating the WebView process as inherently insecure:
- **E2EE IPC**: All data exchanged between the Main C Process and the WebView is encrypted using AES-256-GCM, with keys established via X25519 key exchange. This prevents a compromised OS or WebView from intercepting sensitive API calls.
- **Isolated Execution**: Application logic runs within MicroQuickJS in the secure C process. The WebView is hidden and restricted.
- **Identity-based Bindings**: Identity is managed via DID-based key pairs.
- **Secure Eval**: `window.eval` is replaced with `secureEval` using the MicroQuickJS engine. The original `eval` is renamed to `_forbidden_eval`.

## Building

Expand Down
94 changes: 0 additions & 94 deletions core/CMakeLists.txt

This file was deleted.

15 changes: 0 additions & 15 deletions core/include/webview.h

This file was deleted.

18 changes: 0 additions & 18 deletions core/tests/CMakeLists.txt

This file was deleted.

Loading