npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

githubchart-rust

v5.1.4

Published

GitHub contribution graph generator in Rust/WASM

Downloads

198

Readme

GitHubChart (The Rusty Version)

Generates an SVG of your GitHub contributions:

Example image

Fork

This is forked from githubchart and ported from Ruby to Rust. It does not provide 100% of the same functionality, but it does generate a similar SVG.

Usage with cargo

If you have Rust installed and are familiar with cargo, you can install and run this directly:

cargo run -- output.svg -u frytg

This compiles and runs the program directly (using dev profile and debug symbols). This would also be the command when developing locally.

To modify the color scheme used, you can provide -c SCHEME. For example, cargo run -- output.svg -u frytg -c halloween uses GitHub's halloween colors.

Use cargo fmt to format the code and cargo test to run the tests.

Usage with binary

Alternatively, you can download a release binary from the releases page and run it directly:

./githubchart-rust output.svg -u frytg

Build

You can build a release binary with:

cargo build --release

Cargo.toml is configured to optimize for size.

Test the binary with:

./target/release/githubchart-rust release.svg -u frytg

Build for Web

See Compiling from Rust to WebAssembly for a full guide on compiling Rust to WebAssembly (WASM).

This project is already configured to build for Web with wasm-pack. Run this command to build:

wasm-pack build --target web

or specifically for Deno:

wasm-pack build --target deno --out-dir pkg-deno

or a combined version for both:

rm -rf pkg && wasm-pack build --target deno --out-name githubchart_rust_deno && wasm-pack build --target web && rm pkg/.gitignore

For the combined version, you will need to remove files from pkg/package.json to publish all files (web+deno) to NPM.

There's also an example in web/example.html that you can run locally.

More docs about this:

License

This githubchart-rust fork (like the upstream repository) is released under the MIT License. See the bundled LICENSE file for details.