
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
fast-msgpack-rpc
Advanced tools
A non-compatible variant of the Msgpack-RPC protocol specification for node.js
node-fast-msgpack-rpc is an implementation of the Msgpack-RPC protocol specification for node.js. Msgpack-RPC is built ontop of the very fast MessagePack serialization format. This implementation supports tcp and unix socket transports.
This is a "fast" version of Msgpack-RPC. The big difference here is that the length of the packet is prepended to each packet, meaning we don't need to keep iteratively decoding the packet over and over again. Seems weird they left this out. This protocol is not compatible with the existing Msgpack, but this module has the same API.
If you don't care too much about keeping custom per-connection state, it's easy to make a simple RPC server:
var rpc = require('fast-msgpack-rpc');
var srv = rpc.createServer({
"myprog.v1" : {
add : function(arg, response) {
response.result(arg.a + arg.b);
}
}
});
srv.listen(8000);
a corresponding client might look like:
var c = rpc.createClient('127.0.0.1', 8000,
function() {
c.invoke('add', { a : 5, b : 4},
function(err, response) {
assert.equal(9, response);
c.close();
});
}, "myprog.v1");
Or, equivalently, in beautiful IcedCoffeeScript:
await (c = rpc.createClient '127.0.0.1', 8000, defer(ok), "myprog.v1")
await c.invoke 'add', { a : 5, b : 4 }, defer err, response
c.close()
(documentation to come)
First you will need to install the msgpack2 add-on
To install node-msgpack-rpc with npm:
npm install -g msgpack2
(documentation to come)
FAQs
A non-compatible variant of the Msgpack-RPC protocol specification for node.js
We found that fast-msgpack-rpc demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.