Git Product home page Git Product logo

go-randomx's Introduction

go-randomx

WARNING: this is not a lib, but a binding

Do NOT use go mod import this

NOTICE: For better go.mod experience, like direcly import go-randomx dep through go get or go build, check the https://github.com/ngchain/RandomX and https://github.com/ngchain/go-randomx and their github actions.

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.

go-randomx's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.