https://github.com/over-run/native-list
Native list is a resizable array backed by memory segment.
https://github.com/over-run/native-list
java project-panama
Last synced: 9 days ago
JSON representation
Native list is a resizable array backed by memory segment.
- Host: GitHub
- URL: https://github.com/over-run/native-list
- Owner: Over-Run
- License: mit
- Created: 2026-02-12T08:33:05.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2026-03-22T10:05:09.000Z (3 months ago)
- Last Synced: 2026-03-23T00:58:51.250Z (3 months ago)
- Topics: java, project-panama
- Language: Java
- Homepage:
- Size: 158 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Native List
Native list is a resizable array backed by `MemorySegment`.
## Usage
```java
void main() {
try (var list = new IntNativeList(ListAllocator::ofConfinedArena)) {
list.add(42);
list.add(43);
assertEquals(42, list.get(0));
assertEquals(43, list.get(1));
} // the list is automatically released
}
```
Check [wiki](https://github.com/Over-Run/native-list/wiki) for details.
## Import as Dependency
This library requires JDK 25.
- Maven coordinate: `io.github.over-run:native-list`
- Version: 
Maven:
```xml
io.github.over-run
native-list
${nativeListVersion}
```
Gradle:
```kotlin
dependencies {
implementation("io.github.over-run:native-list:${nativeListVersion}")
}
```