Package kotlin.native
Types
Platform and version requirements: Native (1.3)
A vector of bits growing if necessary and allowing one to set/clear/read bits from it by a bit index.
Platform and version requirements: Native (1.3)
Central Processor Unit architecture.
enum class CpuArchitecture
Platform and version requirements: Native (1.3)
An immutable compile-time array of bytes.
Platform and version requirements: Native (1.3)
Exception thrown when top level variable is accessed from incorrect execution context.
class IncorrectDereferenceException : RuntimeException
Platform and version requirements: Native (1.3)
Platform and version requirements: Native (1.3)
Platform and version requirements: Native (1.3)
Object describing the current platform program executes upon.
Platform and version requirements: Native (1.3)
Typealias describing custom exception reporting hook.
typealias ReportUnhandledExceptionHook = (Throwable) -> Unit
Platform and version requirements: Native (1.3)
Annotations
Platform and version requirements: Native (1.3)
Makes top level function available from C/C++ code with the given name.
Platform and version requirements: Native (1.3)
Preserve the function entry point during global optimizations.
Platform and version requirements: Native (1.3)
Preserve the function entry point during global optimizations, only for the given target.
annotation class RetainForTarget
Platform and version requirements: Native (1.3)
Forces the compiler to use specified symbol name for the target external
function.
annotation class SymbolName
Functions
Platform and version requirements: Native (1.3)
Returns stable C pointer to data at certain offset, useful as a way to pass resource to C APIs.
fun ImmutableBlob.asCPointer(
offset: Int = 0
): CPointer<ByteVar>
Platform and version requirements: Native (1.3)
fun ImmutableBlob.asUCPointer(
offset: Int = 0
): CPointer<UByteVar>
Platform and version requirements: Native (1.3)
Deinitializes Kotlin runtime for the current thread, if was inited. Cannot be called from Kotlin frames holding references, thus deprecated.
fun deinitRuntimeIfNeeded()
Platform and version requirements: Native (1.3)
Gets Char out of the ByteArray byte buffer at specified index index
fun ByteArray.getCharAt(index: Int): Char
Platform and version requirements: Native (1.3)
Gets Double out of the ByteArray byte buffer at specified index index
fun ByteArray.getDoubleAt(index: Int): Double
Platform and version requirements: Native (1.3)
Gets Float out of the ByteArray byte buffer at specified index index
fun ByteArray.getFloatAt(index: Int): Float
Platform and version requirements: Native (1.3)
Gets Int out of the ByteArray byte buffer at specified index index
fun ByteArray.getIntAt(index: Int): Int
Platform and version requirements: Native (1.3)
Gets Long out of the ByteArray byte buffer at specified index index
fun ByteArray.getLongAt(index: Int): Long
Platform and version requirements: Native (1.3)
Gets Short out of the ByteArray byte buffer at specified index index
fun ByteArray.getShortAt(index: Int): Short
Platform and version requirements: Native (1.3)
Returns a list of stack trace addresses representing the stack trace pertaining to this throwable.
fun Throwable.getStackTraceAddresses(): List<Long>
Platform and version requirements: Native (1.3)
Gets UByte out of the ByteArray byte buffer at specified index index
fun ByteArray.getUByteAt(index: Int): UByte
Platform and version requirements: Native (1.3)
Gets UInt out of the ByteArray byte buffer at specified index index
fun ByteArray.getUIntAt(index: Int): UInt
Platform and version requirements: Native (1.3)
Gets ULong out of the ByteArray byte buffer at specified index index
fun ByteArray.getULongAt(index: Int): ULong
Platform and version requirements: Native (1.3)
Gets UShort out of the ByteArray byte buffer at specified index index
fun ByteArray.getUShortAt(index: Int): UShort
Platform and version requirements: Native (1.3)
Compute stable wrt potential object relocations by the memory manager identity hash code.
fun Any?.identityHashCode(): Int
Platform and version requirements: Native (1.3)
Creates ImmutableBlob out of compile-time constant data.
fun immutableBlobOf(vararg elements: Short): ImmutableBlob
Platform and version requirements: Native (1.3)
Initializes Kotlin runtime for the current thread, if not inited already.
fun initRuntimeIfNeeded()
Platform and version requirements: Native (1.3)
Sets Char out of the ByteArray byte buffer at specified index index
fun ByteArray.setCharAt(index: Int, value: Char)
Platform and version requirements: Native (1.3)
Sets Double out of the ByteArray byte buffer at specified index index
fun ByteArray.setDoubleAt(index: Int, value: Double)
Platform and version requirements: Native (1.3)
Sets Float out of the ByteArray byte buffer at specified index index
fun ByteArray.setFloatAt(index: Int, value: Float)
Platform and version requirements: Native (1.3)
Sets Int out of the ByteArray byte buffer at specified index index
fun ByteArray.setIntAt(index: Int, value: Int)
Platform and version requirements: Native (1.3)
Sets Long out of the ByteArray byte buffer at specified index index
fun ByteArray.setLongAt(index: Int, value: Long)
Platform and version requirements: Native (1.3)
Sets Short out of the ByteArray byte buffer at specified index index
fun ByteArray.setShortAt(index: Int, value: Short)
Platform and version requirements: Native (1.3)
Sets UByte out of the ByteArray byte buffer at specified index index
fun ByteArray.setUByteAt(index: Int, value: UByte)
Platform and version requirements: Native (1.3)
Sets UInt out of the ByteArray byte buffer at specified index index
fun ByteArray.setUIntAt(index: Int, value: UInt)
Platform and version requirements: Native (1.3)
Sets ULong out of the ByteArray byte buffer at specified index index
fun ByteArray.setULongAt(index: Int, value: ULong)
Platform and version requirements: Native (1.3)
Install custom unhandled exception hook. Returns old hook, or null if it was not specified. Hook is invoked whenever there's uncaught exception reaching boundaries of the Kotlin world, i.e. top level main(), or when Objective-C to Kotlin call not marked with @Throws throws an exception. Hook must be a frozen lambda, so that it could be called from any thread/worker. Hook is invoked once, and is cleared afterwards, so that memory leak detection works as expected even with custom exception hooks.
fun setUnhandledExceptionHook(
hook: ReportUnhandledExceptionHook
): ReportUnhandledExceptionHook?
Platform and version requirements: Native (1.3)
Sets UShort out of the ByteArray byte buffer at specified index index
fun ByteArray.setUShortAt(index: Int, value: UShort)
Platform and version requirements: Native (1.3)
Converts an UTF-8 array into a String. Replaces invalid input sequences with a default character.
fun ByteArray.stringFromUtf8(): String
fun ByteArray.stringFromUtf8(
start: Int = 0,
size: Int = this.size
): String
Platform and version requirements: Native (1.3)
Converts an UTF-8 array into a String.
fun ByteArray.stringFromUtf8OrThrow(): String
fun ByteArray.stringFromUtf8OrThrow(
start: Int = 0,
size: Int = this.size
): String
Platform and version requirements: Native (1.3)
Copies the data from this blob into a new ByteArray.
fun ImmutableBlob.toByteArray(
startIndex: Int = 0,
endIndex: Int = size
): ByteArray
Platform and version requirements: Native (1.3)
Copies the data from this blob into a new UByteArray.
fun ImmutableBlob.toUByteArray(
startIndex: Int = 0,
endIndex: Int = size
): UByteArray
Platform and version requirements: Native (1.3)
Converts a String into an UTF-8 array. Replaces invalid input sequences with a default character.
fun String.toUtf8(): ByteArray
fun String.toUtf8(
start: Int = 0,
size: Int = this.length
): ByteArray
Platform and version requirements: Native (1.3)
Converts a String into an UTF-8 array.
fun String.toUtf8OrThrow(): ByteArray
fun String.toUtf8OrThrow(
start: Int = 0,
size: Int = this.length
): ByteArray
Platform and version requirements: Native (1.3)
fun vectorOf(
f0: Float,
f1: Float,
f2: Float,
f3: Float
): Vector128
fun vectorOf(f0: Int, f1: Int, f2: Int, f3: Int): Vector128