The code below (data encoded in Go) and then decoded in Rust. works fine.
extern crate rmp_serde as rmps;
extern crate serde;
#[macro_use]
extern crate serde_derive;
use std::ops::RangeInclusive; | |
use bilrost::{Message, OwnedMessage}; | |
use bytes::Bytes; | |
#[derive(bilrost::Message)] | |
struct Container { | |
inner: Inner, | |
} |
use std::ops::RangeInclusive; | |
use bilrost::{ | |
buf::ReverseBuf, | |
encoding::{ | |
Capped, DecodeContext, Decoder, EmptyState, Encoder, ForOverwrite, General, TagMeasurer, | |
TagRevWriter, TagWriter, WireType, Wiretyped, | |
}, | |
DecodeError, Message, OwnedMessage, | |
}; |
x-environment: &default-env | |
RESTATE_ALLOW_BOOTSTRAP: "false" | |
RESTATE_CLUSTER_NAME: "test-cluster" | |
RESTATE_ROLES: '["admin","worker","log-server","metadata-store"]' | |
RESTATE_METADATA_STORE__TYPE: "raft" | |
RESTATE_METADATA_STORE_CLIENT__ADDRESSES: '["http://node-1:5122","http://node-2:5122","http://node-3:5122"]' | |
x-variables: | |
common_settings: &common_settings | |
image: localhost/restatedev/restate:unknown |
#!/bin/sh | |
# this script is called as `volstat.sh <path/to/subvol>` | |
set -e | |
vol=$1 | |
id=$(btrfs subvol show $vol | grep 'Subvolume ID:'| cut -f 4) | |
output=$(btrfs qgroup show --raw -r $vol| grep "^0/$id") | |
size=$(echo $output | cut -d ' ' -f 4) |
#!env bash | |
socket="/tmp/virtiofs.sock" | |
# override this as well if u wanna change | |
# the vm entry point | |
init=/sbin/init | |
# pass to extracted tarball | |
dir=$1 |
set -e | |
# you need to run `docker save <image> -o <file>.tar | |
# then run this script like `extrat-image.sh <file>.tar` | |
# it will create a directoyr `<file>.tar-root` which containers | |
# all files from the image extracted | |
input=$1 | |
if [ ! -f "${input}" ]; then | |
echo "file does not exist" |
use std::collections::HashMap; | |
struct Module; | |
struct Data { | |
modules: HashMap<String, Module>, | |
} | |
impl Data { | |
fn module<S: AsRef<str>>(&mut self, name: S) -> &mut Module { | |
if let Some(m) = self.modules.get_mut(name.as_ref()) { |
#!env sh | |
set -e | |
sudo systemctl stop bluetooth | |
sudo modprobe -r btusb btrtl btbcm btintel | |
sudo modprobe btusb | |
sudo systemctl start bluetooth | |
pulseaudio -k | |
sleep 1s | |
bluetoothctl power on |
#!env sh | |
# this file depends on rankmirrors package | |
tmp=$(mktemp) | |
trap "rm -f ${tmp}" EXIT | |
curl "https://www.archlinux.org/mirrorlist/?country=BE&country=FR&country=DE&country=IL&protocol=http&protocol=https&ip_version=4&use_mirror_status=on" | sed "s/#Server/Server/g" > $tmp | |
rankmirrors ${tmp} | sudo tee /etc/pacman.d/mirrorlist |