Dusome Rust is a VS Code extension that helps students quickly create Rust projects, add reusable modules, and build outputs for Linux, Windows, and WebAssembly.
Install Rust and Cargo first.
Run:
rustup target add wasm32-unknown-unknown
cargo install wasm-bindgen-cliRun:
sudo pacman -S mingw-w64-gcc
rustup target add x86_64-pc-windows-gnu- Rust: Show Menu
- Rust: Create GUI Project
- Rust: Create Script Project
- Rust: Build Web Output (Advanced)
- Rust: Build Web Output (Basic)
- Rust: Run Program
- Rust: Run Web Server
- Rust: Add Advanced Help File From The Web
- Rust: Add Configured Module From The Web
- Dusome Rust: Set Repository URL
- Dusome Rust: Open Extension Settings
- Build: Linux Output
- Build: Windows Output
- Add Rust General Help File From The Web
- Add Rust Advanced Help File From The Web
- ⚙️ Plugin Settings
- Configured module entries from
dusome-rust.customWebModules
Run the ⚙️ Plugin Settings command from the VS Code command palette or select it from the Rust menu. This opens an interactive interface where you can:
Extension Settings:
- Configure repository URL, rustfmt max width, window dimensions, and more
- Toggle boolean settings like fullscreen, resizable, success notifications, and auto-create assets folder
- Set author name and terminal name
- All settings updated apply globally to your VS Code installation
Web Modules:
- Add new custom modules with file name, menu label, and optional custom URL
- Edit existing module entries
- Delete modules
- Reset modules to default modules
Changes are saved directly to your VS Code configuration.
You can also edit settings directly in VS Code's settings.json file or the extension settings. For more granular control over per-workspace module configuration, edit dusome-rust.customWebModules in your workspace settings.json file.
All settings are under the dusome-rust namespace.
| Setting | Type | Default | Description |
|---|---|---|---|
| dusome-rust.repositoryUrl | string | https://raw.githubusercontent.com/Mathew-D/rust-objects/main/ | Base URL used to download modules and helper files. Must end with a slash. |
| dusome-rust.rustfmtMaxWidth | number | 150 | Value written to rustfmt.toml when creating new projects. |
| dusome-rust.defaultWindowWidth | number | 1024 | Default Macroquad window width in generated GUI projects. |
| dusome-rust.defaultWindowHeight | number | 768 | Default Macroquad window height in generated GUI projects. |
| dusome-rust.defaultFullscreen | boolean | false | Default Macroquad fullscreen value in generated GUI projects. |
| dusome-rust.defaultResizable | boolean | true | Default Macroquad window_resizable value in generated GUI projects. |
| dusome-rust.cargoInitTimeoutMs | number | 90000 | Timeout while waiting for Cargo.toml changes during GUI project setup. |
| dusome-rust.showSuccessNotifications | boolean | true | Enables or disables extension success popups. Error and warning popups are still shown. |
| dusome-rust.terminalName | string | Cargo Terminal | Name used for the extension terminal. |
| dusome-rust.autoCreateAssetsFolder | boolean | true | Automatically creates an assets folder when creating new projects. |
| dusome-rust.authorName | string | Author name written into generated Rust project templates. | |
| dusome-rust.customWebModules | array | prefilled | Controls module download entries (fileName, optional url, menuLabel, successMessage) shown in Rust: Show Menu and in Rust: Add Configured Module From The Web. If url is set, it overrides repositoryUrl + fileName for that entry. Best managed via the Manage Web Modules GUI. |
Cause: wasm32 target is missing.
Fix:
rustup target add wasm32-unknown-unknownCause: wasm-bindgen-cli is not installed or is incompatible.
Fix:
cargo install wasm-bindgen-cli --forceThen run Rust: Build Web Output (Advanced) again.
Cause: cross toolchain or target is not installed.
Fix:
sudo pacman -S mingw-w64-gcc
rustup target add x86_64-pc-windows-gnuCause: dusome-rust.repositoryUrl is wrong or missing trailing slash.
Fix:
- Run Dusome Rust: Set Repository URL.
- Use a URL that ends in a slash.
- Verify the repository contains the requested file names.
Cause: Success notifications are enabled.
Fix: Set dusome-rust.showSuccessNotifications to false.
Cause: cargo init timing depends on machine and disk speed.
Fix: Increase dusome-rust.cargoInitTimeoutMs in settings.
Cause: defaults are configured in extension settings.
Fix: Adjust these settings and create a new GUI project:
- dusome-rust.defaultWindowWidth
- dusome-rust.defaultWindowHeight
- dusome-rust.defaultFullscreen
- dusome-rust.defaultResizable
- Most day-to-day actions are available through Rust: Show Menu.
- Build or download the VSIX from: https://github.com/Mathew-D/vs_code_rust
MIT