Skip to content

Cosmic Binary Format

Configuring Maven / Gradle

CBF is xenondevs' lazy evaluation binary format used primarily in Nova. To use CBF, you first have to add the xenondevs maven repository to your build configuration.

<repository>
    <id>xenondevs</id>
    <url>https://repo.xenondevs.xyz/releases</url>
</repository>
maven {
    url 'https://repo.xenondevs.xyz/releases'
}
maven {
    url = uri("https://repo.xenondevs.xyz/releases")
}

Now you can add CBF to your build configuration:

<dependency>
    <groupId>xyz.xenondevs.cbf</groupId>
    <artifactId>cosmic-binary-format</artifactId>
    <version>0.1</version>
</dependency>
implementation "xyz.xenondevs.cbf:cosmic-binary-format:0.1"
implementation("xyz.xenondevs.cbf:cosmic-binary-format:0.1")

To get started, you also need to install a CBF adapter. Currently, only the netty adapter is available.

<dependency>
    <groupId>xyz.xenondevs.cbf</groupId>
    <artifactId>cosmic-binary-format-netty-adapter</artifactId>
    <version>0.1</version>
</dependency>
implementation "xyz.xenondevs.cbf:cosmic-binary-format-netty-adapter:0.1"
implementation("xyz.xenondevs.cbf:cosmic-binary-format-netty-adapter:0.1")

You can then set the defaultBufferProvider to Netty:

CBF.defaultBufferProvider = NettyBufferProvider