Skip to content

Repository files navigation

Native List

Native list is a resizable array backed by MemorySegment.

Usage

void main() {
    try (var list = new IntNativeList(ListAllocator.c())) {
        list.add(42);
        list.add(43);
        assertEquals(42, list.get(0));
        assertEquals(43, list.get(1));
    } // the list is automatically released
}

Check wiki for details.

Import as Dependency

This library requires JDK 25.

  • Maven coordinate: io.github.over-run:native-list
  • Version: Maven Central Version

Maven:

<dependency>
    <groupId>io.github.over-run</groupId>
    <artifactId>native-list</artifactId>
    <version>${nativeListVersion}</version>
</dependency>

Gradle:

dependencies {
    implementation("io.github.over-run:native-list:${nativeListVersion}")
}

Integrate with LWJGL 3

This library provides a list allocator using MemoryUtil of LWJGL 3.

  • Maven coordinate: io.github.over-run:native-list-lwjgl3
  • Version: Maven Central Version

Gradle:

dependencies {
    implementation("io.github.over-run:native-list-lwjgl3:${nativeListLwjgl3Version}")
}

About

Native list is a resizable array backed by memory segment.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages