{"id":45759515,"url":"https://github.com/reussir-lang/reussir-playground","last_synced_at":"2026-02-25T22:11:12.856Z","repository":{"id":339536891,"uuid":"1160566110","full_name":"reussir-lang/reussir-playground","owner":"reussir-lang","description":"A programming language with region-based memory management","archived":false,"fork":false,"pushed_at":"2026-02-20T08:07:54.000Z","size":617,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-20T11:06:11.932Z","etag":null,"topics":["functional-programming","llvm","memory-management","mlir"],"latest_commit_sha":null,"homepage":"https://reussir-playground.zhuyi.fan/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reussir-lang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-18T05:11:23.000Z","updated_at":"2026-02-20T08:22:36.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/reussir-lang/reussir-playground","commit_stats":null,"previous_names":["reussir-lang/reussir-playground"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/reussir-lang/reussir-playground","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reussir-lang%2Freussir-playground","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reussir-lang%2Freussir-playground/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reussir-lang%2Freussir-playground/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reussir-lang%2Freussir-playground/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reussir-lang","download_url":"https://codeload.github.com/reussir-lang/reussir-playground/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reussir-lang%2Freussir-playground/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29843221,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-25T21:18:31.832Z","status":"ssl_error","status_checked_at":"2026-02-25T21:18:29.265Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["functional-programming","llvm","memory-management","mlir"],"created_at":"2026-02-25T22:11:09.737Z","updated_at":"2026-02-25T22:11:12.848Z","avatar_url":"https://github.com/reussir-lang.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Reussir Playground\n\nWeb-based playground for the [Reussir](https://github.com/reussir-lang/reussir)\nprogramming language.\n\n**How it works:**\n- The server compiles Reussir source to a `wasm32-wasip1` object, links it with\n  `reussir-rt` via a generated Rust harness, and returns the `.wasm` binary.\n- The browser executes the binary through a built-in WASI shim\n  — **the server never runs user code**.\n- Text output modes (LLVM IR, Assembly, MLIR) invoke the compiler inside a\n  sandbox and return the textual output directly.\n\n## Requirements\n\n| Tool | Notes |\n|---|---|\n| Rust toolchain | stable + `wasm32-wasip1` target (`rustup target add wasm32-wasip1`) |\n| Node.js + pnpm | frontend build toolchain |\n| reussir-compiler | built from [reussir-lang/reussir](https://github.com/reussir-lang/reussir) |\n| bwrap *(or)* Linux 5.13+ | sandboxing; bwrap is the default |\n\n## Setup\n\n```bash\n# 1. Clone\ngit clone https://github.com/reussir-lang/reussir-playground\ncd reussir-playground\n\n# 2. Add the wasm32-wasip1 target (only needed once)\nrustup target add wasm32-wasip1\n\n# 3. Write your config\ncp config.example.toml config.toml\n$EDITOR config.toml       # set compiler.path and compiler.rt_path\n\n# 4. Build the frontend\ncd frontend \u0026\u0026 pnpm install \u0026\u0026 pnpm build \u0026\u0026 cd ..\n\n# 5. Build and run the server\ncargo run -p reussir-playground --release\n```\n\nThen open `http://127.0.0.1:3000` in a browser.\n\n## Development\n\nFor local development, run the Vite dev server and the Rust backend separately.\nVite proxies `/api` requests to the backend automatically.\n\n```bash\n# Terminal 1: start the Rust server\ncargo run -p reussir-playground --release\n\n# Terminal 2: start the frontend dev server (hot reload)\ncd frontend \u0026\u0026 pnpm dev\n```\n\nThen open `http://localhost:5173`.\n\n## Configuration\n\nAll configuration lives in `config.toml` (see `config.example.toml`).\n\n| Key | Default | Description |\n|---|---|---|\n| `bind_addr` | `127.0.0.1:3000` | Listen address |\n| `compiler.path` | *(required)* | Path to reussir-compiler binary |\n| `compiler.rt_path` | *(required)* | Path to `reussir/runtime/` directory |\n| `compiler.cargo_target_dir` | `playground-target` | Shared Cargo target dir for harness caching |\n| `compiler.compile_timeout_secs` | `30` | Compiler timeout |\n| `compiler.cargo_timeout_secs` | `180` | Cargo build timeout |\n| `sandbox.kind` | `bwrap` | `bwrap` / `landlock` / `none` |\n| `sandbox.bwrap_path` | `bwrap` in PATH | Path to bwrap binary |\n\nThe bind address can also be overridden on the CLI:\n\n```bash\nreussir-playground --bind 0.0.0.0:8080\nreussir-playground --config /etc/reussir-playground/config.toml\n```\n\n## Sandboxing\n\nCompiler invocations are sandboxed to prevent the untrusted reussir source\n(which controls MLIR/LLVM IR passed to the backend) from exfiltrating data or\nmodifying the host.\n\n- **bwrap** (default): unshares user, IPC, and network namespaces; presents a\n  minimal read-only rootfs; the per-request temp dir gets read-write access.\n- **landlock**: applies Linux Landlock rules via `pre_exec` in the child process.\n  Requires kernel ≥ 5.13; gracefully degrades on older kernels.\n- **none**: no sandboxing — only use locally.\n\n\u003e Note: sandboxing applies to the **compiler** process only.  The compiled\n\u003e `.wasm` binary is executed by the browser's own WebAssembly sandbox, so the\n\u003e server never runs user code at all.\n\n## Output modes\n\n| Mode | Description |\n|---|---|\n| **Run** | Compile to `wasm32-wasip1`, ship binary to browser, execute via built-in WASI shim |\n| **LLVM IR** | Return the LLVM IR emitted for the target |\n| **Assembly** | Return the native assembly |\n| **MLIR** | Return the MLIR module before LLVM lowering |\n\n## Architecture\n\n```\nBrowser (React/Monaco)          Server (Rust/Axum)\n──────────────────────          ────────────────────────────────────\n Source editor (Monaco)\n Driver editor (Rust)   ─POST──► /api/compile\n                                  │\n                                  ├─ text modes:\n                                  │   sandbox.wrap(reussir-compiler …)\n                                  │   return { output: \"…\" }\n                                  │\n                                  └─ run mode:\n                                      sandbox.wrap(reussir-compiler\n                                        --target-triple wasm32-wasip1 …)\n                                      cargo build --target wasm32-wasip1\n                                      read .wasm\n                                      return { wasm: \"\u003cbase64\u003e\" }\n\n WASI shim ◄────────────────────────────────────────────────────────\n WebAssembly.instantiate()\n _start()  →  capture stdout/stderr\n display output\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freussir-lang%2Freussir-playground","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freussir-lang%2Freussir-playground","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freussir-lang%2Freussir-playground/lists"}