Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Install

The libraries are not on npm, crates.io, NuGet or Maven Central. Install them from a GitHub release or straight from the repository. Every release lists the files with their SHA-256 checksums in SHA256SUMS.

Replace 0.1.0 with the latest release.

npm installs the release tarball from its URL and records the URL in package.json and the lock file:

npm install https://github.com/FapLandPartyDev/funlink/releases/download/v0.1.0/funlink-0.1.0.tgz

To build without network access, download funlink-0.1.0.tgz into your project and run npm install ./funlink-0.1.0.tgz.

Cargo finds the crate in the rust directory of the repository:

cargo add funlink --git https://github.com/FapLandPartyDev/funlink --tag v0.1.0

or in Cargo.toml:

[dependencies]
funlink = { git = "https://github.com/FapLandPartyDev/funlink", tag = "v0.1.0" }

Cargo.lock pins the exact commit.

Download Funlink.0.1.0.nupkg from the release into a packages directory next to your solution, then add a nuget.config beside it so every restore finds the package:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="funlink" value="packages" />
  </packageSources>
</configuration>
dotnet add package Funlink --version 0.1.0

nuget.org stays available for your other packages.

Maven: download the jars and the pom from the release and install them into your local repository:

mvn install:install-file -Dfile=funlink-0.1.0.jar -DpomFile=funlink-0.1.0.pom \
  -Dsources=funlink-0.1.0-sources.jar -Djavadoc=funlink-0.1.0-javadoc.jar

then depend on it as usual:

<dependency>
  <groupId>io.github.faplandpartydev</groupId>
  <artifactId>funlink</artifactId>
  <version>0.1.0</version>
</dependency>

Gradle: put funlink-0.1.0.jar in libs/:

dependencies {
    implementation(files("libs/funlink-0.1.0.jar"))
}

The library has no dependencies, so the jar is all you need. On a build server, keep the jar in your repository or in your own Maven repository.

Download Funlink-arduino-0.1.0.zip from the release. It holds the Funlink Arduino library for ESP32, ESP8266, Raspberry Pi Pico W and other boards whose WiFiUDP has beginMulticast().

Arduino IDE: Sketch → Include Library → Add .ZIP Library, then pick the zip.

arduino-cli:

arduino-cli config set library.enable_unsafe_install true
arduino-cli lib install --zip-path Funlink-arduino-0.1.0.zip

PlatformIO: in platformio.ini:

lib_deps = https://github.com/FapLandPartyDev/funlink/releases/download/v0.1.0/Funlink-arduino-0.1.0.zip

Other C projects: add src/funlink_core.c, src/funlink_json.c and src/funlink_dns.c from the zip to your build and include funlink_core.h. The library needs no malloc; you supply sending, a random number and the device’s address as callbacks.

The library is under the LGPL-3.0-or-later with a linking exception, so firmware may link it statically.

Download funlink-godot-0.1.0.zip from the release and unpack it into your project folder:

unzip funlink-godot-0.1.0.zip -d my-game/

It holds addons/funlink/, which must end up next to project.godot. The add-on is plain GDScript for Godot 4.2 or later, so it works in every export without building anything. It registers the FunlinkPeer node; enabling it under Project Settings > Plugins is optional.

Export notes:

  • Android needs the INTERNET permission in the export preset.
  • Web exports cannot open sockets, so the add-on does nothing there.

Godot .NET projects can use the C# library instead, which also finds hubs.