Skip to content

Repository files navigation

Trymon OS

Trymon OS is a high-performance web platform that provides a complete, sandboxed operating system environment directly in the browser. Originally conceived as a binary conversion tool, Trymon has evolved into its own powerful web-native ecosystem, featuring a proprietary packaging format (.trymon), a secure JavaScript/TypeScript execution sandbox, a robust Rust-based WASM Kernel with a Virtual File System, and a built-in development studio.


Table of Contents

  1. Overview
  2. Architecture
  3. Key Features
  4. The .trymon Ecosystem
  5. Trymon Studio IDE
  6. Terminal & Core Commands
  7. Getting Started
  8. Project Structure
  9. License

Overview

Trymon bridges the gap between desktop software and the web by providing a Full Web-Native OS Environment. Users and developers can:

  • Develop, build, and execute .trymon applications instantly without installing any local dependencies.
  • Use a full desktop interface (Trymon OS) with window management, a file system, taskbar, and a highly functional terminal.
  • Install and run applications persistently inside the browser.
  • Collaborate in real-time with remote sessions.

The platform is built on three core pillars:

  1. Trymon Engine: A secure, isolated JS/TS Sandbox for executing code with a controlled set of OS and UI APIs.
  2. Rust WASM Kernel & VFS: A blazing fast kernel executing in WebAssembly that manages the process table, command execution, and persistent file storage (IndexedDB).
  3. Interface: React-based desktop with a window manager, Start Menu, Terminal, and native system apps.

Architecture

Trymon OS runs on a hybrid engine (Trymon Engine Machine - TEM):

  • Rust WASM kernel = "cérebro" (state authority): owns the Virtual File System (VFS) and the process table. It manages memory and CPU metrics, executes built-in shell commands (ls, echo, cd, etc.), handles shell redirection (>, >>) and piping, and acts as the central state truth.
  • JS sandbox = "músculo" (executor): executes .trymon apps through a deep-frozen Trymon API bridge (Trymon.UI, Trymon.OS.vfs), which routes file operations back through the Rust kernel. CPU/memory usage is reported back to the kernel.
  • React UI = presentation: window manager, taskbar, desktop, and system apps.
┌─────────────────────────────────────────────────────────────────────┐
│                         Trymon OS (Frontend)                        │
│  ┌─────────────┐  ┌─────────────┐  ┌─────────────┐  ┌───────────┐  │
│  │ Window     │  │ Taskbar     │  │ System      │  │ Desktop   │  │
│  │ Manager    │  │             │  │ Apps        │  │ Icons     │  │
│  └─────────────┘  └─────────────┘  └─────────────┘  └───────────┘  │
└─────────────────────────────────────────────────────────────────────┘
                                    │
                                    ▼
┌─────────────────────────────────────────────────────────────────────┐
│                   Trymon Engine Machine (TEM)                       │
│  ┌───────────────────────────┐  ┌───────────────────────────────┐   │
│  │ Rust WASM Kernel (cérebro)│  │ JS Sandbox (músculo)          │   │
│  │  - Virtual File System    │◄─┼─ Trymon.OS.vfs (deep-frozen)  │   │
│  │  - Process table/metrics  │  │  - Trymon.UI                  │   │
│  │  - Built-in Shell/Bash    │  │  - report_process_metrics     │   │
│  └───────────────────────────┘  └───────────────────────────────┘   │
└─────────────────────────────────────────────────────────────────────┘

Components

Component Technology Description
Frontend React + TypeScript Desktop UI, window management, system apps (Terminal, Browser, IDE).
Kernel (cérebro) Rust → WASM VFS, process table, package metadata, bash shell logic, pipes/redirection.
Sandbox (músculo) JS new Function + strict Secure execution of apps with controlled Trymon API bridge.
Packager fflate In-memory ZIP packaging for the .trymon format.
Compiler sucrase In-browser TypeScript to JavaScript transformation.
Storage IndexedDB Persistent VFS state in browser.

Binary loader honesty: The kernel only supports the native .trymon format. Legacy Linux formats (.AppImage, .deb, .rpm, generic ELF) are detected and explicitly rejected with an UnsupportedFormat error rather than pretending to load/execute a binary it cannot run.


Key Features

Trymon OS Desktop

  • Full window management (drag, resize, minimize, maximize).
  • Taskbar with application icons.
  • Start menu with app launcher and search.
  • Desktop grid with draggable, persistent icons.

Application Management

  • Upload: Drag & drop or file picker for .trymon packages.
  • Install: Install packages to the VFS for persistent use.
  • Execute: Run packages instantly via the secure Trymon Sandbox.

System Monitor

  • Real-time simulated CPU and memory usage.
  • Active window and app tracking.
  • VFS storage statistics.

Session Sync (Trymon Remote)

  • Real-time cursor sharing.
  • Collaborative window management.
  • P2P connection via PeerJS.

The .trymon Ecosystem

Trymon has fully moved away from executing raw Linux binaries. All apps use the native .trymon format executed by the hybrid TEM engine.

The .trymon Format

A .trymon file is essentially a ZIP archive containing everything the app needs to run:

myapp.trymon
├── manifest.json
└── src/
    └── main.ts (or main.js)

manifest.json Structure

{
  "id": "my-awesome-app",
  "name": "Awesome App",
  "version": "1.0.0",
  "entry": "src/main.ts",
  "icon": "data:image/svg+xml;base64,..."
}

Sandbox APIs

When a .trymon app is executed, the TrymonEngine injects a secure API bridge, allowing the app to interact with the OS without breaking out of the sandbox.

Available APIs injected into the runtime:

  • Trymon.UI: Create windows, render React components, manage UI state.
  • Trymon.OS: Access the VFS, show system notifications.

Trymon Studio IDE

Trymon OS includes a built-in, fully featured development environment: Trymon Studio IDE.

Powered by Monaco Editor (the core of VS Code) and Sucrase for instant TypeScript compilation, the IDE allows you to:

  1. Write TypeScript/JavaScript code natively inside Trymon OS.
  2. Edit manifest.json visually or via code.
  3. Click a single Build (.trymon) button to compile, package, and save the app directly to your Trymon Desktop.

There is zero setup required to start developing apps for Trymon OS.


Terminal & Core Commands

Trymon includes a native React terminal that acts as a robust shell powered by the Rust WASM Kernel.

Features:

  • Standard Shell Parsing: Properly parses quotes (" and '), handles environment variable interpolation ($VAR), and manages current working directories (CWD).
  • Piping & Redirection: Output redirection (>) and append mode (>>) work reliably, resolving VFS paths precisely to avoid orphan files. Command piping (|) is also supported.
  • Auto-completion: Tab-completion for resolving files and directories instantly through the VFS.
  • Built-in Commands:
    • File management: touch, mkdir, rm, cp, mv, cat
    • System state: ls, cd, pwd, echo, ps, status, clear, whoami, uname
    • Utility: grep, head, tail, wc, find

The terminal interface supports mouse text selection out-of-the-box and maintains an accurate visual history scrollback.


Getting Started

Prerequisites

  • Node.js 18+
  • Rust toolchain (cargo, rustc)
  • wasm-pack (for compiling the kernel)

Installation

# Clone the repository
git clone https://github.com/trymon/trymon-os.git
cd trymon-os

# Build the WASM Kernel first
cd src/kernel-rust
wasm-pack build --target web --out-dir ../wasm/pkg
cd ../../

# Install frontend dependencies
npm install

# Start development server
npm run dev

Open http://localhost:5173 to experience Trymon OS.

Production Build

npm run build
# Output: dist/

Project Structure

trymon-os/
├── src/
│   ├── kernel-rust/               # Rust WASM kernel (cérebro/state authority)
│   │   ├── src/
│   │   │   ├── process_manager.rs │ VFS, processes, external TEM metrics
│   │   │   ├── binary_loader.rs   │ Honest .trymon-only loader
│   │   │   ├── shell.rs           │ Built-in shell commands (Pipes, redirection)
│   │   │   └── kernel_api.rs      │ WASM FFI exports to JS
│   │   └── Cargo.toml
│   │
│   ├── abstract-software-trymon/  # Application layer
│   │   └── applications-trymon/
│   │       ├── IdeApp.tsx         # Trymon Studio IDE
│   │       ├── BrowserApp.tsx     # Web Browser
│   │       ├── TerminalApp.tsx    # Native Terminal Emulator
│   │       ├── TrymonAppRunner.tsx# .trymon runner (reports metrics to kernel)
│   │       └── ...
│   │
│   ├── interface/                 # OS Desktop layer
│   │   ├── App.tsx                # Main Desktop Manager
│   │   ├── components/            # UI components (Start Menu, Taskbar)
│   │   ├── services/
│   │   │   ├── trymonEngine/      # contract.ts, runtime.ts (sandbox), packager.ts
│   │   │   ├── kernelService.ts   # WASM bridge to Rust kernel
│   │   │   └── persistence.ts     # LocalStorage state
│   │   └── style.css
│   │
│   ├── wasm/pkg/                  # Built WASM (from kernel-rust)
│   └── main.tsx                   # React Entry Point
│
├── public/                        # Static assets
├── dist/                          # Production build
├── package.json
├── vite.config.ts
└── README.md

License

GPL-3.0 - GNU General Public License v3.0

This project is open source. You are free to use, modify, and distribute it under the terms of the GPL-3.0 license.


Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

Trymon OS - The Web-Native Operating System Ecosystem.

About

TRYMON OS: An experimental project focused on exploring how operating systems can be structured within a browser. It is an attempt to create a simple and secure environment for executing isolated binaries and collaborating in real-time, using Rust for the system core. A practical study on the limits of the web development.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages