#rpc #pubsub #wamp #wamp2

bin+lib wampire

A WAMPv2 client and router implenting the basic WAMP profile

3 releases

Uses old Rust 2015

0.1.2 Jul 10, 2018
0.1.1 May 31, 2018
0.1.0 May 26, 2018

#31 in WebSocket

MIT license

4.5K SLoC


Build Status License Chat

Wampire is a Web Application Messaging Protcol v2 router library, client library, and a router service, that implements most of the features defined in the advanced profile. The wampire project is written in Rust and designed for highly concurrent asynchronous I/O. The wampire router provides extended functionality. The router and client interaction with other WAMP implementations. Project initially forked from wamp-rs v0.1.0.

Wampire logo

Check the examples/webrtc-simple folder for nodejs based example using wampire as signaling server for WebRTC connection.

Supporting Wampire

Wampire is an MIT-licensed open source project. It's an independent project with its ongoing development made possible entirely thanks to the support by these awesome backers. If you'd like to join them, please consider:

Become a patron ko-fi

Full Documentation

See the Wampire Project Wiki for full documentation, examples, and operational details.

At present the entire Basic Profile is supported, as well as pattern based subscriptions and registrations from the Advanced Profile.

You may be looking for:

There is currently no support for secure connections.

To include in your project, place the following in your Cargo.toml

wampire = "0.1"

Wampire uses serde-rs, which requires Rust 1.15 or greater.


To start router in development mode use

RUST_LOG=info cargo run wampire

Nginx configuration

To pass WebSocket connection to router add it to Nginx config. PS. can be used with SSL too.

location /ws/ {
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $connection_upgrade;
    proxy_read_timeout 1800s;

    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header Host $http_host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;


Build router:

  1. Clone repo using git clone https://github.com/ohyo-io/wampire.git
  2. cd wampire && cargo build
  3. Copy wampire from target folder to /usr/local/bin
  4. Copy wampire.service from dist to /usr/lib/systemd/system or /lib/systemd/system (depend on your system).

To start a service:

systemctl start wampire

To enable as system service:

systemctl enable wampire


Please see the examples directory. For instructions on how to check the examples

RUST_LOG=info cargo run --example api_user
RUST_LOG=info cargo run --example endpoint
RUST_LOG=info cargo run --example pubsubclient

Advanced Profile Feature Support

RPC Features

Feature Supported
progressive_call_results Yes
progressive_calls No
call_timeout Yes
call_canceling Yes
caller_identification Yes
call_trustlevels No
registration_meta_api Yes
pattern_based_registration Yes
shared_registration Yes
sharded_registration No
registration_revocation No
procedure_reflection No

PubSub Features

Feature Supported
subscriber_blackwhite_listing Yes
publisher_exclusion Yes
publisher_identification Yes
publication_trustlevels No
subscription_meta_api Yes
pattern_based_subscription Yes
sharded_subscription No
event_history No
topic_reflection No
testament_meta_api Yes

Other Advanced Features

Feature Supported
challenge-response authentication Yes
cookie authentication Yes
ticket authentication Yes
rawsocket transport Yes
batched WS transport No
longpoll transport No
session meta api Yes
TLS for websockets Yes
TLS for rawsockets Yes
websocket compression Yes

Extended Functionality

Wampire provides extended functionality around subscriber black/white listing and in the information available via the session meta API.
This enhances the ability of clients to make desisions about message recipients.



This work is licensed under the MIT license. See LICENSE for details.


~196K SLoC