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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@svelte-up/projen-rust-project

v0.0.16

Published

<div align="center"> <h1>Projen Rust Project</h1> <a href="https://circleci.com/gh/GetSvelteUp/projen-rust-project/tree/main"> <img src="https://circleci.com/gh/GetSvelteUp/projen-rust-project/tree/main.svg?style=svg"/> </a> <a hre

Readme

An very experimental plugin (project generator) for projen that aims to make spinning up and maintaining cargo-based rustlang projects easy and predicatable.

Getting Started

To create a new project, run the following command and follow the instructions.

$ mkdir my-project
$ cd my-project
$ git init
$ npx projen new --from @svelte-up/projen-rust-project

Use npx projen new --from @svelte-up/projen-rust-project --help to view a list of command line switches that allow you to specify most project options during bootstrapping.

The new command will create a .projenrc.js file which looks like the below for projen-rust-project projects.

const { RustProjectBase } = require("@svelte-up/projen-rust-project");

const project = new RustProjectBase({
  defaultReleaseBranch: "main",
  devDeps: ["@svelte-up/projen-rust-project"],
  name: "projen-rust-project-example",
});

project.synth();

This configuration instantiates your project with minimal setup, and synthesizes default project files.

Next Steps

Once your project is created, you can configure the project by editing .projenrc.js and re-running npx projen to re-synthesize.

Customize the Generated Cargo Manifest

interface RustProjectBaseOptions extends TypeScriptProjectOptions {
  readonly manifest: CargoManifest;
  readonly target: string;
}

At present, the structure and configuration of your project is primarily controlled via the manifest property on the RustProjectBaseOptions interface. Here, you control how your Cargo.toml file is generated.

For example, the .projenrc.js configuration below generates the subsequent Cargo.toml:

.projenrc.js

// .projenrc.js

const project = new RustProjectBase({
  defaultReleaseBranch: "main",
  devDeps: ["@getsvelteup/projen-rust-project"],
  name: "projen-test-2",
  manifest: {
    package: {
      name: "projen-test",
      version: "0.0.1",
      edition: "2021",
      authors: ["Michael Edelman <[email protected]>"],
      license: "Apache-2.0",
    },
    dependencies: {
      lambda_http: "0.4.1",
      tokio: { version: "1", features: ["full"] },
      serde_json: "1.0.64",
      simple_logger: "1.13.0",
      log: "0.4.14",
    },
    devDependencies: {
      pretty_assertions: "1.0.0",
    },
    profile: {
      dev: {
        lto: false,
      },
      release: {
        lto: true,
        panic: "abort",
      },
    },
  },
});

Cargo.toml

# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen".

[package]
name = "projen-test"
version = "0.0.1"
edition = "2021"
authors = [ "Michael Edelman <[email protected]>" ]
license = "Apache-2.0"

[dependencies]
lambda_http = "0.4.1"
serde_json = "1.0.64"
simple_logger = "1.13.0"
log = "0.4.14"

  [dependencies.tokio]
  version = "1"
  features = [ "full" ]

[profile.dev]
lto = false
debug = 1
incremental = true

[profile.release]
lto = true
debug = false
incremental = true
panic = "abort"

[dev-dependencies]
pretty_assertions = "1.0.0"

Cargo.toml support is pretty robust; however, some features and or settings are currently in development. For a full overview see the API Reference section below.

Add Additional Binaries, Tests, Examples, and Benches

Binaries, tests, examples, and benches can be incldued directly via the manifest configuration above. Alternatively, you can use the various helper methods on your project to do the same. For every binary, test, example, or bench included, the project will automatically stub out the item at its expected location and modify the Cargo.toml file appropriately.

project.addBinary("bootstrap", {
  name: "bootstrap",
  path: "src/bin/bootstrap.rs",
});

project.addBinary("another", {
  name: "another",
  path: "src/bin/another.rs",
  doc: false,
  edition: "2018",
});

Build, Test, Etc.

Projen rust project also generates a package.json file with various execution scripts for interacting with your project based on your custom configuration defined above. For example, adding the two binaries above will result in the creation of the following:

{
  "scripts": {
    "build": "npx npm-run-all -p build:*",
    "build:bootstrap": "cargo build --release  --bin bootstrap",
    "build:another": "cargo build --release  --bin another"
  }
}

Thereafter, you can build individual binaries by running yarn build:<binary-name> or build all of them simply by running yarn build.

API Reference

See API Reference for API details.

Contributions

Contributions of all kinds are welcome! For a quick start, check out a development environment.

$ git clone [email protected]:GetSvelteUp/projen-rust-project
$ cd projen-rust-project
$ yarn
$ yarn watch

License

Distributed under the Apache-2.0 license.