Skip to content

disgoorg/godave

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Reference Go Report Go Version License GoDave Version DisGo Discord

discord gopher

GoDave

GoDave is a library that provides Go bindings for libdave and provides a generic DAVE interface allowing for different implementations in the future.

Summary

  1. Libdave Installation
    1. Windows Installation
    2. Installing manually
  2. Example Usage
  3. License

Libdave Installation

This library uses CGO and dynamic linking to use libdave.

We provide helpful scripts under scripts/ to allow you to download pre-built binaries of build them yourself, depending on your needs. Please audit them before executing!

Note

Due to the nature of this project, it might be necessary to re-install libdave when updating to a new GoDave version. The version that require this may be indicated with a minor bump (for reference: mayor.minor.patch).

You can see what version is required by checking this file

Linux/MacOS/WSL instructions

Open a terminal and execute the following commands:

# Set CC/CXX variables to change the compiler used (ie, for clang
#export CC=/usr/bin/clang CXX=/usr/bin/clang

./libdave_install.sh v1.1.0

MUSL Linux

If you want to build a MUSL version of libdave, you can execute the following commands:

export VCPKG_FORCE_SYSTEM_BINARIES=1
export CC=/usr/bin/gcc CXX=/usr/bin/g++
export CXXFLAGS="-Wno-error=maybe-uninitialized"

# Install necessary packages
apk add build-base cmake ninja zip unzip curl git pkgconfig perl nams go

# FORCE_BUILD=1 as Discord do not provide pre-built binaries
FORCE_BUILD=1 ./libdave_install.sh v1.1.0

Windows instructions

Open Powershell and execute the following commands:

Set-ExecutionPolicy RemoteSigned –Scope Process
.\libdave_install.ps1 v1.1.0

Example Usage

For an example of how to use GoDave, please see here

License

Distributed under the License. See LICENSE for more information.