Code Monkey home page Code Monkey logo

ruvolution's Introduction

Ruvolution

Analyze the modernity of Rust code bases using various techniques.

Setup

You will need to have the Rust toolchain and the cargo-expand utility installed in your local environment.

Before using this tool, you need to expand the code of the std, core and alloc crates:

  1. Clone the official Rust language repository.
  2. Use cd to change your working directory to the cloned repository.
  3. From the directory, execute the expand-std.sh file from this repository. (e.g. $ ../ruvolution/expand-std.sh)
  4. Copy the three generated files (expanded-{std,core,alloc}.rs) back to the Ruvolution directory.

Usage

To see the usage of this tool, use the --help argument:

$ cargo run --release -- --help

It is recommended to run in release mode to enable all optimizations, as source code analysis is quite expensive.

When successfully analyzing a crate, the resulting CSV file should appear in the results folder.


For example, to analyze twenty spread out versions of the tokio crate, the following command is used:

$ cargo run --release -- tokio

The resulting metrics are then written to results/tokio.csv to be further processed.

Analysis

The Python notebook analyze_results.ipynb is used to plot the resulting metrics to explore the viability of these metrics to measure code modernity.

It does this by reading all CSV files from the results folder, and plotting them against time.

ruvolution's People

Contributors

chrrs avatar

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.