Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mplight

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mplight

  • 1.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

MPLight

  • Ruby library
  • Yet another implementation of the MessagePack protocol/format
  • Designed to be as small as possible. Clean code, no dependecies, no frills, no wokeness.

RubyGems install:

gem install mplight

If you like to reduce dependencies, you might prefer to copy the ~300 lines of Ruby code into your project. See Ruby-Nvim for an example.

Usage

require "mplight"
IO.pipe do |r,w|
  t = MPLight::Types.new

  t.extend MPLight::Packer
  t.init_output w
  t.put %w(foo bar baz)

  t.extend MPLight::Unpacker
  t.init_input r
  puts t.get.inspect
end

Usage with Neovim:

require "mplight"
require "yaml"
IO.popen %w(nvim --api-info) do |r|
  t = MPLight::Types.new
  t.extend MPLight::Unpacker
  t.init_input r
  puts t.get.to_yaml
end

See the testit file for further examples.

Sister Project

This library was written together with the Ruby-Nvim.

FAQs

Package last updated on 13 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc