Module

std::types

Types Module

Core runtime type identifiers.

Contents

Type::TypeId provides compile-time constants that mirror the runtime’s internal type tags. These are useful for diagnostics, FFI integrations, and low-level tooling that needs stable numeric identifiers for primitive types.

Constant Ignis Type
I8 i8
I16 i16
I32 i32
I64 i64
U8 u8
U16 u16
U32 u32
U64 u64
F32 f32
F64 f64
BOOL boolean
CHAR char
STRING str
POINTER *T

For sum types, use dedicated modules:

  • std::option for Option<S>
  • std::result for Result<T, E>

Example

import Type from "std::types";

function main(): i32 {
  let id: u32 = Type::TypeId::I32;
  return id as i32;
}
namespace __types

Constants

const TYPE_BOOL_ID: u32
const TYPE_CHAR_ID: u32
const TYPE_F32_ID: u32
const TYPE_F64_ID: u32
const TYPE_I16_ID: u32
const TYPE_I32_ID: u32
const TYPE_I64_ID: u32
const TYPE_I8_ID: u32
const TYPE_POINTER_ID: u32
const TYPE_STRING_ID: u32
const TYPE_U16_ID: u32
const TYPE_U32_ID: u32
const TYPE_U64_ID: u32
const TYPE_U8_ID: u32
namespace Type

Runtime type metadata exposed to Ignis code.

These constants mirror runtime/compiler type tags and are intended for low level diagnostics and interop rather than ordinary application branching.

namespace TypeId

Runtime type identifiers mirrored from the Ignis runtime.

These constants are useful for diagnostics, low-level tooling and FFI integrations that need stable runtime tags.

Example

import Type from "std::types";

function main(): i32 {
  let id: u32 = Type::TypeId::I32;
  return id as i32;
}

Constants

const BOOL: u32
const CHAR: u32
const F32: u32
const F64: u32
const I16: u32
const I32: u32
const I64: u32
const I8: u32
const POINTER: u32
const STRING: u32
const U16: u32
const U32: u32
const U64: u32
const U8: u32