Git Product home page Git Product logo

cargo-ramdisk's Introduction

cargo-ramdisk

This crate is only supported for unix like systems! cargo-ramdisk creates a ramdisk at the target folder of your project for ridiculously faster compilation times.

This is achieved without root permisions by linking your target folder to a temporary folder in /dev/shm in your unix like OS. This location is rw for all users and is mounted in virtual memory as a tmpfs.

Install

cargo install cargo-ramdisk

Usage

USAGE:
    cargo ramdisk [OPTIONS] [SUBCOMMAND]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -t, --target <target>    The path to the target folder where compilation output is written [default: target/]

SUBCOMMANDS:
    help       Prints this message or the help of the given subcommand(s)
    mount      Mount a ramdisk, same as not specifying a subcommand
    remount    Remount an existing ramdisk
    unmount    Unmount an existing ramdisk

Copying data back to disk

In order to copy data back to disk you can use the flag -c or --copy-to in the mount and unmount subcommands.

Sub-commands usage

Cargo ramdisk has three main subcommands for its operation each one with its options and flags.

mount
Mount a ramdisk, same as not specifying a subcommand

USAGE:
    cargo ramdisk mount [FLAGS] [OPTIONS]

FLAGS:
    -c, --copy-to    Copy the contents of the target folder to the ramdisk
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -t, --target <target>    The path to the target folder where compilation output is written [default: ./target]
remount
Remount an existing ramdisk

USAGE:
    cargo ramdisk remount [OPTIONS]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -t, --target <target>    The path to the target folder where compilation output is written [default: target]
unmount
Unmount an existing ramdisk

USAGE:
    cargo ramdisk unmount [FLAGS] [OPTIONS]

FLAGS:
    -c, --copy-back    Copy back the contents of the ramdisk to the target folder
    -h, --help         Prints help information
    -V, --version      Prints version information

OPTIONS:
    -t, --target <target>    The path to the target folder where compilation output is written [default: target]

cargo-ramdisk's People

Contributors

djmcnab avatar paumava avatar psdzzm avatar tynberry avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

cargo-ramdisk's Issues

[Question] Does the project durable?

Hello maintainer, I noticed your project from this reply.In your reply, you mentioned that your project may suffer from a loss of builds in shutdowns and reboots.
So I'd like to ask does the ramdisk write back to disk every time the build is finished? This may solve the durability problem.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.