Skip to content

NickelWenzel/cargo-tools

Repository files navigation

Cargo Tools

Build Status License

Cargo Tools is a Visual Studio Code extension that provides IDE-like features for Rust/Cargo development. It complements rust-analyzer by adding project configuration controls, a workspace target browser, cargo-make task management, and cargo alias shortcuts.

Features

Project Configuration

Project configuration

Project Outline

Project outline

cargo-make Integration

cargo make

Cargo Alias Support

Run and pin cargo aliases defined in .cargo/config.toml — the same shortcuts you use in the terminal are surfaced as first-class tasks in the Tasks panel. This includes the xtask pattern, where a workspace member acts as a build tool invoked via a cargo alias such as cargo xtask compile.

Usage

Requirements

  • Visual Studio Code 1.102.0 or higher
  • Rust toolchain with Cargo installed via rustup

Installation

Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.

ext install NickelWenzel.cargo-tools

Resources

  • Docs for comprehensive documentation.
  • Github for source code, issues, and contributing.

Development

Prerequisites

  • Rust stable
  • Node.js 20
  • wasm-pack 0.14
  • wasm-bindgen-cli 0.2.106

Development workflows are driven by the xtask binary via Cargo aliases defined in .cargo/config.toml.

Command Description
cargo compile Build WASM + bundle TypeScript
cargo lint cargo clippy + cargo fmt --check + ESLint
cargo xt-test Run Rust tests on native and wasm32-unknown-unknown
cargo xt-pkg Produce cargo-tools.vsix

Contributing

Contributions welcome via PRs or issues on Github.

Inspiration

This extension draws inspiration from vscode-cmake-tools.

License

MIT

About

VSCode extension for easy configuration of Rust projects

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors