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

ssb-keys-neon-debug-eenahr-oseefeo

v8.0.0-11

Published

Rust-in-Node.js variant of ssb-keys

Downloads

5

Readme

ssb-keys-neon

A drop-in replacement of ssb-keys, implemented in Rust and delivered as a native module in Node.js

npm install ssb-keys-neon

Motivation

It would make a lot of sense for SSB to be implemented in Rust, a language for safety and performance. Sunrise Choir has written a lot of SSB modules in Rust, but these are not yet running in production, simply because it requires a lot of work to migrate from Node.js (and/or Electron) to Rust.

Neon allows you to create native modules for Node.js written in Rust. This is great, because it allows us to use Sunrise Choir's modules directly inside Node.js!

ssb-keys-neon does exactly that, it runs ssb-crypto, ssb-keyfile, ssb-multiformats (Rust crates) under the hood, but provides an API that perfectly mirrors that of ssb-keys. There is no code you need to migrate, just replace ssb-keys with ssb-keys-neon and it's done.

We even run the same test suite for ssb-keys on ssb-keys-neon.

Usage

There are two ways you can use this npm package.

Option 1: (easiest) automatically replace

In your package.json, assuming you already have ssb-keys, you can replace its implementation by pointing to the GitHub repo for ssb-keys-neon:

   // ...
   "dependencies": {
     "ssb-ebt": "^5.6.7",
     "ssb-friends": "^4.1.4",
     "ssb-invite": "^2.1.3",
-    "ssb-keys": "7.2.0",
+    "ssb-keys": "staltz/ssb-keys-neon#replace-7.2.0",
     "ssb-lan": "^0.2.0",
     "ssb-logging": "^1.0.0",
     "ssb-markdown": "^6.0.4",
   }
   // ...

This is the easiest method because you only need to change package.json, your code can still require('ssb-keys') and under the hood it will load ssb-keys-neon.

Note that you cannot specify version ranges. If you previously had "ssb-keys": "7.x.x", you will have to specify an exact version when you write "staltz/ssb-keys-neon#replace-7.2.0", you cannot write "staltz/ssb-keys-neon#replace-7.x.x".

Option 2: manually replace

This method gives you more control over the usage of ssb-keys-neon, as well as allows you to specify version ranges. Just remove ssb-keys from your package.json, and add ssb-keys-neon:

   // ...
   "dependencies": {
     "ssb-ebt": "^5.6.7",
     "ssb-friends": "^4.1.4",
     "ssb-invite": "^2.1.3",
-    "ssb-keys": "8.0.0",
+    "ssb-keys-neon": ">=8.0.0-1",
     "ssb-lan": "^0.2.0",
     "ssb-logging": "^1.0.0",
     "ssb-markdown": "^6.0.4",
   }
   // ...

Then, you also have to replace usages of ssb-keys manually in JavaScript source files:

-var ssbKeys = require('ssb-keys')
+var ssbKeys = require('ssb-keys-neon')

 // ...

Versioning and support

[email protected] is compatible with [email protected]. Versions older than 8.0.0 still use the old name ssb-neon-keys so be sure to type it correctly.

Versions of ssb-keys that are mirrored by ssb-keys-neon currently include (and which platforms are guaranteed to be supported):

As of [email protected]

  • macOS (darwin-x64)
    • Node 10.x
    • Node 12.x
    • Node 14.x
    • Electron 7.x
    • Electron 8.x
    • Electron 9.x
    • Electron 10.x
  • Linux (linux-x64)
    • Node 10.x
    • Node 12.x
    • Node 14.x
    • Electron 7.x
    • Electron 8.x
    • Electron 9.x
    • Electron 10.x
  • Windows (win32-x64)
    • Node 10.x
    • Node 12.x
    • Node 14.x
    • Electron 7.x
    • Electron 8.x
    • Electron 9.x
    • Electron 10.x

As of [email protected]

  • macOS (darwin-x64)
    • Node 10.x
    • Node 12.x
    • Node 14.x
    • Electron 7.x
    • Electron 8.x
    • Electron 9.x
    • Electron 10.x
  • Linux (linux-x64)
    • Node 10.x
    • Node 12.x
    • Node 14.x
    • Electron 7.x
    • Electron 8.x
    • Electron 9.x
    • Electron 10.x
  • Windows (win32-x64)
    • Node 10.x
    • Node 12.x
    • Node 14.x
    • Electron 7.x
    • Electron 8.x
    • Electron 9.x
    • Electron 10.x

As of [email protected]

  • macOS (darwin-x64)
    • Node 10.x
    • Node 12.x
    • Node 14.x
    • Electron 7.x
    • Electron 8.x
    • Electron 9.x
    • Electron 10.x
  • Linux (linux-x64)
    • Node 10.x
    • Node 12.x
    • Node 14.x
    • Electron 7.x
    • Electron 8.x
    • Electron 9.x
    • Electron 10.x
  • Windows (win32-x64)
    • Node 10.x
    • Node 12.x
    • Node 14.x
    • Electron 7.x
    • Electron 8.x
    • Electron 9.x
    • Electron 10.x

As of [email protected]

  • macOS (darwin-x64)
    • Node 10.x
    • Node 12.x
    • Node 14.x
    • Electron 7.x
    • Electron 8.x
    • Electron 9.x
    • Electron 10.x
  • Linux (linux-x64)
    • Node 10.x
    • Node 12.x
    • Node 14.x
    • Electron 7.x
    • Electron 8.x
    • Electron 9.x
    • Electron 10.x
  • Windows (win32-x64)
    • Node 10.x
    • Node 12.x
    • Node 14.x
    • Electron 7.x
    • Electron 8.x
    • Electron 9.x
    • Electron 10.x

License

AGPL-3.0