> Agent-readable docs index: /llms.txt. Download /docs.zip to grep all markdown files locally.

---
$schema: https://holocron.so/frontmatter.json
title: Studio Getting Started
description: Install and run RoboC++ Studio locally, with optional WASM build for full compiler-backed analysis.
icon: lucide:play
---

RoboC++ Studio lives in the compiler repository at **`ide/web`**. It is a separate Node app from the Rust workspace: you install npm dependencies, start Vite, and optionally build the WASM bridge for real compiler analysis.

## Prerequisites

* **Node.js** with npm (or another package manager compatible with the lockfile)
* For full compiler-backed analysis: **Rust 1.76+**, **wasm-pack**, and the **`wasm32-unknown-unknown`** target

The Rust workspace must be cloneable from the same repo root that contains **`ide/web`**.

## Quick start (UI only)

From the repository root:

```bash
cd ide/web
npm install
npm run dev
```

Open **`http://127.0.0.1:5173`**. Vite binds to localhost on port **5173**.

On first launch Studio uses a checked-in WASM stub. The language-service bridge returns **sample analysis data** until you build the real WASM package. Check, run, and build C still exercise the UI, but results may not match the full compiler until WASM is built.

## Open the sample project

Use **Open Project** and choose **PackagingLine** (or create a new project). The sample workspace includes:

* `counter.st`
* `native_ladder.ld`
* `sequence.sfc`
* `native_fbd.fbd`
* `plcopen_fbd.xml`
* `target/mapping.toml`

Select a file in the explorer, press **F7** to check, then **F5** to simulate. Open **Diagnostics** and **Scan Trace** in the bottom panel to inspect results.

## Build the WASM language service

Install tooling once:

```bash
brew install wasm-pack
rustup target add wasm32-unknown-unknown
```

If you use Homebrew Rust, `wasm-pack` needs a rustup toolchain with the WASM target. The Studio build script handles that automatically when `rustup` is available.

From **`ide/web`**:

```bash
npm run wasm:build
```

This writes the generated package to **`src/wasm/iec_language_service_wasm/`** and replaces the development stub. Restart **`npm run dev`** if it was already running.

After WASM is present, check, simulate, build C, compliance review, and graph previews use the same **`iec_language_service`** crate as the CLI pipeline.

## Verify the web app

```bash
npm run build
npm test
```

Vitest covers project store, settings, local analysis helpers, graph cache, editor tabs, golden fixtures, and performance budgets under **`ide/web/src/`**.

## Save and persist projects

User projects persist in browser **`localStorage`** (`robocpp-studio-projects-v1`). **Cmd/Ctrl+S** saves the active project name and file set. Clearing site data removes saved projects; export important work through PLCopen or copy source files out of the editor.

## CLI equivalent

Studio mirrors common **`rbcpp`** workflows. From the repo root you can cross-check Studio output:

```bash
cargo run -p rbcpp_cli -- check examples/counter.st
cargo run -p rbcpp_cli -- run examples/counter.st --cycles 3
cargo run -p rbcpp_cli -- build-c examples/counter.st -o build/counter.c
```

See [CLI reference](/cli) for flags and profiles. Studio settings for profile and cycle time map to the same **`iec_profile`** and runtime options.

## Optional: target bridge

Studio can talk to file-backed simulator I/O or Modbus TCP hardware through the local **`rbcpp-target-bridge`** service.

From **`ide/web`** (starts bridge + Vite together):

```bash
npm run dev:with-target
```

Or start the bridge manually from the repository root:

```bash
cargo run -p rbcpp_target_bridge -- --bind 127.0.0.1:8787
cd ide/web && npm run dev
```

Set **Target bridge URL** in Studio Settings (default **`http://127.0.0.1:8787`**). In the target connection bar, choose **Simulator** or **Hardware**, then connect, deploy, refresh I/O, run, stop, or reset.

Mapping lines in **`target/mapping.toml`** can bind symbols to files or Modbus points (for example `1:coil:0`). Deploy artifacts default to **`~/.robocpp/studio-target`**. Full setup notes live in **`ide/web/docs/TARGET_BRIDGE.md`** in the compiler repo.

## Limitations today

* **No hosted Studio URL** in this docs deployment. Run locally or deploy `ide/web` yourself.
* **Target bridge is local and experimental.** JSON download remains available when the bridge is offline.
* **Graphical LD/FBD/SFC editing** is partial; prefer the text editor for full control.
* **Not a safety-certified IDE.** Treat Studio as a development and review surface.

## Next steps

<CardGroup cols={2}>
  <Card title="RoboC++ Studio" icon="lucide:layout-panel-left" href="/studio">
    Shell layout, commands, and language service overview.
  </Card>

  <Card title="CLI reference" icon="lucide:terminal" href="/cli">
    Terminal commands Studio mirrors.
  </Card>

  <Card title="Diagnostics" icon="lucide:bug" href="/diagnostics">
    `RBCPP-*` codes in the diagnostics table.
  </Card>

  <Card title="Targets" icon="lucide:cpu" href="/targets">
    Generated C ABI and mapping files Studio uses.
  </Card>
</CardGroup>


---

*Powered by [holocron.so](https://holocron.so)*
