Skip to content

Instantly share code, notes, and snippets.

View CharlyCst's full-sized avatar

Charly CharlyCst

View GitHub Profile
@CharlyCst
CharlyCst / jit.rs
Created March 28, 2021 20:44
An almost legit Rust JIT compiler
mod jit {
use libc::{c_void, dlclose, dlopen, dlsym, RTLD_NOW};
use std::ffi::CString;
use std::fs::File;
use std::io::prelude::*;
use std::io::SeekFrom;
use std::process::Command;
const SOURCE_PATH: &'static str = "/tmp/jit.rs";
const LIB_PATH: &'static str = "/tmp/librsjit.so";
@CharlyCst
CharlyCst / relayer.sh
Last active January 16, 2021 18:13
A script to create and update a client with the IBC relayer
#!/bin/bash
BIN="$1"
CONFIG="$2"
if [[ $BIN == "" || $CONFIG == "" ]]
then
echo "usage: $0 <path_to_relayer> <path_to_config>"
exit 1
fi
package main
import (
"container/list"
lb "gosb"
)
func init() {
lb.Initialize(lb.MPK_BACKEND)
}
package main
import (
"net/http"
lb "gosb"
)
func init() {
lb.Initialize(lb.MPK_BACKEND)
}
package main
import (
"fmt"
"net/http"
lb "gosb"
)
func init() {
lb.Initialize(lb.MPK_BACKEND)
package main
import (
"github.com/gliderlabs/ssh"
"fmt"
"io"
"log"
lb "gosb"
)
package main
import (
"container/list"
"time"
"strconv"
"fmt"
lb "gosb"
)