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

slidev-addon-jupyter-runner

v1.0.10

Published

A Slidev addon that allows you to run jupyter notebooks in your slides.

Readme

slidev-addon-cpp-runner

NPM License Deploy

A C + C++ execution addon for Slidev's Monaco Runner, powered by Coliru's compilation API. Write, compile, and run C + C++ code directly in your presentations!

🌟 Features

  • 🖥️ In-slide C/C++ code execution
  • ⚙️ Customizable compiler configurations
  • 🔄 Real-time output display
  • 📚 Support for multiple language standards
  • 🎚️ Per-slide configuration overrides
  • 🚦 Compiler output filtering
  • 🛡️ Type-safe configuration options

📦 Installation

npm install slidev-addon-cpp-runner

Enable the addon in your Slidev frontmatter:

---
addons:
- slidev-addon-cpp-runner
---

🛠️ Usage

C Example

# C

```c {monaco-run}
/** C2x CODE */

C++ Example

# C++

```cpp {monaco-run}
/** C++20 CODE */

⚙️ Configuration

Global Configuration

---
addons:
- slidev-addon-cpp-runner

# C configuration using default settings
c:
  # Compiler to use.
  compiler: 'gcc'

  # C standard.
  standard: 'c2x'

  # Optimization level.
  optimization: 'O2'

  # Compiler flags.
  flags: '-Wall -Wextra -pedantic -pthread -pedantic-errors'

  # Libraries to link.
  libraries: '-lm -latomic'

  # Additional shell commands to run after compilation.
  extraCommands: ''

  # Whether to always show the compiler output.
  alwaysShowCompilerOutput: true

# C++ configuration using default settings
cpp:
  # Compiler to use.
  compiler: 'g++'

  # C++ standard.
  standard: 'c++20'

  # Optimization level.
  optimization: 'O2'

  # Compiler flags.
  flags: '-Wall -Wextra -pedantic -pthread -pedantic-errors'

  # Libraries to link.
  libraries: '-lm -latomic'

  # Additional shell commands to run after compilation.
  extraCommands: ''

  # Whether to always show the compiler output.
  alwaysShowCompilerOutput: false

---

Compiler Support

| Compiler | Standards | |-----------|--------------------------------| | C++ | | | g++ | 98,11,14,17,20,23 | | clang++ | 98,11,14,17 | | g++-4.9 | 98,11,14 | | g++-5.2 | 98,11,14,1z | | C | | | gcc | 89,99,11,17,2x | | clang | 89 | | g++-4.9 | 89,99,11 | | g++-5.2 | 89,99,11 | | clang++ | 99,11 |

Optimization Levels

| Level | Description | |-------|----------------------------------------------| | O0 | No optimization | | O1 | Basic optimization | | O2 | Moderate optimization (default) | | O3 | Aggressive optimization | | Os | Optimize for size | | Og | Debug-friendly optimization | | Ofast | Maximum performance (unsafe) |

🎚️ Per-Slide Customization

---
cpp:
standard: 'c++17'
optimization: 'O3'
---
# Custom Compilation Settings

```cpp {monaco-run}
/** C++17 CODE */

📝 Output Formatting

  • When alwaysShowCompilerOutput is true:
    • Compiler Output: ☘ [Compiler message]
    • Program Output: ☢ [Program output]
  • When alwaysShowCompilerOutput is false:
    • Only program output is shown (unless there's a compiler error)

🛡️ Type Safety

The addon includes comprehensive type safety features:

  • Strict validation of compiler options, standards, and optimization levels.
  • Runtime validation with fallback to defaults for invalid settings.
  • Console warnings for invalid configuration options.
  • TypeScript interfaces for configuration validation.

🔧 How It Works

  1. 📩 Code sent to Coliru API.
  2. 🛠️ Compiled with specified options.
  3. 🏃 Executed in secure environment.
  4. 📤 Results returned to your slide.

⚠️ Limitations

  • 🌐 Requires internet connection.
  • 🛡️ Subject to Coliru's services and security restrictions.

Happy Coding in Your Slides! 🎉