hoclamgiauus / go-randomx

golang binding for random-x algorithm variants

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

go-randomx

WARNING: this is not a lib, but a binding

Do NOT use go mod import this

Algorithms

  • random-x
  • random-xl
  • random-wow
  • random-arq
  • random-yada
  • ...

Build

Windows

Firstly download and install the msys2, then open and install the following components:

Take msys2's pacman for example

pacman -Syu
pacman -S git mingw64/mingw-w64-x86_64-go mingw64/mingw-w64-x86_64-gcc mingw64/mingw-w64-x86_64-cmake mingw64/mingw-w64-x86_64-make

Secondly clone this repo to your project folder

cd MyProject
git clone https://github.com/maoxs2/go-randomx

And then run ./build.sh to auto compile official random-x code

# clone and compile RandomX source code into librandomx
./build random-x # random-x can be replaced with random-xl random-arq random-wow

Finally you can using the package as your internal one.

Directly using it with import "github.com/MyProject/go-randomx" and then randomx.AllocCache() etc.

Linux

Take Ubuntu for example

Download the latest go from here and then install it following this instruction

sudo apt update && sudo apt upgrade 
sudo apt install git cmake make gcc build-essential

Secondly clone this repo to your project folder

cd MyProject
git clone https://github.com/maoxs2/go-randomx

And then run go generate to auto compile official random-x code

# clone and compile RandomX source code into librandomx
./build random-x # random-x can be replaced with random-xl random-arq random-wow

Finally you can using the package as your internal one.

Directly using it with import "github.com/myname/my-project/go-randomx" and then start the functions like randomx.AllocCache() etc.

More

If you have any better solution, tell me please.

About

golang binding for random-x algorithm variants

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Go 54.9%Language:C++ 43.6%Language:Shell 1.5%