Skip to main content
Log in

Mojo module

ffi

Implements a foreign functions interface (FFI).

Aliases

  • c_char = SIMD[int8, 1]: C char type.
  • c_double = SIMD[float64, 1]: C double type.
  • c_float = SIMD[float32, 1]: C float type.
  • c_int = SIMD[int32, 1]: C int type.
  • c_long = SIMD[_c_long_dtype(), 1]: C long type.
  • c_long_long = SIMD[_c_long_long_dtype(), 1]: C long long type.
  • c_short = SIMD[int16, 1]: C short type.
  • c_size_t = UInt: C size_t type.
  • c_ssize_t = Int: C ssize_t type.
  • c_uchar = SIMD[uint8, 1]: C unsigned char type.
  • c_uint = SIMD[uint32, 1]: C unsigned int type.
  • c_ushort = SIMD[uint16, 1]: C unsigned short type.
  • DEFAULT_RTLD = IntLiteral(#kgen.int_literal_bin<#kgen.int_literal<2> : !kgen.int_literal, #lit.struct.extract<:@stdlib::@builtin::@int_literal::@IntLiteral cond(eq(:string target_get_field(current_target(), "os"), "linux"), {:!kgen.int_literal 256}, {:!kgen.int_literal 8}), "value"> : !kgen.int_literal, or>):
  • OpaquePointer = UnsafePointer[NoneType]: An opaque pointer, equivalent to the C void* type.

Structs

  • DLHandle: Represents a dynamically linked library that can be loaded and unloaded.
  • RTLD: Enumeration of the RTLD flags used during dynamic library loading.

Functions