Fluence Network

The Fluence Labs Developer Hub

Welcome to the Fluence Labs developer hub. You'll find comprehensive guides and documentation to help you start working with Fluence Labs as quickly as possible, as well as support if you get stuck. Let's jump right in!

Should you have any questions, feel free to join our Discord or Telegram!

Get Started

Create a service

Creating, running and deploying services

As mentioned in the introduction, the Fluence network consists of nodes with services that can be called from AIR scripts. Each service is a composition of modules. In its turn, a module is some code compiled into WebAssembly. Modules have a special API and ABI that allow them to interact and transfer complex data between different modules, as well as between any module and AIR scripts. There are three types of modules:

  • Facade modules expose the API of an entire service that is callable from AIR scripts.
  • Effector modules can access the file system through WASI and call external binaries.
  • Pure modules contain pure logic, and they cannot access the file system or call external binaries. They are designed to avoid unexpected security issues.

Modules are organized in this way to separate security concerns. In particular, since effector modules can read and write the filesystem and call external modules, they must be managed with care. Fluence allows hosting providers to explicitly choose which effector modules they allow to run on their nodes. Moreover, each effector module must have explicit permission to write to a particular directory and can only execute binaries, specified in config. Consider the following config for an IPFS adapter module.

name = "ipfs_module"

# module will be able to call only this binary at this path
ipfs = "/usr/local/bin/ipfs"

# module will be able to read and write to this set of directories
preopened_files = ["/wasm_modules"]
mapped_dirs = { "tmp" = "/wasm_modules" }

In the following sections, we will focus on how to develop, debug, and test modules. If you want to learn more about the concept of modules, please read the overview section.

This part of the documentation is focused on Fluence backend SDK and is organized as follows.

First, we will deal with modules using the example of the greeting service:

Then, we will focus on services using the example of the url-downloader service:

Updated a day ago

Create a service

Creating, running and deploying services

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.