← All extensions

Rust Snippets

v0.1.0 · by Bobby Mannino · added 3 November 2026

Rust snippets for the Zed IDE. A collection of Rust snippets to improve your development speed.

Snippets

How to install

With Forge Super installed, the button above opens the app on this extension, where you press Install. Nothing is installed until you do.

You can also open the Extensions panel in the app and search for Rust Snippets. The extension's id is rust-snippets.

Don't have Forge Super yet? Download it here.

README

From the extension's repository, written by its authors and not by Mentenaz. See the source.

Rust Snippets for Zed

Installation

  1. Clone this repo:
git clone https://github.com/bobbymannino/rust-snippets-for-zed
  1. Go to the Extensions menu in the Zed IDE
  2. Click "Install Dev Extension"
  3. Select the folder you cloned

Available Snippets

  • let-vec Initialize an immutable vec
  • mut-vec Initialize a mutable vec
  • match-option Match an option statement
  • match-result Match a result statement
  • if-some If let Some pattern matching
  • clone-struct Clone struct
  • debug-struct Debug struct
  • clone-and-debug-struct Clone and debug struct
  • win-only A Windows only derive
  • mac-only A macOS only derive
  • linux-only A Linux only derive
  • ios-only An iOS only derive
  • android-only An Android only derive
  • if-ok If let Ok pattern matching
  • let-else Let else binding with early return
  • while-some While let Some loop
  • for-in For loop over an iterator
  • fn A function
  • async-fn An async function
  • pub-fn A public function
  • pub-async-fn A public async function
  • impl An impl block
  • impl-trait Implement a trait for a type
  • fn-new A new() constructor
  • impl-default Implement Default for a type
  • impl-display Implement Display for a type
  • impl-from Implement From for a type
  • trait A trait definition
  • enum An enum definition
  • match A match statement
  • test A test function
  • test-mod A tests module
  • main The main function
  • serde-struct A serializable and deserializable struct
  • derive-all Derive the common traits
  • hash-map Initialize a mutable HashMap
  • hash-set Initialize a mutable HashSet
  • unsafe An unsafe block
  • allow Allow a lint