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

flaggo-rust

v1.0.0

Published

Rust SDK for Flaggo - A minimalist, zero-config feature flag library.

Downloads

13

Readme

🚩 flaggo

Version License: MIT

A minimalist, zero-config, portable feature flag library.

Flaggo is designed for developers who want the power of feature flags without the weight of a dedicated server, complex dashboard, or expensive subscription. Just a flags.json file and you're good to go.


🚀 Vision

In a world of complex microservices and heavy SaaS solutions, Flaggo brings back simplicity. By using a simple JSON file as a source of truth, you can manage rollouts, A/B tests, and environment-specific features across your entire stack (Frontend, Backend, and even different languages) with guaranteed consistency.

📦 Installation

# JavaScript / TypeScript (Node.js, Browser, React, Angular, etc.)
npm install flaggo

# Python
pip install flaggo-python

# Rust
cargo add flaggo-rust

🛠 Usage

1. Define your flags (flags.json)

{
  "flags": {
    "new-ui": {
      "enabled": true,
      "environments": ["production"],
      "rollout": 50
    },
    "header-style": {
      "enabled": true,
      "variants": {
        "modern": 0.5,
        "classic": 0.5
      }
    }
  }
}

💻 JavaScript / TypeScript

Standard usage for Node.js or Browser.

import { Flaggo } from "flaggo";

async function main() {
  const flags = await Flaggo.load({
    source: "https://config.example.com/flags.json",
    cacheTTL: 600,
    environment: "production",
    context: { userId: "user-123" },
    fetchOptions: {
      headers: { "Authorization": "Bearer YOUR_TOKEN" } // Cloud Readiness
    }
  });

  if (flags.isEnabled("new-ui")) {
    console.log("New UI is active");
  }
}

⚡ Edge (Vercel Edge, Cloudflare Workers)

For Edge runtimes, use the lightweight entrypoint that excludes Node.js system APIs.

import { Flaggo } from "flaggo/edge";

// Usage remains identical to standard Flaggo

🐍 Python

from flaggo import Flaggo

# Load with custom headers for authenticated APIs
flags = Flaggo.load(
    source="https://api.flaggo.cloud/v1/flags.json", 
    headers={"Authorization": "Bearer YOUR_TOKEN"},
    cache_ttl=300,
    context={"userId": "user-123"}
)

🐹 Go

import "github.com/FabienOnnis/flaggo/flaggo-go"

flags, err := flaggo.Load(flaggo.FlaggoOptions{
    Source:  "https://api.flaggo.cloud/v1/flags.json",
    Headers: map[string]string{"Authorization": "Bearer YOUR_TOKEN"},
    Context: flaggo.FlagContext{UserID: "user-123"},
})

🦀 Rust

use flaggo_rust::{Flaggo, FlaggoOptions, Source, FlagContext};
use std::collections::HashMap;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let mut headers = HashMap::new();
    headers.insert("Authorization".to_string(), "Bearer YOUR_TOKEN".to_string());

    let flags = Flaggo::load(FlaggoOptions {
        source: Source::Url("https://api.flaggo.cloud/v1/flags.json".to_string()),
        headers: Some(headers),
        ..Default::default()
    })?;
    
    Ok(())
}

✨ Key Features

  • 🎯 Zero-config: No database, no server, no latency. Just a JSON file.
  • 🌍 Universal: Native support for Node.js, Browsers, Python, Go and Rust.
  • ⚡ Edge Optimized: Dedicated lightweight build for Edge runtimes.
  • 🧪 A/B Testing: Native support for variants and weighted distribution.
  • ⚡ Smart Cache: Built-in TTL caching with manual refresh capabilities.
  • 🔗 Cross-Language Consistency: Guaranteed identical decisions across all SDKs thanks to FNV-1a hashing.
  • 🛡️ Environment-aware: Easily filter flags based on your current environment.
  • 📈 Stable Rollouts: Incremental rollouts that stay consistent for the same user.

🗺 Roadmap

  • [x] v1.x: Initial Core, Universal support, Multi-SDK, Variants & Cache.
  • [x] v2.0: Edge Support (JS/TS) & Cloud Readiness (Auth headers across all SDKs).
  • [x] v3.0: Major Restructuring (Monorepo) & Independent Package Naming.
  • [ ] v3.1: Flaggo Cloud - Management Dashboard (Separate repository).
  • [ ] v4.0: Real-time push updates via WebSockets.

🤝 Contributing

Contributions are welcome! Whether it's a new SDK, a bug fix, or a feature request, feel free to open an issue or a PR.

📄 License

Distributed under the MIT License. See LICENSE for more information.