// -- KAIN CAPSULE v2 ---------------------------------------------------------- // name: stdlib // kind: directory // storage: editable // contents: source // digest: sha256:03fad182002d89960814118507c18960629c0334d40651a946e1752dfcb3a70e // capsule: stdlib // structure: 71 files | 67 modules // --------------------------------------------------------------------------- // // -- PUBLIC INTERFACE DIRECTORY ----------------------------------------------- // // [constants] // U8_MASK, U16_MASK, U32_MASK, I8_MIN, I8_MAX, I16_MIN, I16_MAX, I32_MIN // I32_MAX, SLOT_MAP_KEY_INDEX_BASE, SLOT_MAP_INITIAL_GENERATION, SLOT_MAP_EMPTY // SLOT_MAP_OCCUPIED, SLOT_MAP_INVALID_INDEX, MCP_KIND_NULL, MCP_KIND_BOOL // MCP_KIND_INT, MCP_KIND_FLOAT, MCP_KIND_STRING, MCP_KIND_OBJECT, MCP_KIND_ARRAY // ATOMIC_RELAXED, ATOMIC_ACQUIRE, ATOMIC_RELEASE, ATOMIC_ACQ_REL, ATOMIC_SEQ_CST // SYNC_INT_MAX, SYNC_PARK_SLICE_MS, MCS_NODE_WORDS, MCS_NODE_NEXT_SLOT // MCS_NODE_WAITING_SLOT, TELEPORT_CHANNEL_MIN_REQUESTED_CAPACITY // TELEPORT_CHANNEL_MAX_REQUESTED_CAPACITY, TELEPORT_CHANNEL_PADDING_SLOTS // TELEPORT_CHANNEL_CONTROL_WORDS, TELEPORT_CHANNEL_BUFFER_SLOT // TELEPORT_CHANNEL_CAPACITY_SLOT, TELEPORT_CHANNEL_WRITE_IDX_SLOT // TELEPORT_CHANNEL_READ_IDX_SLOT, ONCE_STATE_UNINITIALIZED // // [+742 more symbols hidden. use 'kain amalgamate inspect ' for full log] // //!kain-capsule // schema = 2 // kind = "directory" // storage = "editable" // contents = "source" // compression = "none" // digest = "sha256:03fad182002d89960814118507c18960629c0334d40651a946e1752dfcb3a70e" // created_at = "2026-06-11T05:36:53.073034700+00:00" // file_count = 71 // module_count = 67 // preview_symbol_limit = 40 // api_index = "auto" // module_index = "auto" // name = "stdlib" // capsule_set = "stdlib" // root_label = "stdlib" // manifest = "build.kn" //!end-kain-capsule //!kain-file // path = "BUILD.bazel" // kind = "text" // encoding = "utf8" // bytes = 612 // sha256 = "sha256:de21d98d1eadb77824166ba854cb1297de6d342d5675b1b9412dafe0461cea66" // trailing_newline = true //!kain-file-content // load("//:tools/bazel/kain_rules.bzl", "kain_stdlib_map", "kain_stdlib_map_check") // // package(default_visibility = ["//visibility:public"]) // // STDLIB_KAIN_SRCS = glob(["*.kn"]) // // NATIVE_MANIFESTS = [ // "//runtime:native_core_runtime.toml", // "//runtime:native_runtime.toml", // ] // // exports_files([ // "STDLIB_MAP.llm.md", // "stdlib.map.json", // ]) // // kain_stdlib_map( // name = "stdlib_map", // srcs = STDLIB_KAIN_SRCS, // native_manifests = NATIVE_MANIFESTS, // ) // // kain_stdlib_map_check( // name = "stdlib_map_check", // srcs = STDLIB_KAIN_SRCS, // native_manifests = NATIVE_MANIFESTS, // ) //!end-kain-file //!kain-file // path = "STDLIB_MAP.llm.md" // kind = "text" // encoding = "utf8" // bytes = 223078 // sha256 = "sha256:c4d2eac0f1120b2b8f5b747a0aa735f2426a51177c9876fa4fdb94827e30db34" // trailing_newline = true //!kain-file-content // # Kain Native Stdlib Map // // Generated by `kain stdlib-map`. Do not edit by hand. // Scope: LLVM/native root profile only. Indexed source is top-level `stdlib/*.kn`; overlay/helper trees outside the root profile are intentionally excluded. // // summary: modules=67 | public_symbols=3250 | total_symbols=4166 | rust_builtins=240 | native_services=48 // // ## Use First // // - Import root domains directly: `use std::fs`, `use std::net`, `use std::math`, `use std::ui`. // - Prefer public symbols below. Private symbols are kept in `stdlib.map.json` for stdlib-internal maintenance, not normal authoring. // - `@extern` means native/runtime-backed ABI surface; wrap it unless you are editing the runtime substrate. // // ## Imports // // - use std::actor, use std::alloc, use std::ascii, use std::atomic, use std::attrition, use std::base64, use std::bench // - use std::bits, use std::build, use std::bytes, use std::certify, use std::collections, use std::compress // - use std::crypto, use std::cuda, use std::diagnostics, use std::elf, use std::fmt, use std::fs, use std::gen_server // - use std::gpu, use std::graphics, use std::graphics::shared, use std::hash, use std::http, use std::http2 // - use std::input, use std::intent, use std::interop, use std::io, use std::js, use std::json, use std::kain // - use std::machine, use std::math, use std::mcp, use std::memory, use std::mmio, use std::net, use std::os // - use std::os_path, use std::path, use std::platform, use std::process, use std::proof, use std::python, use std::random // - use std::reflect, use std::reload, use std::result, use std::runtime, use std::semver, use std::simd, use std::sync // - use std::tar, use std::target, use std::test, use std::text, use std::thread, use std::time, use std::tls, use std::ui // - use std::unicode, use std::uri, use std::wasm, use std::z3, use std::zip // // ## Cook By Need // // - Read/write files and paths: `std::fs` -> `FsBytesResult`, `FsChunk`, `FsDirEntry`, `FsError`, `FsMetadata`, `FsMetadataResult`, `FsOpResult`, `FsTextResult` // - Spawn processes and capture output: `std::process` -> `process_arg_count`, `process_args`, `process_platform_available`, `process_reset`, `process_stdio_inherit`, `process_stdio_null`, `process_stdio_pipe`, `process_user_args` // - Open network/http/tls lanes: `std::net` -> `net_capability_available`, `net_capability_state`, `net_capability_supported`, `net_platform_available`, `net_platform_name`, `net_reset`, `tcp_connect`, `tcp_listen` // - Build deterministic hashes and fingerprints: `std::hash` -> `HASH_BYTE_MASK`, `HASH_CRC32_POLY`, `HASH_EMPTY32`, `HASH_FNV1A32_OFFSET`, `HASH_FNV1A32_PRIME`, `HASH_GOLDEN32`, `HASH_I63_MASK`, `HASH_U32_MASK` // - Use actors and mailbox helpers: `std::actor` -> `native_actor_abi_version`, `native_actor_default_ask_timeout_ms`, `native_actor_default_mailbox_capacity`, `native_actor_default_shutdown_grace_ms`, `native_actor_invalid_id`, `native_actor_supervision_max_restarts`, `native_actor_supervision_restart_window_millis`, `native_actor_unbounded_mailbox_capacity` // - Create native graphics sessions: `std::graphics` -> `native_graphics_backend_available`, `native_graphics_backend_select`, `native_graphics_backend_status`, `native_graphics_backend_supported`, `native_graphics_reset`, `native_graphics_session_count`, `native_graphics_session_create`, `native_graphics_session_destroy` // - Use GPU shared-residency contracts: `std::gpu` -> `GPU_STAGE_ANY_HIT`, `GPU_STAGE_CLOSEST_HIT`, `GPU_STAGE_COMPUTE`, `GPU_STAGE_FRAGMENT`, `GPU_STAGE_MESH`, `GPU_STAGE_RAYGEN`, `GPU_STAGE_TASK`, `GPU_STAGE_VERTEX` // - Author graphics-shared bindings: `std::graphics::shared` -> `GRAPHICS_SHARED_KIND_COLOR_ATTACHMENT`, `GRAPHICS_SHARED_KIND_DEPTH_ATTACHMENT`, `GRAPHICS_SHARED_KIND_INDEX_BUFFER`, `GRAPHICS_SHARED_KIND_SAMPLED_IMAGE`, `GRAPHICS_SHARED_KIND_STORAGE_BUFFER`, `GRAPHICS_SHARED_KIND_STORAGE_IMAGE`, `GRAPHICS_SHARED_KIND_UNIFORM_BUFFER`, `GRAPHICS_SHARED_KIND_VERTEX_BUFFER` // - Author UI handles and component helpers: `std::ui` -> `native_ui_begin_frame`, `native_ui_end_frame`, `native_ui_reset`, `native_ui_session_count`, `native_ui_session_create`, `native_ui_session_destroy`, `native_ui_window_close`, `native_ui_window_open` // - Use math vectors, matrices, quaternions, and colors: `std::math` -> `DEG_TO_RAD`, `EPSILON`, `HALF_PI`, `HUGE_EPSILON`, `PI`, `RAD_TO_DEG`, `TAU`, `pi` // // ## Modules // // ### `std::actor` (stdlib/actor.kn, public=74, private=33) // // - functions: // - fn native_actor_invalid_id() -> Int @100, fn native_actor_abi_version() -> Int @103 // - fn native_actor_default_mailbox_capacity() -> Int @106, fn native_actor_unbounded_mailbox_capacity() -> Int @109 // - fn native_actor_default_ask_timeout_ms() -> Int @112, fn native_actor_default_shutdown_grace_ms() -> Int @115 // - fn native_actor_supervision_max_restarts() -> Int @118 // - fn native_actor_supervision_restart_window_millis() -> Int @121 // - fn native_actor_spawn(actor_name: String, init_payload: String) -> Int @124 // - fn native_actor_send(actor_id: Int, message_name: String, data_payload: String) -> Int @127 // - fn native_actor_id_is_valid(actor_id: Int) -> Bool @130, fn native_actor_state_invalid(actor_id: Int) -> Bool @133 // - fn native_actor_get_state(actor_id: Int) -> Int @136, fn native_actor_is_running(actor_id: Int) -> Bool @139 // - fn native_actor_is_terminal(actor_id: Int) -> Bool @142, fn native_actor_shutdown(actor_id: Int) -> Int @148 // - fn native_actor_kill(actor_id: Int) -> Int @151, fn native_actor_registry_lookup(name: String) -> Int @154 // - fn native_actor_registry_register(name: String, actor_id: Int) -> Int @157 // - fn native_actor_registry_unregister(name: String) -> Int @160, fn native_actor_registry_has(name: String) -> Bool @163 // - fn native_actor_monitor(monitor_id: Int, monitored_id: Int) -> Int @166 // - fn native_actor_demonitor(monitor_id: Int, monitored_id: Int) -> Int @169 // - fn native_actor_link(actor_a: Int, actor_b: Int) -> Int @172 // - fn native_actor_unlink(actor_a: Int, actor_b: Int) -> Int @175 // - fn native_actor_supervision_observed_child_exit_count(actor_id: Int) -> Int @178 // - fn native_actor_supervision_restart_attempt_count(actor_id: Int) -> Int @181 // - fn native_actor_supervision_escalation_count(actor_id: Int) -> Int @184 // - fn native_actor_supervision_limit_hit(actor_id: Int) -> Bool @187, fn native_actor_scheduler_queue_depth() -> Int @190 // - fn native_actor_scheduler_max_queue_depth() -> Int @193, fn native_actor_scheduler_total_enqueued() -> Int @196 // - fn native_actor_scheduler_total_dequeued() -> Int @199, fn native_actor_scheduler_worker_count() -> Int @202 // - fn native_actor_scheduler_active_workers() -> Int @205, fn native_actor_scheduler_busy_workers() -> Int @208 // - fn native_actor_scheduler_overflow_thread_spawns() -> Int @211, fn actor_invalid_id() -> Int @215 // - fn actor_abi_version() -> Int @218, fn actor_default_mailbox_capacity() -> Int @221 // - fn actor_unbounded_mailbox_capacity() -> Int @224, fn actor_default_ask_timeout_ms() -> Int @227 // - fn actor_default_shutdown_grace_ms() -> Int @230, fn actor_supervision_max_restarts() -> Int @233 // - fn actor_supervision_restart_window_millis() -> Int @236 // - fn actor_spawn(actor_name: String, init_payload: String) -> Int @239 // - fn actor_send(actor_id: Int, message_name: String, data_payload: String) -> Int @242 // - fn actor_id_is_valid(actor_id: Int) -> Bool @245, fn actor_state_invalid(actor_id: Int) -> Bool @248 // - fn actor_get_state(actor_id: Int) -> Int @251, fn actor_is_running(actor_id: Int) -> Bool @254 // - fn actor_is_terminal(actor_id: Int) -> Bool @257, fn actor_shutdown(actor_id: Int) -> Int @260 // - fn actor_kill(actor_id: Int) -> Int @263, fn actor_registry_lookup(name: String) -> Int @266 // - fn actor_registry_register(name: String, actor_id: Int) -> Int @269 // - fn actor_registry_unregister(name: String) -> Int @272, fn actor_registry_has(name: String) -> Bool @275 // - fn actor_monitor(monitor_id: Int, monitored_id: Int) -> Int @278 // - fn actor_demonitor(monitor_id: Int, monitored_id: Int) -> Int @281 // - fn actor_link(actor_a: Int, actor_b: Int) -> Int @284, fn actor_unlink(actor_a: Int, actor_b: Int) -> Int @287 // - fn actor_supervision_observed_child_exit_count(actor_id: Int) -> Int @290 // - fn actor_supervision_restart_attempt_count(actor_id: Int) -> Int @293 // - fn actor_supervision_escalation_count(actor_id: Int) -> Int @296 // - fn actor_supervision_limit_hit(actor_id: Int) -> Bool @299, fn actor_scheduler_queue_depth() -> Int @302 // - fn actor_scheduler_max_queue_depth() -> Int @305, fn actor_scheduler_total_enqueued() -> Int @308 // - fn actor_scheduler_total_dequeued() -> Int @311, fn actor_scheduler_worker_count() -> Int @314 // - fn actor_scheduler_active_workers() -> Int @317, fn actor_scheduler_busy_workers() -> Int @320 // - fn actor_scheduler_overflow_thread_spawns() -> Int @323 // // ### `std::alloc` (stdlib/alloc.kn, public=33, private=0) // // - types: // - struct BumpAllocator @3, struct BumpAllocation @8, struct ArenaAllocator @15, struct ArenaAllocation @21 // - struct PoolAllocator @28, struct PoolAllocation @35, struct AllocSpan @149, struct AllocResult @153 // - struct AllocatorVTable @157, struct Allocator @162 // - functions: // - fn bump_allocator_create(cells: Int) -> BumpAllocator @41 // - fn bump_allocator_remaining(allocator: BumpAllocator) -> Int @45 // - fn bump_allocator_reset(allocator: BumpAllocator) -> BumpAllocator @48 // - fn bump_alloc_cells(allocator: BumpAllocator, cells: Int) -> BumpAllocation @51 // - fn bump_allocator_destroy(allocator: BumpAllocator) -> Int @61 // - fn arena_allocator_create(cells: Int) -> ArenaAllocator @65 // - fn arena_allocator_remaining(arena: ArenaAllocator) -> Int @69 // - fn arena_allocator_reset(arena: ArenaAllocator) -> ArenaAllocator @72 // - fn arena_alloc_cells(arena: ArenaAllocator, cells: Int) -> ArenaAllocation @75 // - fn arena_allocator_destroy(arena: ArenaAllocator) -> Int @87 // - fn pool_allocator_create(block_count: Int, block_cells: Int) -> PoolAllocator @91 // - fn pool_allocator_available(pool: PoolAllocator) -> Int @102 // - fn pool_alloc_block(pool: PoolAllocator) -> PoolAllocation @105 // - fn pool_free_block(pool: PoolAllocator, block_index: Int) -> PoolAllocator @113 // - fn pool_allocator_destroy(pool: PoolAllocator) -> Int @123, fn arena_create(cells: Int) -> ArenaAllocator @128 // - fn arena_alloc(arena: ArenaAllocator, cells: Int) -> ArenaAllocation @131 // - fn bump_create(cells: Int) -> BumpAllocator @134 // - fn bump_alloc(allocator: BumpAllocator, cells: Int) -> BumpAllocation @137 // - fn pool_create(block_count: Int, block_cells: Int) -> PoolAllocator @140 // - fn pool_alloc(pool: PoolAllocator) -> PoolAllocation @143 // - fn alloc_grow_buffer(buffer: ptr, current_cap: Int, needed_cap: Int) -> ptr @168 // - fn alloc_span_slice(span: AllocSpan, start: Int, length: Int) -> AllocSpan @184 // // ### `std::ascii` (stdlib/ascii.kn, public=53, private=1) // // - constants: // - const ASCII_NUL: Int @1, const ASCII_HT: Int @2, const ASCII_LF: Int @3, const ASCII_VT: Int @4 // - const ASCII_FF: Int @5, const ASCII_CR: Int @6, const ASCII_SPACE: Int @7, const ASCII_DEL: Int @8 // - const ASCII_DIGITS: String @10, const ASCII_LOWERCASE: String @11, const ASCII_UPPERCASE: String @12 // - const ASCII_HEX_LOWERCASE: String @13, const ASCII_HEX_UPPERCASE: String @14 // - functions: // - fn ascii_is_byte(value: Int) -> Bool @24, fn ascii_is_control_byte(value: Int) -> Bool @27 // - fn ascii_is_whitespace_byte(value: Int) -> Bool @32, fn ascii_is_printable_byte(value: Int) -> Bool @37 // - fn ascii_is_graphical_byte(value: Int) -> Bool @40, fn ascii_is_upper_byte(value: Int) -> Bool @43 // - fn ascii_is_lower_byte(value: Int) -> Bool @46, fn ascii_is_alpha_byte(value: Int) -> Bool @49 // - fn ascii_is_digit_byte(value: Int) -> Bool @52, fn ascii_is_alnum_byte(value: Int) -> Bool @55 // - fn ascii_is_hex_byte(value: Int) -> Bool @58, fn ascii_is_punctuation_byte(value: Int) -> Bool @65 // - fn ascii_to_upper_byte(value: Int) -> Int @68, fn ascii_to_lower_byte(value: Int) -> Int @73 // - fn ascii_digit_value_byte(value: Int) -> Int @78, fn ascii_hex_value_byte(value: Int) -> Int @83 // - fn ascii_digit_char(value: Int) -> String @92, fn ascii_hex_char_lower(value: Int) -> String @97 // - fn ascii_hex_char_upper(value: Int) -> String @104, fn ascii_char_code(value: String) -> Int @111 // - fn ascii_is_char(value: String) -> Bool @114, fn ascii_is_control(value: String) -> Bool @117 // - fn ascii_is_whitespace(value: String) -> Bool @120, fn ascii_is_printable(value: String) -> Bool @123 // - fn ascii_is_graphical(value: String) -> Bool @126, fn ascii_is_punctuation(value: String) -> Bool @129 // - fn ascii_is_upper(value: String) -> Bool @132, fn ascii_is_lower(value: String) -> Bool @135 // - fn ascii_is_alpha(value: String) -> Bool @138, fn ascii_is_alnum(value: String) -> Bool @141 // - fn ascii_is_digit(value: String) -> Bool @144, fn ascii_is_hex(value: String) -> Bool @147 // - fn ascii_digit_value(value: String) -> Int @150, fn ascii_hex_value(value: String) -> Int @153 // - fn ascii_to_upper(value: String) -> String @156, fn ascii_to_lower(value: String) -> String @162 // - fn ascii_is_text(value: String) -> Bool @168, fn ascii_uppercase(value: String) -> String @176 // - fn ascii_lowercase(value: String) -> String @186 // - fn ascii_equals_ignore_case(left: String, right: String) -> Bool @196 // // ### `std::atomic` (stdlib/atomic.kn, public=44, private=4) // // - types: // - enum Ordering @14, struct AtomicInt @113, struct AtomicBool @167, struct AtomicPtr @203 // - functions: // - fn atomic_raw_load(address: ptr, order: Ordering) -> Int @21 // - fn atomic_raw_store(address: ptr, value: Int, order: Ordering) -> Int @28 // - fn atomic_raw_exchange(address: ptr, value: Int, order: Ordering) -> Int @38 // - fn atomic_raw_fetch_add(address: ptr, delta: Int) -> Int @46 // - fn atomic_raw_fetch_sub(address: ptr, delta: Int) -> Int @49 // - fn atomic_raw_compare_exchange(address: ptr, expected: Int, desired: Int, success_order: Ordering, failure_order: Ordering) -> Bool @73 // - fn atomic_raw_fetch_and(address: ptr, mask: Int) -> Int @93 // - fn atomic_raw_fetch_or(address: ptr, bits: Int) -> Int @96 // - fn atomic_raw_fetch_xor(address: ptr, bits: Int) -> Int @99 // - fn atomic_wait(address: ptr, expected: Int, timeout_ms: Int) -> Int @102 // - fn atomic_notify_one(address: ptr) -> Int @105, fn atomic_notify_all(address: ptr) -> Int @108 // - fn atomic_int_new(initial_value: Int) -> AtomicInt @116, fn atomic_int_destroy(a: AtomicInt) -> Int @121 // - fn atomic_int_load(self: AtomicInt, order: Ordering) -> Int @125 // - fn atomic_int_store(self: AtomicInt, value: Int, order: Ordering) -> Int @128 // - fn atomic_int_add(self: AtomicInt, delta: Int) -> Int @131, fn atomic_int_sub(self: AtomicInt, delta: Int) -> Int @134 // - fn atomic_int_exchange(self: AtomicInt, desired: Int) -> Int @137 // - fn atomic_int_compare_exchange(self: AtomicInt, expected: Int, desired: Int) -> Bool @140 // - fn atomic_int_compare_exchange_ordered(self: AtomicInt, expected: Int, desired: Int, success_order: Ordering, failure_order: Ordering) -> Bool @143 // - fn atomic_int_fetch_and(self: AtomicInt, mask: Int) -> Int @146 // - fn atomic_int_fetch_or(self: AtomicInt, bits: Int) -> Int @149 // - fn atomic_int_fetch_xor(self: AtomicInt, bits: Int) -> Int @152 // - fn atomic_int_wait(self: AtomicInt, expected: Int, timeout_ms: Int) -> Int @155 // - fn atomic_int_notify_one(self: AtomicInt) -> Int @158, fn atomic_int_notify_all(self: AtomicInt) -> Int @161 // - fn atomic_bool_new(initial_value: Bool) -> AtomicBool @170, fn atomic_bool_destroy(a: AtomicBool) -> Int @178 // - fn atomic_bool_load(self: AtomicBool, order: Ordering) -> Bool @182 // - fn atomic_bool_store(self: AtomicBool, value: Bool, order: Ordering) -> Bool @185 // - fn atomic_bool_exchange(self: AtomicBool, desired: Bool) -> Bool @193 // - fn atomic_ptr_new(initial_ptr: ptr) -> AtomicPtr @206, fn atomic_ptr_destroy(a: AtomicPtr) -> Int @211 // - fn atomic_ptr_load(self: AtomicPtr, order: Ordering) -> ptr @215 // - fn atomic_ptr_store(self: AtomicPtr, value: ptr, order: Ordering) -> ptr @218 // - fn atomic_ptr_exchange(self: AtomicPtr, desired: ptr) -> ptr @223 // - fn atomic_ptr_compare_exchange(self: AtomicPtr, expected: ptr, desired: ptr) -> Bool @227 // - fn atomic_ptr_wait(self: AtomicPtr, expected: ptr, timeout_ms: Int) -> Int @230 // - fn atomic_ptr_notify_all(self: AtomicPtr) -> Int @233 // // ### `std::attrition` (stdlib/attrition.kn, public=3, private=0) // // - functions: // - fn attrition_task(id: String) -> BuildTaskSpec @3, fn attrition_case(id: String) -> BuildTaskSpec @6 // - fn attrition_case_named(id: String, case_name: String) -> BuildTaskSpec @9 // // ### `std::base64` (stdlib/base64.kn, public=14, private=5) // // - constants: // - const BASE64_STANDARD_ALPHABET: String @3, const BASE64_URLSAFE_ALPHABET: String @4 // - functions: // - fn base64_encode(text: String) -> String @97, fn base64_encode_nopad(text: String) -> String @100 // - fn base64_encode_url(text: String) -> String @103, fn base64_encode_url_padded(text: String) -> String @106 // - fn base64_decode(text: String) -> String @109, fn base64_decode_url(text: String) -> String @112 // - fn base16_encode(text: String) -> String @115, fn base16_encode_upper(text: String) -> String @125 // - fn base16_decode(text: String) -> String @135, fn hex_encode(text: String) -> String @149 // - fn hex_encode_upper(text: String) -> String @152, fn hex_decode(text: String) -> String @155 // // ### `std::bench` (stdlib/bench.kn, public=4, private=0) // // - functions: // - fn bench_task(id: String) -> BuildTaskSpec @3, fn bench_case(id: String) -> BuildTaskSpec @6 // - fn benchmark_task(id: String) -> BuildTaskSpec @9 // - fn bench_case_named(id: String, case_name: String) -> BuildTaskSpec @12 // // ### `std::bits` (stdlib/bits.kn, public=17, private=9) // // - functions: // - fn u8(value: Int) -> Int @13, fn u16(value: Int) -> Int @16, fn u32(value: Int) -> Int @19 // - fn i8(value: Int) -> Int @22, fn i16(value: Int) -> Int @28, fn i32(value: Int) -> Int @34 // - fn wrapping_add_u32(left: Int, right: Int) -> Int @40, fn wrapping_sub_u32(left: Int, right: Int) -> Int @43 // - fn wrapping_mul_u32(left: Int, right: Int) -> Int @46, fn overflowing_add_u32(left: Int, right: Int) -> Bool @49 // - fn overflowing_mul_u32(left: Int, right: Int) -> Bool @52, fn rotl32(value: Int, bits: Int) -> Int @59 // - fn rotr32(value: Int, bits: Int) -> Int @66, fn popcount32(value: Int) -> Int @73, fn clz32(value: Int) -> Int @81 // - fn ctz32(value: Int) -> Int @92, fn bswap32(value: Int) -> Int @101 // // ### `std::build` (stdlib/build.kn, public=51, private=126) // // - constants: // - const BUILD_KIND_CHECK: String @1, const BUILD_KIND_NATIVE_EXECUTABLE: String @2, const BUILD_KIND_TEST: String @3 // - const BUILD_KIND_PROOF: String @4, const BUILD_KIND_BENCHMARK: String @5, const BUILD_KIND_ATTRITION: String @6 // - const BUILD_KIND_CERTIFY: String @7, const BUILD_KIND_EXEC: String @8, const BUILD_KIND_AMALGAMATE: String @9 // - types: // - struct BuildContext @11, struct PackageSpec @19, struct BladeSpec @24, struct BuildDefaultsSpec @33 // - struct WorkspaceDefaultsSpec @40, struct RunDefaultsSpec @49, struct PlatformPackageSpec @55, struct ProjectSpec @59 // - struct SourceSetSpec @75, struct BuildTaskSpec @83, struct BuildGraphSpec @108, type BuildGraph = BuildGraphSpec @114 // - type BuildTask = BuildTaskSpec @115 // - functions: // - fn build_graph() -> BuildGraphSpec @117, fn package(name: String) -> PackageSpec @125 // - fn blade(name: String) -> BladeSpec @128, fn build_defaults() -> BuildDefaultsSpec @139 // - fn workspace_defaults() -> WorkspaceDefaultsSpec @148, fn run_defaults() -> RunDefaultsSpec @159 // - fn platform_package(name: String) -> PlatformPackageSpec @162 // - fn build_platform_package(name: String) -> PlatformPackageSpec @165 // - fn platform_requirement(name: String) -> PlatformPackageSpec @168 // - fn requires_platform_package(name: String) -> PlatformPackageSpec @171, fn project(name: String) -> ProjectSpec @174 // - fn source_set(name: String) -> SourceSetSpec @192 // - fn build_task_of_kind(id: String, kind: String) -> BuildTaskSpec @202, fn build_task(id: String) -> BuildTaskSpec @229 // - fn build_check(id: String) -> BuildTaskSpec @232, fn check_task(id: String) -> BuildTaskSpec @235 // - fn native_executable(id: String) -> BuildTaskSpec @238, fn root_executable(id: String) -> BuildTaskSpec @241 // - fn build_native_executable(id: String) -> BuildTaskSpec @244, fn exec_task(id: String) -> BuildTaskSpec @247 // - fn command_task(id: String) -> BuildTaskSpec @250, fn amalgamate_capsule(id: String) -> BuildTaskSpec @253 // - fn source_tests(id: String) -> BuildTaskSpec @256, fn gpu_suite(id: String) -> BuildTaskSpec @259 // - fn cuda_artifacts(id: String) -> BuildTaskSpec @262, fn kain_runner(id: String) -> BuildTaskSpec @265 // - fn album_mode(id: String) -> BuildTaskSpec @268, fn capsule_set(id: String) -> BuildTaskSpec @271 // - fn certify(subject: String) -> BuildTaskSpec @274 // // ### `std::bytes` (stdlib/bytes.kn, public=33, private=2) // // - types: // - struct ByteSlice @5, struct BytesBuilder @10, struct BytesDecodeResult @13 // - functions: // - fn bytes_slice(source: String, start: Int, length: Int) -> ByteSlice @35 // - fn bytes_from(source: String) -> ByteSlice @45, fn bytes_len(view: ByteSlice) -> Int @48 // - fn bytes_is_empty(view: ByteSlice) -> Bool @51, fn bytes_byte_at(view: ByteSlice, index: Int) -> Int @54 // - fn bytes_char_at(view: ByteSlice, index: Int) -> String @61 // - fn bytes_find_from(view: ByteSlice, needle: String, start: Int) -> Int @68 // - fn bytes_find(view: ByteSlice, needle: String) -> Int @81 // - fn bytes_contains(view: ByteSlice, needle: String) -> Bool @84 // - fn bytes_starts_with(view: ByteSlice, prefix: String) -> Bool @87 // - fn bytes_ends_with(view: ByteSlice, suffix: String) -> Bool @92 // - fn bytes_count(view: ByteSlice, needle: String) -> Int @98 // - fn bytes_subslice(view: ByteSlice, start: Int, length: Int) -> ByteSlice @112 // - fn bytes_materialize(view: ByteSlice) -> String @117 // - fn bytes_equals_string(view: ByteSlice, other: String) -> Bool @120 // - fn bytes_equals(left: ByteSlice, right: ByteSlice) -> Bool @130, fn bytes_array(view: ByteSlice) -> Array @140 // - fn bytes_from_array(values: Array) -> String @148, fn bytes_hex(value: String) -> String @156 // - fn bytes_hex_upper(value: String) -> String @159, fn bytes_from_hex(text: String) -> BytesDecodeResult @162 // - fn bytes_builder_new() -> BytesBuilder @171, fn bytes_builder_len(builder: BytesBuilder) -> Int @174 // - fn bytes_builder_push_byte(builder: BytesBuilder, value: Int) -> BytesBuilder @177 // - fn bytes_builder_push_string(builder: BytesBuilder, value: String) -> BytesBuilder @180 // - fn bytes_builder_push_slice(builder: BytesBuilder, view: ByteSlice) -> BytesBuilder @183 // - fn bytes_builder_push_array(builder: BytesBuilder, values: Array) -> BytesBuilder @186 // - fn bytes_builder_clear(builder: BytesBuilder) -> BytesBuilder @189 // - fn bytes_builder_build(builder: BytesBuilder) -> String @192 // - fn bytes_builder_view(builder: BytesBuilder) -> ByteSlice @195 // // ### `std::certify` (stdlib/certify.kn, public=3, private=0) // // - functions: // - fn certify_task(id: String) -> BuildTaskSpec @3, fn certify_gate(id: String) -> BuildTaskSpec @6 // - fn release_gate(id: String) -> BuildTaskSpec @9 // // ### `std::collections` (stdlib/collections.kn, public=110, private=6) // // - types: // - struct StringIntMap @112, struct IntQueue @115, struct IntDeque @122, struct IntPriorityQueue @129 // - struct PriorityEntry @134, struct SlotMapKey @144, struct SlotMap @147, struct SlotMapInsert @156 // - struct SlotMapRemove @161, struct IntrusiveHashNode @516, struct IntrusiveHashMap @522, struct ArrayList @620 // - struct HashMap @688 // - functions: // - fn native_int_min(left: Int, right: Int) -> Int @6, fn native_int_max(left: Int, right: Int) -> Int @11 // - fn native_int_clamp(value: Int, low: Int, high: Int) -> Int @16 // - fn native_int_between(value: Int, low: Int, high: Int) -> Bool @23 // - fn native_int_saturating_sub(left: Int, right: Int) -> Int @28, fn native_int_sign(value: Int) -> Int @33 // - fn native_bool_all(left: Bool, right: Bool) -> Bool @40, fn native_bool_any(left: Bool, right: Bool) -> Bool @45 // - fn native_bool_to_int(value: Bool) -> Int @50, fn native_int_to_bool(value: Int) -> Bool @55 // - fn int_min(left: Int, right: Int) -> Int @59, fn int_max(left: Int, right: Int) -> Int @64 // - fn int_clamp(value: Int, low: Int, high: Int) -> Int @69, fn int_between(value: Int, low: Int, high: Int) -> Bool @76 // - fn int_saturating_sub(left: Int, right: Int) -> Int @81, fn int_sign(value: Int) -> Int @86 // - fn bool_all(left: Bool, right: Bool) -> Bool @93, fn bool_any(left: Bool, right: Bool) -> Bool @98 // - fn bool_to_int(value: Bool) -> Int @103, fn int_to_bool(value: Int) -> Bool @108 // - fn string_int_map_new() -> StringIntMap @166 // - fn string_int_map_set(map: StringIntMap, key: String, value: Int) -> StringIntMap @169 // - fn string_int_map_get(map: StringIntMap, key: String) -> Int @173 // - fn string_int_map_get_or(map: StringIntMap, key: String, fallback: Int) -> Int @176 // - fn string_int_map_destroy(map: StringIntMap) -> Int @182, fn typed_map_new() -> StringIntMap @185 // - fn typed_map_set(map: StringIntMap, key: String, value: Int) -> StringIntMap @188 // - fn typed_map_get(map: StringIntMap, key: String) -> Int @191, fn typed_map_destroy(map: StringIntMap) -> Int @194 // - fn queue_create(capacity: Int) -> IntQueue @197, fn queue_len(queue: IntQueue) -> Int @201 // - fn queue_capacity(queue: IntQueue) -> Int @204, fn queue_is_empty(queue: IntQueue) -> Bool @207 // - fn queue_is_full(queue: IntQueue) -> Bool @210, fn queue_push(queue: IntQueue, value: Int) -> IntQueue @213 // - fn queue_peek(queue: IntQueue) -> Int @225, fn queue_pop(queue: IntQueue) -> IntQueue @230 // - fn queue_destroy(queue: IntQueue) -> Int @241, fn deque_create(capacity: Int) -> IntDeque @245 // - fn deque_len(deque: IntDeque) -> Int @249, fn deque_is_empty(deque: IntDeque) -> Bool @252 // - fn deque_is_full(deque: IntDeque) -> Bool @255, fn deque_push_back(deque: IntDeque, value: Int) -> IntDeque @258 // - fn deque_push_front(deque: IntDeque, value: Int) -> IntDeque @270, fn deque_peek_front(deque: IntDeque) -> Int @283 // - fn deque_peek_back(deque: IntDeque) -> Int @288, fn deque_pop_front(deque: IntDeque) -> IntDeque @294 // - fn deque_pop_back(deque: IntDeque) -> IntDeque @305, fn deque_destroy(deque: IntDeque) -> Int @316 // - fn priority_entry_pack(value: Int, priority: Int) -> Int @320, fn priority_entry_value(entry: Int) -> Int @323 // - fn priority_entry_priority(entry: Int) -> Int @326, fn priority_queue_create(capacity: Int) -> IntPriorityQueue @329 // - fn priority_queue_len(queue: IntPriorityQueue) -> Int @333 // - fn priority_queue_is_empty(queue: IntPriorityQueue) -> Bool @336 // - fn priority_queue_is_full(queue: IntPriorityQueue) -> Bool @339 // - fn priority_queue_swap(queue: IntPriorityQueue, left: Int, right: Int) -> IntPriorityQueue @342 // - fn priority_queue_push(queue: IntPriorityQueue, value: Int, priority: Int) -> IntPriorityQueue @349 // - fn priority_queue_peek_entry(queue: IntPriorityQueue) -> PriorityEntry @366 // - fn priority_queue_peek_value(queue: IntPriorityQueue) -> Int @372 // - fn priority_queue_peek_priority(queue: IntPriorityQueue) -> Int @375 // - fn priority_queue_pop(queue: IntPriorityQueue) -> IntPriorityQueue @378 // - fn priority_queue_destroy(queue: IntPriorityQueue) -> Int @408 // - fn slot_map_key(index: Int, generation: Int) -> SlotMapKey @412, fn slot_map_invalid_key() -> SlotMapKey @421 // - fn slot_map_key_index(key: SlotMapKey) -> Int @424, fn slot_map_key_generation(key: SlotMapKey) -> Int @429 // - fn slot_map_key_is_valid(key: SlotMapKey) -> Bool @434, fn slot_map_create(capacity: Int) -> SlotMap @437 // - fn slot_map_len(map: SlotMap) -> Int @454, fn slot_map_capacity(map: SlotMap) -> Int @457 // - fn slot_map_is_full(map: SlotMap) -> Bool @460, fn slot_map_contains(map: SlotMap, key: SlotMapKey) -> Bool @463 // - fn slot_map_get_or(map: SlotMap, key: SlotMapKey, fallback: Int) -> Int @473 // - fn slot_map_insert(map: SlotMap, value: Int) -> SlotMapInsert @478 // - fn slot_map_set(map: SlotMap, key: SlotMapKey, value: Int) -> SlotMap @490 // - fn slot_map_remove(map: SlotMap, key: SlotMapKey) -> SlotMapRemove @495, fn slot_map_destroy(map: SlotMap) -> Int @507 // - fn intrusive_hash_map_create(bucket_count: Int) -> IntrusiveHashMap @527 // - fn intrusive_hash_map_destroy(map: IntrusiveHashMap) -> Int @534 // - fn intrusive_hash_map_insert(map: IntrusiveHashMap, node_offset: Int, item_ptr: ptr, key_hash: Int, key: Int) -> IntrusiveHashMap @538 // - fn intrusive_hash_map_find(map: IntrusiveHashMap, node_offset: Int, key_hash: Int, key: Int) -> ptr @566 // - fn intrusive_hash_map_remove(map: IntrusiveHashMap, node_offset: Int, item_ptr: ptr) -> IntrusiveHashMap @588 // - fn array_list_create(capacity: Int) -> ArrayList @625, fn array_list_len(list: ArrayList) -> Int @630 // - fn array_list_capacity(list: ArrayList) -> Int @633, fn array_list_get(list: ArrayList, index: Int) -> Int @636 // - fn array_list_set(list: ArrayList, index: Int, value: Int) -> ArrayList @641 // - fn array_list_append(list: ptr, value: Int) -> Int @646 // - fn array_list_pop(list: ptr) -> Int @671, fn array_list_destroy(list: ArrayList) -> Int @681 // - fn hash_map_create(capacity: Int) -> HashMap @695, fn hash_map_len(map: HashMap) -> Int @702 // - fn hash_map_capacity(map: HashMap) -> Int @705, fn hash_map_get_or(map: HashMap, key: Int, fallback: Int) -> Int @708 // - fn hash_map_put(map: ptr, key: Int, value: Int) -> Int @724, fn hash_map_destroy(map: HashMap) -> Int @792 // // ### `std::compress` (stdlib/compress.kn, public=9, private=0) // // - types: // - struct RleCompressionWriter @6, struct RleCompressionReader @78 // - functions: // - fn rle_writer_new(dest: ptr) -> RleCompressionWriter @11 // - fn rle_writer_destroy(w: RleCompressionWriter) -> Int @22 // - fn rle_writer_write_char(w: ptr, c: Int, flush_target: ptr) -> Int @29 // - fn rle_writer_flush(w: ptr, flush_target: ptr) -> Int @57 // - fn rle_reader_new(src: ptr) -> RleCompressionReader @83 // - fn rle_reader_destroy(r: RleCompressionReader) -> Int @94 // - fn rle_reader_read_char(r: ptr) -> Int @100 // // ### `std::crypto` (stdlib/crypto.kn, public=9, private=4) // // - functions: // - fn crypto_random_bytes_hex(length: Int) -> String @13, fn crypto_sha256(text: String) -> String @16 // - fn crypto_hmac_sha256(key: String, message: String) -> String @19, fn crypto_blake3(text: String) -> String @22 // - fn random_bytes(length: Int) -> String @25, fn random_bytes_hex(length: Int) -> String @28 // - fn sha256(text: String) -> String @31, fn hmac_sha256(key: String, message: String) -> String @34 // - fn blake3(text: String) -> String @37 // // ### `std::cuda` (stdlib/cuda.kn, public=93, private=29) // // - constants: // - const CUDA_SHADER_BUNDLE_ENV: String @5, const CUDA_COMPUTE_RESIDENCY_ENV: String @6 // - const CUDA_RUNTIME_LIBRARY_ENV: String @7, const CUDA_DEVICE_ENV: String @8, const CUDA_DEVICE_ORDINAL_ENV: String @9 // - const CUDA_SHADER_BUNDLE_FILE_NAME: String @10, const CUDA_COMPUTE_RESIDENCY_FILE_NAME: String @11 // - types: // - struct CudaPaths @13, struct CudaRuntimeState @18, struct CudaDispatchStats @27, struct CudaBindingLocator @41 // - functions: // - fn cuda_paths() -> CudaPaths @523, fn cuda_runtime_state() -> CudaRuntimeState @530 // - fn cuda_driver_available() -> Bool @541, fn cuda_runtime_library_available() -> Bool @544 // - fn cuda_runtime_ready() -> Bool @547, fn cuda_runtime_library_path() -> String @550 // - fn cuda_shader_bundle_path() -> String @553, fn cuda_compute_residency_path() -> String @556 // - fn cuda_last_status() -> Int @559, fn cuda_last_error_kind() -> String @562 // - fn cuda_last_error_message() -> String @565, fn cuda_compute_manifest_from_path(path: String) -> JsonObject @568 // - fn cuda_compute_manifest() -> JsonObject @571, fn cuda_manifest_debug_from_path(path: String) -> String @574 // - fn cuda_manifest_debug() -> String @604, fn cuda_compute_keys_from_path(path: String) -> Array @607 // - fn cuda_compute_keys() -> Array @622 // - fn cuda_has_compute_key_from_path(path: String, compute_key: String) -> Bool @625 // - fn cuda_has_compute_key(compute_key: String) -> Bool @631 // - fn cuda_first_compute_key_from_path(path: String) -> String @634, fn cuda_first_compute_key() -> String @640 // - fn cuda_binding_keys_from_path(path: String, compute_key: String) -> Array @643 // - fn cuda_binding_keys(compute_key: String) -> Array @663 // - fn cuda_output_binding_keys_from_path(path: String, compute_key: String) -> Array @666 // - fn cuda_output_binding_keys(compute_key: String) -> Array @687 // - fn cuda_binding_locator_from_path(path: String, compute_key: String, binding_key: String) -> CudaBindingLocator @690 // - fn cuda_binding_locator(compute_key: String, binding_key: String) -> CudaBindingLocator @694 // - fn cuda_binding_payload_path_from_path(path: String, compute_key: String, binding_key: String) -> String @698 // - fn cuda_binding_payload_path(compute_key: String, binding_key: String) -> String @704 // - fn cuda_binding_payload_bytes_from_path(path: String, compute_key: String, binding_key: String) -> Array @707 // - fn cuda_binding_payload_bytes(compute_key: String, binding_key: String) -> Array @716 // - fn cuda_write_binding_payload_bytes_from_path(path: String, compute_key: String, binding_key: String, bytes: Array) -> Bool @719 // - fn cuda_write_binding_payload_bytes(compute_key: String, binding_key: String, bytes: Array) -> Bool @726 // - fn cuda_zero_binding_payload_from_path(path: String, compute_key: String, binding_key: String) -> Bool @729 // - fn cuda_zero_binding_payload(compute_key: String, binding_key: String) -> Bool @736 // - fn cuda_zero_output_payloads_from_path(path: String, compute_key: String) -> Int @739 // - fn cuda_zero_output_payloads(compute_key: String) -> Int @763 // - fn cuda_copy_binding_payload_from_path(path: String, from_compute_key: String, from_binding_key: String, to_compute_key: String, to_binding_key: String) -> Bool @766 // - fn cuda_copy_binding_payload(from_compute_key: String, from_binding_key: String, to_compute_key: String, to_binding_key: String) -> Bool @774 // - fn cuda_pack_u32_le(value: Int) -> Array @783, fn cuda_pack_i32_le(value: Int) -> Array @792 // - fn cuda_pack_u32_array_le(values: Array) -> Array @795 // - fn cuda_pack_i32_array_le(values: Array) -> Array @807 // - fn cuda_unpack_u32_le(bytes: Array, offset: Int) -> Int @810 // - fn cuda_unpack_u32_array_le(bytes: Array) -> Array @819 // - fn cuda_unpack_i32_array_le(bytes: Array) -> Array @827 // - fn cuda_dispatch_primary_compute(compute_key: String) -> CudaDispatchStats @830 // - fn cuda_dispatch(shader_bundle_path: String, compute_residency_path: String, compute_key: String) -> CudaDispatchStats @834 // // ### `std::diagnostics` (stdlib/diagnostics.kn, public=25, private=0) // // - types: // - enum LogLevel @75, struct LogEntry @81 // - functions: // - fn native_status_ok(status: Int) -> Bool @3, fn native_status_failed(status: Int) -> Bool @6 // - fn native_status_error(status: Int) -> Bool @9, fn native_status_warning(status: Int) -> Bool @12 // - fn native_status_or(status: Int, fallback: Int) -> Int @15, fn native_bool_to_status(value: Bool) -> Int @20 // - fn native_status_to_bool(status: Int) -> Bool @25, fn native_first_error(left: Int, right: Int) -> Int @28 // - fn native_count_failure(status: Int, count: Int) -> Int @33, fn status_ok(status: Int) -> Bool @39 // - fn status_failed(status: Int) -> Bool @42, fn status_error(status: Int) -> Bool @45 // - fn status_warning(status: Int) -> Bool @48, fn status_or(status: Int, fallback: Int) -> Int @51 // - fn bool_to_status(value: Bool) -> Int @56, fn status_to_bool(status: Int) -> Bool @61 // - fn first_error(left: Int, right: Int) -> Int @64, fn count_failure(status: Int, count: Int) -> Int @69 // - fn log_info(subsystem: String, message: String) -> Unit @87 // - fn log_warning(subsystem: String, message: String) -> Unit @90 // - fn log_error(subsystem: String, message: String, code: Int) -> Unit @93 // - fn progress_emit(task_name: String, percentage: Int) -> Unit @96 // - fn debug_dump_memory(label: String, address: ptr, count: Int) -> Unit @104 // // ### `std::elf` (stdlib/elf.kn, public=11, private=0) // // - constants: // - const ELF_MAGIC: Int @4, const ELF_CLASS_64: Int @5, const ELF_DATA_LSB: Int @6, const ELF_TYPE_EXEC: Int @7 // - const ELF_TYPE_DYN: Int @8, const ELF_MACHINE_X86_64: Int @9, const ELF_MACHINE_AARCH64: Int @10 // - types: // - struct ElfHeader @12, struct ElfProgramHeader @30, struct ElfSectionHeader @40 // - functions: // - fn elf_read_header(buffer: ptr) -> ElfHeader @54 // // ### `std::fmt` (stdlib/fmt.kn, public=76, private=11) // // - constants: // - const FMT_ALIGN_LEFT: String @5, const FMT_ALIGN_RIGHT: String @6, const FMT_ALIGN_CENTER: String @7 // - const FMT_BOOL_STYLE_WORD: String @9, const FMT_BOOL_STYLE_JSON: String @10, const FMT_BOOL_STYLE_NUMERIC: String @11 // - const FMT_BASE_DECIMAL: Int @13, const FMT_BASE_HEX: Int @14, const FMT_BASE_BINARY: Int @15 // - types: // - struct FmtWriter @17, struct FmtSpec @20 // - functions: // - fn fmt_string(value: String) -> String @113, fn fmt_writer_new() -> FmtWriter @116 // - fn fmt_spec_default() -> FmtSpec @119, fn fmt_spec_width(spec: FmtSpec, width: Int) -> FmtSpec @131 // - fn fmt_spec_pad(spec: FmtSpec, pad: String) -> FmtSpec @143 // - fn fmt_spec_align(spec: FmtSpec, align: String) -> FmtSpec @155 // - fn fmt_spec_prefix(spec: FmtSpec, prefix: String) -> FmtSpec @167 // - fn fmt_spec_plus(spec: FmtSpec, enabled: Bool) -> FmtSpec @179 // - fn fmt_spec_uppercase(spec: FmtSpec, enabled: Bool) -> FmtSpec @191 // - fn fmt_spec_base(spec: FmtSpec, base: Int) -> FmtSpec @203 // - fn fmt_spec_bool_style(spec: FmtSpec, style: String) -> FmtSpec @215, fn fmt_writer_len(writer: FmtWriter) -> Int @227 // - fn fmt_writer_push_string(writer: FmtWriter, value: String) -> FmtWriter @230 // - fn fmt_writer_push_string_spec(writer: FmtWriter, value: String, spec: FmtSpec) -> FmtWriter @235 // - fn fmt_writer_push_any(writer: FmtWriter, value: Any) -> FmtWriter @238 // - fn fmt_writer_push_int(writer: FmtWriter, value: Int) -> FmtWriter @241 // - fn fmt_writer_push_int_spec(writer: FmtWriter, value: Int, spec: FmtSpec) -> FmtWriter @244 // - fn fmt_writer_push_float(writer: FmtWriter, value: Float) -> FmtWriter @247 // - fn fmt_writer_push_float_spec(writer: FmtWriter, value: Float, spec: FmtSpec) -> FmtWriter @250 // - fn fmt_writer_push_bool_word(writer: FmtWriter, value: Bool) -> FmtWriter @253 // - fn fmt_writer_push_bool_spec(writer: FmtWriter, value: Bool, spec: FmtSpec) -> FmtWriter @256 // - fn fmt_writer_push_hex_int(writer: FmtWriter, value: Int) -> FmtWriter @259 // - fn fmt_writer_push_binary_int(writer: FmtWriter, value: Int) -> FmtWriter @262 // - fn fmt_writer_push_json_string(writer: FmtWriter, value: String) -> FmtWriter @265 // - fn fmt_writer_push_key_value(writer: FmtWriter, key: String, value: String) -> FmtWriter @268 // - fn fmt_writer_push_line(writer: FmtWriter, value: String) -> FmtWriter @271 // - fn fmt_writer_push_prefixed_lines(writer: FmtWriter, prefix: String, lines: Array) -> FmtWriter @275 // - fn fmt_writer_build(writer: FmtWriter) -> String @285 // - fn fmt_string_builder_push_string(builder: ptr, value: String) -> Int @288 // - fn fmt_string_builder_push_string_spec(builder: ptr, value: String, spec: FmtSpec) -> Int @291 // - fn fmt_string_builder_push_any(builder: ptr, value: Any) -> Int @294 // - fn fmt_string_builder_push_int(builder: ptr, value: Int) -> Int @297 // - fn fmt_string_builder_push_int_spec(builder: ptr, value: Int, spec: FmtSpec) -> Int @300 // - fn fmt_string_builder_push_float(builder: ptr, value: Float) -> Int @303 // - fn fmt_string_builder_push_float_spec(builder: ptr, value: Float, spec: FmtSpec) -> Int @306 // - fn fmt_string_builder_push_bool_spec(builder: ptr, value: Bool, spec: FmtSpec) -> Int @309 // - fn fmt_string_builder_push_json_string(builder: ptr, value: String) -> Int @312 // - fn fmt_string_builder_push_key_value(builder: ptr, key: String, value: String) -> Int @315 // - fn fmt_string_builder_push_line(builder: ptr, value: String) -> Int @318 // - fn fmt_any(value: Any) -> String @323, fn fmt_string_spec(value: String, spec: FmtSpec) -> String @326 // - fn fmt_int(value: Int) -> String @330, fn fmt_int_spec(value: Int, spec: FmtSpec) -> String @333 // - fn fmt_float(value: Float) -> String @339, fn fmt_float_spec(value: Float, spec: FmtSpec) -> String @342 // - fn fmt_bool_word(value: Bool) -> String @348, fn fmt_bool_spec(value: Bool, spec: FmtSpec) -> String @353 // - fn fmt_bool_json(value: Bool) -> String @358 // - fn fmt_join_strings(items: Array, separator: String) -> String @361 // - fn fmt_non_empty(value: String, fallback: String) -> String @371 // - fn fmt_key_value(key: String, value: String) -> String @377 // - fn fmt_bracketed(label: String, value: String) -> String @380, fn fmt_repeat(token: String, count: Int) -> String @383 // - fn fmt_pad_left(value: String, width: Int, pad: String) -> String @393 // - fn fmt_pad_right(value: String, width: Int, pad: String) -> String @399 // - fn fmt_pad_center(value: String, width: Int, pad: String) -> String @405 // - fn fmt_status_line(label: String, success: Bool) -> String @414 // - fn fmt_prefixed_lines(prefix: String, lines: Array) -> String @417, fn fmt_hex_u32(value: Int) -> String @427 // - fn fmt_hex_int(value: Int) -> String @440, fn fmt_binary_u32(value: Int) -> String @445 // - fn fmt_binary_int(value: Int) -> String @458, fn fmt_json_escape(value: String) -> String @463 // - fn fmt_json_string(value: String) -> String @499, fn fmt_debug_string_array(items: Array) -> String @502 // // ### `std::fs` (stdlib/fs.kn, public=148, private=6) // // - types: // - struct FsError @5, struct FsOpResult @13, struct FsTextResult @18, struct FsBytesResult @24, struct FsMetadata @30 // - struct FsMetadataResult @38, struct FsDirEntry @44, struct FsChunk @50, struct FsWatchEvent @56 // - struct FsJournalEntry @62, struct File @687 // - functions: // - fn fs_buffered_reader(path: String, capacity: Int) -> BufferedReader @201 // - fn fs_buffered_reader_range(path: String, offset: Int, length: Int, capacity: Int) -> BufferedReader @204 // - fn fs_write_buffered_text(path: String, writer: BufferedWriter) -> Int @207 // - fn fs_append_buffered_text(path: String, writer: BufferedWriter) -> Int @211 // - fn fs_atomic_write_buffered_text(path: String, writer: BufferedWriter) -> Int @215 // - fn fs_parse_int_or_zero(value: String) -> Int @220, fn fs_hex_to_bytes(hex: String) -> Array @225 // - fn fs_bytes_to_hex(bytes: Array) -> String @239, fn fs_nonempty_lines(text: String) -> Array @265 // - fn fs_metadata_line_value(metadata_text: String, key: String) -> String @275 // - fn fs_parse_metadata_text(metadata_text: String) -> FsMetadata @286 // - fn fs_dir_entry_for_path(path: String) -> FsDirEntry @302, fn native_fs_last_status() -> Int @311 // - fn native_fs_last_error_kind() -> String @314, fn native_fs_last_error_message() -> String @317 // - fn fs_try_read_text(path: String) -> FsTextResult @359 // - fn fs_try_read_text_range(path: String, offset: Int, length: Int) -> FsTextResult @369 // - fn fs_try_write_text(path: String, content: String) -> FsOpResult @379 // - fn fs_try_append_text(path: String, content: String) -> FsOpResult @382 // - fn fs_try_atomic_write_text(path: String, content: String) -> FsOpResult @385 // - fn fs_try_read_bytes_hex(path: String) -> FsTextResult @388 // - fn fs_try_read_byte_range_hex(path: String, offset: Int, length: Int) -> FsTextResult @398 // - fn fs_try_read_bytes(path: String) -> FsBytesResult @408 // - fn fs_try_read_bytes_range(path: String, offset: Int, length: Int) -> FsBytesResult @417 // - fn fs_try_write_bytes_hex(path: String, hex: String) -> FsOpResult @426 // - fn fs_try_write_bytes_hex_at(path: String, offset: Int, hex: String) -> FsOpResult @429 // - fn fs_try_append_bytes_hex(path: String, hex: String) -> FsOpResult @432 // - fn fs_try_write_text_at(path: String, offset: Int, content: String) -> FsOpResult @435 // - fn fs_try_write_bytes(path: String, bytes: Array) -> FsOpResult @438 // - fn fs_try_write_bytes_at(path: String, offset: Int, bytes: Array) -> FsOpResult @441 // - fn fs_try_append_bytes(path: String, bytes: Array) -> FsOpResult @444 // - fn fs_try_atomic_write_bytes(path: String, bytes: Array) -> FsOpResult @447 // - fn fs_try_metadata_text(path: String) -> FsTextResult @450, fn fs_try_metadata(path: String) -> FsMetadataResult @460 // - fn fs_try_read_dir_paths_text(path: String) -> FsTextResult @469 // - fn fs_try_walk_paths_text(path: String) -> FsTextResult @479, fn fs_read_text(path: String) -> String @489 // - fn fs_read_text_range(path: String, offset: Int, length: Int) -> String @496 // - fn fs_write_text(path: String, content: String) -> Unit @501 // - fn fs_append_text(path: String, content: String) -> Unit @504 // - fn fs_atomic_write_text(path: String, content: String) -> Unit @507, fn fs_read_bytes(path: String) -> Array @510 // - fn fs_read_bytes_range(path: String, offset: Int, length: Int) -> Array @513 // - fn fs_read_bytes_hex(path: String) -> String @516 // - fn fs_read_byte_range_hex(path: String, offset: Int, length: Int) -> String @519 // - fn fs_write_bytes_hex(path: String, hex: String) -> Unit @522 // - fn fs_write_bytes_hex_at(path: String, offset: Int, hex: String) -> Unit @525 // - fn fs_append_bytes_hex(path: String, hex: String) -> Unit @528 // - fn fs_write_text_at(path: String, offset: Int, content: String) -> Unit @531 // - fn fs_write_bytes(path: String, bytes: Array) -> Unit @534 // - fn fs_write_bytes_at(path: String, offset: Int, bytes: Array) -> Unit @537 // - fn fs_append_bytes(path: String, bytes: Array) -> Unit @540 // - fn fs_atomic_write_bytes(path: String, bytes: Array) -> Unit @543, fn fs_exists(path: String) -> Bool @546 // - fn fs_is_file(path: String) -> Bool @549, fn fs_is_dir(path: String) -> Bool @552 // - fn fs_metadata_text(path: String) -> String @555, fn fs_metadata(path: String) -> FsMetadata @558 // - fn fs_read_dir_paths_text(path: String) -> String @561, fn fs_read_dir_paths(path: String) -> Array @564 // - fn fs_read_dir(path: String) -> Array @567, fn fs_walk_paths_text(path: String) -> String @578 // - fn fs_walk(path: String) -> Array @581, fn fs_try_create_dir_all(path: String) -> FsOpResult @592 // - fn fs_create_dir_all(path: String) -> Unit @595, fn fs_try_copy_file(src: String, dest: String) -> FsOpResult @598 // - fn fs_copy_file(src: String, dest: String) -> Unit @601 // - fn fs_copy_file_streaming(src: String, dest: String, chunk_size: Int) -> Int @604 // - fn fs_stream_chunks(path: String, chunk_size: Int) -> Array @607 // - fn fs_try_move_path(src: String, dest: String) -> FsOpResult @634 // - fn fs_move_path(src: String, dest: String) -> Unit @637, fn fs_try_remove_file(path: String) -> FsOpResult @640 // - fn fs_remove_file(path: String) -> Unit @643, fn fs_try_remove_dir_all(path: String) -> FsOpResult @646 // - fn fs_remove_dir_all(path: String) -> Unit @649, fn fs_temp_file(prefix: String) -> String @652 // - fn fs_temp_dir(prefix: String) -> String @655, fn fs_hash_file(path: String) -> String @658 // - fn fs_path_join(base: String, child: String) -> String @661, fn fs_path_parent(path: String) -> String @664 // - fn fs_path_file_name(path: String) -> String @667, fn fs_path_extension(path: String) -> String @670 // - fn fs_path_stem(path: String) -> String @673, fn fs_last_status() -> Int @677, fn fs_last_error_kind() -> String @680 // - fn fs_last_error_message() -> String @683, fn fs_open(path: String, mode: String) -> File @690 // - fn fs_close(file: File) -> Int @694, fn fs_read(file: File, buffer: ptr, byte_count: Int) -> Int @699 // - fn fs_write(file: File, buffer: ptr, byte_count: Int) -> Int @704 // - fn fs_seek(file: File, offset: Int, origin: Int) -> Int @709, fn fs_tell(file: File) -> Int @714 // - fn fs_flush(file: File) -> Int @719 // // ### `std::gen_server` (stdlib/gen_server.kn, public=7, private=1) // // - actors: // - actor GenServer @11 // - functions: // - fn gen_server_call_result(reply: R, state: S) -> GenServerCallOutcome @31 // - fn gen_server_start(state: S, handle_call: fn(M, S) -> GenServerCallOutcome, handle_cast: fn(M, S) -> S, handle_info: fn(M, S) -> S) -> GenServer @34 // - fn gen_server_start_link(state: S, handle_call: fn(M, S) -> GenServerCallOutcome, handle_cast: fn(M, S) -> S, handle_info: fn(M, S) -> S) -> GenServer @42 // - fn gen_server_call(server: GenServer, request: M) -> R @45 // - fn gen_server_cast(server: GenServer, request: M) -> Unit @49 // - fn gen_server_info(server: GenServer, message: M) -> Unit @52 // // ### `std::gpu` (stdlib/gpu.kn, public=123, private=0) // // - constants: // - const GPU_STAGE_VERTEX: Int @7, const GPU_STAGE_FRAGMENT: Int @8, const GPU_STAGE_COMPUTE: Int @9 // - const GPU_STAGE_TASK: Int @10, const GPU_STAGE_MESH: Int @11, const GPU_STAGE_RAYGEN: Int @12 // - const GPU_STAGE_ANY_HIT: Int @13, const GPU_STAGE_CLOSEST_HIT: Int @14, const GPU_STAGE_MISS: Int @15 // - const GPU_STAGE_INTERSECTION: Int @16, const GPU_STAGE_CALLABLE: Int @17, const GPU_STAGE_COPY: Int @18 // - const GPU_STAGE_RESOLVE: Int @19, const GPU_STAGE_ALL_GRAPHICS: Int @20, const GPU_STAGE_ALL_RAYTRACING: Int @21 // - const GPU_STAGE_ALL: Int @22, const GPU_QUEUE_GRAPHICS: Int @24, const GPU_QUEUE_COMPUTE: Int @25 // - const GPU_QUEUE_TRANSFER: Int @26, const GPU_QUEUE_PRESENT: Int @27, const GPU_QUEUE_HOST: Int @28 // - const GPU_QUEUE_ASYNC: Int @29, const GPU_ACCESS_READ: Int @31, const GPU_ACCESS_WRITE: Int @32 // - const GPU_ACCESS_ATOMIC: Int @33, const GPU_ACCESS_PERSISTENT_MAP: Int @34, const GPU_ACCESS_READ_WRITE: Int @35 // - const GPU_RESIDENCY_HOST_VISIBLE: Int @37, const GPU_RESIDENCY_HOST_COHERENT: Int @38 // - const GPU_RESIDENCY_DEVICE_LOCAL: Int @39, const GPU_RESIDENCY_SHARED: Int @40, const GPU_RESIDENCY_IMPORTED: Int @41 // - const GPU_RESIDENCY_READBACK: Int @42, const GPU_RESIDENCY_UPLOAD: Int @43, const GPU_RESIDENCY_PERSISTENT: Int @44 // - const GPU_RESIDENCY_ZERO_COPY: Int @45, const GPU_RESIDENCY_LAZILY_ALLOCATED: Int @46 // - const GPU_RESIDENCY_SPARSE: Int @47, const GPU_BUFFER_USAGE_TRANSFER_SRC: Int @49 // - const GPU_BUFFER_USAGE_TRANSFER_DST: Int @50, const GPU_BUFFER_USAGE_STORAGE: Int @51 // - const GPU_BUFFER_USAGE_UNIFORM: Int @52, const GPU_BUFFER_USAGE_VERTEX: Int @53, const GPU_BUFFER_USAGE_INDEX: Int @54 // - const GPU_BUFFER_USAGE_INDIRECT: Int @55, const GPU_BUFFER_USAGE_ACCELERATION_STRUCTURE: Int @56 // - const GPU_BUFFER_USAGE_SHADER_BINDING_TABLE: Int @57, const GPU_IMAGE_USAGE_TRANSFER_SRC: Int @59 // - const GPU_IMAGE_USAGE_TRANSFER_DST: Int @60, const GPU_IMAGE_USAGE_SAMPLED: Int @61 // - const GPU_IMAGE_USAGE_STORAGE: Int @62, const GPU_IMAGE_USAGE_COLOR_ATTACHMENT: Int @63 // - const GPU_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT: Int @64, const GPU_IMAGE_USAGE_INPUT_ATTACHMENT: Int @65 // - const GPU_IMAGE_USAGE_PRESENT: Int @66, const GPU_IMAGE_USAGE_TRANSIENT: Int @67 // - const GPU_DESCRIPTOR_RAW_BUFFER: String @69, const GPU_DESCRIPTOR_RAW_IMAGE: String @70 // - const GPU_DESCRIPTOR_STORAGE_BUFFER: String @71, const GPU_DESCRIPTOR_UNIFORM_BUFFER: String @72 // - const GPU_DESCRIPTOR_SAMPLED_IMAGE: String @73, const GPU_DESCRIPTOR_STORAGE_IMAGE: String @74 // - const GPU_DESCRIPTOR_ACCELERATION_STRUCTURE: String @75, const GPU_LAYOUT_TIGHT: String @77 // - const GPU_LAYOUT_PACKED: String @78, const GPU_LAYOUT_STD140: String @79, const GPU_LAYOUT_STD430: String @80 // - const GPU_LAYOUT_CBUFFER: String @81, const GPU_LAYOUT_RASTER_HWC: String @82 // - types: // - struct GpuBackendState @84, struct GpuMemoryPolicy @90, struct GpuResourcePolicy @97, struct GpuBindingPlan @102 // - struct GpuBuffer @109, struct GpuImage @118, struct GpuBufferDescriptorInfo @127 // - functions: // - fn gpu_has_flags(value: Int, flags: Int) -> Bool @166 // - fn gpu_align_up_bytes(value: Int, alignment_bytes: Int) -> Int @169 // - fn gpu_layout(size_bytes: Int, alignment_bytes: Int) -> GpuLayoutInfo @172 // - fn gpu_std140_vec3(value: Vec3) -> Std140 @175, fn gpu_std140_vec4(value: Vec4) -> Std140 @178 // - fn gpu_std140_mat3(value: Mat3) -> Std140 @181, fn gpu_std140_mat4(value: Mat4) -> Std140 @184 // - fn gpu_std430_vec3a(value: Vec3A) -> Std430 @187, fn gpu_std430_vec4(value: Vec4) -> Std430 @190 // - fn gpu_cbuffer_mat4(value: Mat4) -> CBuffer @193 // - fn gpu_std140_mat4_alignment_bytes(value: Std140) -> Int @196 // - fn gpu_std140_mat4_stride_bytes(value: Std140) -> Int @199 // - fn gpu_memory_policy(residency_flags: Int, access_flags: Int, queue_flags: Int, layout_kind: String, descriptor_kind: String) -> GpuMemoryPolicy @202 // - fn gpu_shared_memory_policy(access_flags: Int, queue_flags: Int, layout_kind: String, descriptor_kind: String) -> GpuMemoryPolicy @211 // - fn gpu_device_local_memory_policy(access_flags: Int, queue_flags: Int, layout_kind: String, descriptor_kind: String) -> GpuMemoryPolicy @220 // - fn gpu_upload_memory_policy(access_flags: Int, queue_flags: Int, layout_kind: String, descriptor_kind: String) -> GpuMemoryPolicy @229 // - fn gpu_readback_memory_policy(access_flags: Int, queue_flags: Int, layout_kind: String, descriptor_kind: String) -> GpuMemoryPolicy @238 // - fn gpu_resource_policy(memory: GpuMemoryPolicy, usage_flags: Int, debug_name: String) -> GpuResourcePolicy @247 // - fn gpu_binding_plan(binding: Int, descriptor_kind: String, stage_flags: Int, access_flags: Int, queue_flags: Int) -> GpuBindingPlan @254 // - fn gpu_storage_buffer_binding(binding: Int, stage_flags: Int, access_flags: Int, queue_flags: Int) -> GpuBindingPlan @263 // - fn gpu_uniform_buffer_binding(binding: Int, stage_flags: Int, queue_flags: Int) -> GpuBindingPlan @266 // - fn gpu_sampled_image_binding(binding: Int, stage_flags: Int, queue_flags: Int) -> GpuBindingPlan @269 // - fn gpu_storage_image_binding(binding: Int, stage_flags: Int, access_flags: Int, queue_flags: Int) -> GpuBindingPlan @272 // - fn gpu_descriptor_requires_read_only(descriptor_kind: String) -> Bool @275 // - fn gpu_policy_valid(policy: GpuResourcePolicy) -> Bool @278 // - fn gpu_binding_plan_valid(plan: GpuBindingPlan) -> Bool @283 // - fn gpu_backend_state(backend_id: String) -> GpuBackendState @288, fn gpu_backend_preferred() -> GpuBackendState @296 // - fn gpu_element_size_bytes(element_type: String) -> Int @317, fn gpu_element_count(shape: Array) -> Int @335 // - fn gpu_required_byte_length(element_type: String, shape: Array) -> Int @345 // - fn gpu_raster_byte_length(width: Int, height: Int, channels: Int) -> Int @348 // - fn gpu_zero_bytes(byte_length: Int) -> Array @353 // - fn gpu_import_shared_buffer(handle: Any, policy: GpuResourcePolicy) -> GpuBuffer @361 // - fn gpu_shared_buffer_from_bytes(bytes: Any, element_type: String, shape: Any, format: String, mime_type: String, policy: GpuResourcePolicy) -> GpuBuffer @373 // - fn gpu_shared_buffer_zeroed(element_type: String, shape: Array, format: String, mime_type: String, policy: GpuResourcePolicy) -> GpuBuffer @377 // - fn gpu_shared_buffer_bytes(buffer: GpuBuffer) -> Any @387 // - fn gpu_shared_buffer_replace_bytes(buffer: GpuBuffer, bytes: Any) -> GpuBuffer @390 // - fn gpu_import_shared_image(handle: Any, policy: GpuResourcePolicy) -> GpuImage @394 // - fn gpu_shared_image_from_bytes(bytes: Any, width: Int, height: Int, channels: Int, layout: String, pixel_format: String, mime_type: String, policy: GpuResourcePolicy) -> GpuImage @406 // - fn gpu_shared_image_zeroed(width: Int, height: Int, channels: Int, layout: String, pixel_format: String, mime_type: String, policy: GpuResourcePolicy) -> GpuImage @410 // - fn gpu_shared_image_bytes(image: GpuImage) -> Any @422 // - fn gpu_shared_image_replace_bytes(image: GpuImage, bytes: Any) -> GpuImage @425 // - fn gpu_buffer_descriptor(buffer: GpuBuffer) -> Any @429 // - fn gpu_buffer_descriptor_info(buffer: GpuBuffer) -> GpuBufferDescriptorInfo @470 // - fn gpu_image_descriptor(image: GpuImage) -> Any @512, fn gpu_binding_descriptor(binding: GpuBindingPlan) -> Any @536 // // ### `std::graphics` (stdlib/graphics.kn, public=84, private=42) // // - functions: // - fn native_graphics_reset() -> Int @127 // - fn native_graphics_session_create(app_name: String, width: Int, height: Int) -> Int @130 // - fn native_graphics_session_destroy(session_id: Int) -> Int @133, fn native_graphics_session_count() -> Int @136 // - fn native_graphics_backend_supported(backend_id: String) -> Int @139 // - fn native_graphics_backend_available(backend_id: String) -> Int @142 // - fn native_graphics_backend_status(backend_id: String) -> String @145 // - fn native_graphics_backend_select(session_id: Int, backend_id: String) -> Int @148 // - fn native_graphics_active_backend(session_id: Int) -> String @151 // - fn native_graphics_begin_frame(session_id: Int, delta_ms: Float) -> Int @154 // - fn native_graphics_end_frame(session_id: Int) -> Int @157, fn native_graphics_present(session_id: Int) -> Int @160 // - fn native_graphics_frame_index(session_id: Int) -> Int @163 // - fn native_graphics_last_presented_frame(session_id: Int) -> Int @166 // - fn native_graphics_buffer_create(session_id: Int, kind: String, label: String, byte_length: Int, element_stride: Int) -> Int @169 // - fn native_graphics_buffer_create_from_hex(session_id: Int, kind: String, label: String, bytes_hex: String, element_stride: Int) -> Int @172 // - fn native_graphics_buffer_byte_length(session_id: Int, buffer_id: Int) -> Int @175 // - fn native_graphics_buffer_byte_at(session_id: Int, buffer_id: Int, byte_offset: Int) -> Int @178 // - fn native_graphics_buffer_kind(session_id: Int, buffer_id: Int) -> String @181 // - fn native_graphics_buffer_label(session_id: Int, buffer_id: Int) -> String @184 // - fn native_graphics_shader_spirv_from_hex(session_id: Int, key: String, stage: String, entry_point: String, bytes_hex: String) -> Int @187 // - fn native_graphics_shader_spirv_from_file(session_id: Int, key: String, stage: String, entry_point: String, path: String) -> Int @190 // - fn native_graphics_shader_byte_length(session_id: Int, shader_id: Int) -> Int @193 // - fn native_graphics_shader_byte_at(session_id: Int, shader_id: Int, byte_offset: Int) -> Int @196 // - fn native_graphics_shader_key(session_id: Int, shader_id: Int) -> String @199 // - fn native_graphics_shader_stage(session_id: Int, shader_id: Int) -> String @202 // - fn native_graphics_mesh_create(session_id: Int, label: String, vertex_buffer_id: Int, index_buffer_id: Int, vertex_count: Int, index_count: Int) -> Int @205 // - fn native_graphics_mesh_vertex_count(session_id: Int, mesh_id: Int) -> Int @208 // - fn native_graphics_mesh_index_count(session_id: Int, mesh_id: Int) -> Int @211 // - fn native_graphics_mesh_label(session_id: Int, mesh_id: Int) -> String @214 // - fn native_graphics_pipeline_create(session_id: Int, label: String, vertex_shader_id: Int, fragment_shader_id: Int, backend_id: String) -> Int @217 // - fn native_graphics_pipeline_label(session_id: Int, pipeline_id: Int) -> String @220 // - fn native_graphics_pipeline_backend(session_id: Int, pipeline_id: Int) -> String @223 // - fn native_graphics_draw_mesh(session_id: Int, pipeline_id: Int, mesh_id: Int, instance_count: Int) -> Int @226 // - fn native_graphics_draw_command_count(session_id: Int) -> Int @229 // - fn native_graphics_draw_command_kind(session_id: Int, command_index: Int) -> String @232 // - fn native_graphics_draw_command_mesh(session_id: Int, command_index: Int) -> Int @235 // - fn native_graphics_draw_command_pipeline(session_id: Int, command_index: Int) -> Int @238 // - fn native_graphics_draw_command_instances(session_id: Int, command_index: Int) -> Int @241 // - fn native_graphics_last_status() -> Int @244, fn native_graphics_last_error_kind() -> String @247 // - fn native_graphics_last_error_message() -> String @250, fn graphics_reset() -> Int @254 // - fn graphics_session_create(app_name: String, width: Int, height: Int) -> Int @257 // - fn graphics_session_destroy(session_id: Int) -> Int @260, fn graphics_session_count() -> Int @263 // - fn graphics_backend_supported(backend_id: String) -> Int @266 // - fn graphics_backend_available(backend_id: String) -> Int @269 // - fn graphics_backend_status(backend_id: String) -> String @272 // - fn graphics_backend_select(session_id: Int, backend_id: String) -> Int @275 // - fn graphics_active_backend(session_id: Int) -> String @278 // - fn graphics_begin_frame(session_id: Int, delta_ms: Float) -> Int @281 // - fn graphics_end_frame(session_id: Int) -> Int @284, fn graphics_present(session_id: Int) -> Int @287 // - fn graphics_frame_index(session_id: Int) -> Int @290, fn graphics_last_presented_frame(session_id: Int) -> Int @293 // - fn graphics_buffer_create(session_id: Int, kind: String, label: String, byte_length: Int, element_stride: Int) -> Int @296 // - fn graphics_buffer_create_from_hex(session_id: Int, kind: String, label: String, bytes_hex: String, element_stride: Int) -> Int @299 // - fn graphics_buffer_byte_length(session_id: Int, buffer_id: Int) -> Int @302 // - fn graphics_buffer_byte_at(session_id: Int, buffer_id: Int, byte_offset: Int) -> Int @305 // - fn graphics_buffer_kind(session_id: Int, buffer_id: Int) -> String @308 // - fn graphics_buffer_label(session_id: Int, buffer_id: Int) -> String @311 // - fn graphics_shader_spirv_from_hex(session_id: Int, key: String, stage: String, entry_point: String, bytes_hex: String) -> Int @314 // - fn graphics_shader_spirv_from_file(session_id: Int, key: String, stage: String, entry_point: String, path: String) -> Int @317 // - fn graphics_shader_byte_length(session_id: Int, shader_id: Int) -> Int @320 // - fn graphics_shader_byte_at(session_id: Int, shader_id: Int, byte_offset: Int) -> Int @323 // - fn graphics_shader_key(session_id: Int, shader_id: Int) -> String @326 // - fn graphics_shader_stage(session_id: Int, shader_id: Int) -> String @329 // - fn graphics_mesh_create(session_id: Int, label: String, vertex_buffer_id: Int, index_buffer_id: Int, vertex_count: Int, index_count: Int) -> Int @332 // - fn graphics_mesh_vertex_count(session_id: Int, mesh_id: Int) -> Int @335 // - fn graphics_mesh_index_count(session_id: Int, mesh_id: Int) -> Int @338 // - fn graphics_mesh_label(session_id: Int, mesh_id: Int) -> String @341 // - fn graphics_pipeline_create(session_id: Int, label: String, vertex_shader_id: Int, fragment_shader_id: Int, backend_id: String) -> Int @344 // - fn graphics_pipeline_label(session_id: Int, pipeline_id: Int) -> String @347 // - fn graphics_pipeline_backend(session_id: Int, pipeline_id: Int) -> String @350 // - fn graphics_draw_mesh(session_id: Int, pipeline_id: Int, mesh_id: Int, instance_count: Int) -> Int @353 // - fn graphics_draw_command_count(session_id: Int) -> Int @356 // - fn graphics_draw_command_kind(session_id: Int, command_index: Int) -> String @359 // - fn graphics_draw_command_mesh(session_id: Int, command_index: Int) -> Int @362 // - fn graphics_draw_command_pipeline(session_id: Int, command_index: Int) -> Int @365 // - fn graphics_draw_command_instances(session_id: Int, command_index: Int) -> Int @368 // - fn graphics_last_status() -> Int @371, fn graphics_last_error_kind() -> String @374 // - fn graphics_last_error_message() -> String @377 // // ### `std::graphics::shared` (stdlib/graphics_shared.kn, public=32, private=3) // // - constants: // - const GRAPHICS_SHARED_KIND_VERTEX_BUFFER: String @4, const GRAPHICS_SHARED_KIND_INDEX_BUFFER: String @5 // - const GRAPHICS_SHARED_KIND_UNIFORM_BUFFER: String @6, const GRAPHICS_SHARED_KIND_STORAGE_BUFFER: String @7 // - const GRAPHICS_SHARED_KIND_SAMPLED_IMAGE: String @8, const GRAPHICS_SHARED_KIND_STORAGE_IMAGE: String @9 // - const GRAPHICS_SHARED_KIND_COLOR_ATTACHMENT: String @10, const GRAPHICS_SHARED_KIND_DEPTH_ATTACHMENT: String @11 // - types: // - struct GraphicsSharedBackend @13, struct GraphicsSharedBuffer @18, struct GraphicsSharedImage @25 // - functions: // - fn graphics_shared_backend(backend_id: String) -> GraphicsSharedBackend @48 // - fn graphics_shared_preferred_backend() -> GraphicsSharedBackend @61 // - fn graphics_shared_vertex_policy(debug_name: String) -> GpuResourcePolicy @64 // - fn graphics_shared_index_policy(debug_name: String) -> GpuResourcePolicy @76 // - fn graphics_shared_uniform_policy(debug_name: String) -> GpuResourcePolicy @88 // - fn graphics_shared_storage_policy(debug_name: String) -> GpuResourcePolicy @100 // - fn graphics_shared_sampled_image_policy(debug_name: String) -> GpuResourcePolicy @112 // - fn graphics_shared_storage_image_policy(debug_name: String) -> GpuResourcePolicy @124 // - fn graphics_shared_color_attachment_policy(debug_name: String) -> GpuResourcePolicy @136 // - fn graphics_shared_depth_attachment_policy(debug_name: String) -> GpuResourcePolicy @148 // - fn graphics_shared_vertex_buffer(resource: GpuBuffer, element_stride: Int) -> GraphicsSharedBuffer @160 // - fn graphics_shared_index_buffer(resource: GpuBuffer, element_stride: Int) -> GraphicsSharedBuffer @170 // - fn graphics_shared_uniform_binding(resource: GpuBuffer, binding_slot: Int, stage_flags: Int) -> GraphicsSharedBuffer @180 // - fn graphics_shared_storage_binding(resource: GpuBuffer, binding_slot: Int, stage_flags: Int, access_flags: Int) -> GraphicsSharedBuffer @190 // - fn graphics_shared_sampled_image(resource: GpuImage, binding_slot: Int, stage_flags: Int) -> GraphicsSharedImage @200 // - fn graphics_shared_storage_image(resource: GpuImage, binding_slot: Int, stage_flags: Int, access_flags: Int) -> GraphicsSharedImage @209 // - fn graphics_shared_color_attachment(resource: GpuImage) -> GraphicsSharedImage @218 // - fn graphics_shared_depth_attachment(resource: GpuImage) -> GraphicsSharedImage @227 // - fn graphics_shared_backend_descriptor(state: GraphicsSharedBackend) -> Any @236 // - fn graphics_shared_buffer_descriptor(resource_view: GraphicsSharedBuffer) -> Any @246 // - fn graphics_shared_image_descriptor(resource_view: GraphicsSharedImage) -> Any @258 // // ### `std::hash` (stdlib/hash.kn, public=47, private=0) // // - constants: // - const HASH_U32_MASK: Int @8, const HASH_BYTE_MASK: Int @9, const HASH_FNV1A32_OFFSET: Int @10 // - const HASH_FNV1A32_PRIME: Int @11, const HASH_CRC32_POLY: Int @12, const HASH_GOLDEN32: Int @13 // - const HASH_EMPTY32: Int @14, const HASH_I63_MASK: Int @15 // - types: // - struct Hash32 @17, struct Fingerprint32 @20 // - functions: // - fn hash_u32_mask(value: Int) -> Int @25, fn hash_byte_mask(value: Int) -> Int @28 // - fn hash_i63_mask(value: Int) -> Int @31, fn hash32(value: Int) -> Hash32 @34, fn hash32_value(hash: Hash32) -> Int @37 // - fn hash32_is_zero(hash: Hash32) -> Bool @40, fn rotl32(value: Int, bits: Int) -> Int @43 // - fn rotr32(value: Int, bits: Int) -> Int @52, fn hash_wang32(value: Int) -> Int @61, fn hash_u32(value: Int) -> Int @70 // - fn hash_mix64(value: Int) -> Int @73, fn hash_u64(value: Int) -> Int @79 // - fn hash_u32_with_seed(value: Int, seed: Int) -> Int @82, fn hash_mix32(seed: Int, value: Int) -> Int @86 // - fn hash_pair32(left: Int, right: Int) -> Int @92, fn hash_triple32(a: Int, b: Int, c: Int) -> Int @95 // - fn hash_quad32(a: Int, b: Int, c: Int, d: Int) -> Int @98, fn hash_bool32(value: Bool) -> Int @101 // - fn hash_ordered_finish(seed: Int, words: Int) -> Int @106, fn hash_unordered_pair32(left: Int, right: Int) -> Int @109 // - fn hash_bucket_power_of_two(hash: Int, capacity: Int) -> Int @114 // - fn hash_bucket_mod(hash: Int, capacity: Int) -> Int @119, fn hash_bucket_mod64(hash: Int, capacity: Int) -> Int @124 // - fn hash_fnv1a32_init() -> Int @129, fn hash_fnv1a32_update_byte(hash: Int, byte: Int) -> Int @132 // - fn hash_fnv1a32_update_u32(hash: Int, value: Int) -> Int @136 // - fn hash_bytes4(byte0: Int, byte1: Int, byte2: Int, byte3: Int) -> Int @145, fn hash_crc32_init() -> Int @153 // - fn hash_crc32_update_byte(crc: Int, byte: Int) -> Int @156, fn hash_crc32_finish(crc: Int) -> Int @167 // - fn hash_crc32_bytes4(byte0: Int, byte1: Int, byte2: Int, byte3: Int) -> Int @170 // - fn fingerprint32_begin(salt: Int) -> Fingerprint32 @178 // - fn fingerprint32_add_word(fingerprint: Fingerprint32, word: Int) -> Fingerprint32 @181 // - fn fingerprint32_add_pair(fingerprint: Fingerprint32, left: Int, right: Int) -> Fingerprint32 @186 // - fn fingerprint32_finish(fingerprint: Fingerprint32) -> Int @190 // - fn fingerprint32_words(fingerprint: Fingerprint32) -> Int @193 // - fn fingerprint32_value(fingerprint: Fingerprint32) -> Int @196 // // ### `std::http` (stdlib/http.kn, public=44, private=0) // // - functions: // - fn request_create(method: String, url: String) -> Int @5 // - fn request_create_checked(method: String, url: String) -> Int @8 // - fn request_create_uri(method: String, parsed_uri: Uri) -> Int @14 // - fn request_set_header(request_id: Int, key: String, value: String) -> Int @19 // - fn request_set_body_text(request_id: Int, payload: String) -> Int @22 // - fn request_set_body_buffered_text(request_id: Int, writer: BufferedWriter) -> Int @25 // - fn request_set_body_hex(request_id: Int, payload_hex: String) -> Int @28 // - fn request_set_timeout(request_id: Int, timeout_ms: Int) -> Int @31 // - fn request_set_protocol(request_id: Int, protocol_name: String) -> Int @34 // - fn request_protocol(request_id: Int) -> String @37, fn client_send(request_id: Int) -> Int @40 // - fn response_status(response_id: Int) -> Int @43, fn response_protocol(response_id: Int) -> String @46 // - fn response_header(response_id: Int, key: String) -> String @49, fn response_body_text(response_id: Int) -> String @52 // - fn response_buffered_reader(response_id: Int, capacity: Int) -> BufferedReader @55 // - fn response_body_hex(response_id: Int) -> String @58, fn request_destroy(request_id: Int) -> Int @61 // - fn response_destroy(response_id: Int) -> Int @64, fn server_create(host: String, port: Int) -> Int @67 // - fn server_create_localhost(port: Int) -> Int @70, fn server_listen(server_id: Int) -> Int @73 // - fn server_local_port(server_id: Int) -> Int @76, fn server_pending_request_count(server_id: Int) -> Int @79 // - fn route_actor(server_id: Int, method: String, path: String, actor_id: Int, message_kind: String) -> Int @82 // - fn server_pump(server_id: Int, timeout_ms: Int) -> Int @85 // - fn server_pump_batch(server_id: Int, timeout_ms: Int, max_requests: Int) -> Int @88 // - fn server_next_request(server_id: Int) -> Int @91, fn request_method(incoming_request_id: Int) -> String @94 // - fn request_path(incoming_request_id: Int) -> String @97, fn request_query(incoming_request_id: Int) -> String @100 // - fn request_header(incoming_request_id: Int, key: String) -> String @103 // - fn request_body_text(incoming_request_id: Int) -> String @106 // - fn request_body_buffered_reader(incoming_request_id: Int, capacity: Int) -> BufferedReader @109 // - fn request_body_hex(incoming_request_id: Int) -> String @112 // - fn respond_text(incoming_request_id: Int, status_code: Int, payload: String) -> Int @115 // - fn respond_buffered_text(incoming_request_id: Int, status_code: Int, writer: BufferedWriter) -> Int @118 // - fn respond_hex(incoming_request_id: Int, status_code: Int, payload_hex: String) -> Int @121 // - fn response_set_header_for_request(incoming_request_id: Int, key: String, value: String) -> Int @124 // - fn server_close(server_id: Int) -> Int @127, fn local_url(port: Int, path: String) -> String @130 // - fn local_uri(port: Int, path: String) -> Uri @133, fn get_text(url: String) -> String @136 // - fn post_text(url: String, payload: String) -> String @139 // // ### `std::http2` (stdlib/http2.kn, public=10, private=0) // // - functions: // - fn http2_client_state() -> Int @4, fn http2_client_supported() -> Bool @7, fn http2_client_available() -> Bool @10 // - fn http2_request_upgrade(request_id: Int) -> Int @13, fn http2_request_create(method: String, url: String) -> Int @16 // - fn http2_request_protocol(request_id: Int) -> String @21, fn http2_client_send(request_id: Int) -> Int @24 // - fn http2_response_protocol(response_id: Int) -> String @27, fn http2_response_negotiated(response_id: Int) -> Bool @30 // - fn http2_get_text(url: String) -> String @33 // // ### `std::input` (stdlib/input.kn, public=45, private=27) // // - types: // - struct InputEventRecord @105, struct InputTraceRecord @113 // - functions: // - fn input_source_keyboard() -> String @84, fn input_source_pointer() -> String @87, fn input_source_cli() -> String @90 // - fn input_source_ui_runtime() -> String @93, fn input_source_agent() -> String @96 // - fn input_source_synthetic() -> String @99, fn input_source_native() -> String @102, fn input_reset() -> Int @119 // - fn input_session_create(name: String) -> Int @122, fn input_session_destroy(session_id: Int) -> Int @125 // - fn input_session_count() -> Int @128 // - fn input_bind_action(session_id: Int, source_kind: String, event_kind: String, code: String, action: String) -> Int @131 // - fn input_bind_axis(session_id: Int, source_kind: String, event_kind: String, code: String, axis: String, scale: Float) -> Int @134 // - fn input_push_event(session_id: Int, source_kind: String, source_id: String, event_kind: String, code: String, value: Float, text: String, confidence: Float) -> Int @137 // - fn input_push_key_down(session_id: Int, source_id: String, code: String) -> Int @140 // - fn input_push_key_up(session_id: Int, source_id: String, code: String) -> Int @143 // - fn input_push_text(session_id: Int, source_kind: String, source_id: String, code: String, text: String) -> Int @146 // - fn input_push_axis(session_id: Int, source_kind: String, source_id: String, code: String, value: Float) -> Int @149 // - fn input_push_agent_intent(session_id: Int, source_id: String, action: String, command_text: String, confidence: Float) -> Int @152 // - fn input_begin_frame(session_id: Int, delta_ms: Float) -> Int @155, fn input_frame_index(session_id: Int) -> Int @158 // - fn input_event_count(session_id: Int) -> Int @161, fn input_event_kind(session_id: Int, index: Int) -> String @164 // - fn input_event_source_kind(session_id: Int, index: Int) -> String @167 // - fn input_event_code(session_id: Int, index: Int) -> String @170 // - fn input_event_action(session_id: Int, index: Int) -> String @173 // - fn input_event_text(session_id: Int, index: Int) -> String @176 // - fn input_event_record(session_id: Int, index: Int) -> InputEventRecord @179 // - fn input_event_record_json(event: InputEventRecord) -> JsonObject @189 // - fn input_action_pressed(session_id: Int, action: String) -> Int @199 // - fn input_action_down(session_id: Int, action: String) -> Int @202 // - fn input_action_released(session_id: Int, action: String) -> Int @205 // - fn input_axis_value(session_id: Int, axis: String) -> Float @208 // - fn input_text_commit_count(session_id: Int) -> Int @211 // - fn input_text_commit(session_id: Int, index: Int) -> String @214, fn input_trace_json(session_id: Int) -> String @217 // - fn input_trace_record(session_id: Int) -> InputTraceRecord @220 // - fn input_trace_record_json(trace: InputTraceRecord) -> JsonObject @228 // - fn input_replay_trace_record(session_id: Int, trace: InputTraceRecord) -> Int @236 // - fn input_replay_trace_json(session_id: Int, trace_json: String) -> Int @239, fn input_last_status() -> Int @242 // - fn input_last_error_kind() -> String @245, fn input_last_error_message() -> String @248 // // ### `std::intent` (stdlib/intent.kn, public=90, private=34) // // - functions: // - fn native_entangle_reset() -> Int @103, fn native_entangle_registered_count() -> Int @106 // - fn native_entangle_register(authority: String, mirror: String, policy: String, type_name: String) -> Int @109 // - fn native_entangle_has_bindings() -> Bool @112, fn native_entangle_get_authority(index: Int) -> String @115 // - fn native_entangle_get_mirror(index: Int) -> String @118, fn native_entangle_get_policy(index: Int) -> String @121 // - fn native_entangle_get_type_name(index: Int) -> String @124, fn native_patch_journal_count() -> Int @127 // - fn native_patch_last_path() -> String @130, fn native_resonate_mutation_count() -> Int @133 // - fn native_resonate_fire_count() -> Int @136, fn native_resonate_absorb_count() -> Int @139 // - fn native_resonate_last_target() -> String @142, fn native_resonate_last_old_i64() -> Int @145 // - fn native_resonate_last_new_i64() -> Int @148, fn native_resonate_last_dampen_ns() -> Int @151 // - fn native_entangle_propagation_count() -> Int @154, fn native_entangle_last_authority() -> String @157 // - fn native_entangle_last_mirror() -> String @160, fn native_converge_mismatch_count() -> Int @163 // - fn native_orchestrate_stage_count() -> Int @166, fn native_orchestrate_last_runtime() -> String @169 // - fn native_orchestrate_last_function() -> String @172, fn native_orchestrate_last_selector() -> String @175 // - fn native_orchestrate_last_dependencies() -> String @178, fn native_orchestrate_last_residency() -> String @181 // - fn native_orchestrate_last_transfer() -> String @184, fn native_orchestrate_last_guard() -> String @187 // - fn native_orchestrate_last_fallback() -> String @190, fn native_orchestrate_last_requires() -> String @193 // - fn native_orchestrate_last_policy() -> String @196, fn native_orchestrate_transfer_count() -> Int @199 // - fn native_orchestrate_fallback_count() -> Int @202, fn native_orchestrate_adaptive_stage_count() -> Int @205 // - fn native_law_status(valid: Bool) -> Int @208, fn native_law_is_valid_status(status: Int) -> Bool @213 // - fn native_patch_status(changed: Bool) -> Int @216, fn native_patch_is_noop(status: Int) -> Bool @221 // - fn native_patch_applied(status: Int) -> Bool @224 // - fn native_converge_choose_int(spec_value: Int, fast_value: Int) -> Int @227 // - fn native_converge_choose_bool(spec_value: Bool, fast_value: Bool) -> Bool @232 // - fn native_converge_status(spec_value: Int, fast_value: Int) -> Int @237 // - fn native_orchestrate_stage_status(status: Int) -> Int @242 // - fn native_orchestrate_merge_status(left: Int, right: Int) -> Int @245, fn entangle_reset() -> Int @251 // - fn entangle_registered_count() -> Int @254 // - fn entangle_register(authority: String, mirror: String, policy: String, type_name: String) -> Int @257 // - fn entangle_has_bindings() -> Bool @260, fn entangle_get_authority(index: Int) -> String @263 // - fn entangle_get_mirror(index: Int) -> String @266, fn entangle_get_policy(index: Int) -> String @269 // - fn entangle_get_type_name(index: Int) -> String @272, fn patch_journal_count() -> Int @275 // - fn patch_last_path() -> String @278, fn resonate_mutation_count() -> Int @281, fn resonate_fire_count() -> Int @284 // - fn resonate_absorb_count() -> Int @287, fn resonate_last_target() -> String @290 // - fn resonate_last_old_i64() -> Int @293, fn resonate_last_new_i64() -> Int @296 // - fn resonate_last_dampen_ns() -> Int @299, fn entangle_propagation_count() -> Int @302 // - fn entangle_last_authority() -> String @305, fn entangle_last_mirror() -> String @308 // - fn converge_mismatch_count() -> Int @311, fn orchestrate_stage_count() -> Int @314 // - fn orchestrate_last_runtime() -> String @317, fn orchestrate_last_function() -> String @320 // - fn orchestrate_last_selector() -> String @323, fn orchestrate_last_dependencies() -> String @326 // - fn orchestrate_last_residency() -> String @329, fn orchestrate_last_transfer() -> String @332 // - fn orchestrate_last_guard() -> String @335, fn orchestrate_last_fallback() -> String @338 // - fn orchestrate_last_requires() -> String @341, fn orchestrate_last_policy() -> String @344 // - fn orchestrate_transfer_count() -> Int @347, fn orchestrate_fallback_count() -> Int @350 // - fn orchestrate_adaptive_stage_count() -> Int @353, fn law_status(valid: Bool) -> Int @356 // - fn law_is_valid_status(status: Int) -> Bool @359, fn patch_status(changed: Bool) -> Int @362 // - fn patch_is_noop(status: Int) -> Bool @365, fn patch_applied(status: Int) -> Bool @368 // - fn converge_choose_int(spec_value: Int, fast_value: Int) -> Int @371 // - fn converge_choose_bool(spec_value: Bool, fast_value: Bool) -> Bool @374 // - fn converge_status(spec_value: Int, fast_value: Int) -> Int @377, fn orchestrate_stage_status(status: Int) -> Int @380 // - fn orchestrate_merge_status(left: Int, right: Int) -> Int @383 // // ### `std::interop` (stdlib/interop.kn, public=10, private=0) // // - types: // - struct KainSharedBufferInfo @8, struct KainSharedImageInfo @38 // - functions: // - fn interop_shared_buffer_info(target: Any) -> KainSharedBufferInfo @58 // - fn interop_shared_buffer_bytes(target: Any) -> Array @91 // - fn interop_shared_buffer_from_bytes(bytes: Any, element_type: String, shape: Any, format: String, mime_type: String) -> Any @94 // - fn interop_shared_buffer_replace_bytes(target: Any, bytes: Any) @97 // - fn interop_shared_image_info(target: Any) -> KainSharedImageInfo @100 // - fn interop_shared_image_bytes(target: Any) -> Array @123 // - fn interop_shared_image_from_bytes(bytes: Any, width: Int, height: Int, channels: Int, layout: String, pixel_format: String, mime_type: String) -> Any @126 // - fn interop_shared_image_replace_bytes(target: Any, bytes: Any) @129 // // ### `std::io` (stdlib/io.kn, public=29, private=0) // // - types: // - struct RingBuffer @5, struct StringBuilder @98, struct BufferedReader @165, struct BufferedWriter @266 // - functions: // - fn ring_buffer_new(capacity: Int) -> RingBuffer @11, fn ring_buffer_destroy(rb: RingBuffer) -> Int @21 // - fn ring_buffer_available_read(rb: RingBuffer) -> Int @25, fn ring_buffer_available_write(rb: RingBuffer) -> Int @32 // - fn ring_buffer_write(rb: ptr, src: ptr, count: Int) -> Int @41 // - fn ring_buffer_read(rb: ptr, dest: ptr, count: Int) -> Int @69 // - fn string_builder_new(initial_capacity: Int) -> StringBuilder @103 // - fn string_builder_destroy(sb: StringBuilder) -> Int @112 // - fn string_builder_append_char(sb: ptr, c: Int) -> Int @117 // - fn string_builder_append_string(sb: ptr, str: String) -> Int @143 // - fn string_builder_to_string(sb: StringBuilder) -> String @153 // - fn buffered_reader_new(capacity: Int) -> BufferedReader @171 // - fn buffered_reader_destroy(br: BufferedReader) -> Int @181 // - fn buffered_reader_fill(br: ptr, src: ptr, src_len: Int) -> Int @186 // - fn buffered_reader_read(br: ptr, dest: ptr, count: Int) -> Int @211 // - fn buffered_reader_load_text(br: ptr, text: String) -> Int @233 // - fn buffered_reader_new_from_text(capacity: Int, text: String) -> BufferedReader @250 // - fn buffered_reader_materialize_text(br: BufferedReader) -> String @256 // - fn buffered_writer_new(capacity: Int) -> BufferedWriter @271 // - fn buffered_writer_destroy(bw: BufferedWriter) -> Int @280 // - fn buffered_writer_write(bw: ptr, src: ptr, count: Int, flush_target: ptr) -> Int @285 // - fn buffered_writer_flush(bw: ptr, dest: ptr) -> Int @310 // - fn buffered_writer_push_char(bw: ptr, code: Int, flush_target: ptr) -> Int @326 // - fn buffered_writer_write_text(bw: ptr, text: String, flush_target: ptr) -> Int @340 // - fn buffered_writer_materialize_text(bw: BufferedWriter) -> String @347 // // ### `std::js` (stdlib/js.kn, public=69, private=0) // // - functions: // - fn js_bridge_exec(code: String) @7, fn js_bridge_eval(code: String) -> Any @10 // - fn js_bridge_eval_raw(code: String) -> Any @13, fn js_bridge_import(specifier: String) -> Any @16 // - fn js_bridge_require(specifier: String) -> Any @19, fn js_bridge_require_raw(specifier: String) -> Any @22 // - fn node_import(specifier: String) -> Any @25, fn node_require(specifier: String) -> Any @28 // - fn js_bridge_call(target: Any, args: Any) -> Any @31, fn js_bridge_call_raw(target: Any, args: Any) -> Any @34 // - fn js_bridge_call_method(target: Any, name: String, args: Any) -> Any @37 // - fn js_bridge_call_method_raw(target: Any, name: String, args: Any) -> Any @40 // - fn js_bridge_getattr(target: Any, name: String) -> Any @43 // - fn js_bridge_getattr_raw(target: Any, name: String) -> Any @46 // - fn js_bridge_setattr(target: Any, name: String, value: Any) @49 // - fn js_bridge_hasattr(target: Any, name: String) -> Bool @52, fn js_bridge_buffer_info(target: Any) -> Any @55 // - fn js_bridge_buffer_bytes(target: Any) -> Any @58, fn js_bridge_document_info(target: Any) -> Any @61 // - fn js_bridge_document_text(target: Any) -> String @64, fn js_bridge_image_info(target: Any) -> Any @67 // - fn js_bridge_image_text(target: Any) -> String @70, fn js_bridge_image_bytes(target: Any) -> Any @73 // - fn js_bridge_image_buffer(target: Any) -> Any @76, fn js_web_fs() -> Any @79, fn js_web_path() -> Any @82 // - fn js_web_json() -> Any @85, fn js_web_write_text(path: String, text: String) @88 // - fn js_web_read_text(path: String) -> String @91, fn js_web_path_basename(path: String) -> String @94 // - fn js_web_path_join(parts: Any) -> String @97, fn js_web_json_stringify(value: Any) -> String @100 // - fn js_web_json_parse(text: String) -> Any @103, fn js_web_buffer_info(target: Any) -> Any @106 // - fn js_web_buffer_bytes(target: Any) -> Any @109, fn js_web_document_info(target: Any) -> Any @112 // - fn js_web_document_text(target: Any) -> String @115, fn js_web_document_write(path: String, target: Any) @118 // - fn js_web_image_info(target: Any) -> Any @121, fn js_web_canvas_info(target: Any) -> Any @124 // - fn js_web_image_text(target: Any) -> String @127, fn js_web_image_bytes(target: Any) -> Any @130 // - fn js_web_canvas_bytes(target: Any) -> Any @133, fn js_web_image_buffer(target: Any) -> Any @136 // - fn js_web_image_write(path: String, target: Any) @139, fn js_web_canvas_write(path: String, target: Any) @146 // - fn js_web_shared_buffer(target: Any) -> Any @149, fn js_web_shared_image(target: Any) -> Any @152 // - fn js_web_html_document(title: String, body: String, background: String, accent: String) -> String @155 // - fn js_site_runtime() -> Any @180, fn js_site_load_app(path: String) -> Any @183 // - fn js_site_build_experience(path: String, experience_id: String) -> Any @186 // - fn js_site_bundle_client(path: String) -> Any @189, fn js_site_default_experience(path: String) -> String @192 // - fn js_site_bundle_and_build(path: String) -> Any @195, fn js_site_build(path: String) -> Any @198 // - fn js_site_serve(path: String, experience_id: String) -> Any @201, fn js_site_serve_default(path: String) -> Any @204 // - fn js_site_catalog(path: String) -> Any @207, fn js_site_build_matrix(path: String) -> Any @210 // - fn js_site_write_matrix(path: String) -> Any @213 // - fn js_site_actor_plan(path: String, experience_id: String) -> Any @216 // - fn js_site_system_contract(path: String, experience_id: String) -> Any @219 // - fn js_site_ui_schema(path: String, experience_id: String) -> Any @222 // - fn js_site_actor_report(path: String, experience_id: String) -> String @225 // - fn js_site_build_report(app_manifest_path: String, template_name: String, archetypes: String, outputs: String) -> String @228 // - fn js_actor_runtime() -> Any @248, fn js_actor_server_plan(path: String, experience_id: String) -> Any @251 // - fn js_actor_server_report(path: String, experience_id: String) -> String @254 // // ### `std::json` (stdlib/json.kn, public=133, private=32) // // - constants: // - const JSON_TOKEN_LBRACE: String @10, const JSON_TOKEN_RBRACE: String @11, const JSON_TOKEN_LBRACKET: String @12 // - const JSON_TOKEN_RBRACKET: String @13, const JSON_TOKEN_COLON: String @14, const JSON_TOKEN_COMMA: String @15 // - const JSON_TOKEN_STRING: String @16, const JSON_TOKEN_NUMBER: String @17, const JSON_TOKEN_TRUE: String @18 // - const JSON_TOKEN_FALSE: String @19, const JSON_TOKEN_NULL: String @20, const JSON_TOKEN_WHITESPACE: String @21 // - const JSON_TOKEN_UNKNOWN: String @22, const JSON_KIND_NULL: String @24, const JSON_KIND_BOOL: String @25 // - const JSON_KIND_INT: String @26, const JSON_KIND_FLOAT: String @27, const JSON_KIND_STRING: String @28 // - const JSON_KIND_OBJECT: String @29, const JSON_KIND_ARRAY: String @30, const JSON_KIND_UNKNOWN: String @31 // - const JSON_KIND_CODE_NULL: Int @33, const JSON_KIND_CODE_BOOL: Int @34, const JSON_KIND_CODE_INT: Int @35 // - const JSON_KIND_CODE_FLOAT: Int @36, const JSON_KIND_CODE_STRING: Int @37, const JSON_KIND_CODE_OBJECT: Int @38 // - const JSON_KIND_CODE_ARRAY: Int @39, const JSON_KIND_CODE_UNKNOWN: Int @40, const JSON_STATUS_OK: Int @42 // - const JSON_STATUS_MISSING_KEY: Int @43, const JSON_STATUS_WRONG_KIND: Int @44 // - const JSON_STATUS_INDEX_OUT_OF_RANGE: Int @45, const JSON_STATUS_SCAN_UNKNOWN_TOKEN: Int @46 // - const JSON_STATUS_SCAN_UNTERMINATED_STRING: Int @47, const JSON_STATUS_SCAN_UNBALANCED_DELIMITER: Int @48 // - const JSON_STATUS_SCAN_EMPTY_INPUT: Int @49 // - types: // - type JsonValue = Any @6, type JsonObject = Any @7, type JsonArray = Any @8, struct JsonToken @51 // - struct JsonStatus @57, struct JsonStringResult @66, struct JsonIntResult @71, struct JsonFloatResult @76 // - struct JsonBoolResult @81, struct JsonObjectResult @86, struct JsonArrayResult @91, struct JsonStringArrayResult @96 // - struct JsonIntArrayResult @101, struct JsonFloatArrayResult @106, struct JsonBoolArrayResult @111 // - struct JsonParseResult @116, struct JsonScanReport @121 // - functions: // - fn json_parse_text(text: String) -> JsonValue @456, fn json_parse_text_result(text: String) -> JsonParseResult @459 // - fn json_parse_text_or(text: String, fallback: JsonValue) -> JsonValue @469 // - fn json_stringify(value: JsonValue) -> String @475, fn json_has_key(object: JsonObject, key: String) -> Bool @478 // - fn json_get_value(object: JsonObject, key: String) -> JsonValue @481 // - fn json_value_kind(value: JsonValue) -> String @484, fn json_value_kind_code(value: JsonValue) -> Int @487 // - fn json_is_null(value: JsonValue) -> Bool @490, fn json_is_string(value: JsonValue) -> Bool @493 // - fn json_is_int(value: JsonValue) -> Bool @496, fn json_is_float(value: JsonValue) -> Bool @499 // - fn json_is_bool(value: JsonValue) -> Bool @502, fn json_is_object(value: JsonValue) -> Bool @505 // - fn json_is_array(value: JsonValue) -> Bool @508 // - fn json_string_required(object: JsonObject, key: String) -> String @511 // - fn json_int_required(object: JsonObject, key: String) -> Int @514 // - fn json_float_required(object: JsonObject, key: String) -> Float @517 // - fn json_bool_required(object: JsonObject, key: String) -> Bool @520 // - fn json_string_or(object: JsonObject, key: String, default_value: String) -> String @523 // - fn json_int_or(object: JsonObject, key: String, default_value: Int) -> Int @528 // - fn json_float_or(object: JsonObject, key: String, default_value: Float) -> Float @533 // - fn json_bool_or(object: JsonObject, key: String, default_value: Bool) -> Bool @538 // - fn json_string_field(object: JsonObject, key: String) -> JsonStringResult @543 // - fn json_int_field(object: JsonObject, key: String) -> JsonIntResult @557 // - fn json_float_field(object: JsonObject, key: String) -> JsonFloatResult @571 // - fn json_bool_field(object: JsonObject, key: String) -> JsonBoolResult @585 // - fn json_object_field(object: JsonObject, key: String) -> JsonObjectResult @599 // - fn json_array_field(object: JsonObject, key: String) -> JsonArrayResult @613, fn json_object() -> JsonObject @627 // - fn json_object_set_value(object: JsonObject, key: String, value: JsonValue) -> JsonObject @630 // - fn json_object_set_string(object: JsonObject, key: String, value: String) -> JsonObject @634 // - fn json_object_set_int(object: JsonObject, key: String, value: Int) -> JsonObject @637 // - fn json_object_set_float(object: JsonObject, key: String, value: Float) -> JsonObject @640 // - fn json_object_set_bool(object: JsonObject, key: String, value: Bool) -> JsonObject @643 // - fn json_object_set_object(object: JsonObject, key: String, value: JsonObject) -> JsonObject @646 // - fn json_object_set_array(object: JsonObject, key: String, value: JsonArray) -> JsonObject @649 // - fn json_array() -> JsonArray @652, fn json_array_push_value(array: JsonArray, value: JsonValue) -> JsonArray @655 // - fn json_array_push_string(array: JsonArray, value: String) -> JsonArray @659 // - fn json_array_push_int(array: JsonArray, value: Int) -> JsonArray @662 // - fn json_array_push_float(array: JsonArray, value: Float) -> JsonArray @665 // - fn json_array_push_bool(array: JsonArray, value: Bool) -> JsonArray @668 // - fn json_array_push_object(array: JsonArray, value: JsonObject) -> JsonArray @671 // - fn json_array_push_array(array: JsonArray, value: JsonArray) -> JsonArray @674 // - fn json_array_length(array: JsonArray) -> Int @677 // - fn json_array_value_at(array: JsonArray, index: Int) -> JsonValue @680 // - fn json_string_array(values: JsonArray) -> Array @683, fn json_int_array(values: JsonArray) -> Array @691 // - fn json_float_array(values: JsonArray) -> Array @699, fn json_bool_array(values: JsonArray) -> Array @708 // - fn json_string_array_result(values: JsonArray) -> JsonStringArrayResult @716 // - fn json_int_array_result(values: JsonArray) -> JsonIntArrayResult @735 // - fn json_float_array_result(values: JsonArray) -> JsonFloatArrayResult @754 // - fn json_bool_array_result(values: JsonArray) -> JsonBoolArrayResult @773 // - fn json_string_array_field(object: JsonObject, key: String) -> Array @792 // - fn json_string_array_field_result(object: JsonObject, key: String) -> JsonStringArrayResult @798 // - fn json_int_array_field_result(object: JsonObject, key: String) -> JsonIntArrayResult @804 // - fn json_float_array_field_result(object: JsonObject, key: String) -> JsonFloatArrayResult @810 // - fn json_bool_array_field_result(object: JsonObject, key: String) -> JsonBoolArrayResult @816 // - fn json_array_from_strings(values: Array) -> JsonArray @822 // - fn json_array_from_ints(values: Array) -> JsonArray @830 // - fn json_array_from_floats(values: Array) -> JsonArray @838 // - fn json_array_from_bools(values: Array) -> JsonArray @846 // - fn json_object_set_string_array(object: JsonObject, key: String, values: Array) -> JsonObject @854 // - fn json_object_set_int_array(object: JsonObject, key: String, values: Array) -> JsonObject @857 // - fn json_object_set_float_array(object: JsonObject, key: String, values: Array) -> JsonObject @860 // - fn json_object_set_bool_array(object: JsonObject, key: String, values: Array) -> JsonObject @863 // - fn json_object_with_string(key: String, value: String) -> JsonObject @866 // - fn json_object_with_int(key: String, value: Int) -> JsonObject @869 // - fn json_object_with_float(key: String, value: Float) -> JsonObject @872 // - fn json_object_with_bool(key: String, value: Bool) -> JsonObject @875 // - fn json_object_with_array(key: String, value: JsonArray) -> JsonObject @878 // - fn json_object_with_object(key: String, value: JsonObject) -> JsonObject @881 // - fn json_fmt_writer_push_value(writer: FmtWriter, value: JsonValue) -> FmtWriter @884 // - fn json_string_builder_push_value(builder: ptr, value: JsonValue) -> Int @887 // - fn json_scan(text: String) -> Array @890, fn json_scan_significant(text: String) -> Array @952 // - fn json_scan_report(text: String) -> JsonScanReport @962 // // ### `std::kain` (stdlib/kain.kn, public=31, private=26) // // - types: // - struct Position @61, struct Range @66, struct Location @70, enum SymbolKind @75, enum CompletionKind @91 // - enum CompileTarget @107, struct Symbol @127, struct Completion @134, struct SemanticToken @139, struct Hover @144 // - struct DiagnosticLabel @148, struct DiagnosticFixIt @154, struct Diagnostic @161, struct CheckResult @174 // - struct FormatResult @179, struct Workspace @188, struct Document @191 // - functions: // - fn open_workspace(root: String, target: CompileTarget) -> Option @375 // - fn close_workspace(ws: Workspace) -> Bool @385 // - fn open_document(ws: Workspace, path: String, source: String, version: Int) -> Option @391 // - fn update_document(doc: Document, source: String, version: Int) -> Bool @401 // - fn close_document(doc: Document) -> Bool @405, fn check_document(doc: Document) -> CheckResult @411 // - fn hover_at(doc: Document, pos_line: Int, pos_col: Int) -> Option @430 // - fn definition_at(doc: Document, pos_line: Int, pos_col: Int) -> Array @443 // - fn references_at(doc: Document, pos_line: Int, pos_col: Int) -> Array @457 // - fn completions_at(doc: Document, pos_line: Int, pos_col: Int) -> Array @471 // - fn document_symbols(doc: Document) -> Array @485 // - fn workspace_symbols(ws: Workspace, query: String) -> Array @499 // - fn semantic_tokens(doc: Document) -> Array @513, fn format_document(doc: Document) -> FormatResult @529 // // ### `std::machine` (stdlib/machine.kn, public=38, private=26) // // - functions: // - fn pause() -> Int @81, fn load_fence() -> Unit @84, fn store_fence() -> Unit @87, fn full_fence() -> Unit @90 // - fn cache_flush(address: ptr) -> Unit @93, fn spin_loop_hint() -> Unit @96, fn rdtsc() -> Int @99 // - fn cpuid_eax(leaf: Int, subleaf: Int) -> Int @102, fn cpuid_ebx(leaf: Int, subleaf: Int) -> Int @105 // - fn cpuid_ecx(leaf: Int, subleaf: Int) -> Int @108, fn cpuid_edx(leaf: Int, subleaf: Int) -> Int @111 // - fn prefetch_read(address: ptr, locality: Int) -> Unit @114 // - fn prefetch_write(address: ptr, locality: Int) -> Unit @117, fn cpu_logical_count() -> Int @120 // - fn cpu_core_count() -> Int @123, fn cpu_package_count() -> Int @126, fn cpu_cache_line_bytes() -> Int @129 // - fn current_thread_id() -> Int @132, fn current_thread_affinity_mask() -> Int @135 // - fn set_current_thread_affinity(core_index: Int) -> Int @138, fn numa_node_count() -> Int @141 // - fn numa_current_node() -> Int @144, fn numa_bind_current_thread(node_index: Int) -> Int @147 // - fn vm_page_size() -> Int @150, fn vm_reserve(byte_count: Int) -> ptr @153 // - fn vm_commit(address: ptr, byte_count: Int) -> Int @156 // - fn vm_decommit(address: ptr, byte_count: Int) -> Int @159 // - fn vm_release(address: ptr, byte_count: Int) -> Int @162 // - fn vm_lock(address: ptr, byte_count: Int) -> Int @165 // - fn vm_unlock(address: ptr, byte_count: Int) -> Int @168, fn vm_map_huge(byte_count: Int) -> ptr @171 // - fn vm_map(byte_count: Int) -> ptr @174, fn vm_unmap(address: ptr, byte_count: Int) -> Int @177 // - fn vm_protect_none(address: ptr, byte_count: Int) -> Int @180 // - fn vm_protect_read(address: ptr, byte_count: Int) -> Int @183 // - fn vm_protect_read_write(address: ptr, byte_count: Int) -> Int @186 // - fn vm_protect_execute_read(address: ptr, byte_count: Int) -> Int @189 // - fn vm_protect_execute_read_write(address: ptr, byte_count: Int) -> Int @192 // // ### `std::math` (stdlib/math.kn, public=250, private=0) // // - constants: // - const PI: Float @8, const TAU: Float @9, const HALF_PI: Float @10, const DEG_TO_RAD: Float @11 // - const RAD_TO_DEG: Float @12, const EPSILON: Float @13, const HUGE_EPSILON: Float @14 // - types: // - struct Vec3A @54, struct Quat @60, struct Mat3 @66, struct Mat4 @71, struct Affine2 @77, struct Affine3 @82 // - struct Float8 @88, struct Vec3x4 @92, struct Vec4x8 @97, struct GpuLayoutInfo @103, struct CBuffer @109 // - struct Std140 @113, struct Std430 @117, struct Std140Vec3 @121, struct Std140Mat3 @127, struct Plane @132 // - struct Ray3 @136, struct Aabb @140, struct Obb @144, struct BoundingSphere @151, struct Frustum @155 // - struct RayHit @163, struct ColorRgb @170, struct ColorRgba @175, struct Hsv @181, struct Hsl @186 // - functions: // - fn pi() -> Float @16, fn tau() -> Float @19, fn half_pi() -> Float @22, fn vec2(x: Float, y: Float) -> Vec2 @25 // - fn vec3(x: Float, y: Float, z: Float) -> Vec3 @28, fn vec4(x: Float, y: Float, z: Float, w: Float) -> Vec4 @31 // - fn math_min(a: Float, b: Float) -> Float @34, fn math_max(a: Float, b: Float) -> Float @39 // - fn math_clamp(value: Float, low: Float, high: Float) -> Float @44 // - fn math_int_clamp(value: Int, low: Int, high: Int) -> Int @47, fn degrees_to_radians(value: Float) -> Float @191 // - fn radians_to_degrees(value: Float) -> Float @194, fn saturate(value: Float) -> Float @197 // - fn sign_nonzero(value: Float) -> Float @200, fn inverse_lerp(a: Float, b: Float, value: Float) -> Float @205 // - fn lerp(a: Float, b: Float, t: Float) -> Float @211 // - fn smoothstep(edge0: Float, edge1: Float, value: Float) -> Float @214 // - fn smootherstep(edge0: Float, edge1: Float, value: Float) -> Float @218 // - fn nearly_equal(a: Float, b: Float, epsilon: Float) -> Bool @222, fn fast_sin(angle: Float) -> Float @225 // - fn fast_cos(angle: Float) -> Float @233, fn fast_atan2(y: Float, x: Float) -> Float @236 // - fn fast_acos(value: Float) -> Float @254, fn tan_scalar(value: Float) -> Float @265 // - fn fma_scalar(a: Float, b: Float, c: Float) -> Float @271, fn frac_scalar(value: Float) -> Float @274 // - fn vec2_zero() -> Vec2 @277, fn vec2_one() -> Vec2 @280, fn vec2_splat(value: Float) -> Vec2 @283 // - fn vec3_zero() -> Vec3 @286, fn vec3_one() -> Vec3 @289, fn vec3_up() -> Vec3 @292, fn vec3_right() -> Vec3 @295 // - fn vec3_forward() -> Vec3 @298, fn vec3_splat(value: Float) -> Vec3 @301, fn vec4_zero() -> Vec4 @304 // - fn vec4_one() -> Vec4 @307, fn vec4_splat(value: Float) -> Vec4 @310, fn vec2_dot(a: Vec2, b: Vec2) -> Float @313 // - fn vec3_dot(a: Vec3, b: Vec3) -> Float @316, fn vec4_dot(a: Vec4, b: Vec4) -> Float @319 // - fn vec3_cross(a: Vec3, b: Vec3) -> Vec3 @322, fn vec2_length(value: Vec2) -> Float @325 // - fn vec3_length(value: Vec3) -> Float @328, fn vec4_length(value: Vec4) -> Float @331 // - fn vec2_length_squared(value: Vec2) -> Float @334, fn vec2_add(a: Vec2, b: Vec2) -> Vec2 @337 // - fn vec2_sub(a: Vec2, b: Vec2) -> Vec2 @340, fn vec2_mul_scalar(value: Vec2, scalar: Float) -> Vec2 @343 // - fn vec2_div_scalar(value: Vec2, scalar: Float) -> Vec2 @346, fn vec2_hadamard(a: Vec2, b: Vec2) -> Vec2 @349 // - fn vec2_floor(value: Vec2) -> Vec2 @352, fn vec2_frac(value: Vec2) -> Vec2 @355 // - fn vec3_add(a: Vec3, b: Vec3) -> Vec3 @358, fn vec3_sub(a: Vec3, b: Vec3) -> Vec3 @361 // - fn vec3_mul_scalar(value: Vec3, scalar: Float) -> Vec3 @364 // - fn vec3_div_scalar(value: Vec3, scalar: Float) -> Vec3 @367, fn vec3_neg(value: Vec3) -> Vec3 @370 // - fn vec3_abs(value: Vec3) -> Vec3 @373, fn vec4_add(a: Vec4, b: Vec4) -> Vec4 @376 // - fn vec4_sub(a: Vec4, b: Vec4) -> Vec4 @379, fn vec4_mul_scalar(value: Vec4, scalar: Float) -> Vec4 @382 // - fn vec4_div_scalar(value: Vec4, scalar: Float) -> Vec4 @385, fn vec3_length_squared(value: Vec3) -> Float @388 // - fn vec4_length_squared(value: Vec4) -> Float @391, fn vec2_distance(a: Vec2, b: Vec2) -> Float @394 // - fn vec3_distance(a: Vec3, b: Vec3) -> Float @397, fn vec4_distance(a: Vec4, b: Vec4) -> Float @400 // - fn vec2_normalize_or_zero(value: Vec2) -> Vec2 @403, fn vec3_normalize_or_zero(value: Vec3) -> Vec3 @409 // - fn vec4_normalize_or_zero(value: Vec4) -> Vec4 @415, fn vec2_perp(value: Vec2) -> Vec2 @421 // - fn vec2_rotate(value: Vec2, angle: Float) -> Vec2 @424, fn vec2_lerp(a: Vec2, b: Vec2, t: Float) -> Vec2 @429 // - fn vec3_lerp(a: Vec3, b: Vec3, t: Float) -> Vec3 @432, fn vec4_lerp(a: Vec4, b: Vec4, t: Float) -> Vec4 @435 // - fn vec2_min(a: Vec2, b: Vec2) -> Vec2 @438, fn vec2_max(a: Vec2, b: Vec2) -> Vec2 @441 // - fn vec3_min(a: Vec3, b: Vec3) -> Vec3 @444, fn vec3_max(a: Vec3, b: Vec3) -> Vec3 @447 // - fn vec4_min(a: Vec4, b: Vec4) -> Vec4 @450, fn vec4_max(a: Vec4, b: Vec4) -> Vec4 @453 // - fn vec3_clamp(value: Vec3, lo: Vec3, hi: Vec3) -> Vec3 @456 // - fn vec4_clamp(value: Vec4, lo: Vec4, hi: Vec4) -> Vec4 @463, fn vec3_hadamard(a: Vec3, b: Vec3) -> Vec3 @471 // - fn vec3_floor(value: Vec3) -> Vec3 @474, fn vec3_frac(value: Vec3) -> Vec3 @477 // - fn vec4_hadamard(a: Vec4, b: Vec4) -> Vec4 @480, fn vec3_project(a: Vec3, onto: Vec3) -> Vec3 @483 // - fn vec3_reject(a: Vec3, onto: Vec3) -> Vec3 @489, fn vec3_reflect(direction: Vec3, normal: Vec3) -> Vec3 @492 // - fn vec3_refract(direction: Vec3, normal: Vec3, eta: Float) -> Vec3 @496 // - fn vec3_faceforward(normal: Vec3, incident: Vec3, reference_normal: Vec3) -> Vec3 @506 // - fn vec3a(value: Vec3) -> Vec3A @511, fn vec3a_to_vec3(value: Vec3A) -> Vec3 @514 // - fn vec3a_length(value: Vec3A) -> Float @517, fn vec3a_normalize_or_zero(value: Vec3A) -> Vec3A @520 // - fn float8_splat(value: Float) -> Float8 @531, fn vec3x4_from_vec3(a: Vec3, b: Vec3, c: Vec3, d: Vec3) -> Vec3x4 @534 // - fn vec3x4_add(a: Vec3x4, b: Vec3x4) -> Vec3x4 @541, fn vec3x4_sub(a: Vec3x4, b: Vec3x4) -> Vec3x4 @544 // - fn vec3x4_mul_scalar(a: Vec3x4, value: Float) -> Vec3x4 @547, fn vec3x4_dot(a: Vec3x4, b: Vec3x4) -> Vec4 @550 // - fn vec3x4_length_squared(value: Vec3x4) -> Vec4 @553, fn vec3x4_normalize_or_zero(value: Vec3x4) -> Vec3x4 @556 // - fn vec4x8_make(x_lo: Vec4, x_hi: Vec4, y_lo: Vec4, y_hi: Vec4, z_lo: Vec4, z_hi: Vec4, w_lo: Vec4, w_hi: Vec4) -> Vec4x8 @569 // - fn vec4x8_add(a: Vec4x8, b: Vec4x8) -> Vec4x8 @577, fn quat_identity() -> Quat @585 // - fn quat_conjugate(value: Quat) -> Quat @588, fn quat_dot(a: Quat, b: Quat) -> Float @591 // - fn quat_length(value: Quat) -> Float @594, fn quat_normalize_or_identity(value: Quat) -> Quat @597 // - fn quat_from_axis_angle(axis: Vec3, angle: Float) -> Quat @608, fn quat_mul(a: Quat, b: Quat) -> Quat @614 // - fn quat_rotate_vec3(rotation: Quat, value: Vec3) -> Vec3 @622, fn quat_nlerp(a: Quat, b: Quat, t: Float) -> Quat @629 // - fn quat_slerp(a: Quat, b: Quat, t: Float) -> Quat @638, fn mat3_identity() -> Mat3 @657 // - fn mat3_mul_vec3(transform_matrix: Mat3, value: Vec3) -> Vec3 @664 // - fn mat3_transpose(transform_matrix: Mat3) -> Mat3 @671, fn mat4_identity() -> Mat4 @678 // - fn mat4_translation(offset: Vec3) -> Mat4 @686, fn mat4_scale(scale: Vec3) -> Mat4 @694 // - fn mat4_rotation_x(angle: Float) -> Mat4 @702, fn mat4_rotation_y(angle: Float) -> Mat4 @712 // - fn mat4_rotation_z(angle: Float) -> Mat4 @722, fn mat4_from_quat(value: Quat) -> Mat4 @732 // - fn mat4_rotation_xyz(angles: Vec3) -> Mat4 @750, fn mat4_transpose(transform_matrix: Mat4) -> Mat4 @753 // - fn mat4_mul(a: Mat4, b: Mat4) -> Mat4 @761, fn mat4_transform_point(transform_matrix: Mat4, point: Vec3) -> Vec3 @770 // - fn mat4_transform_vector(transform_matrix: Mat4, vector: Vec3) -> Vec3 @780 // - fn mat4_from_trs(translation: Vec3, rotation: Quat, scale: Vec3) -> Mat4 @784 // - fn mat4_perspective(fov_y_radians: Float, aspect: Float, near_plane: Float, far_plane: Float) -> Mat4 @787 // - fn mat4_orthographic(left: Float, right: Float, bottom: Float, top: Float, near_plane: Float, far_plane: Float) -> Mat4 @797 // - fn mat4_look_at(eye: Vec3, target: Vec3, up: Vec3) -> Mat4 @808, fn affine2_identity() -> Affine2 @819 // - fn affine2_transform_point(transform: Affine2, point: Vec2) -> Vec2 @822, fn affine3_identity() -> Affine3 @828 // - fn affine3_from_trs(translation: Vec3, rotation: Quat, scale: Vec3) -> Affine3 @831 // - fn affine3_transform_point(transform: Affine3, point: Vec3) -> Vec3 @840 // - fn affine3_transform_vector(transform: Affine3, vector: Vec3) -> Vec3 @844 // - fn affine3_to_mat4(transform: Affine3) -> Mat4 @847, fn affine3_mul(a: Affine3, b: Affine3) -> Affine3 @855 // - fn align_up_int(value: Int, alignment: Int) -> Int @863 // - fn gpu_layout_info(size_bytes: Int, alignment_bytes: Int) -> GpuLayoutInfo @871 // - fn std140_vec3(value: Vec3) -> Std140 @880, fn std140_vec4(value: Vec4) -> Std140 @886 // - fn std140_mat3(value: Mat3) -> Std140 @889, fn std140_mat4(value: Mat4) -> Std140 @899 // - fn std430_vec3a(value: Vec3A) -> Std430 @902, fn std430_vec4(value: Vec4) -> Std430 @905 // - fn cbuffer_mat4(value: Mat4) -> CBuffer @908, fn std140_mat4_alignment_bytes(value: Std140) -> Int @911 // - fn std140_mat4_stride_bytes(value: Std140) -> Int @914, fn color_rgba_red(value: ColorRgba) -> Float @917 // - fn color_rgba_green(value: ColorRgba) -> Float @920, fn color_rgba_blue(value: ColorRgba) -> Float @923 // - fn color_rgba_alpha(value: ColorRgba) -> Float @926, fn ray_hit_is_hit(value: RayHit) -> Bool @929 // - fn plane_from_point_normal(point: Vec3, normal: Vec3) -> Plane @932 // - fn plane_signed_distance(plane: Plane, point: Vec3) -> Float @936, fn plane_normalize(plane: Plane) -> Plane @939 // - fn ray3(origin: Vec3, direction: Vec3) -> Ray3 @945, fn aabb_center(bounds: Aabb) -> Vec3 @948 // - fn aabb_half_extents(bounds: Aabb) -> Vec3 @951, fn aabb_expand_point(bounds: Aabb, point: Vec3) -> Aabb @954 // - fn aabb_union(a: Aabb, b: Aabb) -> Aabb @957, fn aabb_contains_point(bounds: Aabb, point: Vec3) -> Bool @960 // - fn sphere_contains_point(sphere: BoundingSphere, point: Vec3) -> Bool @964 // - fn closest_point_on_aabb(bounds: Aabb, point: Vec3) -> Vec3 @967 // - fn closest_point_on_obb(bounds: Obb, point: Vec3) -> Vec3 @970 // - fn sphere_vs_obb(sphere: BoundingSphere, bounds: Obb) -> Bool @980 // - fn ray_vs_aabb(ray: Ray3, bounds: Aabb) -> RayHit @984 // - fn ray_vs_triangle(ray: Ray3, a: Vec3, b: Vec3, c: Vec3) -> RayHit @1012 // - fn frustum_contains_point(frustum: Frustum, point: Vec3) -> Bool @1040 // - fn aabb_support_point(bounds: Aabb, normal: Vec3) -> Vec3 @1044 // - fn plane_accepts_aabb(plane: Plane, bounds: Aabb) -> Bool @1050 // - fn frustum_vs_aabb(frustum: Frustum, bounds: Aabb) -> Bool @1054 // - fn bezier_quadratic_vec2(a: Vec2, b: Vec2, c: Vec2, t: Float) -> Vec2 @1057 // - fn bezier_quadratic_vec3(a: Vec3, b: Vec3, c: Vec3, t: Float) -> Vec3 @1061 // - fn bezier_quadratic_tangent_vec3(a: Vec3, b: Vec3, c: Vec3, t: Float) -> Vec3 @1065 // - fn bezier_cubic_vec2(a: Vec2, b: Vec2, c: Vec2, d: Vec2, t: Float) -> Vec2 @1068 // - fn bezier_cubic_vec3(a: Vec3, b: Vec3, c: Vec3, d: Vec3, t: Float) -> Vec3 @1074 // - fn bezier_cubic_tangent_vec3(a: Vec3, b: Vec3, c: Vec3, d: Vec3, t: Float) -> Vec3 @1080 // - fn catmull_rom_vec3(p0: Vec3, p1: Vec3, p2: Vec3, p3: Vec3, t: Float) -> Vec3 @1085 // - fn catmull_rom_tangent_vec3(p0: Vec3, p1: Vec3, p2: Vec3, p3: Vec3, t: Float) -> Vec3 @1096 // - fn bspline_cubic_vec3(p0: Vec3, p1: Vec3, p2: Vec3, p3: Vec3, t: Float) -> Vec3 @1104 // - fn color_rgb(r: Float, g: Float, b: Float) -> ColorRgb @1113 // - fn color_rgba(r: Float, g: Float, b: Float, a: Float) -> ColorRgba @1116 // - fn color_rgb_to_vec3(value: ColorRgb) -> Vec3 @1119, fn color_rgba_to_vec4(value: ColorRgba) -> Vec4 @1122 // - fn srgb_to_linear_scalar(value: Float) -> Float @1125, fn linear_to_srgb_scalar(value: Float) -> Float @1131 // - fn srgb_to_linear(color: Vec3) -> Vec3 @1137, fn linear_to_srgb(color: Vec3) -> Vec3 @1144 // - fn rgb_to_hsv(rgb: Vec3) -> Hsv @1151, fn hsv_to_rgb(hsv: Hsv) -> Vec3 @1169, fn rgb_to_hsl(rgb: Vec3) -> Hsl @1186 // - fn hsl_to_rgb(hsl: Hsl) -> Vec3 @1204, fn tonemap_aces(color: Vec3) -> Vec3 @1221 // - fn tonemap_reinhard(color: Vec3) -> Vec3 @1237, fn tonemap_uncharted2(color: Vec3) -> Vec3 @1244 // - fn pack_unorm8(value: Float) -> Int @1259, fn pack_unorm4x8(value: Vec4) -> Int @1262 // - fn pack_rgba_to_u32(value: ColorRgba) -> Int @1269, fn unpack_u32_to_rgba(packed: Int) -> ColorRgba @1272 // - fn hash11(x: Float) -> Float @1284, fn hash22(p: Vec2) -> Vec2 @1287, fn hash33(p: Vec3) -> Vec3 @1294 // - fn pcg32_step(state: Int) -> Int @1306, fn noise2(p: Vec2) -> Float @1309, fn noise3(p: Vec3) -> Float @1321 // - fn fbm2(p: Vec2, octaves: Int) -> Float @1341, fn fbm3(p: Vec3, octaves: Int) -> Float @1353 // - fn worley_noise(uv: Vec2, scale: Float, randomness: Float, seed: Float) -> Float @1369 // - fn blue_noise_dither_approx(pixel_x: Int, pixel_y: Int, frame: Int) -> Float @1389 // // ### `std::mcp` (stdlib/mcp.kn, public=73, private=10) // // - constants: // - const MCP_PROTOCOL_VERSION: String @23, const MCP_JSONRPC_VERSION: String @24, const MCP_ERROR_PARSE: Int @27 // - const MCP_ERROR_INVALID_REQUEST: Int @28, const MCP_ERROR_METHOD_NOT_FOUND: Int @29 // - const MCP_ERROR_INVALID_PARAMS: Int @30, const MCP_ERROR_INTERNAL: Int @31, const MCP_ERROR_TOOL_NOT_FOUND: Int @34 // - const MCP_ERROR_RESOURCE_NOT_FOUND: Int @35, const MCP_ERROR_PROMPT_NOT_FOUND: Int @36 // - const MCP_LOG_DEBUG: String @396, const MCP_LOG_INFO: String @397, const MCP_LOG_NOTICE: String @398 // - const MCP_LOG_WARNING: String @399, const MCP_LOG_ERROR: String @400, const MCP_LOG_CRITICAL: String @401 // - const MCP_LOG_ALERT: String @402, const MCP_LOG_EMERGENCY: String @403 // - types: // - struct McpServer @42, struct McpToolDef @47, struct McpCallResult @52, struct McpResourceDef @56 // - struct McpPromptDef @62, struct McpRequest @67 // - functions: // - fn mcp_server_new(name: String, version: String) -> McpServer @79 // - fn mcp_server_with_instructions(name: String, version: String, instructions: String) -> McpServer @86 // - fn mcp_tool_def(name: String, description: String, schema_json: String) -> McpToolDef @99 // - fn mcp_tool_def_no_args(name: String, description: String) -> McpToolDef @107 // - fn mcp_resource_def(uri: String, name: String, description: String, mime_type: String) -> McpResourceDef @115 // - fn mcp_prompt_def(name: String, description: String) -> McpPromptDef @124 // - fn mcp_build_response(id_value: JsonValue, result: JsonObject) -> JsonObject @149 // - fn mcp_build_error(id_value: JsonValue, code: Int, message: String) -> JsonObject @157 // - fn mcp_build_notification(method: String, params: JsonObject) -> JsonObject @168 // - fn mcp_build_initialize_result(server: McpServer, supports_tools: Bool, supports_resources: Bool, supports_prompts: Bool, supports_logging: Bool) -> JsonObject @180 // - fn mcp_build_tools_list(tools: Array) -> JsonObject @225 // - fn mcp_build_resources_list(resources: Array) -> JsonObject @241 // - fn mcp_build_prompts_list(prompts: Array) -> JsonObject @257 // - fn mcp_json_escape(s: String) -> String @274, fn mcp_content_text(text: String) -> String @304 // - fn mcp_content_image(base64_data: String, mime_type: String) -> String @308 // - fn mcp_content_audio(base64_data: String, mime_type: String) -> String @312 // - fn mcp_content_embedded_resource_text(uri: String, mime_type: String, text: String) -> String @316 // - fn mcp_content_embedded_resource_blob(uri: String, mime_type: String, blob_base64: String) -> String @320 // - fn mcp_content_array_text(text: String) -> String @324 // - fn mcp_content_array_image(base64_data: String, mime_type: String) -> String @328 // - fn mcp_content_array_audio(base64_data: String, mime_type: String) -> String @332 // - fn mcp_content_array_embedded_resource_text(uri: String, mime_type: String, text: String) -> String @336 // - fn mcp_content_array_embedded_resource_blob(uri: String, mime_type: String, blob_base64: String) -> String @340 // - fn mcp_text_result(text: String) -> McpCallResult @347, fn mcp_error_result(message: String) -> McpCallResult @353 // - fn mcp_image_result(base64_data: String, mime_type: String) -> McpCallResult @359 // - fn mcp_build_call_result_parts(content_json: String, is_error: Bool) -> JsonObject @366 // - fn mcp_build_call_result(cr: McpCallResult) -> JsonObject @372, fn mcp_read_message() -> String @380 // - fn mcp_write_message(msg: String) -> Unit @385, fn mcp_write_response(obj: JsonObject) -> Unit @389 // - fn mcp_log(level: String, message: String) -> Unit @405, fn mcp_debug(msg: String) -> Unit @408 // - fn mcp_info(msg: String) -> Unit @411, fn mcp_warn(msg: String) -> Unit @414 // - fn mcp_error_log(msg: String) -> Unit @417, fn mcp_run_stdio(server: McpServer, tools: Array) -> Int @431 // - fn mcp_read_request() -> McpRequest @518, fn mcp_send_response(req: McpRequest, result: JsonObject) -> Unit @547 // - fn mcp_send_error(req: McpRequest, code: Int, message: String) -> Unit @552 // - fn mcp_is_initialize(req: McpRequest) -> Bool @557, fn mcp_is_tools_list(req: McpRequest) -> Bool @561 // - fn mcp_is_tools_call(req: McpRequest) -> Bool @565, fn mcp_is_ping(req: McpRequest) -> Bool @569 // - fn mcp_is_notification(req: McpRequest) -> Bool @573, fn mcp_is_eof(req: McpRequest) -> Bool @577 // - fn mcp_tool_call_name(req: McpRequest) -> String @585, fn mcp_tool_call_args(req: McpRequest) -> JsonObject @594 // // ### `std::memory` (stdlib/memory.kn, public=19, private=5) // // - functions: // - fn volatile_load_int(address: ptr) -> Int @9, fn volatile_store_int(address: ptr, value: Int) -> Int @12 // - fn atomic_load_relaxed(address: ptr) -> Int @16, fn atomic_load_acquire(address: ptr) -> Int @19 // - fn atomic_load_seqcst(address: ptr) -> Int @22, fn atomic_store_relaxed(address: ptr, value: Int) -> Int @25 // - fn atomic_store_release(address: ptr, value: Int) -> Int @29 // - fn atomic_store_seqcst(address: ptr, value: Int) -> Int @33 // - fn atomic_add_acqrel(address: ptr, value: Int) -> Int @37 // - fn atomic_sub_acqrel(address: ptr, value: Int) -> Int @40 // - fn atomic_and_acqrel(address: ptr, value: Int) -> Int @43 // - fn atomic_or_acqrel(address: ptr, value: Int) -> Int @46 // - fn atomic_xor_acqrel(address: ptr, value: Int) -> Int @49 // - fn atomic_exchange_acqrel(address: ptr, value: Int) -> Int @52 // - fn atomic_compare_exchange_seqcst(address: ptr, expected: Int, desired: Int) -> Bool @55 // - fn atomic_fence_acquire() -> Int @58, fn atomic_fence_release() -> Int @62, fn atomic_fence_acqrel() -> Int @66 // - fn atomic_fence_seqcst() -> Int @70 // // ### `std::mmio` (stdlib/mmio.kn, public=20, private=0) // // - constants: // - const MMIO_ACCESS_RO: Int @4, const MMIO_ACCESS_WO: Int @5, const MMIO_ACCESS_RW: Int @6 // - const MMIO_ACCESS_W1C: Int @7, const MMIO_ENDIAN_NATIVE: Int @9, const MMIO_ENDIAN_LITTLE: Int @10 // - const MMIO_ENDIAN_BIG: Int @11 // - functions: // - fn mmio_bit_mask(width: Int) -> Int @13, fn mmio_field_get(word: Int, bit_offset: Int, width: Int) -> Int @20 // - fn mmio_field_set(word: Int, bit_offset: Int, width: Int, value: Int) -> Int @23 // - fn mmio_field_w1c(word: Int, bit_offset: Int, width: Int, clear_bits: Int) -> Int @29 // - fn mmio_swap16(value: Int) -> Int @33, fn mmio_swap32(value: Int) -> Int @36 // - fn mmio_to_little32(value: Int) -> Int @43, fn mmio_from_little32(value: Int) -> Int @46 // - fn mmio_to_big32(value: Int) -> Int @49, fn mmio_from_big32(value: Int) -> Int @52 // - fn mmio_read_int(address: ptr) -> Int @55, fn mmio_write_int(address: ptr, value: Int) -> Int @61 // - fn mmio_write_one_to_clear(address: ptr, bit_offset: Int, width: Int, clear_bits: Int) -> Int @67 // // ### `std::net` (stdlib/net.kn, public=58, private=51) // // - functions: // - fn net_reset() -> Int @156, fn net_platform_available() -> Int @159, fn net_platform_name() -> String @162 // - fn net_capability_state(capability_key: String) -> Int @165 // - fn net_capability_supported(capability_key: String) -> Bool @168 // - fn net_capability_available(capability_key: String) -> Bool @171 // - fn tcp_connect(host: String, port: Int, timeout_ms: Int) -> Int @174 // - fn tcp_listen(host: String, port: Int) -> Int @177, fn tcp_listener_local_port(listener_id: Int) -> Int @180 // - fn tcp_accept(listener_id: Int, timeout_ms: Int) -> Int @183, fn tcp_read_text(connection_id: Int) -> String @186 // - fn tcp_buffered_reader(connection_id: Int, capacity: Int) -> BufferedReader @189 // - fn tcp_read_hex(connection_id: Int) -> String @192, fn tcp_write_text(connection_id: Int, payload: String) -> Int @195 // - fn tcp_write_buffered_text(connection_id: Int, writer: BufferedWriter) -> Int @198 // - fn tcp_write_hex(connection_id: Int, payload_hex: String) -> Int @201, fn tcp_close(connection_id: Int) -> Int @204 // - fn tcp_listener_close(listener_id: Int) -> Int @207, fn http_request_create(method: String, url: String) -> Int @210 // - fn http_request_set_header(request_id: Int, key: String, value: String) -> Int @213 // - fn http_request_set_body_text(request_id: Int, payload: String) -> Int @216 // - fn http_request_set_body_hex(request_id: Int, payload_hex: String) -> Int @219 // - fn http_request_set_timeout(request_id: Int, timeout_ms: Int) -> Int @222 // - fn http_request_set_protocol(request_id: Int, protocol_name: String) -> Int @225 // - fn http_request_protocol(request_id: Int) -> String @228, fn http_client_send(request_id: Int) -> Int @231 // - fn http_response_status(response_id: Int) -> Int @234, fn http_response_protocol(response_id: Int) -> String @237 // - fn http_response_header(response_id: Int, key: String) -> String @240 // - fn http_response_body_text(response_id: Int) -> String @243 // - fn http_response_body_hex(response_id: Int) -> String @246, fn http_request_destroy(request_id: Int) -> Int @249 // - fn http_response_destroy(response_id: Int) -> Int @252, fn http_server_create(host: String, port: Int) -> Int @255 // - fn http_server_create_localhost(port: Int) -> Int @258, fn http_server_listen(server_id: Int) -> Int @261 // - fn http_server_local_port(server_id: Int) -> Int @264 // - fn http_route_actor(server_id: Int, method: String, path: String, actor_id: Int, message_kind: String) -> Int @267 // - fn http_server_pump(server_id: Int, timeout_ms: Int) -> Int @270 // - fn http_server_pump_batch(server_id: Int, timeout_ms: Int, max_requests: Int) -> Int @273 // - fn http_server_pending_request_count(server_id: Int) -> Int @276 // - fn http_server_next_request(server_id: Int) -> Int @279 // - fn http_request_method(incoming_request_id: Int) -> String @282 // - fn http_request_path(incoming_request_id: Int) -> String @285 // - fn http_request_query(incoming_request_id: Int) -> String @288 // - fn http_request_header(incoming_request_id: Int, key: String) -> String @291 // - fn http_request_body_text(incoming_request_id: Int) -> String @294 // - fn http_request_body_hex(incoming_request_id: Int) -> String @297 // - fn http_respond_text(incoming_request_id: Int, status_code: Int, payload: String) -> Int @300 // - fn http_respond_hex(incoming_request_id: Int, status_code: Int, payload_hex: String) -> Int @303 // - fn http_response_set_header_for_request(incoming_request_id: Int, key: String, value: String) -> Int @306 // - fn http_server_close(server_id: Int) -> Int @309, fn http_local_url(port: Int, path: String) -> String @312 // - fn http_get_text(url: String) -> String @315, fn http_post_text(url: String, payload: String) -> String @320 // - fn net_last_status() -> Int @326, fn net_last_error_kind() -> String @329, fn net_last_error_message() -> String @332 // // ### `std::os` (stdlib/os.kn, public=127, private=38) // // - constants: // - const OS_SEP: String @156, const OS_ALT_SEP: String @157, const OS_LINESEP: String @158, const OS_PATHSEP: String @159 // - const OS_DEVNULL: String @160, const MMAP_PROT_NONE: Int @737, const MMAP_PROT_READ: Int @738 // - const MMAP_PROT_WRITE: Int @739, const MMAP_PROT_RW: Int @740, const MMAP_PROT_EXEC: Int @741 // - const MMAP_PROT_RX: Int @742, const MMAP_PROT_RWX: Int @743, const MMAP_SHARED: Int @746, const MMAP_PRIVATE: Int @747 // - const MMAP_FIXED: Int @748, const MMAP_HUGETLB: Int @749, const MADV_NORMAL: Int @752, const MADV_RANDOM: Int @753 // - const MADV_SEQUENTIAL: Int @754, const MADV_WILLNEED: Int @755, const MADV_DONTNEED: Int @756 // - const MADV_FREE: Int @757, const MADV_HUGEPAGE: Int @758, const WNOHANG: Int @850, const WUNTRACED: Int @851 // - const WCONTINUED: Int @852 // - types: // - enum OsKind @163, enum ArchKind @171, struct OsUname @251, struct OsDirEntry @342, struct OsStatResult @427 // - struct OsTerminalSize @600, struct OsFile @631, struct OsError @662 // - functions: // - fn os_name() -> String @178, fn os_platform_name() -> String @189, fn os_arch_name() -> String @200 // - fn os_is_windows() -> Bool @214, fn os_is_linux() -> Bool @222, fn os_is_macos() -> Bool @230 // - fn os_is_wasi() -> Bool @238, fn os_is_64bit() -> Bool @246, fn os_uname() -> OsUname @258 // - fn os_getenv(key: String) -> String @288, fn os_getenv_default(key: String, default_value: String) -> String @291 // - fn os_setenv(key: String, value: String) -> Bool @298, fn os_unsetenv(key: String) -> Bool @301 // - fn os_getpid() -> Int @309, fn os_getppid() -> Int @312, fn os_getlogin() -> String @315, fn os_getuid() -> Int @318 // - fn os_getgid() -> Int @321, fn os_getcwd() -> String @329, fn os_chdir(path: String) -> Bool @332 // - fn os_listdir(path: String) -> Array @351, fn os_scandir(path: String) -> Array @369 // - fn os_mkdir(path: String) -> Bool @403, fn os_makedirs(path: String) -> Bool @406 // - fn os_remove(path: String) -> Bool @410, fn os_rmdir(path: String) -> Bool @413 // - fn os_removedirs(path: String) -> Bool @416, fn os_rename(src: String, dst: String) -> Bool @420 // - fn os_replace(src: String, dst: String) -> Bool @423, fn os_stat(path: String) -> OsStatResult @437 // - fn os_symlink(src: String, dst: String) -> Bool @499, fn os_readlink(path: String) -> String @502 // - fn os_exists(path: String) -> Bool @506, fn os_isfile(path: String) -> Bool @509 // - fn os_isdir(path: String) -> Bool @512, fn os_tmpfile(prefix: String) -> String @516 // - fn os_tmpdir(prefix: String) -> String @519, fn os_read_text(path: String) -> String @523 // - fn os_write_text(path: String, content: String) -> Bool @526 // - fn os_append_text(path: String, content: String) -> Bool @530 // - fn os_atomic_write_text(path: String, content: String) -> Bool @534, fn os_system(command: String) -> Int @543 // - fn os_popen_read(command: String, timeout_ms: Int) -> String @556 // - fn os_popen_status(command: String, timeout_ms: Int) -> Int @568, fn os_cpu_count() -> Int @577 // - fn os_cpu_core_count() -> Int @580, fn os_cpu_package_count() -> Int @583 // - fn os_urandom(byte_count: Int) -> String @587, fn os_urandom_bytes(byte_count: Int) -> Array @590 // - fn os_get_terminal_size() -> OsTerminalSize @604, fn os_getpagesize() -> Int @613 // - fn os_sleep_millis(ms: Int) -> Unit @620, fn os_now_millis() -> Int @623 // - fn os_open(path: String, mode: String) -> OsFile @636, fn os_close(file: OsFile) -> Int @640 // - fn os_read(file: OsFile, buffer: ptr, byte_count: Int) -> Int @643 // - fn os_write(file: OsFile, buffer: ptr, byte_count: Int) -> Int @646 // - fn os_seek(file: OsFile, offset: Int, origin: Int) -> Int @649, fn os_tell(file: OsFile) -> Int @652 // - fn os_flush(file: OsFile) -> Int @655, fn os_last_error() -> OsError @667 // - fn os_syscall(sysno: Int, a1: Int, a2: Int, a3: Int, a4: Int, a5: Int, a6: Int) -> Int @706 // - fn os_syscall0(nr: Int) -> Int @709, fn os_syscall1(nr: Int, a1: Int) -> Int @712 // - fn os_syscall2(nr: Int, a1: Int, a2: Int) -> Int @715, fn os_syscall3(nr: Int, a1: Int, a2: Int, a3: Int) -> Int @718 // - fn os_syscall4(nr: Int, a1: Int, a2: Int, a3: Int, a4: Int) -> Int @721 // - fn os_syscall5(nr: Int, a1: Int, a2: Int, a3: Int, a4: Int, a5: Int) -> Int @724 // - fn os_syscall6(nr: Int, a1: Int, a2: Int, a3: Int, a4: Int, a5: Int, a6: Int) -> Int @727 // - fn os_mmap_anon(byte_count: Int) -> Int @761, fn os_mmap_anon_prot(byte_count: Int, prot: Int) -> Int @764 // - fn os_mmap_anon_flags(byte_count: Int, prot: Int, flags: Int) -> Int @767 // - fn os_mmap_file(byte_count: Int, prot: Int, flags: Int, fd: Int, offset: Int) -> Int @771 // - fn os_mmap_file_read(path: String) -> (Int, Int) @774, fn os_munmap(addr: Int, byte_count: Int) -> Bool @789 // - fn os_mprotect(addr: Int, byte_count: Int, prot: Int) -> Bool @793 // - fn os_make_rwx(addr: Int, byte_count: Int) -> Bool @796, fn os_make_rx(addr: Int, byte_count: Int) -> Bool @799 // - fn os_madvise(addr: Int, byte_count: Int, advice: Int) -> Bool @803 // - fn os_madvise_sequential(addr: Int, byte_count: Int) -> Bool @806 // - fn os_madvise_willneed(addr: Int, byte_count: Int) -> Bool @809 // - fn os_madvise_dontneed(addr: Int, byte_count: Int) -> Bool @812 // - fn os_madvise_hugepage(addr: Int, byte_count: Int) -> Bool @815, fn os_msync(addr: Int, byte_count: Int) -> Bool @819 // - fn os_mlock(addr: Int, byte_count: Int) -> Bool @822, fn os_munlock(addr: Int, byte_count: Int) -> Bool @825 // - fn os_fork() -> Int @834, fn os_execve(path: String, argv: Array, envp: Array) -> Int @838 // - fn os_waitpid(pid: Int, options: Int) -> Int @845, fn os_waitpid_block(pid: Int) -> (Int, Int) @854 // - fn os_waitpid_nohang(pid: Int) -> (Int, Int) @864, fn os_io_uring_setup(entries: Int) -> Int @883 // - fn os_io_uring_enter(ring_fd: Int, to_submit: Int, min_complete: Int) -> Int @886 // // ### `std::os_path` (stdlib/os_path.kn, public=32, private=6) // // - functions: // - fn os_path_sep() -> String @28, fn os_path_altsep() -> String @31, fn os_path_extsep() -> String @41 // - fn os_path_pathsep() -> String @44, fn os_path_devnull() -> String @47 // - fn os_path_join(a: String, b: String) -> String @60, fn os_path_split(path: String) -> (String, String) @64 // - fn os_path_dirname(path: String) -> String @70, fn os_path_basename(path: String) -> String @73 // - fn os_path_splitext(path: String) -> (String, String) @78 // - fn os_path_splitdrive(path: String) -> (String, String) @103 // - fn os_path_commonpath(paths: Array) -> String @111, fn os_path_normpath(path: String) -> String @194 // - fn os_path_abspath(path: String) -> String @237, fn os_path_relpath(path: String, start: String) -> String @249 // - fn os_path_realpath(path: String) -> String @288, fn os_path_isabs(path: String) -> Bool @296 // - fn os_path_exists(path: String) -> Bool @299, fn os_path_isfile(path: String) -> Bool @302 // - fn os_path_isdir(path: String) -> Bool @305, fn os_path_ismount(path: String) -> Bool @309 // - fn os_path_islink(path: String) -> Bool @325, fn os_path_samefile(path_a: String, path_b: String) -> Bool @331 // - fn os_path_getsize(path: String) -> Int @340, fn os_path_getmtime(path: String) -> Int @344 // - fn os_path_getctime(path: String) -> Int @348, fn os_path_getatime(path: String) -> Int @352 // - fn os_path_expanduser(path: String) -> String @361, fn os_path_expandvars(path: String) -> String @392 // - fn os_path_with_suffix(path: String, suffix: String) -> String @457 // - fn os_path_with_name(path: String, name: String) -> String @462 // - fn os_path_with_stem(path: String, stem: String) -> String @469 // // ### `std::path` (stdlib/path.kn, public=11, private=0) // // - functions: // - fn path_sep() -> String @3, fn path_delimiter() -> String @11, fn path_is_absolute(path: String) -> Bool @19 // - fn path_join(base: String, child: String) -> String @35, fn path_parent(path: String) -> String @52 // - fn path_file_name(path: String) -> String @66, fn path_extension(path: String) -> String @78 // - fn path_stem(path: String) -> String @102, fn path_normalize(path: String) -> String @126 // - fn path_canonicalize(path: String) -> String @193, fn path_split(path: String) -> Array @260 // // ### `std::platform` (stdlib/platform.kn, public=24, private=12) // // - functions: // - fn native_platform_current_kind() -> Int @37, fn native_platform_current_name() -> String @40 // - fn native_platform_current_service_mask() -> Int @43, fn native_platform_current_optional_service_mask() -> Int @46 // - fn native_platform_library_open(path: String) -> Int @49, fn native_platform_library_close(handle: Int) -> Int @52 // - fn native_platform_library_resolve(handle: Int, symbol_name: String) -> Int @55 // - fn native_platform_library_is_valid(handle: Int) -> Bool @58, fn native_platform_library_live_count() -> Int @61 // - fn native_platform_library_last_status() -> Int @64, fn native_platform_library_last_error_kind() -> String @67 // - fn native_platform_library_last_error_message() -> String @70, fn platform_current_kind() -> Int @74 // - fn platform_current_name() -> String @77, fn platform_current_service_mask() -> Int @80 // - fn platform_current_optional_service_mask() -> Int @83, fn platform_library_open(path: String) -> Int @86 // - fn platform_library_close(handle: Int) -> Int @89 // - fn platform_library_resolve(handle: Int, symbol_name: String) -> Int @92 // - fn platform_library_is_valid(handle: Int) -> Bool @95, fn platform_library_live_count() -> Int @98 // - fn platform_library_last_status() -> Int @101, fn platform_library_last_error_kind() -> String @104 // - fn platform_library_last_error_message() -> String @107 // // ### `std::process` (stdlib/process.kn, public=63, private=52) // // - functions: // - fn process_stdio_inherit() -> String @158, fn process_stdio_pipe() -> String @161 // - fn process_stdio_null() -> String @164, fn process_reset() -> Int @167, fn process_platform_available() -> Int @170 // - fn process_args() -> Array @190, fn process_user_args() -> Array @199 // - fn process_arg_count() -> Int @213, fn process_arg(index: Int) -> String @216 // - fn process_current_working_directory() -> String @219, fn process_environment(key: String) -> String @222 // - fn process_current_executable_path() -> String @225, fn process_current_executable_name() -> String @228 // - fn process_current_id() -> Int @231, fn process_spec_create(executable: String) -> Int @234 // - fn process_spec_destroy(spec_id: Int) -> Int @237, fn process_spec_count() -> Int @240 // - fn process_spec_add_arg(spec_id: Int, argument: String) -> Int @243 // - fn process_spec_set_cwd(spec_id: Int, cwd_path: String) -> Int @246 // - fn process_spec_set_env(spec_id: Int, key: String, value: String) -> Int @249 // - fn process_spec_set_inherit_environment(spec_id: Int, enabled: Int) -> Int @252 // - fn process_spec_set_stdio_modes(spec_id: Int, stdin_mode: String, stdout_mode: String, stderr_mode: String) -> Int @255 // - fn process_spec_set_pipe_stdio(spec_id: Int) -> Int @264, fn process_spec_create_piped(executable: String) -> Int @267 // - fn process_spawn(spec_id: Int) -> Int @272, fn process_spawn_pty(spec_id: Int, columns: Int, rows: Int) -> Int @275 // - fn process_count() -> Int @278, fn process_close(process_id: Int) -> Int @281 // - fn process_poll(process_id: Int) -> Int @284, fn process_wait(process_id: Int, timeout_ms: Int) -> Int @287 // - fn process_is_running(process_id: Int) -> Int @290, fn process_exit_code(process_id: Int) -> Int @293 // - fn process_os_pid(process_id: Int) -> Int @296, fn process_terminate(process_id: Int) -> Int @299 // - fn process_kill(process_id: Int) -> Int @302, fn process_stdin_write_text(process_id: Int, text: String) -> Int @305 // - fn process_stdin_write_hex(process_id: Int, bytes_hex: String) -> Int @308 // - fn process_stdin_close(process_id: Int) -> Int @311, fn process_stdout_read_text(process_id: Int) -> String @314 // - fn process_stdout_buffered_reader(process_id: Int, capacity: Int) -> BufferedReader @317 // - fn process_stdout_read_hex(process_id: Int) -> String @320 // - fn process_stderr_read_text(process_id: Int) -> String @323 // - fn process_stderr_buffered_reader(process_id: Int, capacity: Int) -> BufferedReader @326 // - fn process_stderr_read_hex(process_id: Int) -> String @329 // - fn process_stdout_capture_text(process_id: Int) -> String @332 // - fn process_stdout_capture_hex(process_id: Int) -> String @335 // - fn process_stderr_capture_text(process_id: Int) -> String @338 // - fn process_stderr_capture_hex(process_id: Int) -> String @341 // - fn process_pty_write_text(process_id: Int, text: String) -> Int @344 // - fn process_stdin_write_buffered_text(process_id: Int, writer: BufferedWriter) -> Int @347 // - fn process_pty_write_hex(process_id: Int, bytes_hex: String) -> Int @350 // - fn process_pty_write_buffered_text(process_id: Int, writer: BufferedWriter) -> Int @353 // - fn process_pty_resize(process_id: Int, columns: Int, rows: Int) -> Int @356 // - fn process_pty_read_text(process_id: Int) -> String @359 // - fn process_pty_buffered_reader(process_id: Int, capacity: Int) -> BufferedReader @362 // - fn process_pty_read_hex(process_id: Int) -> String @365, fn process_pty_capture_text(process_id: Int) -> String @368 // - fn process_pty_capture_hex(process_id: Int) -> String @371 // - fn process_output_text(executable: String, arg0: String, arg1: String, arg2: String, timeout_ms: Int) -> String @374 // - fn process_collect_output_until_exit(process_id: Int, timeout_ms: Int, poll_sleep_ms: Int) -> Int @377 // - fn process_last_status() -> Int @392, fn process_last_error_kind() -> String @395 // - fn process_last_error_message() -> String @398 // // ### `std::proof` (stdlib/proof.kn, public=49, private=14) // // - constants: // - const PROOF_STATUS_SKIP: Int @4, const PROOF_STATUS_PROVED: Int @5, const PROOF_STATUS_WITNESS: Int @6 // - const PROOF_STATUS_UNKNOWN: Int @7, const PROOF_EXPECT_ANY: Int @8, const PROOF_BACKEND_Z3: String @9 // - types: // - struct ProofOutcome @11, struct ProofExpectation @18, struct ProofCase @23, struct ProofAssessment @32 // - struct ProofSuiteSummary @38 // - functions: // - fn proof_status_name(status: Int) -> String @48, fn proof_expectation(expected_status: Int) -> ProofExpectation @61 // - fn proof_expect_any() -> ProofExpectation @68, fn proof_expect_proved() -> ProofExpectation @71 // - fn proof_expect_witness() -> ProofExpectation @74, fn proof_expect_unknown() -> ProofExpectation @77 // - fn proof_expectation_allow_skip(expectation: ProofExpectation) -> ProofExpectation @80 // - fn proof_outcome(status: Int, label: String, detail: String, evidence: String, model: String) -> ProofOutcome @94 // - fn proof_skip(label: String, reason: String) -> ProofOutcome @103 // - fn proof_proved(label: String, evidence: String) -> ProofOutcome @106 // - fn proof_witness(label: String, evidence: String, model: String) -> ProofOutcome @109 // - fn proof_unknown(label: String, detail: String, evidence: String) -> ProofOutcome @112 // - fn proof_outcome_is_skip(outcome: ProofOutcome) -> Bool @115 // - fn proof_outcome_is_proved(outcome: ProofOutcome) -> Bool @118 // - fn proof_outcome_is_witness(outcome: ProofOutcome) -> Bool @121 // - fn proof_outcome_is_unknown(outcome: ProofOutcome) -> Bool @124 // - fn proof_outcome_summary(outcome: ProofOutcome) -> String @127, fn proof_case(label: String) -> ProofCase @136 // - fn proof_proved_case(label: String) -> ProofCase @147, fn proof_witness_case(label: String) -> ProofCase @150 // - fn proof_case_summary(spec: ProofCase) -> String @213 // - fn proof_case_accepts(spec: ProofCase, outcome: ProofOutcome) -> Bool @223 // - fn proof_case_outcome_from_result(spec: ProofCase, backend_subject: Any, result: Any) -> ProofOutcome @230 // - fn proof_case_outcome(spec: ProofCase, backend_subject: Any) -> ProofOutcome @239 // - fn proof_case_assess(spec: ProofCase, outcome: ProofOutcome) -> ProofAssessment @246 // - fn proof_case_check_result(spec: ProofCase, backend_subject: Any, result: Any) -> ProofAssessment @264 // - fn proof_case_check(spec: ProofCase, backend_subject: Any) -> ProofAssessment @267 // - fn proof_assessment_ok(assessment: ProofAssessment) -> Bool @270 // - fn proof_assessment_summary(assessment: ProofAssessment) -> String @273 // - fn proof_suite_summary(label: String, assessments: Array) -> ProofSuiteSummary @276 // - fn proof_suite_ok(summary: ProofSuiteSummary) -> Bool @310 // - fn proof_suite_summary_text(summary: ProofSuiteSummary) -> String @313 // - fn proof_check_result(label: String, solver: Any, result: Any) -> ProofOutcome @322 // - fn proof_check(label: String, solver: Any) -> ProofOutcome @330, fn proof_task(id: String) -> BuildTaskSpec @333 // - fn proof_obligation(id: String) -> BuildTaskSpec @336, fn z3_proof(id: String) -> BuildTaskSpec @339 // - fn proof_smt2(id: String, entry: String) -> BuildTaskSpec @342 // // ### `std::python` (stdlib/python.kn, public=78, private=51) // // - functions: // - fn python_bootstrap() @127, fn python_exec(code: String) @130, fn python_eval(code: String) -> Any @133 // - fn python_eval_raw(code: String) -> Any @136, fn python_import(name: String) -> Any @139 // - fn python_module_available(name: String) -> Bool @142, fn python_require_module(name: String) -> Any @146 // - fn python_region_begin() -> Any @150, fn python_region_end(region: Any) -> Int @153 // - fn python_region_import(region: Any, name: String) -> Any @156 // - fn python_region_getattr(region: Any, target: Any, name: String) -> Any @159 // - fn python_region_getattr_raw(region: Any, target: Any, name: String) -> Any @162 // - fn python_region_bind_attr(region: Any, target: Any, name: String) -> Any @165 // - fn python_region_call_raw(region: Any, target: Any, args: Any) -> Any @168 // - fn python_region_call_attr_raw(region: Any, target: Any, attr: String, args: Any) -> Any @171 // - fn python_region_call_raw_f64_trunc_i64(region: Any, target: Any, arg: Float) -> Int @174 // - fn python_region_call_attr_raw_f64_trunc_i64(region: Any, target: Any, attr: String, arg: Float) -> Int @177 // - fn python_region_buffer_view(region: Any, target: Any) -> Any @180 // - fn python_region_buffer_view_checksum37(region: Any, target: Any, iterations: Int, modulus: Int) -> Int @183 // - fn python_region_import_cache_hits(region: Any) -> Int @186 // - fn python_region_import_cache_misses(region: Any) -> Int @189 // - fn python_region_attr_cache_hits(region: Any) -> Int @192, fn python_region_attr_cache_misses(region: Any) -> Int @195 // - fn python_region_views_opened(region: Any) -> Int @198, fn python_region_views_released(region: Any) -> Int @201 // - fn python_region_call_count(region: Any) -> Int @204, fn python_region_generic_call_count(region: Any) -> Int @207 // - fn python_region_fast_call_count(region: Any) -> Int @210, fn python_buffer_view(target: Any) -> Any @213 // - fn python_buffer_view_byte_length(view: Any) -> Int @216, fn python_buffer_view_element_count(view: Any) -> Int @219 // - fn python_buffer_view_element_size(view: Any) -> Int @222, fn python_buffer_view_c_contiguous(view: Any) -> Int @225 // - fn python_buffer_view_writable(view: Any) -> Int @228, fn python_buffer_view_release(view: Any) @231 // - fn python_call(target: Any, args: Any) -> Any @234 // - fn python_call_kwargs(target: Any, args: Any, kwargs: Any) -> Any @237 // - fn python_call_attr(target: Any, attr: String, args: Any) -> Any @240 // - fn python_call_attr_kwargs(target: Any, attr: String, args: Any, kwargs: Any) -> Any @243 // - fn python_call_raw(target: Any, args: Any) -> Any @246 // - fn python_call_attr_raw(target: Any, attr: String, args: Any) -> Any @249 // - fn python_getattr(target: Any, name: String) -> Any @252, fn python_getattr_raw(target: Any, name: String) -> Any @255 // - fn python_setattr(target: Any, name: String, value: Any) @258 // - fn python_hasattr(target: Any, name: String) -> Bool @261, fn python_call_async(target: Any, args: Any) -> Any @264 // - fn python_call_attr_async(target: Any, attr: String, args: Any) -> Any @267 // - fn python_future_from_awaitable(awaitable: Any) -> Any @270, fn python_future_state(future: Any) -> Int @273 // - fn python_future_done(future: Any) -> Bool @276, fn python_future_await(future: Any) -> Any @279 // - fn python_future_cancel(future: Any) -> Int @282, fn python_future_close(future: Any) -> Int @285 // - fn python_actor_callback(actor_id: Int, message_name: String) -> Any @288 // - fn python_actor_callback_callable(callback: Any) -> Any @291 // - fn python_actor_callback_close(callback: Any) -> Int @294 // - fn python_actor_callback_delivered(callback: Any) -> Int @297, fn python_shared_buffer(target: Any) -> Any @300 // - fn python_shared_image(target: Any) -> Any @303, fn python_image(target: Any) -> Any @306 // - fn python_image_shared(target: Any) -> Any @309, fn python_image_owned(target: Any) -> Any @312 // - fn python_image_to(image: Any, backend: String) -> Any @315, fn python_tensor(target: Any) -> Any @318 // - fn python_tensor_shared(target: Any) -> Any @321, fn python_tensor_owned(target: Any) -> Any @324 // - fn python_tensor_to(tensor: Any, backend: String) -> Any @327 // - fn python_tensor_interop_info(target: Any) -> KainSharedBufferInfo @455 // - fn python_tensor_shape_dim(info: KainSharedBufferInfo, index: Int) -> Int @459 // - fn python_tensor_stride_dim(info: KainSharedBufferInfo, index: Int) -> Int @462 // - fn python_shared_buffer_gpu(target: Any, policy: GpuResourcePolicy) -> GpuBuffer @465 // - fn python_gpu_buffer(target: Any, policy: GpuResourcePolicy) -> GpuBuffer @468 // - fn python_gpu_storage_buffer(target: Any, debug_name: String) -> GpuBuffer @473 // - fn python_gpu_uniform_buffer(target: Any, debug_name: String) -> GpuBuffer @489 // - fn python_geometry(target: Any) -> Any @505, fn python_geometry_shared(target: Any) -> Any @508 // - fn python_geometry_owned(target: Any) -> Any @511, fn python_geometry_to(geometry: Any, backend: String) -> Any @514 // // ### `std::random` (stdlib/random.kn, public=21, private=4) // // - types: // - struct Xoshiro128 @3, struct XoshiroNextResult @9, struct IntResult @13, struct FloatResult @17 // - struct FloatNormResult @21, struct ShatteredRngBuffer @175 // - functions: // - fn rotl(x: Int, k: Int) -> Int @25, fn xoshiro128_new(seed: Int) -> Xoshiro128 @46 // - fn xoshiro128_next(rng: Xoshiro128) -> XoshiroNextResult @81 // - fn random_int_in_range(rng: Xoshiro128, min: Int, max: Int) -> IntResult @102 // - fn random_float(rng: Xoshiro128) -> FloatResult @129, fn math_ln(x: Float) -> Float @134 // - fn random_float_norm(rng: Xoshiro128) -> FloatNormResult @162 // - fn shattered_rng_buffer_new(seed: Int, lanes: Int) -> ShatteredRngBuffer @179 // - fn shattered_rng_buffer_destroy(rng: ShatteredRngBuffer) -> Int @226 // - fn shattered_rng_buffer_update(buf: ptr, output: ptr, lanes: Int) -> Int @230 // - fn shattered_rng_buffer_next_block(rng: ShatteredRngBuffer, output: ptr) -> Int @259 // - fn random_ambient_next() -> Int @311, fn random_ambient_float() -> Float @314 // - fn random_ambient_int_in_range(min: Int, max: Int) -> Int @318 // - converges: // - converge xoshiro_scramble(s1: Int) -> Int @37 // // ### `std::reflect` (stdlib/reflect.kn, public=5, private=3) // // - types: // - enum TypeKind @3, struct TypeDescriptor @15 // - functions: // - fn reflect_type_kind(val: Any) -> TypeKind @71, fn reflect_type_name(val: Any) -> String @92 // - fn reflect_descriptor(val: Any) -> TypeDescriptor @95 // // ### `std::reload` (stdlib/reload.kn, public=43, private=1) // // - types: // - struct ReloadGeneration @6, struct ReloadSnapshotRecord @11, struct ReloadMigrationPlan @21 // - functions: // - fn native_reload_begin(session_id: Int, revision_key: String) -> Int @36 // - fn native_reload_commit(session_id: Int) -> Int @39, fn native_reload_generation(session_id: Int) -> Int @42 // - fn native_reload_key(session_id: Int) -> String @45 // - fn native_reload_snapshot(session_id: Int) -> ReloadGeneration @48, fn native_reload_package_surface() -> String @55 // - fn native_reload_default_state_migration() -> String @58, fn native_reload_default_actor_quiesce() -> String @61 // - fn native_reload_gpu_swap_boundary() -> String @64, fn native_reload_default_restart_mode() -> String @67 // - fn native_reload_lane_noop() -> String @70, fn native_reload_lane_presentation() -> String @73 // - fn native_reload_lane_structural() -> String @76, fn native_reload_lane_actor() -> String @79 // - fn native_reload_lane_gpu() -> String @82 // - fn native_reload_snapshot_record(session_id: Int) -> ReloadSnapshotRecord @85 // - fn native_reload_default_migration_plan(session_id: Int) -> ReloadMigrationPlan @116 // - fn native_reload_structural_migration_plan(session_id: Int) -> ReloadMigrationPlan @119 // - fn native_reload_actor_migration_plan(session_id: Int) -> ReloadMigrationPlan @122 // - fn native_reload_gpu_migration_plan(session_id: Int) -> ReloadMigrationPlan @125 // - fn reload_begin(session_id: Int, revision_key: String) -> Int @129, fn reload_commit(session_id: Int) -> Int @132 // - fn reload_generation(session_id: Int) -> Int @135, fn reload_key(session_id: Int) -> String @138 // - fn reload_snapshot(session_id: Int) -> ReloadGeneration @141 // - fn reload_snapshot_record(session_id: Int) -> ReloadSnapshotRecord @144, fn reload_package_surface() -> String @147 // - fn reload_default_state_migration() -> String @150, fn reload_default_actor_quiesce() -> String @153 // - fn reload_gpu_swap_boundary() -> String @156, fn reload_default_restart_mode() -> String @159 // - fn reload_lane_noop() -> String @162, fn reload_lane_presentation() -> String @165 // - fn reload_lane_structural() -> String @168, fn reload_lane_actor() -> String @171, fn reload_lane_gpu() -> String @174 // - fn reload_default_migration_plan(session_id: Int) -> ReloadMigrationPlan @177 // - fn reload_structural_migration_plan(session_id: Int) -> ReloadMigrationPlan @180 // - fn reload_actor_migration_plan(session_id: Int) -> ReloadMigrationPlan @183 // - fn reload_gpu_migration_plan(session_id: Int) -> ReloadMigrationPlan @186 // // ### `std::result` (stdlib/result.kn, public=20, private=0) // // - functions: // - fn native_result_ok() -> Int @1, fn native_result_cancelled() -> Int @4, fn native_result_invalid_argument() -> Int @7 // - fn native_result_not_found() -> Int @10, fn native_result_capacity_exceeded() -> Int @13 // - fn native_result_runtime_unavailable() -> Int @16, fn native_result_is_ok(status: Int) -> Bool @19 // - fn native_result_is_error(status: Int) -> Bool @22, fn native_result_is_control(status: Int) -> Bool @25 // - fn native_result_combine(left: Int, right: Int) -> Int @28, fn result_ok() -> Int @34 // - fn result_cancelled() -> Int @37, fn result_invalid_argument() -> Int @40, fn result_not_found() -> Int @43 // - fn result_capacity_exceeded() -> Int @46, fn result_runtime_unavailable() -> Int @49 // - fn result_is_ok(status: Int) -> Bool @52, fn result_is_error(status: Int) -> Bool @55 // - fn result_is_control(status: Int) -> Bool @58, fn result_combine(left: Int, right: Int) -> Int @61 // // ### `std::runtime` (stdlib/runtime.kn, public=56, private=26) // // - functions: // - fn native_runtime_init() -> Int @79, fn native_runtime_shutdown() -> Int @82 // - fn native_runtime_heap_validate() -> Int @85 // - fn native_runtime_attrition_checkpoint(label: String, subject_id: Int) -> Int @88 // - fn native_runtime_attrition_note_progress(iteration: Int, checksum: Int) -> Int @91 // - fn native_runtime_attrition_result_set(checksum: Int, run_status: Int, run_failure: String) -> Int @94 // - fn native_cpu_feature_mask() -> Int @97, fn native_cpu_feature_fingerprint() -> Int @100 // - fn native_cpu_capability_mask(capability_key: String) -> Int @103 // - fn native_cpu_has_capability(capability_key: String) -> Int @106 // - fn native_simd_i32_domain_dot_scalar_mod(left: ptr, right: ptr, cells: Int, lane_bias: Int, modulus: Int) -> Int @109 // - fn native_simd_i32_domain_dot_avx2_mod(left: ptr, right: ptr, cells: Int, lane_bias: Int, modulus: Int) -> Int @112 // - fn native_simd_i32_domain_dot_avx512_mod(left: ptr, right: ptr, cells: Int, lane_bias: Int, modulus: Int) -> Int @115 // - fn native_simd_i32_domain_affine_accumulate_scalar_mod(left: ptr, right: ptr, cells: Int, passes: Int, bias_mod: Int, phase_mod: Int, modulus: Int) -> Int @118 // - fn native_simd_i32_domain_affine_accumulate_avx2_mod(left: ptr, right: ptr, cells: Int, passes: Int, bias_mod: Int, phase_mod: Int, modulus: Int) -> Int @121 // - fn native_simd_i32_domain_affine_accumulate_avx512_mod(left: ptr, right: ptr, cells: Int, passes: Int, bias_mod: Int, phase_mod: Int, modulus: Int) -> Int @124 // - fn native_simd_i32_domain_affine_pow2_fill_pair_accumulate_mod(left: ptr, right: ptr, cells: Int, left_mul: Int, left_add: Int, left_mask: Int, right_mul: Int, right_add: Int, right_mask: Int, passes: Int, bias_mod: Int, phase_mod: Int, modulus: Int) -> Int @127 // - fn native_converge_select_lane(converge_key: Int, shape_key: Int, eligible_mask: Int, fallback_lane: Int) -> Int @130 // - fn native_converge_commit_winner(converge_key: Int, shape_key: Int, winner_lane: Int) -> Int @133 // - fn native_converge_record_telemetry(converge_key: Int, lane_index: Int, elapsed_ns: Int, ok: Int, mismatch: Int) -> Int @136 // - fn native_converge_telemetry_count() -> Int @139, fn native_converge_cache_probe_count() -> Int @142 // - fn native_converge_cache_hit_count() -> Int @145, fn native_machine_teleport_count() -> Int @148 // - fn native_machine_teleport_last_token() -> Int @151, fn native_machine_pulse_total_fire_count() -> Int @154 // - fn native_runtime_with_status(status: Int) -> Int @157, fn native_runtime_cleanup_status(status: Int) -> Int @162 // - fn runtime_init() -> Int @169, fn runtime_shutdown() -> Int @172, fn runtime_heap_validate() -> Int @175 // - fn runtime_attrition_checkpoint(label: String, subject_id: Int) -> Int @178 // - fn runtime_attrition_note_progress(iteration: Int, checksum: Int) -> Int @181 // - fn runtime_attrition_result_set(checksum: Int, run_status: Int, run_failure: String) -> Int @184 // - fn runtime_cpu_feature_mask() -> Int @187, fn runtime_cpu_feature_fingerprint() -> Int @190 // - fn runtime_cpu_capability_mask(capability_key: String) -> Int @193 // - fn runtime_cpu_has_capability(capability_key: String) -> Int @196 // - fn runtime_simd_i32_domain_dot_scalar_mod(left: ptr, right: ptr, cells: Int, lane_bias: Int, modulus: Int) -> Int @199 // - fn runtime_simd_i32_domain_dot_avx2_mod(left: ptr, right: ptr, cells: Int, lane_bias: Int, modulus: Int) -> Int @202 // - fn runtime_simd_i32_domain_dot_avx512_mod(left: ptr, right: ptr, cells: Int, lane_bias: Int, modulus: Int) -> Int @205 // - fn runtime_simd_i32_domain_affine_accumulate_scalar_mod(left: ptr, right: ptr, cells: Int, passes: Int, bias_mod: Int, phase_mod: Int, modulus: Int) -> Int @208 // - fn runtime_simd_i32_domain_affine_accumulate_avx2_mod(left: ptr, right: ptr, cells: Int, passes: Int, bias_mod: Int, phase_mod: Int, modulus: Int) -> Int @211 // - fn runtime_simd_i32_domain_affine_accumulate_avx512_mod(left: ptr, right: ptr, cells: Int, passes: Int, bias_mod: Int, phase_mod: Int, modulus: Int) -> Int @214 // - fn runtime_simd_i32_domain_affine_pow2_fill_pair_accumulate_mod(left: ptr, right: ptr, cells: Int, left_mul: Int, left_add: Int, left_mask: Int, right_mul: Int, right_add: Int, right_mask: Int, passes: Int, bias_mod: Int, phase_mod: Int, modulus: Int) -> Int @217 // - fn runtime_converge_select_lane(converge_key: Int, shape_key: Int, eligible_mask: Int, fallback_lane: Int) -> Int @220 // - fn runtime_converge_commit_winner(converge_key: Int, shape_key: Int, winner_lane: Int) -> Int @223 // - fn runtime_converge_record_telemetry(converge_key: Int, lane_index: Int, elapsed_ns: Int, ok: Int, mismatch: Int) -> Int @226 // - fn runtime_converge_telemetry_count() -> Int @229, fn runtime_converge_cache_probe_count() -> Int @232 // - fn runtime_converge_cache_hit_count() -> Int @235, fn runtime_machine_teleport_count() -> Int @238 // - fn runtime_machine_teleport_last_token() -> Int @241, fn runtime_machine_pulse_total_fire_count() -> Int @244 // - fn runtime_with_status(status: Int) -> Int @247, fn runtime_cleanup_status(status: Int) -> Int @250 // // ### `std::semver` (stdlib/semver.kn, public=28, private=40) // // - constants: // - const SEMVER_ORDER_LT: Int @3, const SEMVER_ORDER_EQ: Int @4, const SEMVER_ORDER_GT: Int @5 // - const SEMVER_OP_EQ: String @7, const SEMVER_OP_GT: String @8, const SEMVER_OP_GTE: String @9 // - const SEMVER_OP_LT: String @10, const SEMVER_OP_LTE: String @11 // - types: // - struct SemVer @13, struct SemVerParseResult @20, struct SemVerComparator @25, struct SemVerRangeClause @29 // - struct SemVerRange @33, struct SemVerRangeParseResult @36 // - functions: // - fn semver_new(major: Int, minor: Int, patch_value: Int) -> SemVer @643 // - fn semver_with(major: Int, minor: Int, patch_value: Int, pre_release: Array, build_metadata: Array) -> SemVer @652 // - fn semver_parse(text: String) -> SemVerParseResult @661, fn semver_try_parse(text: String) -> Option @675 // - fn semver_format(version: SemVer) -> String @681, fn semver_normalize(text: String) -> String @689 // - fn semver_is_prerelease(version: SemVer) -> Bool @695, fn semver_compare(left: SemVer, right: SemVer) -> Int @698 // - fn semver_compare_text(left_text: String, right_text: String) -> Int @719 // - fn semver_equal(left: SemVer, right: SemVer) -> Bool @730 // - fn semver_range_parse(text: String) -> SemVerRangeParseResult @737 // - fn semver_range_matches(range: SemVerRange, version: SemVer) -> Bool @781 // - fn semver_satisfies(version: SemVer, range_text: String) -> Bool @789 // - fn semver_satisfies_text(version_text: String, range_text: String) -> Bool @795 // // ### `std::simd` (stdlib/simd.kn, public=16, private=1) // // - types: // - struct I64x4 @3 // - functions: // - fn i64x4(a: Int, b: Int, c: Int, d: Int) -> I64x4 @9, fn i64x4_splat(value: Int) -> I64x4 @12 // - fn i64x4_lane(value: I64x4, lane: Int) -> Int @15, fn i64x4_replace(value: I64x4, lane: Int, next: Int) -> I64x4 @24 // - fn i64x4_add(left: I64x4, right: I64x4) -> I64x4 @33, fn i64x4_sub(left: I64x4, right: I64x4) -> I64x4 @36 // - fn i64x4_mul(left: I64x4, right: I64x4) -> I64x4 @39, fn i64x4_and(left: I64x4, right: I64x4) -> I64x4 @42 // - fn i64x4_or(left: I64x4, right: I64x4) -> I64x4 @45, fn i64x4_xor(left: I64x4, right: I64x4) -> I64x4 @48 // - fn i64x4_blend(mask: Int, hot: I64x4, cold: I64x4) -> I64x4 @56, fn i64x4_dot(left: I64x4, right: I64x4) -> Int @64 // - fn i64x4_horizontal_sum(value: I64x4) -> Int @68, fn i64x4_gather(base: ptr, indexes: I64x4) -> I64x4 @71 // - fn i64x4_scatter(base: ptr, indexes: I64x4, values: I64x4) -> Int @79 // // ### `std::sync` (stdlib/sync.kn, public=62, private=31) // // - constants: // - const SYNC_OK: Int @4, const SYNC_ERR_NEGATIVE_COUNT: Int @5, const SYNC_ERR_COUNT_OVERFLOW: Int @6 // - const SYNC_ERR_INVALID_ONCE_STATE: Int @7, const SYNC_ERR_BUSY: Int @8, const SYNC_ERR_TIMEOUT: Int @9 // - const SYNC_ERR_INVALID_STATE: Int @10 // - types: // - struct McsNode @32, struct McsMutex @36, struct TeleportChannel @111, struct Once @182, struct WaitGroup @236 // - struct RwLock @289, struct Semaphore @365, struct CondVar @414 // - functions: // - fn mcs_node_words() -> Int @39, fn mcs_node_new() -> ptr @42, fn mcs_node_destroy(node: ptr) -> Int @45 // - fn mcs_mutex_new() -> McsMutex @73, fn mcs_mutex_destroy(lock: McsMutex) -> Int @77 // - fn mcs_mutex_lock(lock: McsMutex, node: ptr) -> Int @81 // - fn mcs_mutex_unlock(lock: McsMutex, node: ptr) -> Int @96 // - fn teleport_channel_new(capacity: Int) -> TeleportChannel @134 // - fn teleport_channel_destroy(chan: TeleportChannel) -> Int @144 // - fn teleport_channel_send(chan: TeleportChannel, item_ptr: Int) -> Bool @150 // - fn teleport_channel_recv(chan: TeleportChannel) -> Int @165, fn once_new() -> Once @185 // - fn once_destroy(o: Once) -> Int @189, fn once_do(o: Once) -> Int @193, fn once_do_sleep(o: Once) -> Int @206 // - fn once_complete(o: Once) -> Int @209, fn once_reset(o: Once) -> Int @221, fn wait_group_new() -> WaitGroup @246 // - fn wait_group_destroy(wg: WaitGroup) -> Int @250, fn wait_group_count(wg: WaitGroup) -> Int @254 // - fn wait_group_add(wg: WaitGroup, delta: Int) -> Int @257, fn wait_group_done(wg: WaitGroup) -> Int @271 // - fn wait_group_wait(wg: WaitGroup) -> Int @274, fn wait_group_wait_sleep(wg: WaitGroup) -> Int @283 // - fn rwlock_new() -> RwLock @292, fn rwlock_destroy(lock: RwLock) -> Int @296 // - fn rwlock_read_lock(lock: RwLock) -> Int @300, fn rwlock_try_read_lock(lock: RwLock) -> Int @311 // - fn rwlock_read_unlock(lock: RwLock) -> Int @321, fn rwlock_write_lock(lock: RwLock) -> Int @333 // - fn rwlock_try_write_lock(lock: RwLock) -> Int @342, fn rwlock_write_unlock(lock: RwLock) -> Int @347 // - fn rwlock_reader_count(lock: RwLock) -> Int @353, fn rwlock_writer_held(lock: RwLock) -> Bool @359 // - fn semaphore_new(initial: Int) -> Semaphore @368, fn semaphore_destroy(sema: Semaphore) -> Int @374 // - fn semaphore_available(sema: Semaphore) -> Int @378, fn semaphore_try_acquire(sema: Semaphore) -> Int @381 // - fn semaphore_acquire(sema: Semaphore) -> Int @390, fn semaphore_release(sema: Semaphore, permits: Int) -> Int @399 // - fn condvar_new() -> CondVar @417, fn condvar_destroy(cv: CondVar) -> Int @421 // - fn condvar_epoch(cv: CondVar) -> Int @425 // - fn condvar_wait_timeout(cv: CondVar, observed_epoch: Int, timeout_ms: Int) -> Int @428 // - fn condvar_wait_mcs_timeout(cv: CondVar, lock: McsMutex, node: ptr, timeout_ms: Int) -> Int @436 // - fn condvar_notify_one(cv: CondVar) -> Int @447, fn condvar_notify_all(cv: CondVar) -> Int @451 // // ### `std::tar` (stdlib/tar.kn, public=9, private=0) // // - types: // - struct TarEntry @6, struct TarWriter @13, struct TarReader @67 // - functions: // - fn tar_writer_new(dest: ptr) -> TarWriter @16 // - fn tar_write_header(w: TarWriter, name: String, size_bytes: Int, flush_target: ptr) -> Int @21 // - fn tar_write_file_data(w: TarWriter, src: ptr, count_words: Int, flush_target: ptr) -> Int @50 // - fn tar_reader_new(src: ptr) -> TarReader @70, fn tar_read_entry(r: TarReader) -> TarEntry @75 // - fn tar_skip_data(r: TarReader, size_words: Int) -> Int @107 // // ### `std::target` (stdlib/target.kn, public=6, private=0) // // - types: // - enum Arch @4, enum OS @10, enum Env @17, struct Target @23 // - functions: // - fn target_current() -> Target @30, fn target_has_feature(feature_key: String) -> Bool @56 // // ### `std::test` (stdlib/test.kn, public=27, private=0) // // - constants: // - const TEST_STATUS_PASS: Int @4, const TEST_STATUS_FAIL: Int @5, const TEST_STATUS_SKIP: Int @6 // - const TEST_STATUS_PROVED: Int @7, const TEST_STATUS_WITNESS: Int @8 // - types: // - struct TestOutcome @10 // - functions: // - fn test_outcome(status: Int, label: String, detail: String, evidence: String) -> TestOutcome @16 // - fn test_pass(label: String) -> TestOutcome @19, fn test_fail(label: String, detail: String) -> TestOutcome @22 // - fn test_skip(label: String, reason: String) -> TestOutcome @25 // - fn test_proved(label: String, evidence: String) -> TestOutcome @28 // - fn test_witness(label: String, evidence: String) -> TestOutcome @31 // - fn test_outcome_ok(outcome: TestOutcome) -> Bool @34, fn test_bool(label: String, condition: Bool) -> TestOutcome @37 // - fn test_status(label: String, status: Int) -> TestOutcome @42 // - fn test_combine(left: TestOutcome, right: TestOutcome) -> TestOutcome @47 // - fn test_count_failure(outcome: TestOutcome, count: Int) -> Int @52 // - fn test_expect_proof_assessment(assessment: ProofAssessment) -> TestOutcome @57 // - fn test_expect_proof_suite(summary: ProofSuiteSummary) -> TestOutcome @86 // - fn test_expect_case(spec: ProofCase, outcome: ProofOutcome) -> TestOutcome @91 // - fn test_expect_proved(outcome: ProofOutcome) -> TestOutcome @94 // - fn test_expect_witness(outcome: ProofOutcome) -> TestOutcome @97 // - fn test_assert_case(spec: ProofCase, backend_subject: Any) -> TestOutcome @100 // - fn test_assert_unsat(label: String, solver: Any) -> TestOutcome @103 // - fn test_assert_sat(label: String, solver: Any) -> TestOutcome @106, fn test_task(id: String) -> BuildTaskSpec @109 // - fn test_suite(id: String) -> BuildTaskSpec @112 // // ### `std::text` (stdlib/text.kn, public=59, private=3) // // - types: // - struct TextSlice @4, struct StringView @9, struct TextUnescapeResult @14 // - functions: // - fn text_slice(source: String, start: Int, length: Int) -> TextSlice @36, fn text_from(source: String) -> TextSlice @42 // - fn text_view(source: String, start: Int, length: Int) -> TextSlice @45, fn text_len(view: TextSlice) -> Int @48 // - fn text_start(view: TextSlice) -> Int @51, fn text_end(view: TextSlice) -> Int @54 // - fn text_is_empty(view: TextSlice) -> Bool @57, fn text_byte_at(view: TextSlice, index: Int) -> Int @60 // - fn text_char_at(view: TextSlice, index: Int) -> String @67 // - fn text_find_from(view: TextSlice, needle: String, start: Int) -> Int @74 // - fn text_find(view: TextSlice, needle: String) -> Int @87 // - fn text_contains(view: TextSlice, needle: String) -> Bool @90 // - fn text_starts_with(view: TextSlice, needle: String) -> Bool @93 // - fn text_ends_with(view: TextSlice, needle: String) -> Bool @98 // - fn text_equals_string(view: TextSlice, other: String) -> Bool @104 // - fn text_equals(left: TextSlice, right: TextSlice) -> Bool @114 // - fn text_count(view: TextSlice, needle: String) -> Int @124 // - fn text_subslice(view: TextSlice, start: Int, length: Int) -> TextSlice @138 // - fn text_trim_left(view: TextSlice) -> TextSlice @143, fn text_trim_right(view: TextSlice) -> TextSlice @151 // - fn text_trim(view: TextSlice) -> TextSlice @159, fn text_materialize(view: TextSlice) -> String @162 // - fn text_as_bytes(view: TextSlice) -> ByteSlice @165, fn text_from_bytes(view: ByteSlice) -> TextSlice @168 // - fn text_bytes_array(view: TextSlice) -> Array @171, fn text_from_byte_array(values: Array) -> String @174 // - fn text_escape_basic(source: String) -> String @177, fn text_unescape_basic(source: String) -> TextUnescapeResult @211 // - fn text_lines(view: TextSlice) -> Array @264 // - fn string_view(source: String, start: Int, length: Int) -> StringView @267 // - fn string_view_from(source: String) -> StringView @273, fn string_view_len(view: StringView) -> Int @276 // - fn string_view_to_text(view: StringView) -> TextSlice @279 // - fn string_view_materialize(view: StringView) -> String @282, fn text_builder_new() -> BytesBuilder @285 // - fn text_builder_len(builder: BytesBuilder) -> Int @288 // - fn text_builder_push(builder: BytesBuilder, value: String) -> BytesBuilder @291 // - fn text_builder_push_view(builder: BytesBuilder, view: TextSlice) -> BytesBuilder @294 // - fn text_builder_push_char_code(builder: BytesBuilder, codepoint: Int) -> BytesBuilder @297 // - fn text_builder_build(builder: BytesBuilder) -> String @300, fn text_trim_string(source: String) -> String @303 // - fn text_contains_string(source: String, needle: String) -> Bool @306 // - fn text_starts_with_string(source: String, needle: String) -> Bool @309 // - fn text_ends_with_string(source: String, needle: String) -> Bool @312 // - fn text_substring_string(source: String, start: Int, length: Int) -> String @315 // - fn text_upper(source: String) -> String @321, fn text_lower(source: String) -> String @324 // - fn text_replace_string(source: String, from: String, to: String) -> String @327 // - fn text_repeat(source: String, count: Int) -> String @332 // - fn text_split_string(source: String, separator: String) -> Array @342 // - fn text_join_strings(items: Array, separator: String) -> String @366 // - fn text_split_lines(source: String) -> Array @376 // - fn text_tokenize_whitespace(source: String) -> Array @398, fn text_ord(source: String) -> Int @415 // - fn text_chr(codepoint: Int) -> String @418, fn text_to_string(value: Any) -> String @421 // // ### `std::thread` (stdlib/thread.kn, public=18, private=0) // // - types: // - struct ThreadEntry @16, struct Thread @19 // - functions: // - fn thread_entry(func: ptr) -> ThreadEntry @24, fn thread_spawn(func: ptr, arg: ptr) -> Thread @27 // - fn thread_spawn_entry(entry: ThreadEntry, arg: ptr) -> Thread @33, fn thread_join(thread: Thread) -> Int @36 // - fn thread_set_name(name: String) -> Int @44, fn thread_yield() -> Int @47, fn thread_current_id() -> Int @50 // - fn thread_affinity_mask() -> Int @53, fn thread_set_affinity(core_index: Int) -> Int @56 // - fn thread_logical_count() -> Int @59, fn thread_core_count() -> Int @62, fn thread_is_done(thread: Thread) -> Bool @65 // // ### `std::time` (stdlib/time.kn, public=33, private=2) // // - types: // - struct Duration @35, struct Instant @73, struct Deadline @103, struct Ticker @121, struct DateTime @139 // - functions: // - fn native_now_millis() -> Int @7, fn native_sleep_millis(milliseconds: Int) -> Int @10 // - fn native_deadline_millis(duration_millis: Int) -> Int @13 // - fn native_deadline_elapsed(deadline_millis: Int) -> Bool @16, fn now_millis() -> Int @20 // - fn sleep_millis(milliseconds: Int) -> Int @23, fn deadline_millis(duration_millis: Int) -> Int @26 // - fn deadline_elapsed(deadline_millis: Int) -> Bool @29, fn duration_from_millis(ms: Int) -> Duration @38 // - fn duration_from_secs(secs: Int) -> Duration @41, fn duration_from_mins(mins: Int) -> Duration @44 // - fn duration_from_hours(hours: Int) -> Duration @47, fn duration_to_millis(self: Duration) -> Int @50 // - fn duration_to_secs(self: Duration) -> Int @53, fn duration_add(a: Duration, b: Duration) -> Duration @56 // - fn duration_sub(a: Duration, b: Duration) -> Duration @59, fn duration_compare(a: Duration, b: Duration) -> Int @65 // - fn instant_now() -> Instant @76, fn instant_elapsed(self: Instant) -> Duration @79 // - fn instant_add_duration(self: Instant, dur: Duration) -> Instant @86 // - fn instant_sub_instant(self: Instant, other: Instant) -> Duration @89 // - fn instant_compare(a: Instant, b: Instant) -> Int @95, fn deadline_from_duration(dur: Duration) -> Deadline @106 // - fn deadline_is_elapsed(self: Deadline) -> Bool @110, fn deadline_remaining(self: Deadline) -> Duration @113 // - fn ticker_new(interval: Duration) -> Ticker @125, fn ticker_next(t: Ticker) -> Ticker @129 // - fn datetime_from_epoch_millis(epoch_ms: Int) -> DateTime @148 // // ### `std::tls` (stdlib/tls.kn, public=11, private=0) // // - functions: // - fn tls_client_state() -> Int @4, fn tls_client_supported() -> Bool @7, fn tls_client_available() -> Bool @10 // - fn tls_platform_name() -> String @13, fn tls_https_request_create(method: String, url: String) -> Int @16 // - fn tls_https_request_set_header(request_id: Int, key: String, value: String) -> Int @19 // - fn tls_https_request_set_body_text(request_id: Int, payload: String) -> Int @22 // - fn tls_https_request_set_timeout(request_id: Int, timeout_ms: Int) -> Int @25 // - fn tls_https_client_send(request_id: Int) -> Int @28, fn tls_https_response_protocol(response_id: Int) -> String @31 // - fn tls_https_get_text(url: String) -> String @34 // // ### `std::ui` (stdlib/ui.kn, public=340, private=133) // // - functions: // - fn native_ui_reset() -> Int @397, fn native_ui_session_create(app_name: String, width: Int, height: Int) -> Int @400 // - fn native_ui_session_destroy(session_id: Int) -> Int @403, fn native_ui_session_count() -> Int @406 // - fn native_ui_window_open(session_id: Int, title: String, width: Int, height: Int) -> Int @409 // - fn native_ui_window_close(session_id: Int) -> Int @412 // - fn native_ui_begin_frame(session_id: Int, delta_ms: Float) -> Int @415 // - fn native_ui_end_frame(session_id: Int) -> Int @418, fn native_ui_present(session_id: Int) -> Int @421 // - fn native_ui_frame_index(session_id: Int) -> Int @424, fn native_ui_last_presented_frame(session_id: Int) -> Int @427 // - fn native_ui_node_create(session_id: Int, kind: String) -> Int @430 // - fn native_ui_node_destroy(session_id: Int, node_id: Int) -> Int @433 // - fn native_ui_node_count(session_id: Int) -> Int @436 // - fn native_ui_node_exists(session_id: Int, node_id: Int) -> Int @439 // - fn native_ui_node_set_parent(session_id: Int, node_id: Int, parent_id: Int) -> Int @442 // - fn native_ui_node_parent(session_id: Int, node_id: Int) -> Int @445 // - fn native_ui_node_child_count(session_id: Int, node_id: Int) -> Int @448 // - fn native_ui_node_set_rect(session_id: Int, node_id: Int, x: Float, y: Float, width: Float, height: Float) -> Int @451 // - fn native_ui_node_x(session_id: Int, node_id: Int) -> Float @454 // - fn native_ui_node_y(session_id: Int, node_id: Int) -> Float @457 // - fn native_ui_node_width(session_id: Int, node_id: Int) -> Float @460 // - fn native_ui_node_height(session_id: Int, node_id: Int) -> Float @463 // - fn native_ui_node_set_text(session_id: Int, node_id: Int, text: String) -> Int @466 // - fn native_ui_node_text(session_id: Int, node_id: Int) -> String @469 // - fn native_ui_node_kind(session_id: Int, node_id: Int) -> String @472 // - fn native_ui_node_set_flag(session_id: Int, node_id: Int, flag: String, enabled: Int) -> Int @475 // - fn native_ui_node_has_flag(session_id: Int, node_id: Int, flag: String) -> Int @478 // - fn native_ui_node_set_style_i64(session_id: Int, node_id: Int, key: String, value: Int) -> Int @481 // - fn native_ui_node_set_style_f64(session_id: Int, node_id: Int, key: String, value: Float) -> Int @484 // - fn native_ui_node_set_style_string(session_id: Int, node_id: Int, key: String, value: String) -> Int @487 // - fn native_ui_node_style_i64(session_id: Int, node_id: Int, key: String, fallback: Int) -> Int @490 // - fn native_ui_node_style_f64(session_id: Int, node_id: Int, key: String, fallback: Float) -> Float @493 // - fn native_ui_node_style_string(session_id: Int, node_id: Int, key: String, fallback: String) -> String @496 // - fn native_ui_node_set_state_i64(session_id: Int, node_id: Int, key: String, value: Int) -> Int @499 // - fn native_ui_node_set_state_f64(session_id: Int, node_id: Int, key: String, value: Float) -> Int @502 // - fn native_ui_node_set_state_string(session_id: Int, node_id: Int, key: String, value: String) -> Int @505 // - fn native_ui_node_state_i64(session_id: Int, node_id: Int, key: String, fallback: Int) -> Int @508 // - fn native_ui_node_state_f64(session_id: Int, node_id: Int, key: String, fallback: Float) -> Float @511 // - fn native_ui_node_state_string(session_id: Int, node_id: Int, key: String, fallback: String) -> String @514 // - fn native_ui_state_count(session_id: Int) -> Int @517, fn native_ui_focus(session_id: Int, node_id: Int) -> Int @520 // - fn native_ui_focused_node(session_id: Int) -> Int @523 // - fn native_ui_hit_test(session_id: Int, x: Float, y: Float) -> Int @526 // - fn native_ui_mark_dirty(session_id: Int, node_id: Int, reason: Int) -> Int @529 // - fn native_ui_dirty_count(session_id: Int) -> Int @532 // - fn native_ui_push_event(session_id: Int, kind: String, target_node_id: Int, x: Float, y: Float, key_code: Int, text: String) -> Int @535 // - fn native_ui_poll_event(session_id: Int) -> Int @538, fn native_ui_event_kind(session_id: Int) -> String @541 // - fn native_ui_event_target(session_id: Int) -> Int @544, fn native_ui_event_x(session_id: Int) -> Float @547 // - fn native_ui_event_y(session_id: Int) -> Float @550, fn native_ui_event_key_code(session_id: Int) -> Int @553 // - fn native_ui_event_text(session_id: Int) -> String @556 // - fn native_ui_draw_rect(session_id: Int, node_id: Int, x: Float, y: Float, width: Float, height: Float, style_key: String) -> Int @559 // - fn native_ui_draw_text(session_id: Int, node_id: Int, font_resource_id: Int, x: Float, y: Float, text: String, style_key: String) -> Int @562 // - fn native_ui_draw_command_count(session_id: Int) -> Int @565 // - fn native_ui_draw_command_kind(session_id: Int, command_index: Int) -> String @568 // - fn native_ui_draw_command_node(session_id: Int, command_index: Int) -> Int @571 // - fn native_ui_host_attach(session_id: Int, backend_id: String) -> Int @574 // - fn native_ui_host_pump(session_id: Int) -> Int @577, fn native_ui_host_present(session_id: Int) -> Int @580 // - fn native_ui_host_presented_draw_count(session_id: Int) -> Int @583 // - fn native_ui_host_frame_hash(session_id: Int) -> Int @586, fn native_ui_host_should_close(session_id: Int) -> Int @589 // - fn native_ui_host_backend(session_id: Int) -> String @592 // - fn native_ui_node_set_stable_key(session_id: Int, node_id: Int, stable_key: String) -> Int @595 // - fn native_ui_node_stable_key(session_id: Int, node_id: Int) -> String @598 // - fn native_ui_node_find_by_stable_key(session_id: Int, stable_key: String) -> Int @601 // - fn native_ui_accessibility_set_role(session_id: Int, node_id: Int, role: String) -> Int @604 // - fn native_ui_accessibility_set_label(session_id: Int, node_id: Int, label: String) -> Int @607 // - fn native_ui_accessibility_role(session_id: Int, node_id: Int) -> String @610 // - fn native_ui_accessibility_label(session_id: Int, node_id: Int) -> String @613 // - fn native_ui_draw_command_resource(session_id: Int, command_index: Int) -> Int @616 // - fn native_ui_draw_command_x(session_id: Int, command_index: Int) -> Float @619 // - fn native_ui_draw_command_y(session_id: Int, command_index: Int) -> Float @622 // - fn native_ui_draw_command_width(session_id: Int, command_index: Int) -> Float @625 // - fn native_ui_draw_command_height(session_id: Int, command_index: Int) -> Float @628 // - fn native_ui_draw_command_text(session_id: Int, command_index: Int) -> String @631 // - fn native_ui_draw_command_style(session_id: Int, command_index: Int) -> String @634 // - fn native_ui_draw_command_font(session_id: Int, command_index: Int) -> Int @637 // - fn native_ui_resource_create(session_id: Int, resource_type: String, key: String, width: Int, height: Int, byte_length: Int) -> Int @640 // - fn native_ui_font_create(session_id: Int, key: String, family: String, size: Float) -> Int @643 // - fn native_ui_texture_create(session_id: Int, key: String, width: Int, height: Int, format: String, byte_length: Int) -> Int @646 // - fn native_ui_canvas_create(session_id: Int, key: String, width: Int, height: Int) -> Int @649 // - fn native_ui_shader_create(session_id: Int, key: String, stage: String, byte_length: Int) -> Int @652 // - fn native_ui_resource_set_bytes_hex(session_id: Int, resource_id: Int, bytes_hex: String) -> Int @655 // - fn native_ui_resource_count(session_id: Int) -> Int @658 // - fn native_ui_resource_exists(session_id: Int, resource_id: Int) -> Int @661 // - fn native_ui_resource_type(session_id: Int, resource_id: Int) -> String @664 // - fn native_ui_resource_key(session_id: Int, resource_id: Int) -> String @667 // - fn native_ui_resource_width(session_id: Int, resource_id: Int) -> Int @670 // - fn native_ui_resource_height(session_id: Int, resource_id: Int) -> Int @673 // - fn native_ui_resource_byte_length(session_id: Int, resource_id: Int) -> Int @676 // - fn native_ui_text_measure_width(session_id: Int, font_resource_id: Int, text: String) -> Float @679 // - fn native_ui_text_measure_height(session_id: Int, font_resource_id: Int, text: String) -> Float @682 // - fn native_ui_draw_resource(session_id: Int, node_id: Int, resource_id: Int, x: Float, y: Float, width: Float, height: Float, style_key: String) -> Int @685 // - fn native_ui_clipboard_set_text(session_id: Int, text: String) -> Int @688 // - fn native_ui_clipboard_text(session_id: Int) -> String @691 // - fn native_ui_ime_begin(session_id: Int, node_id: Int) -> Int @694 // - fn native_ui_ime_commit_text(session_id: Int, text: String) -> Int @697 // - fn native_ui_ime_end(session_id: Int) -> Int @700, fn native_ui_ime_active_node(session_id: Int) -> Int @703 // - fn native_ui_ime_text(session_id: Int) -> String @706 // - fn native_ui_drag_begin(session_id: Int, node_id: Int, payload: String, x: Float, y: Float) -> Int @709 // - fn native_ui_drag_update(session_id: Int, x: Float, y: Float, drop_target_node_id: Int) -> Int @712 // - fn native_ui_drag_drop(session_id: Int, drop_target_node_id: Int) -> Int @715 // - fn native_ui_drag_active_node(session_id: Int) -> Int @718, fn native_ui_drag_drop_target(session_id: Int) -> Int @721 // - fn native_ui_drag_x(session_id: Int) -> Float @724, fn native_ui_drag_y(session_id: Int) -> Float @727 // - fn native_ui_drag_payload(session_id: Int) -> String @730 // - fn native_ui_menu_create(session_id: Int, key: String) -> Int @733 // - fn native_ui_menu_add_item(session_id: Int, menu_id: Int, key: String, label: String, command_id: Int) -> Int @736 // - fn native_ui_menu_open(session_id: Int, menu_id: Int, x: Float, y: Float) -> Int @739 // - fn native_ui_menu_active(session_id: Int) -> Int @742 // - fn native_ui_menu_item_count(session_id: Int, menu_id: Int) -> Int @745 // - fn native_ui_menu_item_label(session_id: Int, menu_id: Int, item_index: Int) -> String @748 // - fn native_ui_menu_item_command(session_id: Int, menu_id: Int, item_index: Int) -> Int @751 // - fn native_ui_dialog_request(session_id: Int, kind: String, title: String, message: String) -> Int @754 // - fn native_ui_dialog_active(session_id: Int) -> Int @757 // - fn native_ui_dialog_kind(session_id: Int, dialog_id: Int) -> String @760 // - fn native_ui_dialog_title(session_id: Int, dialog_id: Int) -> String @763 // - fn native_ui_dialog_message(session_id: Int, dialog_id: Int) -> String @766 // - fn native_ui_dialog_respond(session_id: Int, dialog_id: Int, result: Int, response_text: String) -> Int @769 // - fn native_ui_dialog_poll_response(session_id: Int) -> Int @772 // - fn native_ui_dialog_response_text(session_id: Int) -> String @775 // - fn native_ui_hot_reload_begin(session_id: Int, revision_key: String) -> Int @778 // - fn native_ui_hot_reload_commit(session_id: Int) -> Int @781 // - fn native_ui_hot_reload_generation(session_id: Int) -> Int @784 // - fn native_ui_hot_reload_key(session_id: Int) -> String @787 // - fn ui_layout_column_y(index_offset: Float, start_y: Float, item_height: Float, gap: Float) -> Float @790 // - fn ui_layout_row_x(index_offset: Float, start_x: Float, item_width: Float, gap: Float) -> Float @793 // - fn ui_float_min(left: Float, right: Float) -> Float @796, fn ui_float_max(left: Float, right: Float) -> Float @801 // - fn ui_float_clamp(value: Float, low: Float, high: Float) -> Float @806 // - fn ui_rect_right(x: Float, width: Float) -> Float @813, fn ui_rect_bottom(y: Float, height: Float) -> Float @816 // - fn ui_rect_contains(px: Float, py: Float, x: Float, y: Float, width: Float, height: Float) -> Int @819 // - fn ui_layout_inset_x(x: Float, inset: Float) -> Float @824, fn ui_layout_inset_y(y: Float, inset: Float) -> Float @827 // - fn ui_layout_inset_width(width: Float, left: Float, right: Float) -> Float @830 // - fn ui_layout_inset_height(height: Float, top: Float, bottom: Float) -> Float @833 // - fn ui_layout_center_x(x: Float, width: Float, child_width: Float) -> Float @836 // - fn ui_layout_center_y(y: Float, height: Float, child_height: Float) -> Float @839 // - fn ui_layout_column_height(item_count: Float, item_height: Float, gap: Float) -> Float @842 // - fn ui_layout_row_width(item_count: Float, item_width: Float, gap: Float) -> Float @847 // - fn ui_layout_split_left_width(width: Float, fraction: Float, gap: Float) -> Float @852 // - fn ui_layout_split_right_x(x: Float, width: Float, fraction: Float, gap: Float) -> Float @855 // - fn ui_layout_split_right_width(width: Float, fraction: Float, gap: Float) -> Float @858 // - fn ui_host_session_create(app_name: String, window_title: String, width: Int, height: Int, backend_id: String) -> Int @861 // - fn ui_frame_begin(session_id: Int, delta_ms: Float) -> Int @867, fn ui_frame_submit(session_id: Int) -> Int @870 // - fn ui_node_from_stable_key(session_id: Int, parent_id: Int, kind: String, stable_key: String, text: String, x: Float, y: Float, width: Float, height: Float) -> Int @873 // - fn ui_reconcile_node(session_id: Int, parent_id: Int, kind: String, stable_key: String, x: Float, y: Float, width: Float, height: Float) -> Int @888 // - fn ui_reconcile_text_node(session_id: Int, parent_id: Int, kind: String, stable_key: String, text: String, x: Float, y: Float, width: Float, height: Float) -> Int @891 // - fn ui_reconcile_labeled_node(session_id: Int, parent_id: Int, kind: String, stable_key: String, text: String, role: String, label: String, x: Float, y: Float, width: Float, height: Float) -> Int @894 // - fn ui_reconcile_focusable_node(session_id: Int, parent_id: Int, kind: String, stable_key: String, text: String, role: String, label: String, x: Float, y: Float, width: Float, height: Float) -> Int @900 // - fn ui_node_style_color_rgba(session_id: Int, node_id: Int, style_key: String, r: Float, g: Float, b: Float, a: Float) -> Int @905 // - fn ui_style_color_rgba(session_id: Int, node_id: Int, style_key: String, r: Float, g: Float, b: Float, a: Float) -> Int @911 // - fn ui_style_metric(session_id: Int, node_id: Int, style_key: String, metric: String, value: Float) -> Int @914 // - fn ui_style_metric_value(session_id: Int, node_id: Int, style_key: String, metric: String, fallback: Float) -> Float @917 // - fn ui_style_padding(session_id: Int, node_id: Int, style_key: String, left: Float, top: Float, right: Float, bottom: Float) -> Int @920 // - fn ui_style_spacing(session_id: Int, node_id: Int, style_key: String, gap: Float) -> Int @926 // - fn ui_style_inherit_color_rgba(session_id: Int, parent_id: Int, node_id: Int, parent_style_key: String, style_key: String, r: Float, g: Float, b: Float, a: Float) -> Int @929 // - fn ui_style_copy_color_rgba(session_id: Int, source_node_id: Int, target_node_id: Int, source_style_key: String, target_style_key: String) -> Int @940 // - fn ui_state_set_i64(session_id: Int, node_id: Int, key: String, value: Int) -> Int @947 // - fn ui_state_set_f64(session_id: Int, node_id: Int, key: String, value: Float) -> Int @950 // - fn ui_state_set_string(session_id: Int, node_id: Int, key: String, value: String) -> Int @953 // - fn ui_state_i64(session_id: Int, node_id: Int, key: String, fallback: Int) -> Int @956 // - fn ui_state_f64(session_id: Int, node_id: Int, key: String, fallback: Float) -> Float @959 // - fn ui_state_string(session_id: Int, node_id: Int, key: String, fallback: String) -> String @962 // - fn ui_state_bool(session_id: Int, node_id: Int, key: String, fallback: Int) -> Int @965 // - fn ui_state_set_bool(session_id: Int, node_id: Int, key: String, enabled: Int) -> Int @970 // - fn ui_state_toggle(session_id: Int, node_id: Int, key: String) -> Int @975 // - fn ui_state_counter(session_id: Int, node_id: Int, key: String, delta: Int) -> Int @983 // - fn ui_state_reference(session_id: Int, node_id: Int, key: String, referenced_id: Int) -> Int @988 // - fn ui_state_shape(session_id: Int, node_id: Int, shape_kind: String, shape_payload: String) -> Int @991 // - fn ui_state_hit(session_id: Int, node_id: Int, hit_kind: String, hit_payload: String) -> Int @995 // - fn ui_state_draw(session_id: Int, node_id: Int, draw_kind: String, draw_payload: String) -> Int @999 // - fn ui_state_resource(session_id: Int, node_id: Int, resource_kind: String, resource_payload: String, resource_id: Int) -> Int @1003 // - fn ui_state_shared_buffer_resource(session_id: Int, node_id: Int, resource_view: GraphicsSharedBuffer, resource_id: Int) -> Int @1024 // - fn ui_state_shared_image_resource(session_id: Int, node_id: Int, resource_view: GraphicsSharedImage, resource_id: Int) -> Int @1033 // - fn ui_reconcile_stateful_node(session_id: Int, parent_id: Int, kind: String, stable_key: String, state_kind: String, state_payload: String, x: Float, y: Float, width: Float, height: Float) -> Int @1042 // - fn ui_custom_hit_contains(session_id: Int, node_id: Int, x: Float, y: Float) -> Int @1048 // - fn ui_custom_hit_targets(session_id: Int, node_id: Int, x: Float, y: Float) -> Int @1054 // - fn ui_text_width(session_id: Int, font_resource_id: Int, text: String) -> Float @1059 // - fn ui_text_height(session_id: Int, font_resource_id: Int, text: String) -> Float @1062 // - fn native_ui_texture_create_from_hex(session_id: Int, key: String, width: Int, height: Int, format: String, bytes_hex: String) -> Int @1065 // - fn ui_texture_rgba8_from_hex(session_id: Int, key: String, width: Int, height: Int, bytes_hex: String) -> Int @1070 // - fn ui_render_box(session_id: Int, node_id: Int, style_key: String) -> Int @1073 // - fn ui_render_box_at(session_id: Int, node_id: Int, x: Float, y: Float, width: Float, height: Float, style_key: String) -> Int @1076 // - fn ui_render_text(session_id: Int, node_id: Int, font_resource_id: Int, x: Float, y: Float, style_key: String) -> Int @1079 // - fn ui_render_text_value(session_id: Int, node_id: Int, font_resource_id: Int, text: String, x: Float, y: Float, style_key: String) -> Int @1082 // - fn ui_render_resource(session_id: Int, node_id: Int, resource_id: Int, x: Float, y: Float, width: Float, height: Float, style_key: String) -> Int @1085 // - fn ui_render_resource_in_node(session_id: Int, node_id: Int, resource_id: Int, style_key: String) -> Int @1088 // - fn ui_render_text_in_box(session_id: Int, node_id: Int, font_resource_id: Int, inset_x: Float, baseline_y: Float, style_key: String) -> Int @1091 // - fn ui_event_kind_is(session_id: Int, expected_kind: String) -> Int @1094 // - fn ui_event_targets(session_id: Int, node_id: Int) -> Int @1105 // - fn ui_focus_if_event_targets(session_id: Int, node_id: Int) -> Int @1110 // - fn ui_node_contains_point(session_id: Int, node_id: Int, x: Float, y: Float) -> Int @1115 // - fn ui_node_is_hit(session_id: Int, node_id: Int, x: Float, y: Float) -> Int @1118 // - fn ui_apply_hover_flag(session_id: Int, node_id: Int, x: Float, y: Float) -> Int @1123 // - fn ui_apply_pressed_flag_from_event(session_id: Int, node_id: Int) -> Int @1128 // - fn ui_drain_events_for_node(session_id: Int, node_id: Int) -> Int @1138 // - fn ui_present_to_attached_host(session_id: Int) -> Int @1147, fn ui_reset() -> Int @1153 // - fn ui_session_create(app_name: String, width: Int, height: Int) -> Int @1156 // - fn ui_session_destroy(session_id: Int) -> Int @1159, fn ui_session_count() -> Int @1162 // - fn ui_window_open(session_id: Int, title: String, width: Int, height: Int) -> Int @1165 // - fn ui_window_close(session_id: Int) -> Int @1168, fn ui_begin_frame(session_id: Int, delta_ms: Float) -> Int @1171 // - fn ui_end_frame(session_id: Int) -> Int @1174, fn ui_present(session_id: Int) -> Int @1177 // - fn ui_frame_index(session_id: Int) -> Int @1180, fn ui_last_presented_frame(session_id: Int) -> Int @1183 // - fn ui_node_create(session_id: Int, kind: String) -> Int @1186 // - fn ui_node_destroy(session_id: Int, node_id: Int) -> Int @1189, fn ui_node_count(session_id: Int) -> Int @1192 // - fn ui_node_exists(session_id: Int, node_id: Int) -> Int @1195 // - fn ui_node_set_parent(session_id: Int, node_id: Int, parent_id: Int) -> Int @1198 // - fn ui_node_parent(session_id: Int, node_id: Int) -> Int @1201 // - fn ui_node_child_count(session_id: Int, node_id: Int) -> Int @1204 // - fn ui_node_set_rect(session_id: Int, node_id: Int, x: Float, y: Float, width: Float, height: Float) -> Int @1207 // - fn ui_node_x(session_id: Int, node_id: Int) -> Float @1210, fn ui_node_y(session_id: Int, node_id: Int) -> Float @1213 // - fn ui_node_width(session_id: Int, node_id: Int) -> Float @1216 // - fn ui_node_height(session_id: Int, node_id: Int) -> Float @1219 // - fn ui_node_set_text(session_id: Int, node_id: Int, text: String) -> Int @1222 // - fn ui_node_text(session_id: Int, node_id: Int) -> String @1225 // - fn ui_node_kind(session_id: Int, node_id: Int) -> String @1228 // - fn ui_node_set_flag(session_id: Int, node_id: Int, flag: String, enabled: Int) -> Int @1231 // - fn ui_node_has_flag(session_id: Int, node_id: Int, flag: String) -> Int @1234 // - fn ui_node_set_style_i64(session_id: Int, node_id: Int, key: String, value: Int) -> Int @1237 // - fn ui_node_set_style_f64(session_id: Int, node_id: Int, key: String, value: Float) -> Int @1240 // - fn ui_node_set_style_string(session_id: Int, node_id: Int, key: String, value: String) -> Int @1243 // - fn ui_node_style_i64(session_id: Int, node_id: Int, key: String, fallback: Int) -> Int @1246 // - fn ui_node_style_f64(session_id: Int, node_id: Int, key: String, fallback: Float) -> Float @1249 // - fn ui_node_style_string(session_id: Int, node_id: Int, key: String, fallback: String) -> String @1252 // - fn ui_node_set_state_i64(session_id: Int, node_id: Int, key: String, value: Int) -> Int @1255 // - fn ui_node_set_state_f64(session_id: Int, node_id: Int, key: String, value: Float) -> Int @1258 // - fn ui_node_set_state_string(session_id: Int, node_id: Int, key: String, value: String) -> Int @1261 // - fn ui_node_state_i64(session_id: Int, node_id: Int, key: String, fallback: Int) -> Int @1264 // - fn ui_node_state_f64(session_id: Int, node_id: Int, key: String, fallback: Float) -> Float @1267 // - fn ui_node_state_string(session_id: Int, node_id: Int, key: String, fallback: String) -> String @1270 // - fn ui_state_count(session_id: Int) -> Int @1273, fn ui_focus(session_id: Int, node_id: Int) -> Int @1276 // - fn ui_focused_node(session_id: Int) -> Int @1279, fn ui_hit_test(session_id: Int, x: Float, y: Float) -> Int @1282 // - fn ui_mark_dirty(session_id: Int, node_id: Int, reason: Int) -> Int @1285 // - fn ui_dirty_count(session_id: Int) -> Int @1288 // - fn ui_push_event(session_id: Int, kind: String, target_node_id: Int, x: Float, y: Float, key_code: Int, text: String) -> Int @1291 // - fn ui_poll_event(session_id: Int) -> Int @1294, fn ui_event_kind(session_id: Int) -> String @1297 // - fn ui_event_target(session_id: Int) -> Int @1300, fn ui_event_x(session_id: Int) -> Float @1303 // - fn ui_event_y(session_id: Int) -> Float @1306, fn ui_event_key_code(session_id: Int) -> Int @1309 // - fn ui_event_text(session_id: Int) -> String @1312, fn ui_event_record(session_id: Int) -> InputEventRecord @1315 // - fn ui_push_input_event(session_id: Int, target_node_id: Int, event: InputEventRecord) -> Int @1325 // - fn ui_draw_rect(session_id: Int, node_id: Int, x: Float, y: Float, width: Float, height: Float, style_key: String) -> Int @1336 // - fn ui_draw_text(session_id: Int, node_id: Int, font_resource_id: Int, x: Float, y: Float, text: String, style_key: String) -> Int @1339 // - fn ui_draw_command_count(session_id: Int) -> Int @1342 // - fn ui_draw_command_kind(session_id: Int, command_index: Int) -> String @1345 // - fn ui_draw_command_node(session_id: Int, command_index: Int) -> Int @1348 // - fn ui_host_attach(session_id: Int, backend_id: String) -> Int @1351, fn ui_host_pump(session_id: Int) -> Int @1354 // - fn ui_host_present(session_id: Int) -> Int @1357, fn ui_host_presented_draw_count(session_id: Int) -> Int @1360 // - fn ui_host_frame_hash(session_id: Int) -> Int @1363, fn ui_host_should_close(session_id: Int) -> Int @1366 // - fn ui_host_backend(session_id: Int) -> String @1369 // - fn ui_node_set_stable_key(session_id: Int, node_id: Int, stable_key: String) -> Int @1372 // - fn ui_node_stable_key(session_id: Int, node_id: Int) -> String @1375 // - fn ui_node_find_by_stable_key(session_id: Int, stable_key: String) -> Int @1378 // - fn ui_accessibility_set_role(session_id: Int, node_id: Int, role: String) -> Int @1381 // - fn ui_accessibility_set_label(session_id: Int, node_id: Int, label: String) -> Int @1384 // - fn ui_accessibility_role(session_id: Int, node_id: Int) -> String @1387 // - fn ui_accessibility_label(session_id: Int, node_id: Int) -> String @1390 // - fn ui_draw_command_resource(session_id: Int, command_index: Int) -> Int @1393 // - fn ui_draw_command_x(session_id: Int, command_index: Int) -> Float @1396 // - fn ui_draw_command_y(session_id: Int, command_index: Int) -> Float @1399 // - fn ui_draw_command_width(session_id: Int, command_index: Int) -> Float @1402 // - fn ui_draw_command_height(session_id: Int, command_index: Int) -> Float @1405 // - fn ui_draw_command_text(session_id: Int, command_index: Int) -> String @1408 // - fn ui_draw_command_style(session_id: Int, command_index: Int) -> String @1411 // - fn ui_draw_command_font(session_id: Int, command_index: Int) -> Int @1414 // - fn ui_resource_create(session_id: Int, resource_type: String, key: String, width: Int, height: Int, byte_length: Int) -> Int @1417 // - fn ui_font_create(session_id: Int, key: String, family: String, size: Float) -> Int @1420 // - fn ui_texture_create(session_id: Int, key: String, width: Int, height: Int, format: String, byte_length: Int) -> Int @1423 // - fn ui_canvas_create(session_id: Int, key: String, width: Int, height: Int) -> Int @1426 // - fn ui_shader_create(session_id: Int, key: String, stage: String, byte_length: Int) -> Int @1429 // - fn ui_resource_set_bytes_hex(session_id: Int, resource_id: Int, bytes_hex: String) -> Int @1432 // - fn ui_resource_count(session_id: Int) -> Int @1435 // - fn ui_resource_exists(session_id: Int, resource_id: Int) -> Int @1438 // - fn ui_resource_type(session_id: Int, resource_id: Int) -> String @1441 // - fn ui_resource_key(session_id: Int, resource_id: Int) -> String @1444 // - fn ui_resource_width(session_id: Int, resource_id: Int) -> Int @1447 // - fn ui_resource_height(session_id: Int, resource_id: Int) -> Int @1450 // - fn ui_resource_byte_length(session_id: Int, resource_id: Int) -> Int @1453 // - fn ui_text_measure_width(session_id: Int, font_resource_id: Int, text: String) -> Float @1456 // - fn ui_text_measure_height(session_id: Int, font_resource_id: Int, text: String) -> Float @1459 // - fn ui_draw_resource(session_id: Int, node_id: Int, resource_id: Int, x: Float, y: Float, width: Float, height: Float, style_key: String) -> Int @1462 // - fn ui_clipboard_set_text(session_id: Int, text: String) -> Int @1465 // - fn ui_clipboard_text(session_id: Int) -> String @1468, fn ui_ime_begin(session_id: Int, node_id: Int) -> Int @1471 // - fn ui_ime_commit_text(session_id: Int, text: String) -> Int @1474, fn ui_ime_end(session_id: Int) -> Int @1477 // - fn ui_ime_active_node(session_id: Int) -> Int @1480, fn ui_ime_text(session_id: Int) -> String @1483 // - fn ui_drag_begin(session_id: Int, node_id: Int, payload: String, x: Float, y: Float) -> Int @1486 // - fn ui_drag_update(session_id: Int, x: Float, y: Float, drop_target_node_id: Int) -> Int @1489 // - fn ui_drag_drop(session_id: Int, drop_target_node_id: Int) -> Int @1492 // - fn ui_drag_active_node(session_id: Int) -> Int @1495, fn ui_drag_drop_target(session_id: Int) -> Int @1498 // - fn ui_drag_x(session_id: Int) -> Float @1501, fn ui_drag_y(session_id: Int) -> Float @1504 // - fn ui_drag_payload(session_id: Int) -> String @1507, fn ui_menu_create(session_id: Int, key: String) -> Int @1510 // - fn ui_menu_add_item(session_id: Int, menu_id: Int, key: String, label: String, command_id: Int) -> Int @1513 // - fn ui_menu_open(session_id: Int, menu_id: Int, x: Float, y: Float) -> Int @1516 // - fn ui_menu_active(session_id: Int) -> Int @1519, fn ui_menu_item_count(session_id: Int, menu_id: Int) -> Int @1522 // - fn ui_menu_item_label(session_id: Int, menu_id: Int, item_index: Int) -> String @1525 // - fn ui_menu_item_command(session_id: Int, menu_id: Int, item_index: Int) -> Int @1528 // - fn ui_dialog_request(session_id: Int, kind: String, title: String, message: String) -> Int @1531 // - fn ui_dialog_active(session_id: Int) -> Int @1534, fn ui_dialog_kind(session_id: Int, dialog_id: Int) -> String @1537 // - fn ui_dialog_title(session_id: Int, dialog_id: Int) -> String @1540 // - fn ui_dialog_message(session_id: Int, dialog_id: Int) -> String @1543 // - fn ui_dialog_respond(session_id: Int, dialog_id: Int, result: Int, response_text: String) -> Int @1546 // - fn ui_dialog_poll_response(session_id: Int) -> Int @1549, fn ui_dialog_response_text(session_id: Int) -> String @1552 // - fn ui_hot_reload_begin(session_id: Int, revision_key: String) -> Int @1555 // - fn ui_hot_reload_commit(session_id: Int) -> Int @1558, fn ui_hot_reload_generation(session_id: Int) -> Int @1561 // - fn ui_hot_reload_key(session_id: Int) -> String @1564 // - fn ui_texture_create_from_hex(session_id: Int, key: String, width: Int, height: Int, format: String, bytes_hex: String) -> Int @1567 // // ### `std::unicode` (stdlib/unicode.kn, public=13, private=1) // // - types: // - struct UnicodeDecodeResult @1, struct UnicodeCursor @6, struct UnicodeCursorNextResult @10 // - functions: // - fn unicode_utf8_char_length(first_byte: Int) -> Int @21 // - fn unicode_utf8_decode_at(value: String, start_index: Int) -> UnicodeDecodeResult @34 // - fn unicode_utf8_encode(codepoint: Int) -> String @97, fn unicode_utf8_is_valid(value: String) -> Bool @123 // - fn unicode_utf8_codepoint_count(value: String) -> Int @133 // - fn unicode_utf8_codepoint_at(value: String, codepoint_index: Int) -> Int @146 // - fn unicode_cursor_new(source: String) -> UnicodeCursor @161 // - fn unicode_cursor_has_next(cursor: UnicodeCursor) -> Bool @164 // - fn unicode_cursor_next(cursor: UnicodeCursor) -> UnicodeCursorNextResult @167 // - fn unicode_normalize(value: String, form: UnicodeNormalizationForm) -> String @174 // // ### `std::uri` (stdlib/uri.kn, public=10, private=2) // // - types: // - struct Uri @5, struct UriQueryParam @16, struct UriQueryParamIterator @21, struct UriQueryParamNext @26 // - functions: // - fn uri_parse(url: String) -> Uri @31, fn uri_decode(value: String) -> String @254 // - fn uri_encode(value: String) -> String @293, fn uri_query_param_iterator(uri: Uri) -> UriQueryParamIterator @313 // - fn uri_query_param_has_next(it: UriQueryParamIterator) -> Bool @320 // - fn uri_query_param_next(it: UriQueryParamIterator) -> UriQueryParamNext @323 // // ### `std::wasm` (stdlib/wasm.kn, public=18, private=0) // // - constants: // - const WASM_MAGIC: Int @4, const WASM_VERSION: Int @5, const WASM_SECTION_CUSTOM: Int @7 // - const WASM_SECTION_TYPE: Int @8, const WASM_SECTION_IMPORT: Int @9, const WASM_SECTION_FUNC: Int @10 // - const WASM_SECTION_TABLE: Int @11, const WASM_SECTION_MEMORY: Int @12, const WASM_SECTION_GLOBAL: Int @13 // - const WASM_SECTION_EXPORT: Int @14, const WASM_SECTION_START: Int @15, const WASM_SECTION_ELEMENT: Int @16 // - const WASM_SECTION_CODE: Int @17, const WASM_SECTION_DATA: Int @18 // - types: // - struct WasmHeader @20, struct WasmSection @24 // - functions: // - fn wasm_validate_header(buffer: ptr) -> Bool @30 // - fn wasm_read_section_header(buffer: ptr, offset: Int) -> WasmSection @37 // // ### `std::z3` (stdlib/z3.kn, public=40, private=3) // // - functions: // - fn z3_available() -> Bool @19, fn z3_require() -> Any @22, fn z3_version() -> String @25, fn z3_solver() -> Any @28 // - fn z3_optimize() -> Any @31, fn z3_int(name: String) -> Any @34, fn z3_real(name: String) -> Any @37 // - fn z3_bool(name: String) -> Any @40, fn z3_bitvec(name: String, bits: Int) -> Any @43 // - fn z3_int_val(value: Int) -> Any @46, fn z3_bool_val(value: Bool) -> Any @49 // - fn z3_bitvec_val(value: Int, bits: Int) -> Any @52, fn z3_expr_add(left: Any, right: Any) -> Any @55 // - fn z3_expr_sub(left: Any, right: Any) -> Any @58, fn z3_expr_mul(left: Any, right: Any) -> Any @61 // - fn z3_expr_eq(left: Any, right: Any) -> Any @64, fn z3_expr_ne(left: Any, right: Any) -> Any @67 // - fn z3_expr_lt(left: Any, right: Any) -> Any @70, fn z3_expr_le(left: Any, right: Any) -> Any @73 // - fn z3_expr_gt(left: Any, right: Any) -> Any @76, fn z3_expr_ge(left: Any, right: Any) -> Any @79 // - fn z3_and(clauses: Any) -> Any @82, fn z3_or(clauses: Any) -> Any @85, fn z3_not(clause: Any) -> Any @88 // - fn z3_distinct(values: Any) -> Any @91, fn z3_sum(values: Any) -> Any @94 // - fn z3_solver_add(solver: Any, constraints: Any) @97, fn z3_solver_push(solver: Any) @100 // - fn z3_solver_pop(solver: Any, depth: Int) @103, fn z3_solver_check(solver: Any) -> Any @106 // - fn z3_result_name(result: Any) -> String @109, fn z3_solver_check_name(solver: Any) -> String @112 // - fn z3_is_sat(result: Any) -> Bool @115, fn z3_is_unsat(result: Any) -> Bool @118 // - fn z3_is_unknown(result: Any) -> Bool @121, fn z3_solver_model(solver: Any) -> Any @124 // - fn z3_model_eval(model: Any, expr: Any) -> Any @127, fn z3_as_long(value: Any) -> Int @130 // - fn z3_as_string(value: Any) -> String @133, fn z3_repr(value: Any) -> String @136 // // ### `std::zip` (stdlib/zip.kn, public=9, private=0) // // - constants: // - const ZIP_LOCAL_HEADER_SIG: Int @4, const ZIP_CENTRAL_HEADER_SIG: Int @5, const ZIP_EOCD_SIG: Int @6 // - types: // - struct ZipLocalHeader @8, struct ZipCentralHeader @20, struct ZipEocd @38 // - functions: // - fn zip_write_local_header(buffer: ptr, header: ZipLocalHeader) -> Int @49 // - fn zip_read_local_header(buffer: ptr) -> ZipLocalHeader @61 // - fn zip_write_eocd(buffer: ptr, eocd: ZipEocd) -> Int @88 // // ## Rust Builtins // // - fn abs(x: Int) -> Int, fn args() -> Array, fn ask(actor: ActorRef, message: String, request: Any) -> Any // - fn ask_timeout(actor: ActorRef, message: String, request: Any, timeout_ms: Int) -> Any // - fn assert(condition: Bool, message: String) -> Unit, fn byte_at(s: String, index: Int) -> Int // - fn ceil(x: Float) -> Int, fn char_at(s: String, index: Int) -> String, fn chr(codepoint: Int) -> String // - fn clamp(x: Int, lo: Int, hi: Int) -> Int // - fn command_run(program: String, args: Array, workdir: String) -> CommandRunResult // - fn contains(s: String, sub: String) -> Bool, fn copy_file(src: String, dest: String) -> Unit // - fn cos(x: Float) -> Float, fn create_dir_all(path: String) -> Unit, fn cross(a: Vec3, b: Vec3) -> Vec3 // - fn cwd() -> String, fn dbg(value: Any) -> Any, fn distance(a: Vec3, b: Vec3) -> Float // - fn dot(a: Vec3, b: Vec3) -> Float, fn ends_with(s: String, suffix: String) -> Bool, fn env(name: String) -> String // - fn file_exists(path: String) -> Bool, fn filter(array: Array, fn: Function) -> Array // - fn find_substring_from(s: String, needle: String, start: Int) -> Int, fn floor(x: Float) -> Int // - fn fs_append_bytes(path: String, bytes: Array) -> Unit, fn fs_append_text(path: String, content: String) -> Unit // - fn fs_atomic_write_bytes(path: String, bytes: Array) -> Unit // - fn fs_atomic_write_text(path: String, content: String) -> Unit, fn fs_capability_describe() -> String // - fn fs_capability_grant(capability: String) -> Unit, fn fs_capability_has(capability: String) -> Bool // - fn fs_capability_revoke(capability: String) -> Unit, fn fs_copy_file(src: String, dest: String) -> Int // - fn fs_copy_file_streaming(src: String, dest: String, chunk_size: Int) -> Int // - fn fs_copy_path(src: String, dest: String) -> Unit, fn fs_create_dir(path: String) -> Unit // - fn fs_create_dir_all(path: String) -> Unit, fn fs_exists(path: String) -> Bool // - fn fs_glob(path: String) -> Array, fn fs_hash_file(path: String) -> String, fn fs_is_dir(path: String) -> Bool // - fn fs_is_file(path: String) -> Bool, fn fs_is_symlink(path: String) -> Bool // - fn fs_metadata(path: String) -> FsMetadata, fn fs_metadata_text(path: String) -> String // - fn fs_mount(key: String, root: String, mode: String) -> Unit, fn fs_move_path(src: String, dest: String) -> Unit // - fn fs_path_absolute(path: String) -> String, fn fs_path_canonicalize(path: String) -> String // - fn fs_path_extension(path: String) -> String, fn fs_path_file_name(path: String) -> String // - fn fs_path_join(src: String, dest: String) -> String, fn fs_path_normalize(path: String) -> String // - fn fs_path_parent(path: String) -> String, fn fs_path_stem(path: String) -> String // - fn fs_read_byte_range_hex(path: String, offset: Int, length: Int) -> String // - fn fs_read_bytes(path: String) -> Array, fn fs_read_bytes_hex(path: String) -> String // - fn fs_read_bytes_range(path: String, offset: Int, length: Int) -> Array // - fn fs_read_dir(path: String) -> Array, fn fs_read_dir_paths(path: String) -> Array // - fn fs_read_dir_paths_text(path: String) -> String, fn fs_read_text(path: String) -> String // - fn fs_read_text_range(path: String, offset: Int, length: Int) -> String, fn fs_remove_dir(path: String) -> Unit // - fn fs_remove_dir_all(path: String) -> Unit, fn fs_remove_file(path: String) -> Unit // - fn fs_remove_path(path: String) -> Unit, fn fs_resolve(path: String) -> String // - fn fs_sandbox_allow_host_paths(allow: Bool) -> Unit // - fn fs_stream_chunks(path: String, chunk_size: Int) -> Array // - fn fs_symlink_metadata(path: String) -> FsMetadata, fn fs_temp_dir(path: String) -> String // - fn fs_temp_file(path: String) -> String, fn fs_try_append_bytes(path: String, bytes: Array) -> Any // - fn fs_try_append_text(path: String, content: String) -> Any // - fn fs_try_atomic_write_text(path: String, content: String) -> Any // - fn fs_try_copy_file(src: String, dest: String) -> Any, fn fs_try_copy_path(src: String, dest: String) -> Any // - fn fs_try_create_dir(path: String) -> Any, fn fs_try_create_dir_all(path: String) -> Any // - fn fs_try_glob(path: String) -> Any, fn fs_try_hash_file(path: String) -> Any, fn fs_try_metadata(path: String) -> Any // - fn fs_try_move_path(src: String, dest: String) -> Any, fn fs_try_read_bytes(path: String) -> Any // - fn fs_try_read_dir(path: String) -> Any, fn fs_try_read_dir_paths(path: String) -> Any // - fn fs_try_read_text(path: String) -> Any, fn fs_try_remove_dir(path: String) -> Any // - fn fs_try_remove_dir_all(path: String) -> Any, fn fs_try_remove_file(path: String) -> Any // - fn fs_try_remove_path(path: String) -> Any, fn fs_try_symlink_metadata(path: String) -> Any // - fn fs_try_walk(path: String) -> Any, fn fs_try_write_bytes(path: String, bytes: Array) -> Any // - fn fs_try_write_text(path: String, content: String) -> Any // - fn fs_tx_append_text(transaction_id: Int, path: String, content: String) -> Unit, fn fs_tx_begin() -> Int // - fn fs_tx_commit(transaction_id: Int) -> Array // - fn fs_tx_copy_path(transaction_id: Int, src: String, dest: String) -> Unit // - fn fs_tx_move_path(transaction_id: Int, src: String, dest: String) -> Unit // - fn fs_tx_remove_path(transaction_id: Int, path: String) -> Unit // - fn fs_tx_rollback(transaction_id: Int) -> Array // - fn fs_tx_write_text(transaction_id: Int, path: String, content: String) -> Unit, fn fs_unmount(key: String) -> Bool // - fn fs_walk(path: String) -> Array, fn fs_walk_paths_text(path: String) -> String // - fn fs_watch(path: String, recursive: Bool) -> Int, fn fs_watch_close(watcher_id: Int) -> Bool // - fn fs_watch_poll(watcher_id: Int) -> Array, fn fs_write_bytes(path: String, bytes: Array) -> Unit // - fn fs_write_bytes_at(path: String, offset: Int, bytes: Array) -> Unit // - fn fs_write_bytes_hex(path: String, hex: String) -> Unit // - fn fs_write_bytes_hex_at(path: String, offset: Int, hex: String) -> Unit // - fn fs_write_text(path: String, content: String) -> Unit // - fn fs_write_text_at(path: String, offset: Int, content: String) -> Unit // - fn input_action_down(session_id: Int, action: String) -> Int // - fn input_action_pressed(session_id: Int, action: String) -> Int // - fn input_action_released(session_id: Int, action: String) -> Int // - fn input_axis_value(session_id: Int, axis: String) -> Float // - fn input_begin_frame(session_id: Int, delta_ms: Float) -> Int // - fn input_bind_action(session_id: Int, source_kind: String, event_kind: String, code: String, action: String) -> Int // - fn input_bind_axis(session_id: Int, source_kind: String, event_kind: String, code: String, axis: String, scale: Float) -> Int // - fn input_push_agent_intent(session_id: Int, source_id: String, action: String, command_text: String, confidence: Float) -> Int // - fn input_push_event(session_id: Int, source_kind: String, source_id: String, event_kind: String, code: String, value: Float, text: String, confidence: Float) -> Int // - fn input_reset() -> Int, fn input_session_create(name: String) -> Int, fn input_trace_json(session_id: Int) -> String // - fn join(arr: Array, sep: String) -> String, fn json_any_kind(value: Any) -> Int // - fn json_any_to_float(value: Any) -> Float, fn json_any_to_int(value: Any) -> Int // - fn json_any_to_string(value: Any) -> String, fn json_array_get(array: Any, index: Int) -> Any // - fn json_array_len(array: Any) -> Int, fn json_array_new() -> Array // - fn json_array_push(array: Any, value: Any) -> Unit, fn json_get(object: Any, key: String) -> Any // - fn json_get_bool(object: Any, key: String) -> Bool, fn json_get_float(object: Any, key: String) -> Float // - fn json_get_int(object: Any, key: String) -> Int, fn json_get_string(object: Any, key: String) -> String // - fn json_has(object: Any, key: String) -> Bool, fn json_object_new() -> Any // - fn json_object_set(object: Any, key: String, value: Any) -> Unit, fn json_parse(text: String) -> Any // - fn json_string(value: Any) -> String, fn kain_input_action_down(session_id: Int, action: String) -> Int // - fn kain_input_action_pressed(session_id: Int, action: String) -> Int // - fn kain_input_action_released(session_id: Int, action: String) -> Int // - fn kain_input_axis_value(session_id: Int, axis: String) -> Float // - fn kain_input_begin_frame(session_id: Int, delta_ms: Float) -> Int // - fn kain_input_bind_action(session_id: Int, source_kind: String, event_kind: String, code: String, action: String) -> Int // - fn kain_input_bind_axis(session_id: Int, source_kind: String, event_kind: String, code: String, axis: String, scale: Float) -> Int // - fn kain_input_event_action(session_id: Int, index: Int) -> String // - fn kain_input_event_code(session_id: Int, index: Int) -> String, fn kain_input_event_count(session_id: Int) -> Int // - fn kain_input_event_kind(session_id: Int, index: Int) -> String // - fn kain_input_event_source_kind(session_id: Int, index: Int) -> String // - fn kain_input_event_text(session_id: Int, index: Int) -> String, fn kain_input_frame_index(session_id: Int) -> Int // - fn kain_input_push_agent_intent(session_id: Int, source_id: String, action: String, command_text: String, confidence: Float) -> Int // - fn kain_input_push_event(session_id: Int, source_kind: String, source_id: String, event_kind: String, code: String, value: Float, text: String, confidence: Float) -> Int // - fn kain_input_replay_trace_json(session_id: Int, trace_json: String) -> Int, fn kain_input_reset() -> Int // - fn kain_input_session_create(name: String) -> Int, fn kain_input_session_destroy(session_id: Int) -> Int // - fn kain_input_text_commit(session_id: Int, index: Int) -> String // - fn kain_input_text_commit_count(session_id: Int) -> Int, fn kain_input_trace_json(session_id: Int) -> String // - fn len(collection: Any) -> Int, fn length(v: Vec3) -> Float, fn map(array: Array, fn: Function) -> Array // - fn map_get(map: Any, key: String) -> Any, fn map_new() -> Any, fn map_set(map: Any, key: String, value: Any) -> Unit // - fn max(a: Int, b: Int) -> Int, fn min(a: Int, b: Int) -> Int, fn mix(a: Float, b: Float, t: Float) -> Float // - fn mount(component: Any, selector: String) -> Unit, fn native_config_flag(key: String, enabled: Int) -> Unit // - fn native_config_float(key: String, value: Float) -> Unit, fn native_config_int(key: String, value: Int) -> Unit // - fn native_config_string(key: String, value: String) -> Unit, fn normalize(v: Vec3) -> Vec3, fn now() -> Float // - fn ord(s: String) -> Int, fn panic(message: String) -> Never, fn path_extension(path: String) -> String // - fn path_file_name(path: String) -> String, fn path_is_dir(path: String) -> Bool, fn path_is_file(path: String) -> Bool // - fn path_join(base: String, child: String) -> String, fn path_parent(path: String) -> String // - fn path_stem(path: String) -> String, fn pop(array: Array) -> Any, fn pow(base: Float, exp: Float) -> Float // - fn print(value: Any) -> Unit, fn println(value: Any) -> Unit, fn push(array: Array, value: Any) -> Unit // - fn range(start: Int, end: Int) -> Array, fn read_dir(path: String) -> Array // - fn read_file(path: String) -> String, fn read_line() -> String // - fn reduce(array: Array, initial: Any, fn: Function) -> Any, fn remove_file(path: String) -> Unit // - fn replace(s: String, from: String, to: String) -> String, fn round(x: Float) -> Int // - fn send(actor: ActorRef, message: Message) -> Unit, fn sin(x: Float) -> Float, fn sleep(seconds: Float) -> Unit // - fn smoothstep(edge0: Float, edge1: Float, x: Float) -> Float, fn socket_connect(host: String, port: Int) -> Int // - fn socket_recv(sock: Int) -> String, fn socket_send(sock: Int, data: String) -> Unit // - fn spawn(actor: Actor) -> ActorRef, fn spawn_cube(x: Float, y: Float) -> Unit // - fn spawn_native_sculpt_lab(x: Float, y: Float) -> Unit, fn spawn_native_viewport(x: Float, y: Float) -> Unit // - fn split(s: String, sep: String) -> Array, fn sqrt(x: Float) -> Float // - fn starts_with(s: String, prefix: String) -> Bool, fn stderr_write(value: String) -> Unit // - fn stdin_read_exact(length: Int) -> String, fn stdout_write(value: String) -> Unit // - fn substring(s: String, start: Int, end: Int) -> String, fn tan(x: Float) -> Float, fn to_float(value: Any) -> Float // - fn to_int(value: Any) -> Int, fn to_lower(s: String) -> String, fn to_string(value: Any) -> String // - fn to_upper(s: String) -> String, fn trim(s: String) -> String, fn vec2(x: Float, y: Float) -> Vec2 // - fn vec3(x: Float, y: Float, z: Float) -> Vec3, fn vec4(x: Float, y: Float, z: Float, w: Float) -> Vec4 // - fn write_file(path: String, content: String) -> Unit // // ## Native Runtime Services // // - `actor.registry`: available optional on all declared platforms - Named actor registration and lookup // - `actor.runtime`: available optional on all declared platforms - Actor spawn, mailbox, lifecycle, and scheduling // - `asset.gltf`: degraded optional on all declared platforms - The legacy runtime-owned glTF loader was removed from the active runtime; authored packages or blade-owned loaders must satisfy this seam // - `asset.ingestion`: available optional on all declared platforms - Canonical descriptor-driven entry path for assets and emitted bundles // - `asset.realtime`: available optional on all declared platforms - Realtime bundle loading and scene management // - `async.runtime`: available optional on all declared platforms - Task/future execution, wake/poll, and cancellation // - `async.timers`: available optional on all declared platforms - Timer registration and wake delivery // - `base.diagnostics`: available required on all declared platforms - Structured diagnostics and error reporting // - `base.memory`: available required on all declared platforms - Core allocation, retain/release, and memory management // - `compatibility`: available optional on all declared platforms - Version validation, migration, hot reload, and snapshot flow // - `contract`: available required on all declared platforms - Runtime contract bundle loading and validation // - `control.converge.autotune`: available optional on all declared platforms - Proof-bounded native converge lane selection, warm cache state, and fixed-ring telemetry for future silicon autotuning // - `control.runtime-tiers`: available optional on all declared platforms - Compile-time no-op, gated, and full-cost control tiers for diagnostics, profiling, and relocation bookkeeping // - `cpu.capabilities`: available optional on all declared platforms - Runtime-published CPU feature bits for compiled converge selectors, including x86 AVX/AVX2/AVX-512 gates // - `data.json`: available optional on all declared platforms - Native JSON parse/render/object/array helpers for LLVM builtin calls over string, integer, boolean, null, object, and array values // - `device.reflection`: available optional on all declared platforms - Backend, GPU, display, and hotplug capability descriptors // - `gfx.backend.d3d12`: degraded optional on windows - Runtime-owned DirectX 12 backend identity and capability target; concrete presenters live outside the C runtime // - `gfx.backend.vulkan`: degraded optional on windows, linux - Runtime-owned Vulkan backend identity and capability target; concrete presenters live outside the C runtime // - `gfx.compute`: available optional on all declared platforms - Compute bundle validation, dispatch planning, and native runtime handoff // - `gfx.compute.cuda`: degraded optional on windows, linux - Windows-first NVIDIA PTX sidecar dispatch bridge backed by the external kain-gpu-runtime driver lane // - `gfx.raw-native`: available optional on all declared platforms - Catalog-free graphics kernel for Kain-authored engines, buffers, SPIR-V modules, pipelines, and draw commands // - `gfx.shader.spirv`: available optional on all declared platforms - Canonical native shader payload registration for Kain-authored graphics and compute pipelines // - `gfx.viewport`: degraded optional on windows - Platform window handles and presenter attachment contract; concrete presenters now live in blades or packages // - `host.bridge`: available optional on all declared platforms - Plugin and foreign service integration // - `interop.shared-contracts`: available optional on all declared platforms - Runtime-owned shared buffer/image handles plus neutral info and byte snapshot lanes for Python, JS, GPU, and foreign host bridges // - `io.net`: available optional on windows, linux, macos - Native TCP, protocol-aware HTTP client/server, capability-query, and Windows-first HTTPS/HTTP2 client primitives // - `io.process`: available optional on windows, linux, macos - Native child-process, pipe, and PTY session management // - `machine.stones`: available optional on all declared platforms - Native axiom predicates, pulse scheduler/snapshots, shatter SoA lane buffers, and teleport zero-copy handoff telemetry // - `machine.topology`: available optional on windows, linux, macos - Native logical-CPU count, thread identity, and current-thread affinity controls for systems blades // - `machine.virtual-memory`: available optional on windows, linux, macos - Native page-size, map/unmap, and page-protection ABI for authored systems code // - `memory.atomic-seqcst`: available optional on windows, linux, macos - Canonical seq-cst atomic cell ABI for native shared-memory fanout and LLVM fallback surfaces // - `memory.atomic-v2`: available optional on windows, linux, macos - Explicit memory-order atomic load/store/RMW/CAS/fence ABI including bitwise RMW operations // - `memory.fixup`: available optional on all declared platforms - Known-ref registration, self-updating pointer patching, and handle-aware relocation tracking for helper-owned allocations // - `memory.handles`: available optional on all declared platforms - Index plus magic runtime handles for stale rejection across relocation and control-plane surfaces // - `memory.ownership`: available required on all declared platforms - Native collapse/observe/decay guards for helper-owned heap regions and imported pointer lifetimes // - `memory.shared-fanout`: available optional on windows, linux, macos - Native shared-memory fanout over real OS threads for compiler-owned share/fanout lowering // - `memory.volatile`: available optional on windows, linux, macos - Byte-exact volatile load/store ABI for MMIO and externally-observed memory // - `platform.app-host`: available required on windows - Raw Win32 app/window host substrate without baked presenters or app policy // - `platform.input`: available required on windows - Canonical Kain input sessions, semantic actions, replay traces, and native platform event handling // - `platform.library`: available optional on windows, linux, macos - Raw platform dynamic library open/resolve/close substrate for generated typed platform packages; no generic public ABI call surface is exposed // - `reflection`: available optional on all declared platforms - Reflection payload loading and runtime type lookup // - `runtime.inspection`: available optional on all declared platforms - Runtime-owned scene, resource, and binding inspection queries // - `runtime.profile`: available optional on all declared platforms - Scoped push/pop profiling zones with compile-out tiers and fixed-cost native timing telemetry // - `scene.mutation`: available optional on all declared platforms - Transactional scene mutation requests and receipts // - `scene.query`: available optional on all declared platforms - Picking, raycast, bounds, visibility, and selection query contracts // - `scene.runtime`: available optional on all declared platforms - Stable native scene handles and runtime-owned scene state access // - `ui.bundle`: available optional on all declared platforms - Compiled UI bundle loading and overlay rendering // - `ui.component`: available optional on all declared platforms - Component state, invalidation, focus, and event routing //!end-kain-file //!kain-file // path = "actor.kn" // kind = "text" // encoding = "utf8" // bytes = 10541 // sha256 = "sha256:4893cd07281655dbed56175c0b935c6d063dc83a558d6c0be6fa60379c73d0e1" // trailing_newline = true //!kain-file-content // @extern // fn abi_actor_abi_version() -> Int // // @extern // fn abi_actor_invalid_id() -> Int // // @extern // fn abi_actor_default_mailbox_capacity() -> Int // // @extern // fn abi_actor_unbounded_mailbox_capacity() -> Int // // @extern // fn abi_actor_default_ask_timeout_ms() -> Int // // @extern // fn abi_actor_default_shutdown_grace_ms() -> Int // // @extern // fn abi_actor_supervision_max_restarts() -> Int // // @extern // fn abi_actor_supervision_restart_window_millis() -> Int // // @extern // fn abi_actor_spawn(actor_name: String, init_payload: String) -> Int // // @extern // fn abi_actor_send(actor_id: Int, message_name: String, data_payload: String) -> Int // // @extern // fn abi_actor_state_invalid(actor_id: Int) -> Bool // // @extern // fn abi_actor_get_state(actor_id: Int) -> Int // // @extern // fn abi_actor_shutdown(actor_id: Int) -> Int // // @extern // fn abi_actor_kill(actor_id: Int) -> Int // // @extern // fn abi_actor_registry_lookup(name: String) -> Int // // @extern // fn abi_actor_registry_register(name: String, actor_id: Int) -> Int // // @extern // fn abi_actor_registry_unregister(name: String) -> Int // // @extern // fn abi_actor_monitor(monitor_id: Int, monitored_id: Int) -> Int // // @extern // fn abi_actor_demonitor(monitor_id: Int, monitored_id: Int) -> Int // // @extern // fn abi_actor_link(actor_a: Int, actor_b: Int) -> Int // // @extern // fn abi_actor_unlink(actor_a: Int, actor_b: Int) -> Int // // @extern // fn abi_actor_supervision_observed_child_exit_count(actor_id: Int) -> Int // // @extern // fn abi_actor_supervision_restart_attempt_count(actor_id: Int) -> Int // // @extern // fn abi_actor_supervision_escalation_count(actor_id: Int) -> Int // // @extern // fn abi_actor_supervision_limit_hit(actor_id: Int) -> Bool // // @extern // fn abi_actor_scheduler_queue_depth() -> Int // // @extern // fn abi_actor_scheduler_max_queue_depth() -> Int // // @extern // fn abi_actor_scheduler_total_enqueued() -> Int // // @extern // fn abi_actor_scheduler_total_dequeued() -> Int // // @extern // fn abi_actor_scheduler_worker_count() -> Int // // @extern // fn abi_actor_scheduler_active_workers() -> Int // // @extern // fn abi_actor_scheduler_busy_workers() -> Int // // @extern // fn abi_actor_scheduler_overflow_thread_spawns() -> Int // // pub fn native_actor_invalid_id() -> Int: // return abi_actor_invalid_id() // // pub fn native_actor_abi_version() -> Int: // return abi_actor_abi_version() // // pub fn native_actor_default_mailbox_capacity() -> Int: // return abi_actor_default_mailbox_capacity() // // pub fn native_actor_unbounded_mailbox_capacity() -> Int: // return abi_actor_unbounded_mailbox_capacity() // // pub fn native_actor_default_ask_timeout_ms() -> Int: // return abi_actor_default_ask_timeout_ms() // // pub fn native_actor_default_shutdown_grace_ms() -> Int: // return abi_actor_default_shutdown_grace_ms() // // pub fn native_actor_supervision_max_restarts() -> Int: // return abi_actor_supervision_max_restarts() // // pub fn native_actor_supervision_restart_window_millis() -> Int: // return abi_actor_supervision_restart_window_millis() // // pub fn native_actor_spawn(actor_name: String, init_payload: String) -> Int: // return abi_actor_spawn(actor_name, init_payload) // // pub fn native_actor_send(actor_id: Int, message_name: String, data_payload: String) -> Int: // return abi_actor_send(actor_id, message_name, data_payload) // // pub fn native_actor_id_is_valid(actor_id: Int) -> Bool: // return actor_id != native_actor_invalid_id() // // pub fn native_actor_state_invalid(actor_id: Int) -> Bool: // return abi_actor_state_invalid(actor_id) // // pub fn native_actor_get_state(actor_id: Int) -> Int: // return abi_actor_get_state(actor_id) // // pub fn native_actor_is_running(actor_id: Int) -> Bool: // return native_actor_get_state(actor_id) == 2 // // pub fn native_actor_is_terminal(actor_id: Int) -> Bool: // let actor_status = native_actor_get_state(actor_id) // if actor_status == 5: // return true // return actor_status == 6 // // pub fn native_actor_shutdown(actor_id: Int) -> Int: // return abi_actor_shutdown(actor_id) // // pub fn native_actor_kill(actor_id: Int) -> Int: // return abi_actor_kill(actor_id) // // pub fn native_actor_registry_lookup(name: String) -> Int: // return abi_actor_registry_lookup(name) // // pub fn native_actor_registry_register(name: String, actor_id: Int) -> Int: // return abi_actor_registry_register(name, actor_id) // // pub fn native_actor_registry_unregister(name: String) -> Int: // return abi_actor_registry_unregister(name) // // pub fn native_actor_registry_has(name: String) -> Bool: // return native_actor_id_is_valid(native_actor_registry_lookup(name)) // // pub fn native_actor_monitor(monitor_id: Int, monitored_id: Int) -> Int: // return abi_actor_monitor(monitor_id, monitored_id) // // pub fn native_actor_demonitor(monitor_id: Int, monitored_id: Int) -> Int: // return abi_actor_demonitor(monitor_id, monitored_id) // // pub fn native_actor_link(actor_a: Int, actor_b: Int) -> Int: // return abi_actor_link(actor_a, actor_b) // // pub fn native_actor_unlink(actor_a: Int, actor_b: Int) -> Int: // return abi_actor_unlink(actor_a, actor_b) // // pub fn native_actor_supervision_observed_child_exit_count(actor_id: Int) -> Int: // return abi_actor_supervision_observed_child_exit_count(actor_id) // // pub fn native_actor_supervision_restart_attempt_count(actor_id: Int) -> Int: // return abi_actor_supervision_restart_attempt_count(actor_id) // // pub fn native_actor_supervision_escalation_count(actor_id: Int) -> Int: // return abi_actor_supervision_escalation_count(actor_id) // // pub fn native_actor_supervision_limit_hit(actor_id: Int) -> Bool: // return abi_actor_supervision_limit_hit(actor_id) // // pub fn native_actor_scheduler_queue_depth() -> Int: // return abi_actor_scheduler_queue_depth() // // pub fn native_actor_scheduler_max_queue_depth() -> Int: // return abi_actor_scheduler_max_queue_depth() // // pub fn native_actor_scheduler_total_enqueued() -> Int: // return abi_actor_scheduler_total_enqueued() // // pub fn native_actor_scheduler_total_dequeued() -> Int: // return abi_actor_scheduler_total_dequeued() // // pub fn native_actor_scheduler_worker_count() -> Int: // return abi_actor_scheduler_worker_count() // // pub fn native_actor_scheduler_active_workers() -> Int: // return abi_actor_scheduler_active_workers() // // pub fn native_actor_scheduler_busy_workers() -> Int: // return abi_actor_scheduler_busy_workers() // // pub fn native_actor_scheduler_overflow_thread_spawns() -> Int: // return abi_actor_scheduler_overflow_thread_spawns() // // # root-domain aliases: generated public std names // pub fn actor_invalid_id() -> Int: // return native_actor_invalid_id() // // pub fn actor_abi_version() -> Int: // return native_actor_abi_version() // // pub fn actor_default_mailbox_capacity() -> Int: // return native_actor_default_mailbox_capacity() // // pub fn actor_unbounded_mailbox_capacity() -> Int: // return native_actor_unbounded_mailbox_capacity() // // pub fn actor_default_ask_timeout_ms() -> Int: // return native_actor_default_ask_timeout_ms() // // pub fn actor_default_shutdown_grace_ms() -> Int: // return native_actor_default_shutdown_grace_ms() // // pub fn actor_supervision_max_restarts() -> Int: // return native_actor_supervision_max_restarts() // // pub fn actor_supervision_restart_window_millis() -> Int: // return native_actor_supervision_restart_window_millis() // // pub fn actor_spawn(actor_name: String, init_payload: String) -> Int: // return native_actor_spawn(actor_name, init_payload) // // pub fn actor_send(actor_id: Int, message_name: String, data_payload: String) -> Int: // return native_actor_send(actor_id, message_name, data_payload) // // pub fn actor_id_is_valid(actor_id: Int) -> Bool: // return native_actor_id_is_valid(actor_id) // // pub fn actor_state_invalid(actor_id: Int) -> Bool: // return native_actor_state_invalid(actor_id) // // pub fn actor_get_state(actor_id: Int) -> Int: // return native_actor_get_state(actor_id) // // pub fn actor_is_running(actor_id: Int) -> Bool: // return native_actor_is_running(actor_id) // // pub fn actor_is_terminal(actor_id: Int) -> Bool: // return native_actor_is_terminal(actor_id) // // pub fn actor_shutdown(actor_id: Int) -> Int: // return native_actor_shutdown(actor_id) // // pub fn actor_kill(actor_id: Int) -> Int: // return native_actor_kill(actor_id) // // pub fn actor_registry_lookup(name: String) -> Int: // return native_actor_registry_lookup(name) // // pub fn actor_registry_register(name: String, actor_id: Int) -> Int: // return native_actor_registry_register(name, actor_id) // // pub fn actor_registry_unregister(name: String) -> Int: // return native_actor_registry_unregister(name) // // pub fn actor_registry_has(name: String) -> Bool: // return native_actor_registry_has(name) // // pub fn actor_monitor(monitor_id: Int, monitored_id: Int) -> Int: // return native_actor_monitor(monitor_id, monitored_id) // // pub fn actor_demonitor(monitor_id: Int, monitored_id: Int) -> Int: // return native_actor_demonitor(monitor_id, monitored_id) // // pub fn actor_link(actor_a: Int, actor_b: Int) -> Int: // return native_actor_link(actor_a, actor_b) // // pub fn actor_unlink(actor_a: Int, actor_b: Int) -> Int: // return native_actor_unlink(actor_a, actor_b) // // pub fn actor_supervision_observed_child_exit_count(actor_id: Int) -> Int: // return native_actor_supervision_observed_child_exit_count(actor_id) // // pub fn actor_supervision_restart_attempt_count(actor_id: Int) -> Int: // return native_actor_supervision_restart_attempt_count(actor_id) // // pub fn actor_supervision_escalation_count(actor_id: Int) -> Int: // return native_actor_supervision_escalation_count(actor_id) // // pub fn actor_supervision_limit_hit(actor_id: Int) -> Bool: // return native_actor_supervision_limit_hit(actor_id) // // pub fn actor_scheduler_queue_depth() -> Int: // return native_actor_scheduler_queue_depth() // // pub fn actor_scheduler_max_queue_depth() -> Int: // return native_actor_scheduler_max_queue_depth() // // pub fn actor_scheduler_total_enqueued() -> Int: // return native_actor_scheduler_total_enqueued() // // pub fn actor_scheduler_total_dequeued() -> Int: // return native_actor_scheduler_total_dequeued() // // pub fn actor_scheduler_worker_count() -> Int: // return native_actor_scheduler_worker_count() // // pub fn actor_scheduler_active_workers() -> Int: // return native_actor_scheduler_active_workers() // // pub fn actor_scheduler_busy_workers() -> Int: // return native_actor_scheduler_busy_workers() // // pub fn actor_scheduler_overflow_thread_spawns() -> Int: // return native_actor_scheduler_overflow_thread_spawns() // # end root-domain aliases //!end-kain-file //!kain-file // path = "alloc.kn" // kind = "text" // encoding = "utf8" // bytes = 7635 // sha256 = "sha256:5aa62d57a7a49f7d53db6c03b33c07c4ce19708056a5de0f1f71c7dbf64ba6ed" // trailing_newline = true //!kain-file-content // use std::collections // // pub struct BumpAllocator: // buffer: ptr // capacity: Int // cursor: Int // // pub struct BumpAllocation: // allocator: BumpAllocator // ptr: ptr // offset: Int // cells: Int // ok: Bool // // pub struct ArenaAllocator: // buffer: ptr // capacity: Int // cursor: Int // high_water: Int // // pub struct ArenaAllocation: // arena: ArenaAllocator // ptr: ptr // offset: Int // cells: Int // ok: Bool // // pub struct PoolAllocator: // buffer: ptr // free_stack: ptr // block_cells: Int // block_count: Int // free_count: Int // // pub struct PoolAllocation: // pool: PoolAllocator // ptr: ptr // block_index: Int // ok: Bool // // pub fn bump_allocator_create(cells: Int) -> BumpAllocator: // let safe_cells = int_max(cells, 1) // return BumpAllocator { buffer: alloc_zeroed(safe_cells, "Int"), capacity: safe_cells, cursor: 0 } // // pub fn bump_allocator_remaining(allocator: BumpAllocator) -> Int: // return int_max(allocator.capacity - allocator.cursor, 0) // // pub fn bump_allocator_reset(allocator: BumpAllocator) -> BumpAllocator: // return BumpAllocator { buffer: allocator.buffer, capacity: allocator.capacity, cursor: 0 } // // pub fn bump_alloc_cells(allocator: BumpAllocator, cells: Int) -> BumpAllocation: // let safe_cells = int_max(cells, 0) // if safe_cells == 0: // return BumpAllocation { allocator: allocator, ptr: allocator.buffer, offset: allocator.cursor, cells: 0, ok: true } // if allocator.cursor + safe_cells > allocator.capacity: // return BumpAllocation { allocator: allocator, ptr: allocator.buffer, offset: allocator.cursor, cells: 0, ok: false } // let offset = allocator.cursor // let next_allocator = BumpAllocator { buffer: allocator.buffer, capacity: allocator.capacity, cursor: allocator.cursor + safe_cells } // return BumpAllocation { allocator: next_allocator, ptr: ptr_offset(allocator.buffer, offset, "Int"), offset: offset, cells: safe_cells, ok: true } // // pub fn bump_allocator_destroy(allocator: BumpAllocator) -> Int: // decay allocator.buffer // return 0 // // pub fn arena_allocator_create(cells: Int) -> ArenaAllocator: // let safe_cells = int_max(cells, 1) // return ArenaAllocator { buffer: alloc_zeroed(safe_cells, "Int"), capacity: safe_cells, cursor: 0, high_water: 0 } // // pub fn arena_allocator_remaining(arena: ArenaAllocator) -> Int: // return int_max(arena.capacity - arena.cursor, 0) // // pub fn arena_allocator_reset(arena: ArenaAllocator) -> ArenaAllocator: // return ArenaAllocator { buffer: arena.buffer, capacity: arena.capacity, cursor: 0, high_water: arena.high_water } // // pub fn arena_alloc_cells(arena: ArenaAllocator, cells: Int) -> ArenaAllocation: // let safe_cells = int_max(cells, 0) // if safe_cells == 0: // return ArenaAllocation { arena: arena, ptr: arena.buffer, offset: arena.cursor, cells: 0, ok: true } // if arena.cursor + safe_cells > arena.capacity: // return ArenaAllocation { arena: arena, ptr: arena.buffer, offset: arena.cursor, cells: 0, ok: false } // let offset = arena.cursor // let next_cursor = arena.cursor + safe_cells // let next_high_water = int_max(arena.high_water, next_cursor) // let next_arena = ArenaAllocator { buffer: arena.buffer, capacity: arena.capacity, cursor: next_cursor, high_water: next_high_water } // return ArenaAllocation { arena: next_arena, ptr: ptr_offset(arena.buffer, offset, "Int"), offset: offset, cells: safe_cells, ok: true } // // pub fn arena_allocator_destroy(arena: ArenaAllocator) -> Int: // decay arena.buffer // return 0 // // pub fn pool_allocator_create(block_count: Int, block_cells: Int) -> PoolAllocator: // let safe_blocks = int_max(block_count, 1) // let safe_block_cells = int_max(block_cells, 1) // let buffer = alloc_zeroed(safe_blocks * safe_block_cells, "Int") // let free_stack = alloc_zeroed(safe_blocks, "Int") // var index = 0 // while index < safe_blocks: // mem_store(ptr_offset(free_stack, index, "Int"), safe_blocks - index - 1, "Int") // index = index + 1 // return PoolAllocator { buffer: buffer, free_stack: free_stack, block_cells: safe_block_cells, block_count: safe_blocks, free_count: safe_blocks } // // pub fn pool_allocator_available(pool: PoolAllocator) -> Int: // return pool.free_count // // pub fn pool_alloc_block(pool: PoolAllocator) -> PoolAllocation: // if pool.free_count <= 0: // return PoolAllocation { pool: pool, ptr: pool.buffer, block_index: -1, ok: false } // let stack_slot = pool.free_count - 1 // let block_index = mem_load(ptr_offset(pool.free_stack, stack_slot, "Int"), "Int") // let next_pool = PoolAllocator { buffer: pool.buffer, free_stack: pool.free_stack, block_cells: pool.block_cells, block_count: pool.block_count, free_count: stack_slot } // return PoolAllocation { pool: next_pool, ptr: ptr_offset(pool.buffer, block_index * pool.block_cells, "Int"), block_index: block_index, ok: true } // // pub fn pool_free_block(pool: PoolAllocator, block_index: Int) -> PoolAllocator: // if block_index < 0: // return pool // if block_index >= pool.block_count: // return pool // if pool.free_count >= pool.block_count: // return pool // mem_store(ptr_offset(pool.free_stack, pool.free_count, "Int"), block_index, "Int") // return PoolAllocator { buffer: pool.buffer, free_stack: pool.free_stack, block_cells: pool.block_cells, block_count: pool.block_count, free_count: pool.free_count + 1 } // // pub fn pool_allocator_destroy(pool: PoolAllocator) -> Int: // decay pool.free_stack // decay pool.buffer // return 0 // // pub fn arena_create(cells: Int) -> ArenaAllocator: // return arena_allocator_create(cells) // // pub fn arena_alloc(arena: ArenaAllocator, cells: Int) -> ArenaAllocation: // return arena_alloc_cells(arena, cells) // // pub fn bump_create(cells: Int) -> BumpAllocator: // return bump_allocator_create(cells) // // pub fn bump_alloc(allocator: BumpAllocator, cells: Int) -> BumpAllocation: // return bump_alloc_cells(allocator, cells) // // pub fn pool_create(block_count: Int, block_cells: Int) -> PoolAllocator: // return pool_allocator_create(block_count, block_cells) // // pub fn pool_alloc(pool: PoolAllocator) -> PoolAllocation: // return pool_alloc_block(pool) // // // # --- Allocator Traits & Interfaces --- // // pub struct AllocSpan: // ptr: ptr // cells: Int // // pub struct AllocResult: // span: AllocSpan // ok: Bool // // pub struct AllocatorVTable: // alloc_fn: ptr // free_fn: ptr // resize_fn: ptr // // pub struct Allocator: // instance: ptr // vtable: ptr // // # Grow a generic buffer using standard doubling strategy or dynamic delta. // # Reallocates the buffer if requested cells exceed current capacity. // pub fn alloc_grow_buffer(buffer: ptr, current_cap: Int, needed_cap: Int) -> ptr with Unsafe: // if needed_cap <= current_cap: // return buffer // var new_cap = current_cap * 2 // if new_cap < needed_cap: // new_cap = needed_cap // let new_buf = alloc_zeroed(new_cap, "Int") // if current_cap > 0: // var i = 0 // while i < current_cap: // let val = mem_load(ptr_offset(buffer, i, "Int"), "Int") // mem_store(ptr_offset(new_buf, i, "Int"), val, "Int") // i = i + 1 // decay buffer // return new_buf // // pub fn alloc_span_slice(span: AllocSpan, start: Int, length: Int) -> AllocSpan: // if start < 0 or start + length > span.cells: // return AllocSpan { ptr: span.ptr, cells: 0 } // return AllocSpan { ptr: ptr_offset(span.ptr, start, "Int"), cells: length } // //!end-kain-file //!kain-file // path = "ascii.kn" // kind = "text" // encoding = "utf8" // bytes = 6517 // sha256 = "sha256:adb7390d880af296f10e17e4db3ab8633905876adfbcd51d6073fda6d3535592" // trailing_newline = true //!kain-file-content // pub const ASCII_NUL: Int = 0 // pub const ASCII_HT: Int = 9 // pub const ASCII_LF: Int = 10 // pub const ASCII_VT: Int = 11 // pub const ASCII_FF: Int = 12 // pub const ASCII_CR: Int = 13 // pub const ASCII_SPACE: Int = 32 // pub const ASCII_DEL: Int = 127 // // pub const ASCII_DIGITS: String = "0123456789" // pub const ASCII_LOWERCASE: String = "abcdefghijklmnopqrstuvwxyz" // pub const ASCII_UPPERCASE: String = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" // pub const ASCII_HEX_LOWERCASE: String = "0123456789abcdef" // pub const ASCII_HEX_UPPERCASE: String = "0123456789ABCDEF" // // fn ascii_byte_of(value: String) -> Int: // if len(value) != 1: // return -1 // let byte = byte_at(value, 0) // if ascii_is_byte(byte) == false: // return -1 // return byte // // pub fn ascii_is_byte(value: Int) -> Bool: // return value >= 0 and value < 128 // // pub fn ascii_is_control_byte(value: Int) -> Bool: // if ascii_is_byte(value) == false: // return false // return value <= 31 or value == ASCII_DEL // // pub fn ascii_is_whitespace_byte(value: Int) -> Bool: // if ascii_is_byte(value) == false: // return false // return value == ASCII_SPACE or (value >= ASCII_HT and value <= ASCII_CR) // // pub fn ascii_is_printable_byte(value: Int) -> Bool: // return value >= ASCII_SPACE and value < ASCII_DEL // // pub fn ascii_is_graphical_byte(value: Int) -> Bool: // return value > ASCII_SPACE and value < ASCII_DEL // // pub fn ascii_is_upper_byte(value: Int) -> Bool: // return value >= 65 and value <= 90 // // pub fn ascii_is_lower_byte(value: Int) -> Bool: // return value >= 97 and value <= 122 // // pub fn ascii_is_alpha_byte(value: Int) -> Bool: // return ascii_is_upper_byte(value) or ascii_is_lower_byte(value) // // pub fn ascii_is_digit_byte(value: Int) -> Bool: // return value >= 48 and value <= 57 // // pub fn ascii_is_alnum_byte(value: Int) -> Bool: // return ascii_is_alpha_byte(value) or ascii_is_digit_byte(value) // // pub fn ascii_is_hex_byte(value: Int) -> Bool: // if ascii_is_digit_byte(value): // return true // if value >= 65 and value <= 70: // return true // return value >= 97 and value <= 102 // // pub fn ascii_is_punctuation_byte(value: Int) -> Bool: // return ascii_is_graphical_byte(value) and ascii_is_alnum_byte(value) == false // // pub fn ascii_to_upper_byte(value: Int) -> Int: // if ascii_is_lower_byte(value): // return value - 32 // return value // // pub fn ascii_to_lower_byte(value: Int) -> Int: // if ascii_is_upper_byte(value): // return value + 32 // return value // // pub fn ascii_digit_value_byte(value: Int) -> Int: // if ascii_is_digit_byte(value): // return value - 48 // return -1 // // pub fn ascii_hex_value_byte(value: Int) -> Int: // if ascii_is_digit_byte(value): // return value - 48 // if value >= 65 and value <= 70: // return 10 + (value - 65) // if value >= 97 and value <= 102: // return 10 + (value - 97) // return -1 // // pub fn ascii_digit_char(value: Int) -> String: // if value < 0 or value > 9: // return "" // return chr(48 + value) // // pub fn ascii_hex_char_lower(value: Int) -> String: // if value < 0 or value > 15: // return "" // if value < 10: // return ascii_digit_char(value) // return chr(87 + value) // // pub fn ascii_hex_char_upper(value: Int) -> String: // if value < 0 or value > 15: // return "" // if value < 10: // return ascii_digit_char(value) // return chr(55 + value) // // pub fn ascii_char_code(value: String) -> Int: // return ascii_byte_of(value) // // pub fn ascii_is_char(value: String) -> Bool: // return ascii_byte_of(value) >= 0 // // pub fn ascii_is_control(value: String) -> Bool: // return ascii_is_control_byte(ascii_byte_of(value)) // // pub fn ascii_is_whitespace(value: String) -> Bool: // return ascii_is_whitespace_byte(ascii_byte_of(value)) // // pub fn ascii_is_printable(value: String) -> Bool: // return ascii_is_printable_byte(ascii_byte_of(value)) // // pub fn ascii_is_graphical(value: String) -> Bool: // return ascii_is_graphical_byte(ascii_byte_of(value)) // // pub fn ascii_is_punctuation(value: String) -> Bool: // return ascii_is_punctuation_byte(ascii_byte_of(value)) // // pub fn ascii_is_upper(value: String) -> Bool: // return ascii_is_upper_byte(ascii_byte_of(value)) // // pub fn ascii_is_lower(value: String) -> Bool: // return ascii_is_lower_byte(ascii_byte_of(value)) // // pub fn ascii_is_alpha(value: String) -> Bool: // return ascii_is_alpha_byte(ascii_byte_of(value)) // // pub fn ascii_is_alnum(value: String) -> Bool: // return ascii_is_alnum_byte(ascii_byte_of(value)) // // pub fn ascii_is_digit(value: String) -> Bool: // return ascii_is_digit_byte(ascii_byte_of(value)) // // pub fn ascii_is_hex(value: String) -> Bool: // return ascii_is_hex_byte(ascii_byte_of(value)) // // pub fn ascii_digit_value(value: String) -> Int: // return ascii_digit_value_byte(ascii_byte_of(value)) // // pub fn ascii_hex_value(value: String) -> Int: // return ascii_hex_value_byte(ascii_byte_of(value)) // // pub fn ascii_to_upper(value: String) -> String: // let byte = ascii_byte_of(value) // if byte < 0: // return value // return chr(ascii_to_upper_byte(byte)) // // pub fn ascii_to_lower(value: String) -> String: // let byte = ascii_byte_of(value) // if byte < 0: // return value // return chr(ascii_to_lower_byte(byte)) // // pub fn ascii_is_text(value: String) -> Bool: // var index = 0 // while index < len(value): // if ascii_is_byte(byte_at(value, index)) == false: // return false // index = index + 1 // return true // // pub fn ascii_uppercase(value: String) -> String: // if ascii_is_text(value) == false: // return value // var index = 0 // var output = "" // while index < len(value): // output = output + chr(ascii_to_upper_byte(byte_at(value, index))) // index = index + 1 // return output // // pub fn ascii_lowercase(value: String) -> String: // if ascii_is_text(value) == false: // return value // var index = 0 // var output = "" // while index < len(value): // output = output + chr(ascii_to_lower_byte(byte_at(value, index))) // index = index + 1 // return output // // pub fn ascii_equals_ignore_case(left: String, right: String) -> Bool: // if len(left) != len(right): // return false // var index = 0 // while index < len(left): // if ascii_to_lower_byte(byte_at(left, index)) != ascii_to_lower_byte(byte_at(right, index)): // return false // index = index + 1 // return true //!end-kain-file //!kain-file // path = "atomic.kn" // kind = "text" // encoding = "utf8" // bytes = 9303 // sha256 = "sha256:a03e4660c2c513d89759acda26519adebddc93a468cd5907cfa0fc44eb1b09f5" // trailing_newline = true //!kain-file-content // use std::memory // // @extern // fn abi_atomic_wait_i64(address: ptr, expected: Int, timeout_ms: Int) -> Int // // @extern // fn abi_atomic_notify_one_i64(address: ptr) -> Int // // @extern // fn abi_atomic_notify_all_i64(address: ptr) -> Int // // # --- Memory Orderings --- // // pub enum Ordering: // Relaxed // Acquire // Release // AcqRel // SeqCst // // pub fn atomic_raw_load(address: ptr, order: Ordering) -> Int with Unsafe: // if order == Ordering::Relaxed: // return atomic_load(address, "Int", "relaxed") // if order == Ordering::Acquire: // return atomic_load(address, "Int", "acquire") // return atomic_load(address, "Int", "seq_cst") // // pub fn atomic_raw_store(address: ptr, value: Int, order: Ordering) -> Int with Unsafe: // if order == Ordering::Relaxed: // atomic_store(address, value, "Int", "relaxed") // return value // if order == Ordering::Release: // atomic_store(address, value, "Int", "release") // return value // atomic_store(address, value, "Int", "seq_cst") // return value // // pub fn atomic_raw_exchange(address: ptr, value: Int, order: Ordering) -> Int with Unsafe: // if order == Ordering::SeqCst: // atomic_fence("seq_cst") // let previous = atomic_exchange(address, value, "Int", "acq_rel") // atomic_fence("seq_cst") // return previous // return atomic_exchange(address, value, "Int", "acq_rel") // // pub fn atomic_raw_fetch_add(address: ptr, delta: Int) -> Int with Unsafe: // return atomic_add(address, delta, "Int", "acq_rel") // // pub fn atomic_raw_fetch_sub(address: ptr, delta: Int) -> Int with Unsafe: // return atomic_sub(address, delta, "Int", "acq_rel") // // fn atomic_failure_order(success_order: Ordering, failure_order: Ordering) -> Ordering: // if failure_order == Ordering::Release or failure_order == Ordering::AcqRel: // if success_order == Ordering::SeqCst: // return Ordering::Acquire // if success_order == Ordering::AcqRel: // return Ordering::Acquire // return Ordering::Relaxed // if success_order == Ordering::Relaxed: // return Ordering::Relaxed // if success_order == Ordering::Release: // return Ordering::Relaxed // if success_order == Ordering::Acquire: // if failure_order == Ordering::SeqCst: // return Ordering::Acquire // return failure_order // if success_order == Ordering::AcqRel: // if failure_order == Ordering::SeqCst: // return Ordering::Acquire // return failure_order // return failure_order // // pub fn atomic_raw_compare_exchange(address: ptr, expected: Int, desired: Int, success_order: Ordering, failure_order: Ordering) -> Bool with Unsafe: // let fail = atomic_failure_order(success_order, failure_order) // if success_order == Ordering::Relaxed: // return atomic_compare_exchange(address, expected, desired, "Int", "relaxed", "relaxed") // if success_order == Ordering::Acquire: // if fail == Ordering::Acquire: // return atomic_compare_exchange(address, expected, desired, "Int", "acquire", "acquire") // return atomic_compare_exchange(address, expected, desired, "Int", "acquire", "relaxed") // if success_order == Ordering::Release: // return atomic_compare_exchange(address, expected, desired, "Int", "release", "relaxed") // if success_order == Ordering::AcqRel: // if fail == Ordering::Acquire: // return atomic_compare_exchange(address, expected, desired, "Int", "acq_rel", "acquire") // return atomic_compare_exchange(address, expected, desired, "Int", "acq_rel", "relaxed") // if fail == Ordering::SeqCst: // return atomic_compare_exchange(address, expected, desired, "Int", "seq_cst", "seq_cst") // if fail == Ordering::Acquire: // return atomic_compare_exchange(address, expected, desired, "Int", "seq_cst", "acquire") // return atomic_compare_exchange(address, expected, desired, "Int", "seq_cst", "relaxed") // // pub fn atomic_raw_fetch_and(address: ptr, mask: Int) -> Int with Unsafe: // return atomic_and(address, mask, "Int", "acq_rel") // // pub fn atomic_raw_fetch_or(address: ptr, bits: Int) -> Int with Unsafe: // return atomic_or(address, bits, "Int", "acq_rel") // // pub fn atomic_raw_fetch_xor(address: ptr, bits: Int) -> Int with Unsafe: // return atomic_xor(address, bits, "Int", "acq_rel") // // pub fn atomic_wait(address: ptr, expected: Int, timeout_ms: Int) -> Int with Unsafe: // return abi_atomic_wait_i64(address, expected, timeout_ms) // // pub fn atomic_notify_one(address: ptr) -> Int with Unsafe: // return abi_atomic_notify_one_i64(address) // // pub fn atomic_notify_all(address: ptr) -> Int with Unsafe: // return abi_atomic_notify_all_i64(address) // // # --- AtomicInt (Type-Safe Atomic Integer Wrapper) --- // // pub struct AtomicInt: // ptr: ptr // // pub fn atomic_int_new(initial_value: Int) -> AtomicInt: // let p = alloc_zeroed(1, "Int") // mem_store(p, initial_value, "Int") // return AtomicInt { ptr: p } // // pub fn atomic_int_destroy(a: AtomicInt) -> Int: // decay a.ptr // return 0 // // pub fn atomic_int_load(self: AtomicInt, order: Ordering) -> Int with Unsafe: // return atomic_raw_load(self.ptr, order) // // pub fn atomic_int_store(self: AtomicInt, value: Int, order: Ordering) -> Int with Unsafe: // return atomic_raw_store(self.ptr, value, order) // // pub fn atomic_int_add(self: AtomicInt, delta: Int) -> Int with Unsafe: // return atomic_raw_fetch_add(self.ptr, delta) // // pub fn atomic_int_sub(self: AtomicInt, delta: Int) -> Int with Unsafe: // return atomic_raw_fetch_sub(self.ptr, delta) // // pub fn atomic_int_exchange(self: AtomicInt, desired: Int) -> Int with Unsafe: // return atomic_raw_exchange(self.ptr, desired, Ordering::AcqRel) // // pub fn atomic_int_compare_exchange(self: AtomicInt, expected: Int, desired: Int) -> Bool with Unsafe: // return atomic_raw_compare_exchange(self.ptr, expected, desired, Ordering::SeqCst, Ordering::SeqCst) // // pub fn atomic_int_compare_exchange_ordered(self: AtomicInt, expected: Int, desired: Int, success_order: Ordering, failure_order: Ordering) -> Bool with Unsafe: // return atomic_raw_compare_exchange(self.ptr, expected, desired, success_order, failure_order) // // pub fn atomic_int_fetch_and(self: AtomicInt, mask: Int) -> Int with Unsafe: // return atomic_raw_fetch_and(self.ptr, mask) // // pub fn atomic_int_fetch_or(self: AtomicInt, bits: Int) -> Int with Unsafe: // return atomic_raw_fetch_or(self.ptr, bits) // // pub fn atomic_int_fetch_xor(self: AtomicInt, bits: Int) -> Int with Unsafe: // return atomic_raw_fetch_xor(self.ptr, bits) // // pub fn atomic_int_wait(self: AtomicInt, expected: Int, timeout_ms: Int) -> Int with Unsafe: // return atomic_wait(self.ptr, expected, timeout_ms) // // pub fn atomic_int_notify_one(self: AtomicInt) -> Int with Unsafe: // return atomic_notify_one(self.ptr) // // pub fn atomic_int_notify_all(self: AtomicInt) -> Int with Unsafe: // return atomic_notify_all(self.ptr) // // // # --- AtomicBool (Type-Safe Atomic Boolean Wrapper) --- // // pub struct AtomicBool: // ptr: ptr // // pub fn atomic_bool_new(initial_value: Bool) -> AtomicBool: // let p = alloc_zeroed(1, "Int") // var val = 0 // if initial_value: // val = 1 // mem_store(p, val, "Int") // return AtomicBool { ptr: p } // // pub fn atomic_bool_destroy(a: AtomicBool) -> Int: // decay a.ptr // return 0 // // pub fn atomic_bool_load(self: AtomicBool, order: Ordering) -> Bool with Unsafe: // return atomic_raw_load(self.ptr, order) != 0 // // pub fn atomic_bool_store(self: AtomicBool, value: Bool, order: Ordering) -> Bool with Unsafe: // var val = 0 // if value: // val = 1 // // let _stored = atomic_raw_store(self.ptr, val, order) // return value // // pub fn atomic_bool_exchange(self: AtomicBool, desired: Bool) -> Bool with Unsafe: // var val = 0 // if desired: // val = 1 // let prev = atomic_raw_exchange(self.ptr, val, Ordering::AcqRel) // return prev != 0 // // // # --- AtomicPtr (Type-Safe Atomic Pointer Wrapper) --- // // pub struct AtomicPtr: // ptr: ptr // // pub fn atomic_ptr_new(initial_ptr: ptr) -> AtomicPtr: // let p = alloc_zeroed(1, "Int") // mem_store(p, ptr_to_int(initial_ptr), "Int") // return AtomicPtr { ptr: p } // // pub fn atomic_ptr_destroy(a: AtomicPtr) -> Int: // decay a.ptr // return 0 // // pub fn atomic_ptr_load(self: AtomicPtr, order: Ordering) -> ptr with Unsafe: // return int_to_ptr(atomic_raw_load(self.ptr, order), "Int") // // pub fn atomic_ptr_store(self: AtomicPtr, value: ptr, order: Ordering) -> ptr with Unsafe: // let val = ptr_to_int(value) // let _stored = atomic_raw_store(self.ptr, val, order) // return value // // pub fn atomic_ptr_exchange(self: AtomicPtr, desired: ptr) -> ptr with Unsafe: // let prev = atomic_raw_exchange(self.ptr, ptr_to_int(desired), Ordering::AcqRel) // return int_to_ptr(prev, "Int") // // pub fn atomic_ptr_compare_exchange(self: AtomicPtr, expected: ptr, desired: ptr) -> Bool with Unsafe: // return atomic_raw_compare_exchange(self.ptr, ptr_to_int(expected), ptr_to_int(desired), Ordering::AcqRel, Ordering::Acquire) // // pub fn atomic_ptr_wait(self: AtomicPtr, expected: ptr, timeout_ms: Int) -> Int with Unsafe: // return atomic_wait(self.ptr, ptr_to_int(expected), timeout_ms) // // pub fn atomic_ptr_notify_all(self: AtomicPtr) -> Int with Unsafe: // return atomic_notify_all(self.ptr) //!end-kain-file //!kain-file // path = "attrition.kn" // kind = "text" // encoding = "utf8" // bytes = 356 // sha256 = "sha256:2e2a847e6097850ed1a78d454f2363218fab65d9b07a8a8412191ad77375805a" // trailing_newline = true //!kain-file-content // use std::build // // pub fn attrition_task(id: String) -> BuildTaskSpec: // return build_task_of_kind(id, BUILD_KIND_ATTRITION) // // pub fn attrition_case(id: String) -> BuildTaskSpec: // return attrition_task(id) // // pub fn attrition_case_named(id: String, case_name: String) -> BuildTaskSpec: // return attrition_case(id).arg("--case").arg(case_name) // //!end-kain-file //!kain-file // path = "base64.kn" // kind = "text" // encoding = "utf8" // bytes = 5602 // sha256 = "sha256:d3013ebfe7c2d474ce6e518ef73f6356512d586e5df448c0caca5e2b3de780dc" // trailing_newline = true //!kain-file-content // use std::ascii // // pub const BASE64_STANDARD_ALPHABET: String = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" // pub const BASE64_URLSAFE_ALPHABET: String = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_" // // fn base64_alphabet_char(alphabet: String, index: Int) -> String: // if index < 0 or index >= 64: // return "" // return char_at(alphabet, index) // // fn base64_value_from_code(code: Int) -> Int: // if ascii_is_upper_byte(code): // return code - 65 // if ascii_is_lower_byte(code): // return 26 + (code - 97) // if ascii_is_digit_byte(code): // return 52 + (code - 48) // if code == ord("+") or code == ord("-"): // return 62 // if code == ord("/") or code == ord("_"): // return 63 // return -1 // // fn base64_encode_with_alphabet(text: String, alphabet: String, padded: Bool) -> String: // var output = "" // var index = 0 // while index < len(text): // let remaining = len(text) - index // let b0 = byte_at(text, index) // let b1 = if remaining > 1: byte_at(text, index + 1) else: 0 // let b2 = if remaining > 2: byte_at(text, index + 2) else: 0 // let triple = (b0 << 16) | (b1 << 8) | b2 // output = output + base64_alphabet_char(alphabet, (triple >> 18) & 63) // output = output + base64_alphabet_char(alphabet, (triple >> 12) & 63) // if remaining > 1: // output = output + base64_alphabet_char(alphabet, (triple >> 6) & 63) // else: // if padded: // output = output + "=" // if remaining > 2: // output = output + base64_alphabet_char(alphabet, triple & 63) // else: // if padded: // output = output + "=" // index = index + 3 // return output // // fn base64_normalize_input(text: String) -> String: // var output = "" // var index = 0 // while index < len(text): // let ch = char_at(text, index) // if ascii_is_whitespace(ch) == false: // output = output + ch // index = index + 1 // while (len(output) % 4) != 0: // output = output + "=" // return output // // fn base64_decode_normalized(text: String) -> String: // if len(text) == 0: // return "" // if (len(text) % 4) == 1: // return "" // var output = "" // var index = 0 // while index + 3 < len(text): // let c0 = char_at(text, index) // let c1 = char_at(text, index + 1) // let c2 = char_at(text, index + 2) // let c3 = char_at(text, index + 3) // let v0 = base64_value_from_code(ord(c0)) // let v1 = base64_value_from_code(ord(c1)) // if v0 < 0 or v1 < 0: // return "" // if c2 == "=": // if c3 != "=": // return "" // output = output + chr(((v0 << 2) | (v1 >> 4)) & 255) // return output // let v2 = base64_value_from_code(ord(c2)) // if v2 < 0: // return "" // if c3 == "=": // output = output + chr(((v0 << 2) | (v1 >> 4)) & 255) // output = output + chr((((v1 & 15) << 4) | (v2 >> 2)) & 255) // return output // let v3 = base64_value_from_code(ord(c3)) // if v3 < 0: // return "" // output = output + chr(((v0 << 2) | (v1 >> 4)) & 255) // output = output + chr((((v1 & 15) << 4) | (v2 >> 2)) & 255) // output = output + chr((((v2 & 3) << 6) | v3) & 255) // index = index + 4 // return output // // pub fn base64_encode(text: String) -> String: // return base64_encode_with_alphabet(text, BASE64_STANDARD_ALPHABET, true) // // pub fn base64_encode_nopad(text: String) -> String: // return base64_encode_with_alphabet(text, BASE64_STANDARD_ALPHABET, false) // // pub fn base64_encode_url(text: String) -> String: // return base64_encode_with_alphabet(text, BASE64_URLSAFE_ALPHABET, false) // // pub fn base64_encode_url_padded(text: String) -> String: // return base64_encode_with_alphabet(text, BASE64_URLSAFE_ALPHABET, true) // // pub fn base64_decode(text: String) -> String: // return base64_decode_normalized(base64_normalize_input(text)) // // pub fn base64_decode_url(text: String) -> String: // return base64_decode_normalized(base64_normalize_input(text)) // // pub fn base16_encode(text: String) -> String: // var output = "" // var index = 0 // while index < len(text): // let value = byte_at(text, index) // output = output + ascii_hex_char_lower((value >> 4) & 15) // output = output + ascii_hex_char_lower(value & 15) // index = index + 1 // return output // // pub fn base16_encode_upper(text: String) -> String: // var output = "" // var index = 0 // while index < len(text): // let value = byte_at(text, index) // output = output + ascii_hex_char_upper((value >> 4) & 15) // output = output + ascii_hex_char_upper(value & 15) // index = index + 1 // return output // // pub fn base16_decode(text: String) -> String: // if (len(text) % 2) != 0: // return "" // var output = "" // var index = 0 // while index + 1 < len(text): // let high = ascii_hex_value(char_at(text, index)) // let low = ascii_hex_value(char_at(text, index + 1)) // if high < 0 or low < 0: // return "" // output = output + chr((high << 4) | low) // index = index + 2 // return output // // pub fn hex_encode(text: String) -> String: // return base16_encode(text) // // pub fn hex_encode_upper(text: String) -> String: // return base16_encode_upper(text) // // pub fn hex_decode(text: String) -> String: // return base16_decode(text) //!end-kain-file //!kain-file // path = "bench.kn" // kind = "text" // encoding = "utf8" // bytes = 418 // sha256 = "sha256:0eaa0d787ef1882d3ac2c2d1860088ae0af53f10e260de316284ec5283968602" // trailing_newline = true //!kain-file-content // use std::build // // pub fn bench_task(id: String) -> BuildTaskSpec: // return build_task_of_kind(id, BUILD_KIND_BENCHMARK) // // pub fn bench_case(id: String) -> BuildTaskSpec: // return bench_task(id) // // pub fn benchmark_task(id: String) -> BuildTaskSpec: // return bench_task(id) // // pub fn bench_case_named(id: String, case_name: String) -> BuildTaskSpec: // return bench_case(id).arg("--case").arg(case_name) // //!end-kain-file //!kain-file // path = "bits.kn" // kind = "text" // encoding = "utf8" // bytes = 2926 // sha256 = "sha256:d01c3ee5ed00684ce6481beec29a9d3eddafed86b61aa4ac4d13191423cba985" // trailing_newline = true //!kain-file-content // # Fixed-width integer masks and bit intrinsics over Kain's native Int lane. // // const U8_MASK: Int = 255 // const U16_MASK: Int = 65535 // const U32_MASK: Int = 4294967295 // const I8_MIN: Int = -128 // const I8_MAX: Int = 127 // const I16_MIN: Int = -32768 // const I16_MAX: Int = 32767 // const I32_MIN: Int = -2147483648 // const I32_MAX: Int = 2147483647 // // pub fn u8(value: Int) -> Int: // return value & U8_MASK // // pub fn u16(value: Int) -> Int: // return value & U16_MASK // // pub fn u32(value: Int) -> Int: // return value & U32_MASK // // pub fn i8(value: Int) -> Int: // let lane = value & U8_MASK // if lane > I8_MAX: // return lane - 256 // return lane // // pub fn i16(value: Int) -> Int: // let lane = value & U16_MASK // if lane > I16_MAX: // return lane - 65536 // return lane // // pub fn i32(value: Int) -> Int: // let lane = value & U32_MASK // if lane > I32_MAX: // return lane - 4294967296 // return lane // // pub fn wrapping_add_u32(left: Int, right: Int) -> Int: // return (left + right) & U32_MASK // // pub fn wrapping_sub_u32(left: Int, right: Int) -> Int: // return (left - right) & U32_MASK // // pub fn wrapping_mul_u32(left: Int, right: Int) -> Int: // return (left * right) & U32_MASK // // pub fn overflowing_add_u32(left: Int, right: Int) -> Bool: // return (left & U32_MASK) + (right & U32_MASK) > U32_MASK // // pub fn overflowing_mul_u32(left: Int, right: Int) -> Bool: // let lhs = left & U32_MASK // let rhs = right & U32_MASK // if lhs == 0: // return false // return rhs > (U32_MASK / lhs) // // pub fn rotl32(value: Int, bits: Int) -> Int: // let shift = bits & 31 // let lane = value & U32_MASK // if shift == 0: // return lane // return ((lane << shift) | (lane >> (32 - shift))) & U32_MASK // // pub fn rotr32(value: Int, bits: Int) -> Int: // let shift = bits & 31 // let lane = value & U32_MASK // if shift == 0: // return lane // return ((lane >> shift) | (lane << (32 - shift))) & U32_MASK // // pub fn popcount32(value: Int) -> Int: // var lane = value & U32_MASK // var count: Int = 0 // while lane != 0: // count = count + (lane & 1) // lane = lane >> 1 // return count // // pub fn clz32(value: Int) -> Int: // var bit: Int = 31 // var count: Int = 0 // let lane = value & U32_MASK // while bit >= 0: // if ((lane >> bit) & 1) == 1: // return count // count = count + 1 // bit = bit - 1 // return count // // pub fn ctz32(value: Int) -> Int: // var bit: Int = 0 // let lane = value & U32_MASK // while bit < 32: // if ((lane >> bit) & 1) == 1: // return bit // bit = bit + 1 // return 32 // // pub fn bswap32(value: Int) -> Int: // let lane = value & U32_MASK // let b0 = (lane & 255) << 24 // let b1 = ((lane >> 8) & 255) << 16 // let b2 = ((lane >> 16) & 255) << 8 // let b3 = (lane >> 24) & 255 // return (b0 | b1 | b2 | b3) & U32_MASK // //!end-kain-file //!kain-file // path = "build.kn" // kind = "text" // encoding = "utf8" // bytes = 25540 // sha256 = "sha256:5714c1167811b1cd2452258581279a7840f684a0f352bbc7a05308398060e735" // trailing_newline = true //!kain-file-content // pub const BUILD_KIND_CHECK: String = "check" // pub const BUILD_KIND_NATIVE_EXECUTABLE: String = "native-executable" // pub const BUILD_KIND_TEST: String = "test" // pub const BUILD_KIND_PROOF: String = "proof" // pub const BUILD_KIND_BENCHMARK: String = "benchmark" // pub const BUILD_KIND_ATTRITION: String = "attrition" // pub const BUILD_KIND_CERTIFY: String = "certify" // pub const BUILD_KIND_EXEC: String = "exec" // pub const BUILD_KIND_AMALGAMATE: String = "amalgamate" // // pub struct BuildContext: // workspace_root: String // blade_root: String // host: String // target: String // lane: String // profile: String // // pub struct PackageSpec: // name: String // version_value: String // description_value: String // // pub struct BladeSpec: // name: String // kind_value: String // entry_path: String // source_roots: Array // module_roots: Array // build_targets: Array // dependencies: Array // // pub struct BuildDefaultsSpec: // entry_path: String // artifact_root_path: String // cache_root_path: String // profile_value: String // target_value: String // // pub struct WorkspaceDefaultsSpec: // blade_patterns: Array // blade_roots: Array // members: Array // search_roots: Array // stdlib_root_path: String // manifest_root_path: String // generated_root_path: String // // pub struct RunDefaultsSpec: // entry_path: String // target_value: String // args: Array // watch_paths: Array // // pub struct PlatformPackageSpec: // name: String // provider_value: String // // pub struct ProjectSpec: // name: String // kind_value: String // version_value: String // description_value: String // entry_path: String // source_roots: Array // module_roots: Array // generated_root_path: String // build_targets: Array // artifact_root_path: String // cache_root_path: String // profile_value: String // run_args: Array // watch_paths: Array // // pub struct SourceSetSpec: // name: String // roots: Array // files_value: Array // dirs: Array // globs: Array // excludes: Array // // pub struct BuildTaskSpec: // id: String // kind_value: String // blade_name: String // entry_path: String // manifest_path: String // command_value: String // cwd_path: String // target_value: String // profile_value: String // args: Array // inputs: Array // outputs: Array // dependencies: Array // required_capabilities: Array // matrix_axes: Array // telemetry_channels: Array // certificate_subjects: Array // env_entries: Array // option_entries: Array // tag_values: Array // note_values: Array // author_values: Array // meta_entries: Array // // pub struct BuildGraphSpec: // packages: Array // blades: Array // tasks: Array // platform_packages: Array // // pub type BuildGraph = BuildGraphSpec // pub type BuildTask = BuildTaskSpec // // pub fn build_graph() -> BuildGraphSpec: // return BuildGraphSpec { // packages: [], // blades: [], // tasks: [], // platform_packages: [] // } // // pub fn package(name: String) -> PackageSpec: // return PackageSpec { name: name, version_value: "", description_value: "" } // // pub fn blade(name: String) -> BladeSpec: // return BladeSpec { // name: name, // kind_value: "", // entry_path: "", // source_roots: [], // module_roots: [], // build_targets: [], // dependencies: [] // } // // pub fn build_defaults() -> BuildDefaultsSpec: // return BuildDefaultsSpec { // entry_path: "", // artifact_root_path: "", // cache_root_path: "", // profile_value: "", // target_value: "" // } // // pub fn workspace_defaults() -> WorkspaceDefaultsSpec: // return WorkspaceDefaultsSpec { // blade_patterns: [], // blade_roots: [], // members: [], // search_roots: [], // stdlib_root_path: "", // manifest_root_path: "", // generated_root_path: "" // } // // pub fn run_defaults() -> RunDefaultsSpec: // return RunDefaultsSpec { entry_path: "", target_value: "", args: [], watch_paths: [] } // // pub fn platform_package(name: String) -> PlatformPackageSpec: // return PlatformPackageSpec { name: name, provider_value: "system" } // // pub fn build_platform_package(name: String) -> PlatformPackageSpec: // return platform_package(name) // // pub fn platform_requirement(name: String) -> PlatformPackageSpec: // return platform_package(name) // // pub fn requires_platform_package(name: String) -> PlatformPackageSpec: // return platform_package(name) // // pub fn project(name: String) -> ProjectSpec: // return ProjectSpec { // name: name, // kind_value: "", // version_value: "", // description_value: "", // entry_path: "", // source_roots: [], // module_roots: [], // generated_root_path: "", // build_targets: [], // artifact_root_path: "", // cache_root_path: "", // profile_value: "", // run_args: [], // watch_paths: [] // } // // pub fn source_set(name: String) -> SourceSetSpec: // return SourceSetSpec { // name: name, // roots: [], // files_value: [], // dirs: [], // globs: [], // excludes: [] // } // // pub fn build_task_of_kind(id: String, kind: String) -> BuildTaskSpec: // return BuildTaskSpec { // id: id, // kind_value: kind, // blade_name: "", // entry_path: "", // manifest_path: "", // command_value: "", // cwd_path: "", // target_value: "", // profile_value: "", // args: [], // inputs: [], // outputs: [], // dependencies: [], // required_capabilities: [], // matrix_axes: [], // telemetry_channels: [], // certificate_subjects: [], // env_entries: [], // option_entries: [], // tag_values: [], // note_values: [], // author_values: [], // meta_entries: [] // } // // pub fn build_task(id: String) -> BuildTaskSpec: // return build_task_of_kind(id, "") // // pub fn build_check(id: String) -> BuildTaskSpec: // return build_task_of_kind(id, BUILD_KIND_CHECK) // // pub fn check_task(id: String) -> BuildTaskSpec: // return build_check(id) // // pub fn native_executable(id: String) -> BuildTaskSpec: // return build_task_of_kind(id, BUILD_KIND_NATIVE_EXECUTABLE) // // pub fn root_executable(id: String) -> BuildTaskSpec: // return native_executable(id) // // pub fn build_native_executable(id: String) -> BuildTaskSpec: // return native_executable(id) // // pub fn exec_task(id: String) -> BuildTaskSpec: // return build_task_of_kind(id, BUILD_KIND_EXEC) // // pub fn command_task(id: String) -> BuildTaskSpec: // return exec_task(id) // // pub fn amalgamate_capsule(id: String) -> BuildTaskSpec: // return build_task_of_kind(id, BUILD_KIND_AMALGAMATE) // // pub fn source_tests(id: String) -> BuildTaskSpec: // return build_task_of_kind(id, BUILD_KIND_TEST) // // pub fn gpu_suite(id: String) -> BuildTaskSpec: // return build_task_of_kind(id, "gpu") // // pub fn cuda_artifacts(id: String) -> BuildTaskSpec: // return exec_task(id).command("kain").target("cuda") // // pub fn kain_runner(id: String) -> BuildTaskSpec: // return exec_task(id).command("kain") // // pub fn album_mode(id: String) -> BuildTaskSpec: // return exec_task(id).command("powershell") // // pub fn capsule_set(id: String) -> BuildTaskSpec: // return build_task_of_kind(id, BUILD_KIND_AMALGAMATE) // // pub fn certify(subject: String) -> BuildTaskSpec: // return build_task_of_kind("certify-" + subject, BUILD_KIND_CERTIFY).certifies(subject) // // impl PackageSpec: // fn version(_self: Self_, value: String) -> PackageSpec: // let mut next = _self // next.version_value = value // return next // // fn description(_self: Self_, value: String) -> PackageSpec: // let mut next = _self // next.description_value = value // return next // // impl BladeSpec: // fn kind(_self: Self_, value: String) -> BladeSpec: // let mut next = _self // next.kind_value = value // return next // // fn entry(_self: Self_, path: String) -> BladeSpec: // let mut next = _self // next.entry_path = path // return next // // fn source_root(_self: Self_, path: String) -> BladeSpec: // let mut next = _self // push(next.source_roots, path) // return next // // fn module_root(_self: Self_, path: String) -> BladeSpec: // let mut next = _self // push(next.module_roots, path) // return next // // fn build_target(_self: Self_, target: String) -> BladeSpec: // let mut next = _self // push(next.build_targets, target) // return next // // fn dependency(_self: Self_, name: String) -> BladeSpec: // let mut next = _self // push(next.dependencies, name) // return next // // impl BuildDefaultsSpec: // fn entry(_self: Self_, path: String) -> BuildDefaultsSpec: // let mut next = _self // next.entry_path = path // return next // // fn artifact_root(_self: Self_, path: String) -> BuildDefaultsSpec: // let mut next = _self // next.artifact_root_path = path // return next // // fn cache_root(_self: Self_, path: String) -> BuildDefaultsSpec: // let mut next = _self // next.cache_root_path = path // return next // // fn profile(_self: Self_, value: String) -> BuildDefaultsSpec: // let mut next = _self // next.profile_value = value // return next // // fn target(_self: Self_, value: String) -> BuildDefaultsSpec: // let mut next = _self // next.target_value = value // return next // // impl WorkspaceDefaultsSpec: // fn blade_pattern(_self: Self_, path: String) -> WorkspaceDefaultsSpec: // let mut next = _self // push(next.blade_patterns, path) // return next // // fn blades(_self: Self_, path: String) -> WorkspaceDefaultsSpec: // return _self.blade_pattern(path) // // fn blade_root(_self: Self_, path: String) -> WorkspaceDefaultsSpec: // let mut next = _self // push(next.blade_roots, path) // return next // // fn blade_roots(_self: Self_, path: String) -> WorkspaceDefaultsSpec: // return _self.blade_root(path) // // fn member(_self: Self_, path: String) -> WorkspaceDefaultsSpec: // let mut next = _self // push(next.members, path) // return next // // fn members(_self: Self_, path: String) -> WorkspaceDefaultsSpec: // return _self.member(path) // // fn search_root(_self: Self_, path: String) -> WorkspaceDefaultsSpec: // let mut next = _self // push(next.search_roots, path) // return next // // fn search_roots(_self: Self_, path: String) -> WorkspaceDefaultsSpec: // return _self.search_root(path) // // fn stdlib_root(_self: Self_, path: String) -> WorkspaceDefaultsSpec: // let mut next = _self // next.stdlib_root_path = path // return next // // fn manifest_root(_self: Self_, path: String) -> WorkspaceDefaultsSpec: // let mut next = _self // next.manifest_root_path = path // return next // // fn generated_root(_self: Self_, path: String) -> WorkspaceDefaultsSpec: // let mut next = _self // next.generated_root_path = path // return next // // impl RunDefaultsSpec: // fn entry(_self: Self_, path: String) -> RunDefaultsSpec: // let mut next = _self // next.entry_path = path // return next // // fn target(_self: Self_, value: String) -> RunDefaultsSpec: // let mut next = _self // next.target_value = value // return next // // fn arg(_self: Self_, value: String) -> RunDefaultsSpec: // let mut next = _self // push(next.args, value) // return next // // fn watch(_self: Self_, path: String) -> RunDefaultsSpec: // let mut next = _self // push(next.watch_paths, path) // return next // // impl PlatformPackageSpec: // fn provider(_self: Self_, value: String) -> PlatformPackageSpec: // let mut next = _self // next.provider_value = value // return next // // impl ProjectSpec: // fn kind(_self: Self_, value: String) -> ProjectSpec: // let mut next = _self // next.kind_value = value // return next // // fn version(_self: Self_, value: String) -> ProjectSpec: // let mut next = _self // next.version_value = value // return next // // fn description(_self: Self_, value: String) -> ProjectSpec: // let mut next = _self // next.description_value = value // return next // // fn entry(_self: Self_, path: String) -> ProjectSpec: // let mut next = _self // next.entry_path = path // return next // // fn source_root(_self: Self_, path: String) -> ProjectSpec: // let mut next = _self // push(next.source_roots, path) // return next // // fn source_roots(_self: Self_, path: String) -> ProjectSpec: // return _self.source_root(path) // // fn module_root(_self: Self_, path: String) -> ProjectSpec: // let mut next = _self // push(next.module_roots, path) // return next // // fn module_roots(_self: Self_, path: String) -> ProjectSpec: // return _self.module_root(path) // // fn generated_root(_self: Self_, path: String) -> ProjectSpec: // let mut next = _self // next.generated_root_path = path // return next // // fn target(_self: Self_, value: String) -> ProjectSpec: // let mut next = _self // push(next.build_targets, value) // return next // // fn targets(_self: Self_, value: String) -> ProjectSpec: // return _self.target(value) // // fn artifact_root(_self: Self_, path: String) -> ProjectSpec: // let mut next = _self // next.artifact_root_path = path // return next // // fn cache_root(_self: Self_, path: String) -> ProjectSpec: // let mut next = _self // next.cache_root_path = path // return next // // fn profile(_self: Self_, value: String) -> ProjectSpec: // let mut next = _self // next.profile_value = value // return next // // fn run_arg(_self: Self_, value: String) -> ProjectSpec: // let mut next = _self // push(next.run_args, value) // return next // // fn watch(_self: Self_, path: String) -> ProjectSpec: // let mut next = _self // push(next.watch_paths, path) // return next // // impl SourceSetSpec: // fn root(_self: Self_, path: String) -> SourceSetSpec: // let mut next = _self // push(next.roots, path) // return next // // fn file(_self: Self_, path: String) -> SourceSetSpec: // let mut next = _self // push(next.files_value, path) // return next // // fn files(_self: Self_, path: String) -> SourceSetSpec: // return _self.file(path) // // fn dir(_self: Self_, path: String) -> SourceSetSpec: // let mut next = _self // push(next.dirs, path) // return next // // fn glob(_self: Self_, pattern: String) -> SourceSetSpec: // let mut next = _self // push(next.globs, pattern) // return next // // fn exclude(_self: Self_, pattern: String) -> SourceSetSpec: // let mut next = _self // push(next.excludes, pattern) // return next // // impl BuildTaskSpec: // fn kind(_self: Self_, value: String) -> BuildTaskSpec: // let mut next = _self // next.kind_value = value // return next // // fn blade(_self: Self_, value: String) -> BuildTaskSpec: // let mut next = _self // next.blade_name = value // return next // // fn entry(_self: Self_, path: String) -> BuildTaskSpec: // let mut next = _self // next.entry_path = path // return next // // fn manifest(_self: Self_, path: String) -> BuildTaskSpec: // let mut next = _self // next.manifest_path = path // return next // // fn source(_self: Self_, path: String) -> BuildTaskSpec: // return _self.entry(path) // // fn path(_self: Self_, path: String) -> BuildTaskSpec: // return _self.entry(path) // // fn project(_self: Self_, value: ProjectSpec) -> BuildTaskSpec: // let mut next = _self // if next.entry_path == "": // next.entry_path = value.entry_path // return next // // fn command(_self: Self_, value: String) -> BuildTaskSpec: // let mut next = _self // next.command_value = value // return next // // fn arg(_self: Self_, value: String) -> BuildTaskSpec: // let mut next = _self // push(next.args, value) // return next // // fn args(_self: Self_, value: String) -> BuildTaskSpec: // return _self.arg(value) // // fn cwd(_self: Self_, path: String) -> BuildTaskSpec: // let mut next = _self // next.cwd_path = path // return next // // fn target(_self: Self_, value: String) -> BuildTaskSpec: // let mut next = _self // next.target_value = value // return next // // fn profile(_self: Self_, value: String) -> BuildTaskSpec: // let mut next = _self // next.profile_value = value // return next // // fn input(_self: Self_, path: String) -> BuildTaskSpec: // let mut next = _self // push(next.inputs, path) // return next // // fn inputs(_self: Self_, path: String) -> BuildTaskSpec: // return _self.input(path) // // fn output(_self: Self_, path: String) -> BuildTaskSpec: // let mut next = _self // push(next.outputs, path) // return next // // fn outputs(_self: Self_, path: String) -> BuildTaskSpec: // return _self.output(path) // // fn root_output(_self: Self_, path: String) -> BuildTaskSpec: // return _self.output(path) // // fn blade_output(_self: Self_, path: String) -> BuildTaskSpec: // return _self.output(path) // // fn artifact(_self: Self_, path: String) -> BuildTaskSpec: // return _self.output(path) // // fn produces(_self: Self_, path: String) -> BuildTaskSpec: // return _self.output(path) // // fn depends_on(_self: Self_, task_id: String) -> BuildTaskSpec: // let mut next = _self // push(next.dependencies, task_id) // return next // // fn requires(_self: Self_, task_id: String) -> BuildTaskSpec: // return _self.depends_on(task_id) // // fn requires_task(_self: Self_, task_id: String) -> BuildTaskSpec: // return _self.depends_on(task_id) // // fn after(_self: Self_, task_id: String) -> BuildTaskSpec: // return _self.depends_on(task_id) // // fn requires_capability(_self: Self_, capability: String) -> BuildTaskSpec: // let mut next = _self // push(next.required_capabilities, capability) // return next // // fn when_capability(_self: Self_, capability: String) -> BuildTaskSpec: // return _self.requires_capability(capability) // // fn capability(_self: Self_, capability: String) -> BuildTaskSpec: // return _self.requires_capability(capability) // // fn axis(_self: Self_, key: String, value: String) -> BuildTaskSpec: // let mut next = _self // push(next.matrix_axes, key + "=" + value) // return next // // fn matrix_axis(_self: Self_, value: String) -> BuildTaskSpec: // let mut next = _self // push(next.matrix_axes, value) // return next // // fn matrix_value(_self: Self_, value: String) -> BuildTaskSpec: // return _self.matrix_axis(value) // // fn telemetry(_self: Self_, channel: String) -> BuildTaskSpec: // let mut next = _self // push(next.telemetry_channels, channel) // return next // // fn telemetry_channel(_self: Self_, channel: String) -> BuildTaskSpec: // return _self.telemetry(channel) // // fn certifies(_self: Self_, subject: String) -> BuildTaskSpec: // let mut next = _self // push(next.certificate_subjects, subject) // return next // // fn env(_self: Self_, key: String, value: String) -> BuildTaskSpec: // let mut next = _self // push(next.env_entries, key + "=" + value) // return next // // fn option(_self: Self_, key: String, value: String) -> BuildTaskSpec: // let mut next = _self // push(next.option_entries, key + "=" + value) // return next // // fn name(_self: Self_, value: String) -> BuildTaskSpec: // return _self.option("name", value) // // fn version(_self: Self_, value: String) -> BuildTaskSpec: // return _self.option("version", value) // // fn author(_self: Self_, value: String) -> BuildTaskSpec: // let mut next = _self // push(next.author_values, value) // return next // // fn note(_self: Self_, value: String) -> BuildTaskSpec: // let mut next = _self // push(next.note_values, value) // return next // // fn tag(_self: Self_, value: String) -> BuildTaskSpec: // let mut next = _self // push(next.tag_values, value) // return next // // fn meta(_self: Self_, key: String, value: String) -> BuildTaskSpec: // let mut next = _self // push(next.meta_entries, key + "=" + value) // return next // // fn storage(_self: Self_, value: String) -> BuildTaskSpec: // return _self.option("storage", value) // // fn contents(_self: Self_, value: String) -> BuildTaskSpec: // return _self.option("contents", value) // // fn capsule_set(_self: Self_, value: String) -> BuildTaskSpec: // return _self.option("capsule_set", value) // // fn archive(_self: Self_, enabled: Bool) -> BuildTaskSpec: // if enabled: // return _self.storage("archive") // return _self.storage("editable") // // fn editable(_self: Self_) -> BuildTaskSpec: // return _self.storage("editable") // // fn header(_self: Self_, value: String) -> BuildTaskSpec: // return _self.option("header", value) // // fn compression(_self: Self_, value: String) -> BuildTaskSpec: // return _self.option("compression", value) // // fn preview_symbols(_self: Self_, value: Int) -> BuildTaskSpec: // return _self.option("preview_symbols", str(value)) // // fn api_index(_self: Self_, value: String) -> BuildTaskSpec: // return _self.option("api_index", value) // // fn module_index(_self: Self_, value: String) -> BuildTaskSpec: // return _self.option("module_index", value) // // fn timeout_ms(_self: Self_, value: Int) -> BuildTaskSpec: // return _self.option("timeout_ms", str(value)) // // fn stdout(_self: Self_, path: String) -> BuildTaskSpec: // return _self.option("stdout", path) // // fn stderr(_self: Self_, path: String) -> BuildTaskSpec: // return _self.option("stderr", path) // // fn artifact_root(_self: Self_, path: String) -> BuildTaskSpec: // return _self.option("artifact_root", path) // // fn output_dir(_self: Self_, path: String) -> BuildTaskSpec: // return _self.option("output_dir", path) // // fn stem(_self: Self_, value: String) -> BuildTaskSpec: // return _self.option("stem", value) // // fn fragment_source(_self: Self_, path: String) -> BuildTaskSpec: // return _self.option("fragment", path).input(path) // // fn compute_source(_self: Self_, path: String) -> BuildTaskSpec: // return _self.option("compute", path).input(path) // // fn runner(_self: Self_, path: String) -> BuildTaskSpec: // return _self.option("runner", path).input(path) // // fn executable(_self: Self_, path: String) -> BuildTaskSpec: // return _self.option("executable", path) // // fn always_run(_self: Self_) -> BuildTaskSpec: // return _self.option("always_run", "true") // // fn proof_mode(_self: Self_, value: String) -> BuildTaskSpec: // return _self.arg(value) // // fn mode(_self: Self_, value: String) -> BuildTaskSpec: // return _self.arg(value) // // impl BuildGraphSpec: // fn project(_self: Self_, value: ProjectSpec) -> BuildGraphSpec: // let mut next = _self // push(next.packages, PackageSpec { // name: value.name, // version_value: value.version_value, // description_value: value.description_value // }) // push(next.blades, BladeSpec { // name: value.name, // kind_value: value.kind_value, // entry_path: value.entry_path, // source_roots: value.source_roots, // module_roots: value.module_roots, // build_targets: value.build_targets, // dependencies: [] // }) // return next // // fn package(_self: Self_, value: PackageSpec) -> BuildGraphSpec: // let mut next = _self // push(next.packages, value) // return next // // fn blade(_self: Self_, value: BladeSpec) -> BuildGraphSpec: // let mut next = _self // push(next.blades, value) // return next // // fn task(_self: Self_, value: BuildTaskSpec) -> BuildGraphSpec: // let mut next = _self // push(next.tasks, value) // return next // // fn tasks(_self: Self_, value: BuildTaskSpec) -> BuildGraphSpec: // return _self.task(value) // // fn sources(_self: Self_, value: SourceSetSpec) -> BuildGraphSpec: // return _self // // fn require(_self: Self_, value: PlatformPackageSpec) -> BuildGraphSpec: // let mut next = _self // push(next.platform_packages, value) // return next // // fn defaults(_self: Self_, value: BuildDefaultsSpec) -> BuildGraphSpec: // return _self // // fn workspace(_self: Self_, value: WorkspaceDefaultsSpec) -> BuildGraphSpec: // return _self // // fn run(_self: Self_, value: RunDefaultsSpec) -> BuildGraphSpec: // return _self //!end-kain-file //!kain-file // path = "bytes.kn" // kind = "text" // encoding = "utf8" // bytes = 6377 // sha256 = "sha256:ca191c63568ec20b46333d8da30de20de661fdce8da78f4bb51b08b5eaab4489" // trailing_newline = true //!kain-file-content // use std::ascii // use std::base64 // use std::collections // // pub struct ByteSlice: // source: String // start: Int // length: Int // // pub struct BytesBuilder: // buffer: String // // pub struct BytesDecodeResult: // ok: Bool // value: String // error: String // // fn bytes_decode_error(message: String) -> BytesDecodeResult: // return BytesDecodeResult { // ok: false, // value: "", // error: message // } // // fn bytes_hex_text_is_valid(text: String) -> Bool: // if (len(text) % 2) != 0: // return false // var index = 0 // while index < len(text): // if ascii_hex_value_byte(byte_at(text, index)) < 0: // return false // index = index + 1 // return true // // pub fn bytes_slice(source: String, start: Int, length: Int) -> ByteSlice: // let source_len = len(source) // let safe_start = int_clamp(start, 0, source_len) // let safe_length = int_clamp(length, 0, source_len - safe_start) // return ByteSlice { // source: source, // start: safe_start, // length: safe_length // } // // pub fn bytes_from(source: String) -> ByteSlice: // return bytes_slice(source, 0, len(source)) // // pub fn bytes_len(view: ByteSlice) -> Int: // return view.length // // pub fn bytes_is_empty(view: ByteSlice) -> Bool: // return view.length == 0 // // pub fn bytes_byte_at(view: ByteSlice, index: Int) -> Int: // if index < 0: // return 0 // if index >= view.length: // return 0 // return byte_at(view.source, view.start + index) // // pub fn bytes_char_at(view: ByteSlice, index: Int) -> String: // if index < 0: // return "" // if index >= view.length: // return "" // return char_at(view.source, view.start + index) // // pub fn bytes_find_from(view: ByteSlice, needle: String, start: Int) -> Int: // let safe_start = int_clamp(start, 0, view.length) // if len(needle) == 0: // return safe_start // if len(needle) > view.length - safe_start: // return -1 // let found = find_substring_from(view.source, needle, view.start + safe_start) // if found < view.start + safe_start: // return -1 // if found + len(needle) > view.start + view.length: // return -1 // return found - view.start // // pub fn bytes_find(view: ByteSlice, needle: String) -> Int: // return bytes_find_from(view, needle, 0) // // pub fn bytes_contains(view: ByteSlice, needle: String) -> Bool: // return bytes_find(view, needle) >= 0 // // pub fn bytes_starts_with(view: ByteSlice, prefix: String) -> Bool: // if len(prefix) > view.length: // return false // return bytes_find_from(view, prefix, 0) == 0 // // pub fn bytes_ends_with(view: ByteSlice, suffix: String) -> Bool: // let suffix_len = len(suffix) // if suffix_len > view.length: // return false // return bytes_find_from(view, suffix, view.length - suffix_len) == view.length - suffix_len // // pub fn bytes_count(view: ByteSlice, needle: String) -> Int: // let needle_len = len(needle) // if needle_len == 0: // return 0 // var total = 0 // var cursor = 0 // while cursor < view.length: // let found = bytes_find_from(view, needle, cursor) // if found < 0: // return total // total = total + 1 // cursor = found + needle_len // return total // // pub fn bytes_subslice(view: ByteSlice, start: Int, length: Int) -> ByteSlice: // let safe_start = int_clamp(start, 0, view.length) // let safe_length = int_clamp(length, 0, view.length - safe_start) // return bytes_slice(view.source, view.start + safe_start, safe_length) // // pub fn bytes_materialize(view: ByteSlice) -> String: // return substring(view.source, view.start, view.start + view.length) // // pub fn bytes_equals_string(view: ByteSlice, other: String) -> Bool: // if view.length != len(other): // return false // var index = 0 // while index < view.length: // if bytes_byte_at(view, index) != byte_at(other, index): // return false // index = index + 1 // return true // // pub fn bytes_equals(left: ByteSlice, right: ByteSlice) -> Bool: // if left.length != right.length: // return false // var index = 0 // while index < left.length: // if bytes_byte_at(left, index) != bytes_byte_at(right, index): // return false // index = index + 1 // return true // // pub fn bytes_array(view: ByteSlice) -> Array: // let mut items: Array = [] // var index = 0 // while index < view.length: // push(items, bytes_byte_at(view, index)) // index = index + 1 // return items // // pub fn bytes_from_array(values: Array) -> String: // var output = "" // var index = 0 // while index < len(values): // output = output + chr(values[index] & 255) // index = index + 1 // return output // // pub fn bytes_hex(value: String) -> String: // return hex_encode(value) // // pub fn bytes_hex_upper(value: String) -> String: // return hex_encode_upper(value) // // pub fn bytes_from_hex(text: String) -> BytesDecodeResult: // if bytes_hex_text_is_valid(text) == false: // return bytes_decode_error("hex text must have even length and only hexadecimal digits") // return BytesDecodeResult { // ok: true, // value: hex_decode(text), // error: "" // } // // pub fn bytes_builder_new() -> BytesBuilder: // return BytesBuilder { buffer: "" } // // pub fn bytes_builder_len(builder: BytesBuilder) -> Int: // return len(builder.buffer) // // pub fn bytes_builder_push_byte(builder: BytesBuilder, value: Int) -> BytesBuilder: // return BytesBuilder { buffer: builder.buffer + chr(value & 255) } // // pub fn bytes_builder_push_string(builder: BytesBuilder, value: String) -> BytesBuilder: // return BytesBuilder { buffer: builder.buffer + value } // // pub fn bytes_builder_push_slice(builder: BytesBuilder, view: ByteSlice) -> BytesBuilder: // return bytes_builder_push_string(builder, bytes_materialize(view)) // // pub fn bytes_builder_push_array(builder: BytesBuilder, values: Array) -> BytesBuilder: // return bytes_builder_push_string(builder, bytes_from_array(values)) // // pub fn bytes_builder_clear(builder: BytesBuilder) -> BytesBuilder: // return BytesBuilder { buffer: "" } // // pub fn bytes_builder_build(builder: BytesBuilder) -> String: // return builder.buffer // // pub fn bytes_builder_view(builder: BytesBuilder) -> ByteSlice: // return bytes_from(builder.buffer) //!end-kain-file //!kain-file // path = "certify.kn" // kind = "text" // encoding = "utf8" // bytes = 290 // sha256 = "sha256:19f6251b9eefa3ae3741c18e90325eeb7a9183ebc50374ae8bc2884d06cd7558" // trailing_newline = true //!kain-file-content // use std::build // // pub fn certify_task(id: String) -> BuildTaskSpec: // return build_task_of_kind(id, BUILD_KIND_CERTIFY) // // pub fn certify_gate(id: String) -> BuildTaskSpec: // return certify_task(id) // // pub fn release_gate(id: String) -> BuildTaskSpec: // return certify_task(id) // //!end-kain-file //!kain-file // path = "collections.kn" // kind = "text" // encoding = "utf8" // bytes = 28715 // sha256 = "sha256:e5d77bd945f20c25a9fe97c40196ba2911290f7d9befd476c2752aa53f1de855" // trailing_newline = true //!kain-file-content // use std::hash // // @extern // fn abi_map_release(handle: Int) -> Int // // pub fn native_int_min(left: Int, right: Int) -> Int: // if left < right: // return left // return right // // pub fn native_int_max(left: Int, right: Int) -> Int: // if left > right: // return left // return right // // pub fn native_int_clamp(value: Int, low: Int, high: Int) -> Int: // if value < low: // return low // if value > high: // return high // return value // // pub fn native_int_between(value: Int, low: Int, high: Int) -> Bool: // if value < low: // return false // return value <= high // // pub fn native_int_saturating_sub(left: Int, right: Int) -> Int: // if right > left: // return 0 // return left - right // // pub fn native_int_sign(value: Int) -> Int: // if value > 0: // return 1 // if value < 0: // return -1 // return 0 // // pub fn native_bool_all(left: Bool, right: Bool) -> Bool: // if left: // return right // return false // // pub fn native_bool_any(left: Bool, right: Bool) -> Bool: // if left: // return true // return right // // pub fn native_bool_to_int(value: Bool) -> Int: // if value: // return 1 // return 0 // // pub fn native_int_to_bool(value: Int) -> Bool: // return value != 0 // // # root-domain aliases: generated public std names // pub fn int_min(left: Int, right: Int) -> Int: // if left < right: // return left // return right // // pub fn int_max(left: Int, right: Int) -> Int: // if left > right: // return left // return right // // pub fn int_clamp(value: Int, low: Int, high: Int) -> Int: // if value < low: // return low // if value > high: // return high // return value // // pub fn int_between(value: Int, low: Int, high: Int) -> Bool: // if value < low: // return false // return value <= high // // pub fn int_saturating_sub(left: Int, right: Int) -> Int: // if right > left: // return 0 // return left - right // // pub fn int_sign(value: Int) -> Int: // if value > 0: // return 1 // if value < 0: // return -1 // return 0 // // pub fn bool_all(left: Bool, right: Bool) -> Bool: // if left: // return right // return false // // pub fn bool_any(left: Bool, right: Bool) -> Bool: // if left: // return true // return right // // pub fn bool_to_int(value: Bool) -> Int: // if value: // return 1 // return 0 // // pub fn int_to_bool(value: Int) -> Bool: // return value != 0 // # end root-domain aliases // // pub struct StringIntMap: // handle: Int // // pub struct IntQueue: // buffer: ptr // capacity: Int // head: Int // tail: Int // count: Int // // pub struct IntDeque: // buffer: ptr // capacity: Int // head: Int // tail: Int // count: Int // // pub struct IntPriorityQueue: // buffer: ptr // capacity: Int // count: Int // // pub struct PriorityEntry: // value: Int // priority: Int // // const SLOT_MAP_KEY_INDEX_BASE: Int = 1000000000 // const SLOT_MAP_INITIAL_GENERATION: Int = 1 // const SLOT_MAP_EMPTY: Int = 0 // const SLOT_MAP_OCCUPIED: Int = 1 // const SLOT_MAP_INVALID_INDEX: Int = -1 // // pub struct SlotMapKey: // raw: Int // // pub struct SlotMap: // values: ptr // generations: ptr // occupied: ptr // next_free: ptr // capacity: Int // count: Int // free_head: Int // // pub struct SlotMapInsert: // map: SlotMap // key: SlotMapKey // ok: Bool // // pub struct SlotMapRemove: // map: SlotMap // value: Int // ok: Bool // // pub fn string_int_map_new() -> StringIntMap: // return StringIntMap { handle: map_new() } // // pub fn string_int_map_set(map: StringIntMap, key: String, value: Int) -> StringIntMap: // map_set(map.handle, key, value) // return map // // pub fn string_int_map_get(map: StringIntMap, key: String) -> Int: // return map_get(map.handle, key) // // pub fn string_int_map_get_or(map: StringIntMap, key: String, fallback: Int) -> Int: // let value = map_get(map.handle, key) // if value == 0: // return fallback // return value // // pub fn string_int_map_destroy(map: StringIntMap) -> Int: // return abi_map_release(map.handle) // // pub fn typed_map_new() -> StringIntMap: // return string_int_map_new() // // pub fn typed_map_set(map: StringIntMap, key: String, value: Int) -> StringIntMap: // return string_int_map_set(map, key, value) // // pub fn typed_map_get(map: StringIntMap, key: String) -> Int: // return string_int_map_get(map, key) // // pub fn typed_map_destroy(map: StringIntMap) -> Int: // return string_int_map_destroy(map) // // pub fn queue_create(capacity: Int) -> IntQueue: // let safe_capacity = int_max(capacity, 1) // return IntQueue { buffer: alloc_zeroed(safe_capacity, "Int"), capacity: safe_capacity, head: 0, tail: 0, count: 0 } // // pub fn queue_len(queue: IntQueue) -> Int: // return queue.count // // pub fn queue_capacity(queue: IntQueue) -> Int: // return queue.capacity // // pub fn queue_is_empty(queue: IntQueue) -> Bool: // return queue.count == 0 // // pub fn queue_is_full(queue: IntQueue) -> Bool: // return queue.count >= queue.capacity // // pub fn queue_push(queue: IntQueue, value: Int) -> IntQueue: // if queue_is_full(queue): // return queue // mem_store(ptr_offset(queue.buffer, queue.tail, "Int"), value, "Int") // return IntQueue { // buffer: queue.buffer, // capacity: queue.capacity, // head: queue.head, // tail: (queue.tail + 1) % queue.capacity, // count: queue.count + 1 // } // // pub fn queue_peek(queue: IntQueue) -> Int: // if queue_is_empty(queue): // return 0 // return mem_load(ptr_offset(queue.buffer, queue.head, "Int"), "Int") // // pub fn queue_pop(queue: IntQueue) -> IntQueue: // if queue_is_empty(queue): // return queue // return IntQueue { // buffer: queue.buffer, // capacity: queue.capacity, // head: (queue.head + 1) % queue.capacity, // tail: queue.tail, // count: queue.count - 1 // } // // pub fn queue_destroy(queue: IntQueue) -> Int: // decay queue.buffer // return 0 // // pub fn deque_create(capacity: Int) -> IntDeque: // let safe_capacity = int_max(capacity, 1) // return IntDeque { buffer: alloc_zeroed(safe_capacity, "Int"), capacity: safe_capacity, head: 0, tail: 0, count: 0 } // // pub fn deque_len(deque: IntDeque) -> Int: // return deque.count // // pub fn deque_is_empty(deque: IntDeque) -> Bool: // return deque.count == 0 // // pub fn deque_is_full(deque: IntDeque) -> Bool: // return deque.count >= deque.capacity // // pub fn deque_push_back(deque: IntDeque, value: Int) -> IntDeque: // if deque_is_full(deque): // return deque // mem_store(ptr_offset(deque.buffer, deque.tail, "Int"), value, "Int") // return IntDeque { // buffer: deque.buffer, // capacity: deque.capacity, // head: deque.head, // tail: (deque.tail + 1) % deque.capacity, // count: deque.count + 1 // } // // pub fn deque_push_front(deque: IntDeque, value: Int) -> IntDeque: // if deque_is_full(deque): // return deque // let next_head = (deque.head + deque.capacity - 1) % deque.capacity // mem_store(ptr_offset(deque.buffer, next_head, "Int"), value, "Int") // return IntDeque { // buffer: deque.buffer, // capacity: deque.capacity, // head: next_head, // tail: deque.tail, // count: deque.count + 1 // } // // pub fn deque_peek_front(deque: IntDeque) -> Int: // if deque_is_empty(deque): // return 0 // return mem_load(ptr_offset(deque.buffer, deque.head, "Int"), "Int") // // pub fn deque_peek_back(deque: IntDeque) -> Int: // if deque_is_empty(deque): // return 0 // let slot = (deque.tail + deque.capacity - 1) % deque.capacity // return mem_load(ptr_offset(deque.buffer, slot, "Int"), "Int") // // pub fn deque_pop_front(deque: IntDeque) -> IntDeque: // if deque_is_empty(deque): // return deque // return IntDeque { // buffer: deque.buffer, // capacity: deque.capacity, // head: (deque.head + 1) % deque.capacity, // tail: deque.tail, // count: deque.count - 1 // } // // pub fn deque_pop_back(deque: IntDeque) -> IntDeque: // if deque_is_empty(deque): // return deque // return IntDeque { // buffer: deque.buffer, // capacity: deque.capacity, // head: deque.head, // tail: (deque.tail + deque.capacity - 1) % deque.capacity, // count: deque.count - 1 // } // // pub fn deque_destroy(deque: IntDeque) -> Int: // decay deque.buffer // return 0 // // pub fn priority_entry_pack(value: Int, priority: Int) -> Int: // return (priority * 1000000000) + (value & 999999999) // // pub fn priority_entry_value(entry: Int) -> Int: // return entry % 1000000000 // // pub fn priority_entry_priority(entry: Int) -> Int: // return entry / 1000000000 // // pub fn priority_queue_create(capacity: Int) -> IntPriorityQueue: // let safe_capacity = int_max(capacity, 1) // return IntPriorityQueue { buffer: alloc_zeroed(safe_capacity, "Int"), capacity: safe_capacity, count: 0 } // // pub fn priority_queue_len(queue: IntPriorityQueue) -> Int: // return queue.count // // pub fn priority_queue_is_empty(queue: IntPriorityQueue) -> Bool: // return queue.count == 0 // // pub fn priority_queue_is_full(queue: IntPriorityQueue) -> Bool: // return queue.count >= queue.capacity // // pub fn priority_queue_swap(queue: IntPriorityQueue, left: Int, right: Int) -> IntPriorityQueue: // let left_value = mem_load(ptr_offset(queue.buffer, left, "Int"), "Int") // let right_value = mem_load(ptr_offset(queue.buffer, right, "Int"), "Int") // mem_store(ptr_offset(queue.buffer, left, "Int"), right_value, "Int") // mem_store(ptr_offset(queue.buffer, right, "Int"), left_value, "Int") // return queue // // pub fn priority_queue_push(queue: IntPriorityQueue, value: Int, priority: Int) -> IntPriorityQueue: // if priority_queue_is_full(queue): // return queue // let entry = priority_entry_pack(value, priority) // mem_store(ptr_offset(queue.buffer, queue.count, "Int"), entry, "Int") // var next = IntPriorityQueue { buffer: queue.buffer, capacity: queue.capacity, count: queue.count + 1 } // var child = queue.count // while child > 0: // let parent = (child - 1) / 2 // let child_value = mem_load(ptr_offset(next.buffer, child, "Int"), "Int") // let parent_value = mem_load(ptr_offset(next.buffer, parent, "Int"), "Int") // if priority_entry_priority(child_value) <= priority_entry_priority(parent_value): // return next // next = priority_queue_swap(next, child, parent) // child = parent // return next // // pub fn priority_queue_peek_entry(queue: IntPriorityQueue) -> PriorityEntry: // if priority_queue_is_empty(queue): // return PriorityEntry { value: 0, priority: 0 } // let entry = mem_load(queue.buffer, "Int") // return PriorityEntry { value: priority_entry_value(entry), priority: priority_entry_priority(entry) } // // pub fn priority_queue_peek_value(queue: IntPriorityQueue) -> Int: // return priority_queue_peek_entry(queue).value // // pub fn priority_queue_peek_priority(queue: IntPriorityQueue) -> Int: // return priority_queue_peek_entry(queue).priority // // pub fn priority_queue_pop(queue: IntPriorityQueue) -> IntPriorityQueue: // if priority_queue_is_empty(queue): // return queue // if queue.count == 1: // return IntPriorityQueue { buffer: queue.buffer, capacity: queue.capacity, count: 0 } // let last_index = queue.count - 1 // let last_value = mem_load(ptr_offset(queue.buffer, last_index, "Int"), "Int") // mem_store(queue.buffer, last_value, "Int") // var next = IntPriorityQueue { buffer: queue.buffer, capacity: queue.capacity, count: last_index } // var parent = 0 // while true: // let left = (parent * 2) + 1 // let right = left + 1 // var best = parent // if left < next.count: // let left_value = mem_load(ptr_offset(next.buffer, left, "Int"), "Int") // let best_value = mem_load(ptr_offset(next.buffer, best, "Int"), "Int") // if priority_entry_priority(left_value) > priority_entry_priority(best_value): // best = left // if right < next.count: // let right_value = mem_load(ptr_offset(next.buffer, right, "Int"), "Int") // let best_value = mem_load(ptr_offset(next.buffer, best, "Int"), "Int") // if priority_entry_priority(right_value) > priority_entry_priority(best_value): // best = right // if best == parent: // return next // next = priority_queue_swap(next, parent, best) // parent = best // return next // // pub fn priority_queue_destroy(queue: IntPriorityQueue) -> Int: // decay queue.buffer // return 0 // // pub fn slot_map_key(index: Int, generation: Int) -> SlotMapKey: // if index < 0: // return SlotMapKey { raw: SLOT_MAP_INVALID_INDEX } // if index >= SLOT_MAP_KEY_INDEX_BASE: // return SlotMapKey { raw: SLOT_MAP_INVALID_INDEX } // if generation <= 0: // return SlotMapKey { raw: SLOT_MAP_INVALID_INDEX } // return SlotMapKey { raw: (generation * SLOT_MAP_KEY_INDEX_BASE) + index } // // pub fn slot_map_invalid_key() -> SlotMapKey: // return SlotMapKey { raw: SLOT_MAP_INVALID_INDEX } // // pub fn slot_map_key_index(key: SlotMapKey) -> Int: // if key.raw < 0: // return SLOT_MAP_INVALID_INDEX // return key.raw % SLOT_MAP_KEY_INDEX_BASE // // pub fn slot_map_key_generation(key: SlotMapKey) -> Int: // if key.raw < 0: // return 0 // return key.raw / SLOT_MAP_KEY_INDEX_BASE // // pub fn slot_map_key_is_valid(key: SlotMapKey) -> Bool: // return slot_map_key_index(key) >= 0 and slot_map_key_generation(key) > 0 // // pub fn slot_map_create(capacity: Int) -> SlotMap: // let safe_capacity = int_clamp(capacity, 1, SLOT_MAP_KEY_INDEX_BASE - 1) // let values = alloc_zeroed(safe_capacity, "Int") // let generations = alloc_zeroed(safe_capacity, "Int") // let occupied = alloc_zeroed(safe_capacity, "Int") // let next_free = alloc_zeroed(safe_capacity, "Int") // var index = 0 // while index < safe_capacity: // mem_store(ptr_offset(generations, index, "Int"), SLOT_MAP_INITIAL_GENERATION, "Int") // mem_store(ptr_offset(occupied, index, "Int"), SLOT_MAP_EMPTY, "Int") // if index + 1 < safe_capacity: // mem_store(ptr_offset(next_free, index, "Int"), index + 1, "Int") // else: // mem_store(ptr_offset(next_free, index, "Int"), SLOT_MAP_INVALID_INDEX, "Int") // index = index + 1 // return SlotMap { values: values, generations: generations, occupied: occupied, next_free: next_free, capacity: safe_capacity, count: 0, free_head: 0 } // // pub fn slot_map_len(map: SlotMap) -> Int: // return map.count // // pub fn slot_map_capacity(map: SlotMap) -> Int: // return map.capacity // // pub fn slot_map_is_full(map: SlotMap) -> Bool: // return map.free_head < 0 or map.count >= map.capacity // // pub fn slot_map_contains(map: SlotMap, key: SlotMapKey) -> Bool: // let index = slot_map_key_index(key) // if index < 0: // return false // if index >= map.capacity: // return false // if mem_load(ptr_offset(map.occupied, index, "Int"), "Int") != SLOT_MAP_OCCUPIED: // return false // return mem_load(ptr_offset(map.generations, index, "Int"), "Int") == slot_map_key_generation(key) // // pub fn slot_map_get_or(map: SlotMap, key: SlotMapKey, fallback: Int) -> Int: // if slot_map_contains(map, key) == false: // return fallback // return mem_load(ptr_offset(map.values, slot_map_key_index(key), "Int"), "Int") // // pub fn slot_map_insert(map: SlotMap, value: Int) -> SlotMapInsert: // if slot_map_is_full(map): // return SlotMapInsert { map: map, key: slot_map_invalid_key(), ok: false } // let index = map.free_head // let next_head = mem_load(ptr_offset(map.next_free, index, "Int"), "Int") // let generation = mem_load(ptr_offset(map.generations, index, "Int"), "Int") // mem_store(ptr_offset(map.values, index, "Int"), value, "Int") // mem_store(ptr_offset(map.occupied, index, "Int"), SLOT_MAP_OCCUPIED, "Int") // mem_store(ptr_offset(map.next_free, index, "Int"), SLOT_MAP_INVALID_INDEX, "Int") // let next_map = SlotMap { values: map.values, generations: map.generations, occupied: map.occupied, next_free: map.next_free, capacity: map.capacity, count: map.count + 1, free_head: next_head } // return SlotMapInsert { map: next_map, key: slot_map_key(index, generation), ok: true } // // pub fn slot_map_set(map: SlotMap, key: SlotMapKey, value: Int) -> SlotMap: // if slot_map_contains(map, key): // mem_store(ptr_offset(map.values, slot_map_key_index(key), "Int"), value, "Int") // return map // // pub fn slot_map_remove(map: SlotMap, key: SlotMapKey) -> SlotMapRemove: // if slot_map_contains(map, key) == false: // return SlotMapRemove { map: map, value: 0, ok: false } // let index = slot_map_key_index(key) // let value = mem_load(ptr_offset(map.values, index, "Int"), "Int") // let generation = mem_load(ptr_offset(map.generations, index, "Int"), "Int") // mem_store(ptr_offset(map.generations, index, "Int"), generation + 1, "Int") // mem_store(ptr_offset(map.occupied, index, "Int"), SLOT_MAP_EMPTY, "Int") // mem_store(ptr_offset(map.next_free, index, "Int"), map.free_head, "Int") // let next_map = SlotMap { values: map.values, generations: map.generations, occupied: map.occupied, next_free: map.next_free, capacity: map.capacity, count: map.count - 1, free_head: index } // return SlotMapRemove { map: next_map, value: value, ok: true } // // pub fn slot_map_destroy(map: SlotMap) -> Int: // decay map.next_free // decay map.occupied // decay map.generations // decay map.values // return 0 // // # --- Intrusive Zero-Allocation Hash Map (The uthash Evolution) --- // // pub struct IntrusiveHashNode: // next: ptr // prev: ptr // hash_value: Int // key: Int // // pub struct IntrusiveHashMap: // buckets: ptr // bucket_count: Int // count: Int // // pub fn intrusive_hash_map_create(bucket_count: Int) -> IntrusiveHashMap: // var safe_buckets = bucket_count // if safe_buckets < 1: // safe_buckets = 1 // let buckets: ptr = alloc_zeroed(safe_buckets, "Int") // return IntrusiveHashMap { buckets: buckets, bucket_count: safe_buckets, count: 0 } // // pub fn intrusive_hash_map_destroy(map: IntrusiveHashMap) -> Int: // decay map.buckets // return 0 // // pub fn intrusive_hash_map_insert(map: IntrusiveHashMap, node_offset: Int, item_ptr: ptr, key_hash: Int, key: Int) -> IntrusiveHashMap with Unsafe: // let bucket_idx = (key_hash & 9223372036854775807) % map.bucket_count // let bucket_ptr = ptr_offset(map.buckets, bucket_idx, "Int") // let head_ptr = int_to_ptr(mem_load(bucket_ptr, "Int"), "Int") // // # Get address of our IntrusiveHashNode inside item_ptr // let node_ptr = ptr_offset(item_ptr, node_offset, "Int") // // # Initialize node fields: next, prev, hash_value, key // mem_store(ptr_offset(node_ptr, 0, "Int"), ptr_to_int(head_ptr), "Int") // mem_store(ptr_offset(node_ptr, 1, "Int"), 0, "Int") // mem_store(ptr_offset(node_ptr, 2, "Int"), key_hash, "Int") // mem_store(ptr_offset(node_ptr, 3, "Int"), key, "Int") // // # If head was not NULL, set head.prev = item_ptr // if ptr_to_int(head_ptr) != 0: // let head_node_ptr = ptr_offset(head_ptr, node_offset, "Int") // mem_store(ptr_offset(head_node_ptr, 1, "Int"), ptr_to_int(item_ptr), "Int") // // # Set bucket head = item_ptr // mem_store(bucket_ptr, ptr_to_int(item_ptr), "Int") // // return IntrusiveHashMap { // buckets: map.buckets, // bucket_count: map.bucket_count, // count: map.count + 1 // } // // pub fn intrusive_hash_map_find(map: IntrusiveHashMap, node_offset: Int, key_hash: Int, key: Int) -> ptr with Unsafe: // let bucket_idx = (key_hash & 9223372036854775807) % map.bucket_count // let bucket_ptr = ptr_offset(map.buckets, bucket_idx, "Int") // var current = int_to_ptr(mem_load(bucket_ptr, "Int"), "Int") // // var found = int_to_ptr(0, "Int") // var done = false // while ptr_to_int(current) != 0 and done == false: // let node_ptr = ptr_offset(current, node_offset, "Int") // let current_hash = mem_load(ptr_offset(node_ptr, 2, "Int"), "Int") // // if current_hash == key_hash: // let current_key = mem_load(ptr_offset(node_ptr, 3, "Int"), "Int") // if current_key == key: // found = current // done = true // // if done == false: // current = int_to_ptr(mem_load(ptr_offset(node_ptr, 0, "Int"), "Int"), "Int") // // return found // // pub fn intrusive_hash_map_remove(map: IntrusiveHashMap, node_offset: Int, item_ptr: ptr) -> IntrusiveHashMap with Unsafe: // let node_ptr = ptr_offset(item_ptr, node_offset, "Int") // let next_ptr = int_to_ptr(mem_load(ptr_offset(node_ptr, 0, "Int"), "Int"), "Int") // let prev_ptr = int_to_ptr(mem_load(ptr_offset(node_ptr, 1, "Int"), "Int"), "Int") // let hash_val = mem_load(ptr_offset(node_ptr, 2, "Int"), "Int") // // let bucket_idx = (hash_val & 9223372036854775807) % map.bucket_count // let bucket_ptr = ptr_offset(map.buckets, bucket_idx, "Int") // // # If this is the head of the bucket, update head = next_ptr // let head_ptr = int_to_ptr(mem_load(bucket_ptr, "Int"), "Int") // if ptr_to_int(head_ptr) == ptr_to_int(item_ptr): // mem_store(bucket_ptr, ptr_to_int(next_ptr), "Int") // // # If there is a next node, set next.prev = prev_ptr // if ptr_to_int(next_ptr) != 0: // let next_node_ptr = ptr_offset(next_ptr, node_offset, "Int") // mem_store(ptr_offset(next_node_ptr, 1, "Int"), ptr_to_int(prev_ptr), "Int") // // # If there is a prev node, set prev.next = next_ptr // if ptr_to_int(prev_ptr) != 0: // let prev_node_ptr = ptr_offset(prev_ptr, node_offset, "Int") // mem_store(ptr_offset(prev_node_ptr, 0, "Int"), ptr_to_int(next_ptr), "Int") // // return IntrusiveHashMap { // buckets: map.buckets, // bucket_count: map.bucket_count, // count: map.count - 1 // } // // # --- ArrayList (Growable Element Buffer) --- // // pub struct ArrayList: // buffer: ptr // capacity: Int // count: Int // // pub fn array_list_create(capacity: Int) -> ArrayList: // let safe_capacity = int_max(capacity, 8) // let buffer = alloc_zeroed(safe_capacity, "Int") // return ArrayList { buffer: buffer, capacity: safe_capacity, count: 0 } // // pub fn array_list_len(list: ArrayList) -> Int: // return list.count // // pub fn array_list_capacity(list: ArrayList) -> Int: // return list.capacity // // pub fn array_list_get(list: ArrayList, index: Int) -> Int: // if index < 0 or index >= list.count: // return 0 // return mem_load(ptr_offset(list.buffer, index, "Int"), "Int") // // pub fn array_list_set(list: ArrayList, index: Int, value: Int) -> ArrayList: // if index >= 0 and index < list.count: // mem_store(ptr_offset(list.buffer, index, "Int"), value, "Int") // return list // // pub fn array_list_append(list: ptr, value: Int) -> Int with Unsafe: // var cap = mem_load(ptr_offset(list, 1, "Int"), "Int") // var len = mem_load(ptr_offset(list, 2, "Int"), "Int") // var buf = int_to_ptr(mem_load(list, "Int"), "Int") // // if len >= cap: // let new_cap = cap * 2 // let new_buf = alloc_zeroed(new_cap, "Int") // var i = 0 // while i < len: // let val = mem_load(ptr_offset(buf, i, "Int"), "Int") // mem_store(ptr_offset(new_buf, i, "Int"), val, "Int") // i = i + 1 // // decay buf // mem_store(list, ptr_to_int(new_buf), "Int") // mem_store(ptr_offset(list, 1, "Int"), new_cap, "Int") // buf = new_buf // cap = new_cap // // mem_store(ptr_offset(buf, len, "Int"), value, "Int") // len = len + 1 // mem_store(ptr_offset(list, 2, "Int"), len, "Int") // return len // // pub fn array_list_pop(list: ptr) -> Int with Unsafe: // let len = mem_load(ptr_offset(list, 2, "Int"), "Int") // if len <= 0: // return 0 // let buf = int_to_ptr(mem_load(list, "Int"), "Int") // let last_idx = len - 1 // let val = mem_load(ptr_offset(buf, last_idx, "Int"), "Int") // mem_store(ptr_offset(list, 2, "Int"), last_idx, "Int") // return val // // pub fn array_list_destroy(list: ArrayList) -> Int: // decay list.buffer // return 0 // // // # --- HashMap (Open-Addressing Linear-Probed Hash Map) --- // // pub struct HashMap: // keys: ptr // values: ptr // occupied: ptr // capacity: Int // count: Int // // pub fn hash_map_create(capacity: Int) -> HashMap: // let safe_capacity = int_max(capacity, 8) // let keys = alloc_zeroed(safe_capacity, "Int") // let values = alloc_zeroed(safe_capacity, "Int") // let occupied = alloc_zeroed(safe_capacity, "Int") // return HashMap { keys: keys, values: values, occupied: occupied, capacity: safe_capacity, count: 0 } // // pub fn hash_map_len(map: HashMap) -> Int: // return map.count // // pub fn hash_map_capacity(map: HashMap) -> Int: // return map.capacity // // pub fn hash_map_get_or(map: HashMap, key: Int, fallback: Int) -> Int with Unsafe: // let cap = map.capacity // let mixed = hash_mix64(key) // var idx = hash_bucket_mod64(mixed, cap) // var i = 0 // while i < cap: // let occ = mem_load(ptr_offset(map.occupied, idx, "Int"), "Int") // if occ == 0: // return fallback // let k = mem_load(ptr_offset(map.keys, idx, "Int"), "Int") // if k == key: // return mem_load(ptr_offset(map.values, idx, "Int"), "Int") // idx = (idx + 1) % cap // i = i + 1 // return fallback // // pub fn hash_map_put(map: ptr, key: Int, value: Int) -> Int with Unsafe: // var cap = mem_load(ptr_offset(map, 3, "Int"), "Int") // var len = mem_load(ptr_offset(map, 4, "Int"), "Int") // var keys_ptr = int_to_ptr(mem_load(map, "Int"), "Int") // var vals_ptr = int_to_ptr(mem_load(ptr_offset(map, 1, "Int"), "Int"), "Int") // var occs_ptr = int_to_ptr(mem_load(ptr_offset(map, 2, "Int"), "Int"), "Int") // // # Probe & Insert // let mixed = hash_mix64(key) // var idx = hash_bucket_mod64(mixed, cap) // var done = false // while done == false: // let occ = mem_load(ptr_offset(occs_ptr, idx, "Int"), "Int") // if occ == 0: // mem_store(ptr_offset(occs_ptr, idx, "Int"), 1, "Int") // mem_store(ptr_offset(keys_ptr, idx, "Int"), key, "Int") // mem_store(ptr_offset(vals_ptr, idx, "Int"), value, "Int") // len = len + 1 // mem_store(ptr_offset(map, 4, "Int"), len, "Int") // done = true // else: // let k = mem_load(ptr_offset(keys_ptr, idx, "Int"), "Int") // if k == key: // mem_store(ptr_offset(vals_ptr, idx, "Int"), value, "Int") // done = true // else: // idx = (idx + 1) % cap // // # Resize & Rehash if load factor > 0.7 // if len * 10 > cap * 7: // let new_cap = cap * 2 // let new_keys = alloc_zeroed(new_cap, "Int") // let new_vals = alloc_zeroed(new_cap, "Int") // let new_occs = alloc_zeroed(new_cap, "Int") // // var i = 0 // while i < cap: // let occ = mem_load(ptr_offset(occs_ptr, i, "Int"), "Int") // if occ == 1: // let k = mem_load(ptr_offset(keys_ptr, i, "Int"), "Int") // let v = mem_load(ptr_offset(vals_ptr, i, "Int"), "Int") // // # Insert into new arrays // let m = hash_mix64(k) // var n_idx = hash_bucket_mod64(m, new_cap) // var placed = false // while placed == false: // let n_occ = mem_load(ptr_offset(new_occs, n_idx, "Int"), "Int") // if n_occ == 0: // mem_store(ptr_offset(new_occs, n_idx, "Int"), 1, "Int") // mem_store(ptr_offset(new_keys, n_idx, "Int"), k, "Int") // mem_store(ptr_offset(new_vals, n_idx, "Int"), v, "Int") // placed = true // else: // n_idx = (n_idx + 1) % new_cap // i = i + 1 // // decay keys_ptr // decay vals_ptr // decay occs_ptr // // mem_store(map, ptr_to_int(new_keys), "Int") // mem_store(ptr_offset(map, 1, "Int"), ptr_to_int(new_vals), "Int") // mem_store(ptr_offset(map, 2, "Int"), ptr_to_int(new_occs), "Int") // mem_store(ptr_offset(map, 3, "Int"), new_cap, "Int") // // return len // // pub fn hash_map_destroy(map: HashMap) -> Int: // decay map.keys // decay map.values // decay map.occupied // return 0 // //!end-kain-file //!kain-file // path = "compress.kn" // kind = "text" // encoding = "utf8" // bytes = 3974 // sha256 = "sha256:2588d2e8f069c84c7f55ac11377637b34ff89899bbaaf9708c2c523e3d195418" // trailing_newline = true //!kain-file-content // use std::memory // use std::io // // # --- RleCompressionWriter (Streamable Run-Length Encoder) --- // // pub struct RleCompressionWriter: // dest: ptr // last_char: ptr // run_count: ptr // // pub fn rle_writer_new(dest: ptr) -> RleCompressionWriter: // let last = alloc_zeroed(1, "Int") // let count = alloc_zeroed(1, "Int") // mem_store(last, -1, "Int") // mem_store(count, 0, "Int") // return RleCompressionWriter { // dest: dest, // last_char: last, // run_count: count // } // // pub fn rle_writer_destroy(w: RleCompressionWriter) -> Int: // decay w.last_char // decay w.run_count // return 0 // // # Appends a byte/word value to the compressed stream. // # Automatically flushes runs when they hit the 255 byte threshold. // pub fn rle_writer_write_char(w: ptr, c: Int, flush_target: ptr) -> Int with Unsafe: // let last = mem_load(w.last_char, "Int") // let count = mem_load(w.run_count, "Int") // let dest = w.dest // // if last == -1: // # First character // mem_store(w.last_char, c, "Int") // mem_store(w.run_count, 1, "Int") // return 0 // // if c == last and count < 255: // mem_store(w.run_count, count + 1, "Int") // else: // # Flush the old run // let pair = alloc_zeroed(2, "Int") // mem_store(ptr_offset(pair, 0, "Int"), last, "Int") // mem_store(ptr_offset(pair, 1, "Int"), count, "Int") // let _ignored = buffered_writer_write(dest, pair, 2, flush_target) // decay pair // // # Start a new run // mem_store(w.last_char, c, "Int") // mem_store(w.run_count, 1, "Int") // // return 0 // // # Flushes all remaining compressed runs to the destination writer. // pub fn rle_writer_flush(w: ptr, flush_target: ptr) -> Int with Unsafe: // let last = mem_load(w.last_char, "Int") // let count = mem_load(w.run_count, "Int") // let dest = w.dest // // if last != -1 and count > 0: // let pair = alloc_zeroed(2, "Int") // mem_store(ptr_offset(pair, 0, "Int"), last, "Int") // mem_store(ptr_offset(pair, 1, "Int"), count, "Int") // let _ignored = buffered_writer_write(dest, pair, 2, flush_target) // decay pair // // mem_store(w.last_char, -1, "Int") // mem_store(w.run_count, 0, "Int") // return 1 // // return 0 // // // # --- RleCompressionReader (Streamable Run-Length Decoder) --- // // pub struct RleCompressionReader: // src: ptr // current_char: ptr // remaining_runs: ptr // // pub fn rle_reader_new(src: ptr) -> RleCompressionReader: // let curr = alloc_zeroed(1, "Int") // let rem = alloc_zeroed(1, "Int") // mem_store(curr, -1, "Int") // mem_store(rem, 0, "Int") // return RleCompressionReader { // src: src, // current_char: curr, // remaining_runs: rem // } // // pub fn rle_reader_destroy(r: RleCompressionReader) -> Int: // decay r.current_char // decay r.remaining_runs // return 0 // // # Reads a decompressed byte/word from the stream, resolving compressed runs on the fly. // pub fn rle_reader_read_char(r: ptr) -> Int with Unsafe: // let curr = mem_load(r.current_char, "Int") // let rem = mem_load(r.remaining_runs, "Int") // let src = r.src // // if rem > 0: // mem_store(r.remaining_runs, rem - 1, "Int") // return curr // // # Read next run pair (character, count) from the buffered reader // let pair = alloc_zeroed(2, "Int") // let read_count = buffered_reader_read(src, pair, 2) // if read_count < 2: // decay pair // return -1 # EOF or partial read // // let next_char = mem_load(ptr_offset(pair, 0, "Int"), "Int") // let next_count = mem_load(ptr_offset(pair, 1, "Int"), "Int") // decay pair // // mem_store(r.current_char, next_char, "Int") // mem_store(r.remaining_runs, next_count - 1, "Int") // return next_char //!end-kain-file //!kain-file // path = "crypto.kn" // kind = "text" // encoding = "utf8" // bytes = 1231 // sha256 = "sha256:0c47a56e38149aa23cb99bbaee1d80b2b07ec1e1dd5b7944c3fe70d1b3b78f7b" // trailing_newline = true //!kain-file-content // @extern // fn abi_crypto_random_bytes_hex(length: Int) -> String // // @extern // fn abi_crypto_sha256_text(text: String, text_len: Int) -> String // // @extern // fn abi_crypto_hmac_sha256_text(key: String, key_len: Int, message: String, message_len: Int) -> String // // @extern // fn abi_crypto_blake3_text(text: String, text_len: Int) -> String // // pub fn crypto_random_bytes_hex(length: Int) -> String: // return abi_crypto_random_bytes_hex(length) // // pub fn crypto_sha256(text: String) -> String: // return abi_crypto_sha256_text(text, len(text)) // // pub fn crypto_hmac_sha256(key: String, message: String) -> String: // return abi_crypto_hmac_sha256_text(key, len(key), message, len(message)) // // pub fn crypto_blake3(text: String) -> String: // return abi_crypto_blake3_text(text, len(text)) // // pub fn random_bytes(length: Int) -> String: // return crypto_random_bytes_hex(length) // // pub fn random_bytes_hex(length: Int) -> String: // return crypto_random_bytes_hex(length) // // pub fn sha256(text: String) -> String: // return crypto_sha256(text) // // pub fn hmac_sha256(key: String, message: String) -> String: // return crypto_hmac_sha256(key, message) // // pub fn blake3(text: String) -> String: // return crypto_blake3(text) //!end-kain-file //!kain-file // path = "cuda.kn" // kind = "text" // encoding = "utf8" // bytes = 32823 // sha256 = "sha256:5666ec5c25f10dd99826bc3707b678aa9fe8cd49a912ea9953e6f2624405be5e" // trailing_newline = true //!kain-file-content // use std::fs // use std::bytes // use std::json // // pub const CUDA_SHADER_BUNDLE_ENV: String = "KAIN_CUDA_SHADER_BUNDLE" // pub const CUDA_COMPUTE_RESIDENCY_ENV: String = "KAIN_CUDA_COMPUTE_RESIDENCY" // pub const CUDA_RUNTIME_LIBRARY_ENV: String = "KAIN_GPU_RUNTIME_LIBRARY" // pub const CUDA_DEVICE_ENV: String = "KAIN_CUDA_DEVICE" // pub const CUDA_DEVICE_ORDINAL_ENV: String = "KAIN_CUDA_DEVICE_ORDINAL" // pub const CUDA_SHADER_BUNDLE_FILE_NAME: String = "kain_shader_bundle.json" // pub const CUDA_COMPUTE_RESIDENCY_FILE_NAME: String = "kain_compute_residency.json" // // pub struct CudaPaths: // runtime_library_path: String // shader_bundle_path: String // compute_residency_path: String // // pub struct CudaRuntimeState: // driver_available: Bool // runtime_library_available: Bool // runtime_ready: Bool // paths: CudaPaths // last_status: Int // last_error_kind: String // last_error_message: String // // pub struct CudaDispatchStats: // ok: Bool // status: Int // message: String // compute_key: String // shader_bundle_path: String // compute_residency_path: String // dispatch_invocations: Int // tensor_binding_count: Int // stream_binding_count: Int // neural_node_count: Int // output_binding_count: Int // total_output_bytes: Int // // pub struct CudaBindingLocator: // ok: Bool // compute_key: String // binding_key: String // payload_path: String // descriptor_kind: String // access_mode: String // element_type: String // slot: Int // byte_length: Int // // struct CudaTextRange: // ok: Bool // start: Int // end: Int // // // ============================================================================ // // CUDA device-side PTX intrinsic surface // // ============================================================================ // // These are intentionally extern-only: the CUDA/PTX backend owns the lowering, // // while normal host/runtime CUDA helpers below stay in Kain. // // @extern // pub fn cuda_lane_id() -> UInt // // @extern // pub fn cuda_warp_id() -> UInt // // @extern // pub fn cuda_active_mask() -> UInt // // @extern // pub fn cuda_block_sync() -> Void // // @extern // pub fn cuda_barrier_sync() -> Void // // @extern // pub fn cuda_warp_sync(mask: UInt) -> Void // // @extern // pub fn cuda_ballot(predicate: Bool) -> UInt // // @extern // pub fn cuda_warp_any(predicate: Bool) -> Bool // // @extern // pub fn cuda_warp_all(predicate: Bool) -> Bool // // @extern // pub fn cuda_shfl_xor_u32(value: UInt, lane_mask: UInt) -> UInt // // @extern // pub fn cuda_shfl_xor_f32(value: Float, lane_mask: UInt) -> Float // // @extern // pub fn cuda_warp_reduce_sum_u32(value: UInt) -> UInt // // @extern // pub fn cuda_warp_reduce_sum_f32(value: Float) -> Float // // @extern // pub fn cuda_cp_async_commit_group() -> Void // // @extern // pub fn cuda_cp_async_wait_group_0() -> Void // // @extern // pub fn cuda_require_tensor_cores() -> Void // // @extern // pub fn cuda_require_wgmma() -> Void // // @extern // pub fn abi_cuda_driver_available() -> Bool // // @extern // pub fn abi_cuda_runtime_library_available() -> Bool // // @extern // pub fn abi_cuda_runtime_ready() -> Bool // // @extern // pub fn abi_cuda_runtime_library_path() -> String // // @extern // pub fn abi_cuda_shader_bundle_path() -> String // // @extern // pub fn abi_cuda_compute_residency_path() -> String // // @extern // pub fn abi_cuda_dispatch_primary_compute(compute_key: String) -> Int // // @extern // pub fn abi_cuda_dispatch(shader_bundle_path: String, compute_residency_path: String, compute_key: String) -> Int // // @extern // pub fn abi_cuda_last_status() -> Int // // @extern // pub fn abi_cuda_last_error_kind() -> String // // @extern // pub fn abi_cuda_last_error_message() -> String // // @extern // pub fn abi_cuda_last_dispatch_invocations() -> Int // // @extern // pub fn abi_cuda_last_tensor_binding_count() -> Int // // @extern // pub fn abi_cuda_last_stream_binding_count() -> Int // // @extern // pub fn abi_cuda_last_neural_node_count() -> Int // // @extern // pub fn abi_cuda_last_output_binding_count() -> Int // // @extern // pub fn abi_cuda_last_total_output_bytes() -> Int // // fn cuda_empty_binding_locator(compute_key: String, binding_key: String) -> CudaBindingLocator: // return CudaBindingLocator { // ok: false, // compute_key: compute_key, // binding_key: binding_key, // payload_path: "", // descriptor_kind: "", // access_mode: "", // element_type: "", // slot: -1, // byte_length: 0 // } // // fn cuda_manifest_text(path: String) -> String: // if path == "" or fs_exists(path) == false: // return "" // let raw_hex = fs_read_bytes_hex(path) // if fs_last_status() != 0: // return "" // let decoded = bytes_from_hex(raw_hex) // if decoded.ok == false: // return "" // return decoded.value // // fn cuda_manifest_from_text(text: String) -> JsonObject: // if text == "": // return json_object() // let parsed = json_parse_text(text) // if json_is_object(parsed): // return parsed // return json_object() // // fn cuda_compute_entries(manifest: JsonObject) -> JsonArray: // let entries = json_array_field(manifest, "compute_shaders") // if entries.ok == false: // return json_array() // return entries.value // // fn cuda_compute_entry_from_manifest(manifest: JsonObject, compute_key: String) -> JsonObject: // let entries = cuda_compute_entries(manifest) // var index = 0 // while index < json_array_length(entries): // let candidate = json_array_value_at(entries, index) // let key_field = json_string_field(candidate, "key") // if key_field.ok and key_field.value == compute_key: // return candidate // index = index + 1 // return json_object() // // fn cuda_binding_locator_from_manifest_path(manifest_path: String, manifest: JsonObject, compute_key: String, binding_key: String) -> CudaBindingLocator: // let entry = cuda_compute_entry_from_manifest(manifest, compute_key) // let bindings_result = json_array_field(entry, "bindings") // if bindings_result.ok == false: // return cuda_empty_binding_locator(compute_key, binding_key) // let root_dir = fs_path_parent(manifest_path) // let bindings = bindings_result.value // var index = 0 // while index < json_array_length(bindings): // let binding = json_array_value_at(bindings, index) // let key_field = json_string_field(binding, "key") // if key_field.ok and key_field.value == binding_key: // let payload_field = json_string_field(binding, "payload_file") // let descriptor_field = json_string_field(binding, "descriptor_kind") // let access_field = json_string_field(binding, "access_mode") // let element_field = json_string_field(binding, "element_type") // let slot_field = json_int_field(binding, "slot") // let byte_length_field = json_int_field(binding, "byte_length") // if payload_field.ok == false: // return cuda_empty_binding_locator(compute_key, binding_key) // let descriptor_kind = if descriptor_field.ok: descriptor_field.value else: "" // let access_mode = if access_field.ok: access_field.value else: "" // let element_type = if element_field.ok: element_field.value else: "" // let slot = if slot_field.ok: slot_field.value else: -1 // let byte_length = if byte_length_field.ok: byte_length_field.value else: 0 // return CudaBindingLocator { // ok: true, // compute_key: compute_key, // binding_key: binding_key, // payload_path: fs_path_join(root_dir, payload_field.value), // descriptor_kind: descriptor_kind, // access_mode: access_mode, // element_type: element_type, // slot: slot, // byte_length: byte_length // } // index = index + 1 // return cuda_empty_binding_locator(compute_key, binding_key) // // fn cuda_empty_range() -> CudaTextRange: // return CudaTextRange { // ok: false, // start: -1, // end: -1 // } // // fn cuda_range(start: Int, end: Int) -> CudaTextRange: // return CudaTextRange { // ok: true, // start: start, // end: end // } // // fn cuda_is_ws(ch: String) -> Bool: // return ch == " " or ch == "\n" or ch == "\r" or ch == "\t" // // fn cuda_skip_ws(text: String, start: Int) -> Int: // var index = start // while index < len(text) and cuda_is_ws(char_at(text, index)): // index = index + 1 // return index // // fn cuda_json_string_end(text: String, start: Int) -> Int: // var index = start + 1 // var escaped = false // while index < len(text): // let ch = char_at(text, index) // if escaped: // escaped = false // else: // if ch == "\\": // escaped = true // else: // if ch == "\"": // return index // index = index + 1 // return -1 // // fn cuda_json_string_literal(text: String, start: Int) -> String: // let end = cuda_json_string_end(text, start) // if end < 0: // return "" // return substring(text, start + 1, end) // // fn cuda_match_delimited(text: String, start: Int, open_ch: String, close_ch: String) -> Int: // var index = start // var depth = 0 // var in_string = false // var escaped = false // while index < len(text): // let ch = char_at(text, index) // if in_string: // if escaped: // escaped = false // else: // if ch == "\\": // escaped = true // else: // if ch == "\"": // in_string = false // else: // if ch == "\"": // in_string = true // else: // if ch == open_ch: // depth = depth + 1 // else: // if ch == close_ch: // depth = depth - 1 // if depth == 0: // return index // index = index + 1 // return -1 // // fn cuda_json_scalar_end(text: String, start: Int, limit: Int) -> Int: // var index = start // while index < limit: // let ch = char_at(text, index) // if ch == "," or ch == "}" or ch == "]" or cuda_is_ws(ch): // return index // index = index + 1 // return limit // // fn cuda_root_object_range(text: String) -> CudaTextRange: // let start = cuda_skip_ws(text, 0) // if start >= len(text) or char_at(text, start) != "{": // return cuda_empty_range() // let finish = cuda_match_delimited(text, start, "{", "}") // if finish < 0: // return cuda_empty_range() // return cuda_range(start, finish + 1) // // fn cuda_object_field_value_start(text: String, object_start: Int, object_end: Int, key: String) -> Int: // var index = object_start + 1 // var object_depth = 1 // var array_depth = 0 // while index < object_end: // let ch = char_at(text, index) // if ch == "\"": // let end = cuda_json_string_end(text, index) // if end < 0: // return -1 // let literal = substring(text, index + 1, end) // let after = cuda_skip_ws(text, end + 1) // if object_depth == 1 and array_depth == 0 and literal == key and after < object_end and char_at(text, after) == ":": // return cuda_skip_ws(text, after + 1) // index = end + 1 // else: // if ch == "{": // object_depth = object_depth + 1 // else: // if ch == "}": // object_depth = object_depth - 1 // else: // if ch == "[": // array_depth = array_depth + 1 // else: // if ch == "]": // array_depth = array_depth - 1 // index = index + 1 // return -1 // // fn cuda_object_field_range(text: String, object_start: Int, object_end: Int, key: String) -> CudaTextRange: // let value_start = cuda_object_field_value_start(text, object_start, object_end, key) // if value_start < 0 or value_start >= object_end: // return cuda_empty_range() // let ch = char_at(text, value_start) // if ch == "\"": // let finish = cuda_json_string_end(text, value_start) // if finish < 0: // return cuda_empty_range() // return cuda_range(value_start, finish + 1) // if ch == "{": // let finish = cuda_match_delimited(text, value_start, "{", "}") // if finish < 0: // return cuda_empty_range() // return cuda_range(value_start, finish + 1) // if ch == "[": // let finish = cuda_match_delimited(text, value_start, "[", "]") // if finish < 0: // return cuda_empty_range() // return cuda_range(value_start, finish + 1) // let finish = cuda_json_scalar_end(text, value_start, object_end) // if finish <= value_start: // return cuda_empty_range() // return cuda_range(value_start, finish) // // fn cuda_field_string_in_object(text: String, object_start: Int, object_end: Int, key: String) -> String: // let field = cuda_object_field_range(text, object_start, object_end, key) // if field.ok == false or char_at(text, field.start) != "\"": // return "" // return cuda_json_string_literal(text, field.start) // // fn cuda_field_int_in_object(text: String, object_start: Int, object_end: Int, key: String) -> Int: // let field = cuda_object_field_range(text, object_start, object_end, key) // if field.ok == false: // return 0 // let scalar = substring(text, field.start, field.end) // if scalar == "": // return 0 // return to_int(scalar) // // fn cuda_field_array_in_object(text: String, object_start: Int, object_end: Int, key: String) -> CudaTextRange: // let field = cuda_object_field_range(text, object_start, object_end, key) // if field.ok == false or char_at(text, field.start) != "[": // return cuda_empty_range() // return field // // fn cuda_next_object_in_array(text: String, array_range: CudaTextRange, cursor: Int) -> CudaTextRange: // var index = cursor // while index < array_range.end: // index = cuda_skip_ws(text, index) // if index >= array_range.end: // return cuda_empty_range() // let ch = char_at(text, index) // if ch == ",": // index = index + 1 // else: // if ch != "{": // return cuda_empty_range() // let finish = cuda_match_delimited(text, index, "{", "}") // if finish < 0: // return cuda_empty_range() // return cuda_range(index, finish + 1) // return cuda_empty_range() // // fn cuda_compute_shaders_range_from_text(text: String) -> CudaTextRange: // let root = cuda_root_object_range(text) // if root.ok == false: // return cuda_empty_range() // return cuda_field_array_in_object(text, root.start, root.end, "compute_shaders") // // fn cuda_compute_entry_range_from_text(text: String, compute_key: String) -> CudaTextRange: // let entries = cuda_compute_shaders_range_from_text(text) // if entries.ok == false: // return cuda_empty_range() // var cursor = entries.start + 1 // while true: // let entry = cuda_next_object_in_array(text, entries, cursor) // if entry.ok == false: // return cuda_empty_range() // if cuda_field_string_in_object(text, entry.start, entry.end, "key") == compute_key: // return entry // cursor = entry.end // return cuda_empty_range() // // fn cuda_binding_range_from_text(text: String, compute_key: String, binding_key: String) -> CudaTextRange: // let entry = cuda_compute_entry_range_from_text(text, compute_key) // if entry.ok == false: // return cuda_empty_range() // let bindings = cuda_field_array_in_object(text, entry.start, entry.end, "bindings") // if bindings.ok == false: // return cuda_empty_range() // var cursor = bindings.start + 1 // while true: // let binding = cuda_next_object_in_array(text, bindings, cursor) // if binding.ok == false: // return cuda_empty_range() // if cuda_field_string_in_object(text, binding.start, binding.end, "key") == binding_key: // return binding // cursor = binding.end // return cuda_empty_range() // // fn cuda_zero_bytes(count: Int) -> Array: // let safe_count = if count > 0: count else: 0 // let mut bytes: Array = [] // var index = 0 // while index < safe_count: // push(bytes, 0) // index = index + 1 // return bytes // // fn cuda_hex_from_bytes(bytes: Array) -> String: // var hex = "" // var index = 0 // while index < len(bytes): // let byte = bytes[index] & 255 // let hi = (byte >> 4) & 15 // let lo = byte & 15 // hex = hex + substring("0123456789abcdef", hi, hi + 1) // hex = hex + substring("0123456789abcdef", lo, lo + 1) // index = index + 1 // return hex // // fn cuda_zero_hex(byte_count: Int) -> String: // let safe_count = if byte_count > 0: byte_count else: 0 // var hex = "" // var index = 0 // while index < safe_count: // hex = hex + "00" // index = index + 1 // return hex // // fn cuda_dispatch_stats(compute_key: String) -> CudaDispatchStats: // return CudaDispatchStats { // ok: abi_cuda_last_status() == 0, // status: abi_cuda_last_status(), // message: abi_cuda_last_error_message(), // compute_key: compute_key, // shader_bundle_path: abi_cuda_shader_bundle_path(), // compute_residency_path: abi_cuda_compute_residency_path(), // dispatch_invocations: abi_cuda_last_dispatch_invocations(), // tensor_binding_count: abi_cuda_last_tensor_binding_count(), // stream_binding_count: abi_cuda_last_stream_binding_count(), // neural_node_count: abi_cuda_last_neural_node_count(), // output_binding_count: abi_cuda_last_output_binding_count(), // total_output_bytes: abi_cuda_last_total_output_bytes() // } // // pub fn cuda_paths() -> CudaPaths: // return CudaPaths { // runtime_library_path: abi_cuda_runtime_library_path(), // shader_bundle_path: abi_cuda_shader_bundle_path(), // compute_residency_path: abi_cuda_compute_residency_path() // } // // pub fn cuda_runtime_state() -> CudaRuntimeState: // return CudaRuntimeState { // driver_available: abi_cuda_driver_available(), // runtime_library_available: abi_cuda_runtime_library_available(), // runtime_ready: abi_cuda_runtime_ready(), // paths: cuda_paths(), // last_status: abi_cuda_last_status(), // last_error_kind: abi_cuda_last_error_kind(), // last_error_message: abi_cuda_last_error_message() // } // // pub fn cuda_driver_available() -> Bool: // return abi_cuda_driver_available() // // pub fn cuda_runtime_library_available() -> Bool: // return abi_cuda_runtime_library_available() // // pub fn cuda_runtime_ready() -> Bool: // return abi_cuda_runtime_ready() // // pub fn cuda_runtime_library_path() -> String: // return abi_cuda_runtime_library_path() // // pub fn cuda_shader_bundle_path() -> String: // return abi_cuda_shader_bundle_path() // // pub fn cuda_compute_residency_path() -> String: // return abi_cuda_compute_residency_path() // // pub fn cuda_last_status() -> Int: // return abi_cuda_last_status() // // pub fn cuda_last_error_kind() -> String: // return abi_cuda_last_error_kind() // // pub fn cuda_last_error_message() -> String: // return abi_cuda_last_error_message() // // pub fn cuda_compute_manifest_from_path(path: String) -> JsonObject: // return cuda_manifest_from_text(cuda_manifest_text(path)) // // pub fn cuda_compute_manifest() -> JsonObject: // return cuda_compute_manifest_from_path(cuda_compute_residency_path()) // // pub fn cuda_manifest_debug_from_path(path: String) -> String: // let text = cuda_manifest_text(path) // let root = cuda_root_object_range(text) // let entries = cuda_compute_shaders_range_from_text(text) // var report = "" // report = report + "text_len=" + to_string(len(text)) + "\n" // report = report + "root_ok=" + to_string(bool_to_int(root.ok)) + "\n" // report = report + "entries_ok=" + to_string(bool_to_int(entries.ok)) + "\n" // if entries.ok: // report = report + "entries_span=" + to_string(entries.start) + ":" + to_string(entries.end) + "\n" // let first = cuda_next_object_in_array(text, entries, entries.start + 1) // report = report + "first_entry_ok=" + to_string(bool_to_int(first.ok)) + "\n" // if first.ok: // report = report + "first_entry_key=" + cuda_field_string_in_object(text, first.start, first.end, "key") + "\n" // let bindings = cuda_field_array_in_object(text, first.start, first.end, "bindings") // report = report + "first_bindings_ok=" + to_string(bool_to_int(bindings.ok)) + "\n" // if bindings.ok: // report = report + "first_bindings_span=" + to_string(bindings.start) + ":" + to_string(bindings.end) + "\n" // var cursor = entries.start + 1 // var iter = 0 // while true: // let entry = cuda_next_object_in_array(text, entries, cursor) // if entry.ok == false: // break // report = report + "iter_key[" + to_string(iter) + "]=" + cuda_field_string_in_object(text, entry.start, entry.end, "key") + "\n" // iter = iter + 1 // cursor = entry.end // report = report + "iter_count=" + to_string(iter) + "\n" // return report // // pub fn cuda_manifest_debug() -> String: // return cuda_manifest_debug_from_path(cuda_compute_residency_path()) // // pub fn cuda_compute_keys_from_path(path: String) -> Array: // let manifest = cuda_compute_manifest_from_path(path) // let mut keys: Array = [] // let entries = cuda_compute_entries(manifest) // if json_array_length(entries) == 0: // return keys // var index = 0 // while index < json_array_length(entries): // let entry = json_array_value_at(entries, index) // let key_field = json_string_field(entry, "key") // if key_field.ok and key_field.value != "": // push(keys, key_field.value) // index = index + 1 // return keys // // pub fn cuda_compute_keys() -> Array: // return cuda_compute_keys_from_path(cuda_compute_residency_path()) // // pub fn cuda_has_compute_key_from_path(path: String, compute_key: String) -> Bool: // let manifest = cuda_compute_manifest_from_path(path) // let entry = cuda_compute_entry_from_manifest(manifest, compute_key) // let key_field = json_string_field(entry, "key") // return key_field.ok and key_field.value == compute_key // // pub fn cuda_has_compute_key(compute_key: String) -> Bool: // return cuda_has_compute_key_from_path(cuda_compute_residency_path(), compute_key) // // pub fn cuda_first_compute_key_from_path(path: String) -> String: // let keys = cuda_compute_keys_from_path(path) // if len(keys) == 0: // return "" // return keys[0] // // pub fn cuda_first_compute_key() -> String: // return cuda_first_compute_key_from_path(cuda_compute_residency_path()) // // pub fn cuda_binding_keys_from_path(path: String, compute_key: String) -> Array: // let text = cuda_manifest_text(path) // let mut keys: Array = [] // let entry = cuda_compute_entry_range_from_text(text, compute_key) // if entry.ok == false: // return keys // let bindings = cuda_field_array_in_object(text, entry.start, entry.end, "bindings") // if bindings.ok == false: // return keys // var cursor = bindings.start + 1 // while true: // let binding = cuda_next_object_in_array(text, bindings, cursor) // if binding.ok == false: // return keys // let key = cuda_field_string_in_object(text, binding.start, binding.end, "key") // if key != "": // push(keys, key) // cursor = binding.end // return keys // // pub fn cuda_binding_keys(compute_key: String) -> Array: // return cuda_binding_keys_from_path(cuda_compute_residency_path(), compute_key) // // pub fn cuda_output_binding_keys_from_path(path: String, compute_key: String) -> Array: // let text = cuda_manifest_text(path) // let mut keys: Array = [] // let entry = cuda_compute_entry_range_from_text(text, compute_key) // if entry.ok == false: // return keys // let bindings = cuda_field_array_in_object(text, entry.start, entry.end, "bindings") // if bindings.ok == false: // return keys // var cursor = bindings.start + 1 // while true: // let binding = cuda_next_object_in_array(text, bindings, cursor) // if binding.ok == false: // return keys // let key = cuda_field_string_in_object(text, binding.start, binding.end, "key") // let access_mode = cuda_field_string_in_object(text, binding.start, binding.end, "access_mode") // if key != "" and (access_mode == "write" or access_mode == "read_write"): // push(keys, key) // cursor = binding.end // return keys // // pub fn cuda_output_binding_keys(compute_key: String) -> Array: // return cuda_output_binding_keys_from_path(cuda_compute_residency_path(), compute_key) // // pub fn cuda_binding_locator_from_path(path: String, compute_key: String, binding_key: String) -> CudaBindingLocator: // let manifest = cuda_compute_manifest_from_path(path) // return cuda_binding_locator_from_manifest_path(path, manifest, compute_key, binding_key) // // pub fn cuda_binding_locator(compute_key: String, binding_key: String) -> CudaBindingLocator: // let path = cuda_compute_residency_path() // return cuda_binding_locator_from_path(path, compute_key, binding_key) // // pub fn cuda_binding_payload_path_from_path(path: String, compute_key: String, binding_key: String) -> String: // let locator = cuda_binding_locator_from_path(path, compute_key, binding_key) // if locator.ok == false: // return "" // return locator.payload_path // // pub fn cuda_binding_payload_path(compute_key: String, binding_key: String) -> String: // return cuda_binding_payload_path_from_path(cuda_compute_residency_path(), compute_key, binding_key) // // pub fn cuda_binding_payload_bytes_from_path(path: String, compute_key: String, binding_key: String) -> Array: // let locator = cuda_binding_locator_from_path(path, compute_key, binding_key) // if locator.ok == false or locator.payload_path == "" or fs_exists(locator.payload_path) == false: // return [] // let raw_hex = fs_read_bytes_hex(locator.payload_path) // if fs_last_status() != 0: // return [] // return fs_hex_to_bytes(raw_hex) // // pub fn cuda_binding_payload_bytes(compute_key: String, binding_key: String) -> Array: // return cuda_binding_payload_bytes_from_path(cuda_compute_residency_path(), compute_key, binding_key) // // pub fn cuda_write_binding_payload_bytes_from_path(path: String, compute_key: String, binding_key: String, bytes: Array) -> Bool: // let locator = cuda_binding_locator_from_path(path, compute_key, binding_key) // if locator.ok == false or locator.payload_path == "": // return false // fs_write_bytes_hex(locator.payload_path, cuda_hex_from_bytes(bytes)) // return true // // pub fn cuda_write_binding_payload_bytes(compute_key: String, binding_key: String, bytes: Array) -> Bool: // return cuda_write_binding_payload_bytes_from_path(cuda_compute_residency_path(), compute_key, binding_key, bytes) // // pub fn cuda_zero_binding_payload_from_path(path: String, compute_key: String, binding_key: String) -> Bool: // let locator = cuda_binding_locator_from_path(path, compute_key, binding_key) // if locator.ok == false: // return false // fs_write_bytes_hex(locator.payload_path, cuda_zero_hex(locator.byte_length)) // return true // // pub fn cuda_zero_binding_payload(compute_key: String, binding_key: String) -> Bool: // return cuda_zero_binding_payload_from_path(cuda_compute_residency_path(), compute_key, binding_key) // // pub fn cuda_zero_output_payloads_from_path(path: String, compute_key: String) -> Int: // let text = cuda_manifest_text(path) // let entry = cuda_compute_entry_range_from_text(text, compute_key) // var zeroed = 0 // if entry.ok == false: // return zeroed // let bindings = cuda_field_array_in_object(text, entry.start, entry.end, "bindings") // if bindings.ok == false: // return zeroed // let root_dir = fs_path_parent(path) // var cursor = bindings.start + 1 // while true: // let binding = cuda_next_object_in_array(text, bindings, cursor) // if binding.ok == false: // return zeroed // let residency_role = cuda_field_string_in_object(text, binding.start, binding.end, "residency_role") // let payload_file = cuda_field_string_in_object(text, binding.start, binding.end, "payload_file") // let byte_length = cuda_field_int_in_object(text, binding.start, binding.end, "byte_length") // if payload_file != "" and (residency_role == "output" or residency_role == "required_output"): // fs_write_bytes_hex(fs_path_join(root_dir, payload_file), cuda_zero_hex(byte_length)) // zeroed = zeroed + 1 // cursor = binding.end // return zeroed // // pub fn cuda_zero_output_payloads(compute_key: String) -> Int: // return cuda_zero_output_payloads_from_path(cuda_compute_residency_path(), compute_key) // // pub fn cuda_copy_binding_payload_from_path(path: String, from_compute_key: String, from_binding_key: String, to_compute_key: String, to_binding_key: String) -> Bool: // let src = cuda_binding_locator_from_path(path, from_compute_key, from_binding_key) // let dst = cuda_binding_locator_from_path(path, to_compute_key, to_binding_key) // if src.ok == false or dst.ok == false or src.payload_path == "" or dst.payload_path == "": // return false // fs_copy_file(src.payload_path, dst.payload_path) // return true // // pub fn cuda_copy_binding_payload(from_compute_key: String, from_binding_key: String, to_compute_key: String, to_binding_key: String) -> Bool: // return cuda_copy_binding_payload_from_path( // cuda_compute_residency_path(), // from_compute_key, // from_binding_key, // to_compute_key, // to_binding_key // ) // // pub fn cuda_pack_u32_le(value: Int) -> Array: // let lane = value & 4294967295 // return [ // lane & 255, // (lane >> 8) & 255, // (lane >> 16) & 255, // (lane >> 24) & 255 // ] // // pub fn cuda_pack_i32_le(value: Int) -> Array: // return cuda_pack_u32_le(value) // // pub fn cuda_pack_u32_array_le(values: Array) -> Array: // let mut bytes: Array = [] // var index = 0 // while index < len(values): // let lane = cuda_pack_u32_le(values[index]) // push(bytes, lane[0]) // push(bytes, lane[1]) // push(bytes, lane[2]) // push(bytes, lane[3]) // index = index + 1 // return bytes // // pub fn cuda_pack_i32_array_le(values: Array) -> Array: // return cuda_pack_u32_array_le(values) // // pub fn cuda_unpack_u32_le(bytes: Array, offset: Int) -> Int: // if offset < 0 or offset + 3 >= len(bytes): // return 0 // let byte0 = bytes[offset + 0] & 255 // let byte1 = bytes[offset + 1] & 255 // let byte2 = bytes[offset + 2] & 255 // let byte3 = bytes[offset + 3] & 255 // return (byte0 | (byte1 << 8) | (byte2 << 16) | (byte3 << 24)) & 4294967295 // // pub fn cuda_unpack_u32_array_le(bytes: Array) -> Array: // let mut values: Array = [] // var offset = 0 // while offset + 3 < len(bytes): // push(values, cuda_unpack_u32_le(bytes, offset)) // offset = offset + 4 // return values // // pub fn cuda_unpack_i32_array_le(bytes: Array) -> Array: // return cuda_unpack_u32_array_le(bytes) // // pub fn cuda_dispatch_primary_compute(compute_key: String) -> CudaDispatchStats: // let _status = abi_cuda_dispatch_primary_compute(compute_key) // return cuda_dispatch_stats(compute_key) // // pub fn cuda_dispatch(shader_bundle_path: String, compute_residency_path: String, compute_key: String) -> CudaDispatchStats: // let _status = abi_cuda_dispatch(shader_bundle_path, compute_residency_path, compute_key) // return CudaDispatchStats { // ok: abi_cuda_last_status() == 0, // status: abi_cuda_last_status(), // message: abi_cuda_last_error_message(), // compute_key: compute_key, // shader_bundle_path: shader_bundle_path, // compute_residency_path: compute_residency_path, // dispatch_invocations: abi_cuda_last_dispatch_invocations(), // tensor_binding_count: abi_cuda_last_tensor_binding_count(), // stream_binding_count: abi_cuda_last_stream_binding_count(), // neural_node_count: abi_cuda_last_neural_node_count(), // output_binding_count: abi_cuda_last_output_binding_count(), // total_output_bytes: abi_cuda_last_total_output_bytes() // } //!end-kain-file //!kain-file // path = "diagnostics.kn" // kind = "text" // encoding = "utf8" // bytes = 3075 // sha256 = "sha256:72dfb1bf91cd64ff40088989256cc0715065ff7d2dc180afb39b08e4b9008855" // trailing_newline = true //!kain-file-content // use std::memory // // pub fn native_status_ok(status: Int) -> Bool: // return status == 0 // // pub fn native_status_failed(status: Int) -> Bool: // return status != 0 // // pub fn native_status_error(status: Int) -> Bool: // return status < 0 // // pub fn native_status_warning(status: Int) -> Bool: // return status > 0 // // pub fn native_status_or(status: Int, fallback: Int) -> Int: // if status == 0: // return fallback // return status // // pub fn native_bool_to_status(value: Bool) -> Int: // if value: // return 0 // return -1 // // pub fn native_status_to_bool(status: Int) -> Bool: // return status == 0 // // pub fn native_first_error(left: Int, right: Int) -> Int: // if left != 0: // return left // return right // // pub fn native_count_failure(status: Int, count: Int) -> Int: // if status != 0: // return count + 1 // return count // // # root-domain aliases: generated public std names // pub fn status_ok(status: Int) -> Bool: // return status == 0 // // pub fn status_failed(status: Int) -> Bool: // return status != 0 // // pub fn status_error(status: Int) -> Bool: // return status < 0 // // pub fn status_warning(status: Int) -> Bool: // return status > 0 // // pub fn status_or(status: Int, fallback: Int) -> Int: // if status == 0: // return fallback // return status // // pub fn bool_to_status(value: Bool) -> Int: // if value: // return 0 // return -1 // // pub fn status_to_bool(status: Int) -> Bool: // return status == 0 // // pub fn first_error(left: Int, right: Int) -> Int: // if left != 0: // return left // return right // // pub fn count_failure(status: Int, count: Int) -> Int: // if status != 0: // return count + 1 // return count // # end root-domain aliases // // pub enum LogLevel: // Debug // Info // Warning // Error // // pub struct LogEntry: // level: LogLevel // subsystem: String // message: String // code: Int // // pub fn log_info(subsystem: String, message: String) -> Unit: // print("INFO [" + subsystem + "] " + message + "\n") // // pub fn log_warning(subsystem: String, message: String) -> Unit: // print("WARNING [" + subsystem + "] " + message + "\n") // // pub fn log_error(subsystem: String, message: String, code: Int) -> Unit: // print("ERROR [" + subsystem + " - code: " + to_string(code) + "] " + message + "\n") // // pub fn progress_emit(task_name: String, percentage: Int) -> Unit: // var percent = percentage // if percent < 0: // percent = 0 // if percent > 100: // percent = 100 // print("PROGRESS [" + task_name + "] " + to_string(percent) + "%\n") // // pub fn debug_dump_memory(label: String, address: ptr, count: Int) -> Unit with Unsafe: // print("--- MEMORY DUMP: " + label + " (offset: " + to_string(ptr_to_int(address)) + ", count: " + to_string(count) + ") ---\n") // var i = 0 // while i < count: // let val = mem_load(ptr_offset(address, i, "Int"), "Int") // print(" [" + to_string(i) + "]: " + to_string(val) + "\n") // i = i + 1 // print("--------------------------------------------------\n") //!end-kain-file //!kain-file // path = "elf.kn" // kind = "text" // encoding = "utf8" // bytes = 3128 // sha256 = "sha256:66aa02d5741c80a477f1657770de0459fc4dc5f43dc6bfb2635008b76ef00c91" // trailing_newline = true //!kain-file-content // use std::memory // // # --- ELF Format Spec Constants --- // pub const ELF_MAGIC: Int = 1179403647 # 0x464c457f (little-endian \x7fELF) // pub const ELF_CLASS_64: Int = 2 // pub const ELF_DATA_LSB: Int = 1 // pub const ELF_TYPE_EXEC: Int = 2 // pub const ELF_TYPE_DYN: Int = 3 // pub const ELF_MACHINE_X86_64: Int = 62 // pub const ELF_MACHINE_AARCH64: Int = 183 // // pub struct ElfHeader: // elf_class: Int // data: Int // version: Int // os_abi: Int // file_type: Int // machine: Int // entry: Int // phoff: Int // shoff: Int // flags: Int // ehsize: Int // phentsize: Int // phnum: Int // shentsize: Int // shnum: Int // shstrndx: Int // // pub struct ElfProgramHeader: // ph_type: Int // flags: Int // offset: Int // vaddr: Int // paddr: Int // filesz: Int // memsz: Int // align: Int // // pub struct ElfSectionHeader: // name_offset: Int // sh_type: Int // flags: Int // addr: Int // offset: Int // size: Int // link: Int // info: Int // addralign: Int // entsize: Int // // # Parses a compact word-packed ELF header buffer used by the stdlib smoke lane. // # This layout is intentionally simplified rather than a byte-exact ELF64 parser. // pub fn elf_read_header(buffer: ptr) -> ElfHeader with Unsafe: // let magic = mem_load(ptr_offset(buffer, 0, "Int"), "Int") // if magic != 1179403647: // return ElfHeader { elf_class: 0, data: 0, version: 0, os_abi: 0, file_type: 0, machine: 0, entry: 0, phoff: 0, shoff: 0, flags: 0, ehsize: 0, phentsize: 0, phnum: 0, shentsize: 0, shnum: 0, shstrndx: 0 } // // let ident_words = mem_load(ptr_offset(buffer, 1, "Int"), "Int") // let elf_class = ident_words & 255 // let data = (ident_words >> 8) & 255 // let version = (ident_words >> 16) & 255 // let os_abi = (ident_words >> 24) & 255 // // let type_machine = mem_load(ptr_offset(buffer, 2, "Int"), "Int") // let file_type = type_machine & 65535 // let machine = (type_machine >> 16) & 65535 // // let entry = mem_load(ptr_offset(buffer, 3, "Int"), "Int") // let phoff = mem_load(ptr_offset(buffer, 4, "Int"), "Int") // let shoff = mem_load(ptr_offset(buffer, 5, "Int"), "Int") // // let flags_sizes = mem_load(ptr_offset(buffer, 6, "Int"), "Int") // let flags = flags_sizes & 4294967295 // let ehsize = (flags_sizes >> 32) & 65535 // // let table_counts = mem_load(ptr_offset(buffer, 7, "Int"), "Int") // let phentsize = table_counts & 65535 // let phnum = (table_counts >> 16) & 65535 // let shentsize = (table_counts >> 32) & 65535 // let shnum = (table_counts >> 48) & 65535 // // let shstrndx = mem_load(ptr_offset(buffer, 8, "Int"), "Int") // // return ElfHeader { // elf_class: elf_class, // data: data, // version: version, // os_abi: os_abi, // file_type: file_type, // machine: machine, // entry: entry, // phoff: phoff, // shoff: shoff, // flags: flags, // ehsize: ehsize, // phentsize: phentsize, // phnum: phnum, // shentsize: shentsize, // shnum: shnum, // shstrndx: shstrndx // } //!end-kain-file //!kain-file // path = "fmt.kn" // kind = "text" // encoding = "utf8" // bytes = 18253 // sha256 = "sha256:da37f71fb01237d394a430d62c691f183265bd0510f7f171feda44e9165e62e0" // trailing_newline = true //!kain-file-content // use std::ascii // use std::bytes // use std::io // // pub const FMT_ALIGN_LEFT: String = "left" // pub const FMT_ALIGN_RIGHT: String = "right" // pub const FMT_ALIGN_CENTER: String = "center" // // pub const FMT_BOOL_STYLE_WORD: String = "word" // pub const FMT_BOOL_STYLE_JSON: String = "json" // pub const FMT_BOOL_STYLE_NUMERIC: String = "numeric" // // pub const FMT_BASE_DECIMAL: Int = 10 // pub const FMT_BASE_HEX: Int = 16 // pub const FMT_BASE_BINARY: Int = 2 // // pub struct FmtWriter: // builder: BytesBuilder // // pub struct FmtSpec: // width: Int // pad: String // align: String // prefix: String // plus_for_positive: Bool // uppercase: Bool // number_base: Int // bool_style: String // // fn fmt_pad_token(pad: String) -> String: // if len(pad) == 0: // return " " // return char_at(pad, 0) // // fn fmt_supported_align(align: String) -> String: // if align == FMT_ALIGN_LEFT: // return align // if align == FMT_ALIGN_CENTER: // return align // return FMT_ALIGN_RIGHT // // fn fmt_supported_base(base: Int) -> Int: // if base == FMT_BASE_HEX: // return base // if base == FMT_BASE_BINARY: // return base // return FMT_BASE_DECIMAL // // fn fmt_supported_bool_style(style: String) -> String: // if style == FMT_BOOL_STYLE_JSON: // return style // if style == FMT_BOOL_STYLE_NUMERIC: // return style // return FMT_BOOL_STYLE_WORD // // fn fmt_apply_uppercase(value: String, uppercase: Bool) -> String: // if uppercase: // return to_upper(value) // return value // // fn fmt_apply_prefix(value: String, prefix: String) -> String: // if len(prefix) == 0: // return value // if len(value) == 0: // return prefix // let head = char_at(value, 0) // if head == "-" or head == "+": // return head + prefix + substring(value, 1, len(value)) // return prefix + value // // fn fmt_apply_plus(value: String, plus_for_positive: Bool) -> String: // if plus_for_positive == false: // return value // if len(value) == 0: // return value // let head = char_at(value, 0) // if head == "-" or head == "+": // return value // return "+" + value // // fn fmt_apply_width(value: String, spec: FmtSpec) -> String: // if spec.width <= len(value): // return value // let align = fmt_supported_align(spec.align) // if align == FMT_ALIGN_LEFT: // return fmt_pad_right(value, spec.width, spec.pad) // if align == FMT_ALIGN_CENTER: // return fmt_pad_center(value, spec.width, spec.pad) // return fmt_pad_left(value, spec.width, spec.pad) // // fn fmt_render_number_body(value: Int, spec: FmtSpec) -> String: // let base = fmt_supported_base(spec.number_base) // if base == FMT_BASE_HEX: // return fmt_apply_uppercase(fmt_hex_int(value), spec.uppercase) // if base == FMT_BASE_BINARY: // return fmt_binary_int(value) // return fmt_int(value) // // fn fmt_render_float_body(value: Float, spec: FmtSpec) -> String: // return fmt_apply_uppercase(fmt_float(value), spec.uppercase) // // fn fmt_render_bool_body(value: Bool, spec: FmtSpec) -> String: // let style = fmt_supported_bool_style(spec.bool_style) // if style == FMT_BOOL_STYLE_NUMERIC: // if value: // return "1" // return "0" // if style == FMT_BOOL_STYLE_JSON: // return fmt_bool_json(value) // let body = fmt_bool_word(value) // return fmt_apply_uppercase(body, spec.uppercase) // // pub fn fmt_string(value: String) -> String: // return value // // pub fn fmt_writer_new() -> FmtWriter: // return FmtWriter { builder: bytes_builder_new() } // // pub fn fmt_spec_default() -> FmtSpec: // return FmtSpec { // width: 0, // pad: " ", // align: FMT_ALIGN_RIGHT, // prefix: "", // plus_for_positive: false, // uppercase: false, // number_base: FMT_BASE_DECIMAL, // bool_style: FMT_BOOL_STYLE_WORD // } // // pub fn fmt_spec_width(spec: FmtSpec, width: Int) -> FmtSpec: // return FmtSpec { // width: int_max(width, 0), // pad: spec.pad, // align: spec.align, // prefix: spec.prefix, // plus_for_positive: spec.plus_for_positive, // uppercase: spec.uppercase, // number_base: spec.number_base, // bool_style: spec.bool_style // } // // pub fn fmt_spec_pad(spec: FmtSpec, pad: String) -> FmtSpec: // return FmtSpec { // width: spec.width, // pad: fmt_pad_token(pad), // align: spec.align, // prefix: spec.prefix, // plus_for_positive: spec.plus_for_positive, // uppercase: spec.uppercase, // number_base: spec.number_base, // bool_style: spec.bool_style // } // // pub fn fmt_spec_align(spec: FmtSpec, align: String) -> FmtSpec: // return FmtSpec { // width: spec.width, // pad: spec.pad, // align: fmt_supported_align(align), // prefix: spec.prefix, // plus_for_positive: spec.plus_for_positive, // uppercase: spec.uppercase, // number_base: spec.number_base, // bool_style: spec.bool_style // } // // pub fn fmt_spec_prefix(spec: FmtSpec, prefix: String) -> FmtSpec: // return FmtSpec { // width: spec.width, // pad: spec.pad, // align: spec.align, // prefix: prefix, // plus_for_positive: spec.plus_for_positive, // uppercase: spec.uppercase, // number_base: spec.number_base, // bool_style: spec.bool_style // } // // pub fn fmt_spec_plus(spec: FmtSpec, enabled: Bool) -> FmtSpec: // return FmtSpec { // width: spec.width, // pad: spec.pad, // align: spec.align, // prefix: spec.prefix, // plus_for_positive: enabled, // uppercase: spec.uppercase, // number_base: spec.number_base, // bool_style: spec.bool_style // } // // pub fn fmt_spec_uppercase(spec: FmtSpec, enabled: Bool) -> FmtSpec: // return FmtSpec { // width: spec.width, // pad: spec.pad, // align: spec.align, // prefix: spec.prefix, // plus_for_positive: spec.plus_for_positive, // uppercase: enabled, // number_base: spec.number_base, // bool_style: spec.bool_style // } // // pub fn fmt_spec_base(spec: FmtSpec, base: Int) -> FmtSpec: // return FmtSpec { // width: spec.width, // pad: spec.pad, // align: spec.align, // prefix: spec.prefix, // plus_for_positive: spec.plus_for_positive, // uppercase: spec.uppercase, // number_base: fmt_supported_base(base), // bool_style: spec.bool_style // } // // pub fn fmt_spec_bool_style(spec: FmtSpec, style: String) -> FmtSpec: // return FmtSpec { // width: spec.width, // pad: spec.pad, // align: spec.align, // prefix: spec.prefix, // plus_for_positive: spec.plus_for_positive, // uppercase: spec.uppercase, // number_base: spec.number_base, // bool_style: fmt_supported_bool_style(style) // } // // pub fn fmt_writer_len(writer: FmtWriter) -> Int: // return bytes_builder_len(writer.builder) // // pub fn fmt_writer_push_string(writer: FmtWriter, value: String) -> FmtWriter: // return FmtWriter { // builder: bytes_builder_push_string(writer.builder, value) // } // // pub fn fmt_writer_push_string_spec(writer: FmtWriter, value: String, spec: FmtSpec) -> FmtWriter: // return fmt_writer_push_string(writer, fmt_string_spec(value, spec)) // // pub fn fmt_writer_push_any(writer: FmtWriter, value: Any) -> FmtWriter: // return fmt_writer_push_string(writer, fmt_any(value)) // // pub fn fmt_writer_push_int(writer: FmtWriter, value: Int) -> FmtWriter: // return fmt_writer_push_string(writer, fmt_int(value)) // // pub fn fmt_writer_push_int_spec(writer: FmtWriter, value: Int, spec: FmtSpec) -> FmtWriter: // return fmt_writer_push_string(writer, fmt_int_spec(value, spec)) // // pub fn fmt_writer_push_float(writer: FmtWriter, value: Float) -> FmtWriter: // return fmt_writer_push_string(writer, fmt_float(value)) // // pub fn fmt_writer_push_float_spec(writer: FmtWriter, value: Float, spec: FmtSpec) -> FmtWriter: // return fmt_writer_push_string(writer, fmt_float_spec(value, spec)) // // pub fn fmt_writer_push_bool_word(writer: FmtWriter, value: Bool) -> FmtWriter: // return fmt_writer_push_string(writer, fmt_bool_word(value)) // // pub fn fmt_writer_push_bool_spec(writer: FmtWriter, value: Bool, spec: FmtSpec) -> FmtWriter: // return fmt_writer_push_string(writer, fmt_bool_spec(value, spec)) // // pub fn fmt_writer_push_hex_int(writer: FmtWriter, value: Int) -> FmtWriter: // return fmt_writer_push_string(writer, fmt_hex_int(value)) // // pub fn fmt_writer_push_binary_int(writer: FmtWriter, value: Int) -> FmtWriter: // return fmt_writer_push_string(writer, fmt_binary_int(value)) // // pub fn fmt_writer_push_json_string(writer: FmtWriter, value: String) -> FmtWriter: // return fmt_writer_push_string(writer, fmt_json_string(value)) // // pub fn fmt_writer_push_key_value(writer: FmtWriter, key: String, value: String) -> FmtWriter: // return fmt_writer_push_string(writer, fmt_key_value(key, value)) // // pub fn fmt_writer_push_line(writer: FmtWriter, value: String) -> FmtWriter: // let next_writer = fmt_writer_push_string(writer, value) // return fmt_writer_push_string(next_writer, "\n") // // pub fn fmt_writer_push_prefixed_lines(writer: FmtWriter, prefix: String, lines: Array) -> FmtWriter: // var next_writer = writer // var index = 0 // while index < len(lines): // if index > 0: // next_writer = fmt_writer_push_string(next_writer, "\n") // next_writer = fmt_writer_push_string(next_writer, prefix + lines[index]) // index = index + 1 // return next_writer // // pub fn fmt_writer_build(writer: FmtWriter) -> String: // return bytes_builder_build(writer.builder) // // pub fn fmt_string_builder_push_string(builder: ptr, value: String) -> Int with Unsafe: // return string_builder_append_string(builder, value) // // pub fn fmt_string_builder_push_string_spec(builder: ptr, value: String, spec: FmtSpec) -> Int with Unsafe: // return string_builder_append_string(builder, fmt_string_spec(value, spec)) // // pub fn fmt_string_builder_push_any(builder: ptr, value: Any) -> Int with Unsafe: // return string_builder_append_string(builder, fmt_any(value)) // // pub fn fmt_string_builder_push_int(builder: ptr, value: Int) -> Int with Unsafe: // return string_builder_append_string(builder, fmt_int(value)) // // pub fn fmt_string_builder_push_int_spec(builder: ptr, value: Int, spec: FmtSpec) -> Int with Unsafe: // return string_builder_append_string(builder, fmt_int_spec(value, spec)) // // pub fn fmt_string_builder_push_float(builder: ptr, value: Float) -> Int with Unsafe: // return string_builder_append_string(builder, fmt_float(value)) // // pub fn fmt_string_builder_push_float_spec(builder: ptr, value: Float, spec: FmtSpec) -> Int with Unsafe: // return string_builder_append_string(builder, fmt_float_spec(value, spec)) // // pub fn fmt_string_builder_push_bool_spec(builder: ptr, value: Bool, spec: FmtSpec) -> Int with Unsafe: // return string_builder_append_string(builder, fmt_bool_spec(value, spec)) // // pub fn fmt_string_builder_push_json_string(builder: ptr, value: String) -> Int with Unsafe: // return string_builder_append_string(builder, fmt_json_string(value)) // // pub fn fmt_string_builder_push_key_value(builder: ptr, key: String, value: String) -> Int with Unsafe: // return string_builder_append_string(builder, fmt_key_value(key, value)) // // pub fn fmt_string_builder_push_line(builder: ptr, value: String) -> Int with Unsafe: // let wrote = string_builder_append_string(builder, value) // let newline = string_builder_append_string(builder, "\n") // return wrote + newline // // pub fn fmt_any(value: Any) -> String: // return to_string(value) // // pub fn fmt_string_spec(value: String, spec: FmtSpec) -> String: // let prefixed = fmt_apply_prefix(fmt_apply_uppercase(value, spec.uppercase), spec.prefix) // return fmt_apply_width(prefixed, spec) // // pub fn fmt_int(value: Int) -> String: // return to_string(value) // // pub fn fmt_int_spec(value: Int, spec: FmtSpec) -> String: // let body = fmt_render_number_body(value, spec) // let with_plus = fmt_apply_plus(body, spec.plus_for_positive) // let prefixed = fmt_apply_prefix(with_plus, spec.prefix) // return fmt_apply_width(prefixed, spec) // // pub fn fmt_float(value: Float) -> String: // return to_string(value) // // pub fn fmt_float_spec(value: Float, spec: FmtSpec) -> String: // let body = fmt_render_float_body(value, spec) // let with_plus = fmt_apply_plus(body, spec.plus_for_positive) // let prefixed = fmt_apply_prefix(with_plus, spec.prefix) // return fmt_apply_width(prefixed, spec) // // pub fn fmt_bool_word(value: Bool) -> String: // if value: // return "true" // return "false" // // pub fn fmt_bool_spec(value: Bool, spec: FmtSpec) -> String: // let body = fmt_render_bool_body(value, spec) // let prefixed = fmt_apply_prefix(body, spec.prefix) // return fmt_apply_width(prefixed, spec) // // pub fn fmt_bool_json(value: Bool) -> String: // return fmt_bool_word(value) // // pub fn fmt_join_strings(items: Array, separator: String) -> String: // var joined = "" // var index = 0 // while index < len(items): // if index > 0: // joined = joined + separator // joined = joined + items[index] // index = index + 1 // return joined // // pub fn fmt_non_empty(value: String, fallback: String) -> String: // let trimmed = trim(value) // if len(trimmed) == 0: // return fallback // return trimmed // // pub fn fmt_key_value(key: String, value: String) -> String: // return key + "=" + value // // pub fn fmt_bracketed(label: String, value: String) -> String: // return "[" + label + "] " + value // // pub fn fmt_repeat(token: String, count: Int) -> String: // if count <= 0: // return "" // var output = "" // var index = 0 // while index < count: // output = output + token // index = index + 1 // return output // // pub fn fmt_pad_left(value: String, width: Int, pad: String) -> String: // if width <= len(value): // return value // let filler = fmt_pad_token(pad) // return fmt_repeat(filler, width - len(value)) + value // // pub fn fmt_pad_right(value: String, width: Int, pad: String) -> String: // if width <= len(value): // return value // let filler = fmt_pad_token(pad) // return value + fmt_repeat(filler, width - len(value)) // // pub fn fmt_pad_center(value: String, width: Int, pad: String) -> String: // if width <= len(value): // return value // let filler = fmt_pad_token(pad) // let remaining = width - len(value) // let left = remaining / 2 // let right = remaining - left // return fmt_repeat(filler, left) + value + fmt_repeat(filler, right) // // pub fn fmt_status_line(label: String, success: Bool) -> String: // return label + " " + fmt_key_value("success", fmt_bool_word(success)) // // pub fn fmt_prefixed_lines(prefix: String, lines: Array) -> String: // var rendered = "" // var index = 0 // while index < len(lines): // if index > 0: // rendered = rendered + "\n" // rendered = rendered + prefix + lines[index] // index = index + 1 // return rendered // // pub fn fmt_hex_u32(value: Int) -> String: // let lane = value & 4294967295 // var output = "" // var shift = 28 // var started = false // while shift >= 0: // let digit = (lane >> shift) & 15 // if digit != 0 or started or shift == 0: // output = output + ascii_hex_char_lower(digit) // started = true // shift = shift - 4 // return output // // pub fn fmt_hex_int(value: Int) -> String: // if value < 0: // return "-" + fmt_hex_u32(0 - value) // return fmt_hex_u32(value) // // pub fn fmt_binary_u32(value: Int) -> String: // let lane = value & 4294967295 // var output = "" // var bit = 31 // var started = false // while bit >= 0: // let digit = (lane >> bit) & 1 // if digit != 0 or started or bit == 0: // output = output + ascii_digit_char(digit) // started = true // bit = bit - 1 // return output // // pub fn fmt_binary_int(value: Int) -> String: // if value < 0: // return "-" + fmt_binary_u32(0 - value) // return fmt_binary_u32(value) // // pub fn fmt_json_escape(value: String) -> String: // var output = "" // var index = 0 // while index < len(value): // let ch = char_at(value, index) // let code = ord(ch) // if ch == "\"": // output = output + "\\\"" // else: // if ch == "\\": // output = output + "\\\\" // else: // if code == 8: // output = output + "\\b" // else: // if code == 9: // output = output + "\\t" // else: // if code == 10: // output = output + "\\n" // else: // if code == 12: // output = output + "\\f" // else: // if code == 13: // output = output + "\\r" // else: // if code >= 0 and code < 32: // output = output + "\\u00" // output = output + ascii_hex_char_lower((code >> 4) & 15) // output = output + ascii_hex_char_lower(code & 15) // else: // output = output + ch // index = index + 1 // return output // // pub fn fmt_json_string(value: String) -> String: // return "\"" + fmt_json_escape(value) + "\"" // // pub fn fmt_debug_string_array(items: Array) -> String: // var output = "[" // var index = 0 // while index < len(items): // if index > 0: // output = output + ", " // output = output + fmt_json_string(items[index]) // index = index + 1 // return output + "]" //!end-kain-file //!kain-file // path = "fs.kn" // kind = "text" // encoding = "utf8" // bytes = 23540 // sha256 = "sha256:267de28dd4a2b8601ff69318efe1d9f89ba72245a52f0a49d98e855ebb1b6657" // trailing_newline = true //!kain-file-content // use std::base64 // use std::io // use std::text // // pub struct FsError: // kind: String // operation: String // path: String // other_path: String // message: String // raw_code: Int // // pub struct FsOpResult: // ok: Bool // status: Int // error: FsError // // pub struct FsTextResult: // ok: Bool // value: String // status: Int // error: FsError // // pub struct FsBytesResult: // ok: Bool // value: Array // status: Int // error: FsError // // pub struct FsMetadata: // file_type: String // len: Int // readonly: Bool // created_millis: Int // modified_millis: Int // accessed_millis: Int // // pub struct FsMetadataResult: // ok: Bool // value: FsMetadata // status: Int // error: FsError // // pub struct FsDirEntry: // path: String // file_name: String // file_type: String // metadata: FsMetadata // // pub struct FsChunk: // index: Int // offset: Int // len: Int // bytes: Array // // pub struct FsWatchEvent: // kind: String // path: String // before_len: Int // after_len: Int // // pub struct FsJournalEntry: // operation: String // path: String // other_path: String // status: String // message: String // // @extern // pub fn abi_fs_read_text(path: String) -> String // // @extern // pub fn abi_fs_read_text_range(path: String, offset: Int, length: Int) -> String // // @extern // pub fn abi_fs_write_text(path: String, content: String) -> Int // // @extern // pub fn abi_fs_write_text_len(path: String, content: String, content_len: Int) -> Int // // @extern // pub fn abi_fs_append_text(path: String, content: String) -> Int // // @extern // pub fn abi_fs_append_text_len(path: String, content: String, content_len: Int) -> Int // // @extern // pub fn abi_fs_atomic_write_text(path: String, content: String) -> Int // // @extern // pub fn abi_fs_atomic_write_text_len(path: String, content: String, content_len: Int) -> Int // // @extern // pub fn abi_fs_read_bytes_hex(path: String) -> String // // @extern // pub fn abi_fs_read_byte_range_hex(path: String, offset: Int, length: Int) -> String // // @extern // pub fn abi_fs_write_bytes_hex(path: String, hex: String) -> Int // // @extern // pub fn abi_fs_write_bytes_hex_at(path: String, offset: Int, hex: String) -> Int // // @extern // pub fn abi_fs_append_bytes_hex(path: String, hex: String) -> Int // // @extern // pub fn abi_fs_atomic_write_bytes_hex(path: String, hex: String) -> Int // // @extern // pub fn abi_fs_exists(path: String) -> Bool // // @extern // pub fn abi_fs_is_file(path: String) -> Bool // // @extern // pub fn abi_fs_is_dir(path: String) -> Bool // // @extern // pub fn abi_fs_metadata_text(path: String) -> String // // @extern // pub fn abi_fs_read_dir_paths_text(path: String) -> String // // @extern // pub fn abi_fs_walk_paths_text(path: String) -> String // // @extern // pub fn abi_fs_create_dir_all(path: String) -> Int // // @extern // pub fn abi_fs_copy_file(src: String, dest: String) -> Int // // @extern // pub fn abi_fs_copy_file_streaming(src: String, dest: String, chunk_size: Int) -> Int // // @extern // pub fn abi_fs_move_path(src: String, dest: String) -> Int // // @extern // pub fn abi_fs_remove_file(path: String) -> Int // // @extern // pub fn abi_fs_remove_dir_all(path: String) -> Int // // @extern // pub fn abi_fs_temp_file(prefix: String) -> String // // @extern // pub fn abi_fs_temp_dir(prefix: String) -> String // // @extern // pub fn abi_fs_hash_file(path: String) -> String // // @extern // pub fn abi_fs_path_join(base: String, child: String) -> String // // @extern // pub fn abi_fs_path_parent(path: String) -> String // // @extern // pub fn abi_fs_path_file_name(path: String) -> String // // @extern // pub fn abi_fs_path_extension(path: String) -> String // // @extern // pub fn abi_fs_path_stem(path: String) -> String // // @extern // pub fn abi_fs_last_status() -> Int // // @extern // pub fn abi_fs_last_error_kind() -> String // // @extern // pub fn abi_fs_last_error_message() -> String // // @extern // pub fn abi_fs_open(path: String, mode: String) -> ptr // // @extern // pub fn abi_fs_close(handle: ptr) -> Int // // @extern // pub fn abi_fs_read(handle: ptr, buffer: ptr, byte_count: Int) -> Int // // @extern // pub fn abi_fs_write(handle: ptr, buffer: ptr, byte_count: Int) -> Int // // @extern // pub fn abi_fs_seek(handle: ptr, offset: Int, origin: Int) -> Int // // @extern // pub fn abi_fs_tell(handle: ptr) -> Int // // @extern // pub fn abi_fs_flush(handle: ptr) -> Int // // pub fn fs_buffered_reader(path: String, capacity: Int) -> BufferedReader with Unsafe: // return buffered_reader_new_from_text(capacity, fs_read_text(path)) // // pub fn fs_buffered_reader_range(path: String, offset: Int, length: Int, capacity: Int) -> BufferedReader with Unsafe: // return buffered_reader_new_from_text(capacity, fs_read_text_range(path, offset, length)) // // pub fn fs_write_buffered_text(path: String, writer: BufferedWriter) -> Int with Unsafe: // let payload = buffered_writer_materialize_text(writer) // return abi_fs_write_text_len(path, payload, len(payload)) // // pub fn fs_append_buffered_text(path: String, writer: BufferedWriter) -> Int with Unsafe: // let payload = buffered_writer_materialize_text(writer) // return abi_fs_append_text_len(path, payload, len(payload)) // // pub fn fs_atomic_write_buffered_text(path: String, writer: BufferedWriter) -> Int with Unsafe: // let payload = buffered_writer_materialize_text(writer) // return abi_fs_atomic_write_text_len(path, payload, len(payload)) // // // pub fn fs_parse_int_or_zero(value: String) -> Int: // if value == "": // return 0 // return to_int(value) // // pub fn fs_hex_to_bytes(hex: String) -> Array: // let mut bytes: Array = [] // var index = 0 // if (len(hex) % 2) != 0: // return bytes // while index + 1 < len(hex): // let high = fs_hex_digit_value(char_at(hex, index)) // let low = fs_hex_digit_value(char_at(hex, index + 1)) // if high < 0 or low < 0: // return [] // push(bytes, ((high << 4) | low) & 255) // index = index + 2 // return bytes // // pub fn fs_bytes_to_hex(bytes: Array) -> String: // var hex = "" // var index = 0 // while index < len(bytes): // let value = bytes[index] & 255 // hex = hex + fs_hex_digit_char((value >> 4) & 15) // hex = hex + fs_hex_digit_char(value & 15) // index = index + 1 // return hex // // fn fs_hex_digit_value(ch: String) -> Int: // let code = ord(ch) // if code >= 48 and code <= 57: // return code - 48 // if code >= 97 and code <= 102: // return code - 87 // if code >= 65 and code <= 70: // return code - 55 // return -1 // // fn fs_hex_digit_char(value: Int) -> String: // let nibble = value & 15 // if nibble < 10: // return chr(48 + nibble) // return chr(87 + nibble) // // pub fn fs_nonempty_lines(text: String) -> Array: // let raw_lines = text_split_lines(text) // let mut lines: Array = [] // var index = 0 // while index < len(raw_lines): // if raw_lines[index] != "": // push(lines, raw_lines[index]) // index = index + 1 // return lines // // pub fn fs_metadata_line_value(metadata_text: String, key: String) -> String: // let prefix = key + "=" // let lines = text_split_lines(metadata_text) // var index = 0 // while index < len(lines): // let metadata_row = lines[index] // if metadata_row != "" and text_starts_with_string(metadata_row, prefix): // return text_substring_string(metadata_row, len(prefix), len(metadata_row) - len(prefix)) // index = index + 1 // return "" // // pub fn fs_parse_metadata_text(metadata_text: String) -> FsMetadata: // let file_type = fs_metadata_line_value(metadata_text, "file_type") // let len_value = fs_parse_int_or_zero(fs_metadata_line_value(metadata_text, "len")) // let readonly = fs_metadata_line_value(metadata_text, "readonly") == "1" // let created_millis = fs_parse_int_or_zero(fs_metadata_line_value(metadata_text, "created_millis")) // let modified_millis = fs_parse_int_or_zero(fs_metadata_line_value(metadata_text, "modified_millis")) // let accessed_millis = fs_parse_int_or_zero(fs_metadata_line_value(metadata_text, "accessed_millis")) // return FsMetadata { // file_type: file_type, // len: len_value, // readonly: readonly, // created_millis: created_millis, // modified_millis: modified_millis, // accessed_millis: accessed_millis // } // // pub fn fs_dir_entry_for_path(path: String) -> FsDirEntry: // let metadata = fs_parse_metadata_text(abi_fs_metadata_text(path)) // return FsDirEntry { // path: path, // file_name: abi_fs_path_file_name(path), // file_type: metadata.file_type, // metadata: metadata // } // // pub fn native_fs_last_status() -> Int: // return abi_fs_last_status() // // pub fn native_fs_last_error_kind() -> String: // return abi_fs_last_error_kind() // // pub fn native_fs_last_error_message() -> String: // return abi_fs_last_error_message() // // fn fs_error_empty() -> FsError: // return FsError { // kind: "", // operation: "", // path: "", // other_path: "", // message: "", // raw_code: 0 // } // // fn fs_metadata_empty() -> FsMetadata: // return FsMetadata { // file_type: "", // len: 0, // readonly: false, // created_millis: 0, // modified_millis: 0, // accessed_millis: 0 // } // // fn fs_error_from_status(operation: String, path: String, other_path: String, status: Int) -> FsError: // if status == 0: // return fs_error_empty() // return FsError { // kind: abi_fs_last_error_kind(), // operation: operation, // path: path, // other_path: other_path, // message: abi_fs_last_error_message(), // raw_code: status // } // // fn fs_op_result(operation: String, path: String, other_path: String, status: Int) -> FsOpResult: // return FsOpResult { // ok: status == 0, // status: status, // error: fs_error_from_status(operation, path, other_path, status) // } // // pub fn fs_try_read_text(path: String) -> FsTextResult: // let value = abi_fs_read_text(path) // let status = abi_fs_last_status() // return FsTextResult { // ok: status == 0, // value: if status == 0: value else: "", // status: status, // error: fs_error_from_status("read_text", path, "", status) // } // // pub fn fs_try_read_text_range(path: String, offset: Int, length: Int) -> FsTextResult: // let value = abi_fs_read_text_range(path, offset, length) // let status = abi_fs_last_status() // return FsTextResult { // ok: status == 0, // value: if status == 0: value else: "", // status: status, // error: fs_error_from_status("read_text_range", path, "", status) // } // // pub fn fs_try_write_text(path: String, content: String) -> FsOpResult: // return fs_op_result("write_text", path, "", abi_fs_write_text_len(path, content, len(content))) // // pub fn fs_try_append_text(path: String, content: String) -> FsOpResult: // return fs_op_result("append_text", path, "", abi_fs_append_text_len(path, content, len(content))) // // pub fn fs_try_atomic_write_text(path: String, content: String) -> FsOpResult: // return fs_op_result("atomic_write_text", path, "", abi_fs_atomic_write_text_len(path, content, len(content))) // // pub fn fs_try_read_bytes_hex(path: String) -> FsTextResult: // let value = abi_fs_read_bytes_hex(path) // let status = abi_fs_last_status() // return FsTextResult { // ok: status == 0, // value: if status == 0: value else: "", // status: status, // error: fs_error_from_status("read_bytes_hex", path, "", status) // } // // pub fn fs_try_read_byte_range_hex(path: String, offset: Int, length: Int) -> FsTextResult: // let value = abi_fs_read_byte_range_hex(path, offset, length) // let status = abi_fs_last_status() // return FsTextResult { // ok: status == 0, // value: if status == 0: value else: "", // status: status, // error: fs_error_from_status("read_byte_range_hex", path, "", status) // } // // pub fn fs_try_read_bytes(path: String) -> FsBytesResult: // let raw = fs_try_read_bytes_hex(path) // return FsBytesResult { // ok: raw.ok, // value: if raw.ok: fs_hex_to_bytes(raw.value) else: [], // status: raw.status, // error: raw.error // } // // pub fn fs_try_read_bytes_range(path: String, offset: Int, length: Int) -> FsBytesResult: // let raw = fs_try_read_byte_range_hex(path, offset, length) // return FsBytesResult { // ok: raw.ok, // value: if raw.ok: fs_hex_to_bytes(raw.value) else: [], // status: raw.status, // error: raw.error // } // // pub fn fs_try_write_bytes_hex(path: String, hex: String) -> FsOpResult: // return fs_op_result("write_bytes_hex", path, "", abi_fs_write_bytes_hex(path, hex)) // // pub fn fs_try_write_bytes_hex_at(path: String, offset: Int, hex: String) -> FsOpResult: // return fs_op_result("write_bytes_hex_at", path, "", abi_fs_write_bytes_hex_at(path, offset, hex)) // // pub fn fs_try_append_bytes_hex(path: String, hex: String) -> FsOpResult: // return fs_op_result("append_bytes_hex", path, "", abi_fs_append_bytes_hex(path, hex)) // // pub fn fs_try_write_text_at(path: String, offset: Int, content: String) -> FsOpResult: // return fs_op_result("write_text_at", path, "", abi_fs_write_bytes_hex_at(path, offset, hex_encode(content))) // // pub fn fs_try_write_bytes(path: String, bytes: Array) -> FsOpResult: // return fs_try_write_bytes_hex(path, fs_bytes_to_hex(bytes)) // // pub fn fs_try_write_bytes_at(path: String, offset: Int, bytes: Array) -> FsOpResult: // return fs_try_write_bytes_hex_at(path, offset, fs_bytes_to_hex(bytes)) // // pub fn fs_try_append_bytes(path: String, bytes: Array) -> FsOpResult: // return fs_try_append_bytes_hex(path, fs_bytes_to_hex(bytes)) // // pub fn fs_try_atomic_write_bytes(path: String, bytes: Array) -> FsOpResult: // return fs_op_result("atomic_write_bytes", path, "", abi_fs_atomic_write_bytes_hex(path, fs_bytes_to_hex(bytes))) // // pub fn fs_try_metadata_text(path: String) -> FsTextResult: // let value = abi_fs_metadata_text(path) // let status = abi_fs_last_status() // return FsTextResult { // ok: status == 0, // value: if status == 0: value else: "", // status: status, // error: fs_error_from_status("metadata_text", path, "", status) // } // // pub fn fs_try_metadata(path: String) -> FsMetadataResult: // let raw = fs_try_metadata_text(path) // return FsMetadataResult { // ok: raw.ok, // value: if raw.ok: fs_parse_metadata_text(raw.value) else: fs_metadata_empty(), // status: raw.status, // error: raw.error // } // // pub fn fs_try_read_dir_paths_text(path: String) -> FsTextResult: // let value = abi_fs_read_dir_paths_text(path) // let status = abi_fs_last_status() // return FsTextResult { // ok: status == 0, // value: if status == 0: value else: "", // status: status, // error: fs_error_from_status("read_dir_paths_text", path, "", status) // } // // pub fn fs_try_walk_paths_text(path: String) -> FsTextResult: // let value = abi_fs_walk_paths_text(path) // let status = abi_fs_last_status() // return FsTextResult { // ok: status == 0, // value: if status == 0: value else: "", // status: status, // error: fs_error_from_status("walk_paths_text", path, "", status) // } // // pub fn fs_read_text(path: String) -> String: // // Keep the fast helper pinned to the raw ABI string lane for now. // // `abi_fs_read_text` returns the correct owned Kain string, while the // // richer `FsTextResult` wrapper path is currently mispacking success // // results under native LLVM in smoketest pressure. // return abi_fs_read_text(path) // // pub fn fs_read_text_range(path: String, offset: Int, length: Int) -> String: // // Same temporary pin as `fs_read_text`: the raw ABI string return is // // correct, while the richer result wrapper still needs a substrate fix. // return abi_fs_read_text_range(path, offset, length) // // pub fn fs_write_text(path: String, content: String) -> Unit: // let _result = fs_try_write_text(path, content) // // pub fn fs_append_text(path: String, content: String) -> Unit: // let _result = fs_try_append_text(path, content) // // pub fn fs_atomic_write_text(path: String, content: String) -> Unit: // let _result = fs_try_atomic_write_text(path, content) // // pub fn fs_read_bytes(path: String) -> Array: // return fs_try_read_bytes(path).value // // pub fn fs_read_bytes_range(path: String, offset: Int, length: Int) -> Array: // return fs_try_read_bytes_range(path, offset, length).value // // pub fn fs_read_bytes_hex(path: String) -> String: // return fs_try_read_bytes_hex(path).value // // pub fn fs_read_byte_range_hex(path: String, offset: Int, length: Int) -> String: // return fs_try_read_byte_range_hex(path, offset, length).value // // pub fn fs_write_bytes_hex(path: String, hex: String) -> Unit: // let _result = fs_try_write_bytes_hex(path, hex) // // pub fn fs_write_bytes_hex_at(path: String, offset: Int, hex: String) -> Unit: // let _result = fs_try_write_bytes_hex_at(path, offset, hex) // // pub fn fs_append_bytes_hex(path: String, hex: String) -> Unit: // let _result = fs_try_append_bytes_hex(path, hex) // // pub fn fs_write_text_at(path: String, offset: Int, content: String) -> Unit: // let _result = fs_try_write_text_at(path, offset, content) // // pub fn fs_write_bytes(path: String, bytes: Array) -> Unit: // let _result = fs_try_write_bytes(path, bytes) // // pub fn fs_write_bytes_at(path: String, offset: Int, bytes: Array) -> Unit: // let _result = fs_try_write_bytes_at(path, offset, bytes) // // pub fn fs_append_bytes(path: String, bytes: Array) -> Unit: // let _result = fs_try_append_bytes(path, bytes) // // pub fn fs_atomic_write_bytes(path: String, bytes: Array) -> Unit: // let _result = fs_try_atomic_write_bytes(path, bytes) // // pub fn fs_exists(path: String) -> Bool: // return abi_fs_exists(path) // // pub fn fs_is_file(path: String) -> Bool: // return abi_fs_is_file(path) // // pub fn fs_is_dir(path: String) -> Bool: // return abi_fs_is_dir(path) // // pub fn fs_metadata_text(path: String) -> String: // return fs_try_metadata_text(path).value // // pub fn fs_metadata(path: String) -> FsMetadata: // return fs_try_metadata(path).value // // pub fn fs_read_dir_paths_text(path: String) -> String: // return fs_try_read_dir_paths_text(path).value // // pub fn fs_read_dir_paths(path: String) -> Array: // return fs_nonempty_lines(fs_read_dir_paths_text(path)) // // pub fn fs_read_dir(path: String) -> Array: // let raw_lines = fs_read_dir_paths(path) // let mut entries: Array = [] // var index = 0 // while index < len(raw_lines): // let entry_path = raw_lines[index] // if entry_path != "": // push(entries, fs_dir_entry_for_path(entry_path)) // index = index + 1 // return entries // // pub fn fs_walk_paths_text(path: String) -> String: // return fs_try_walk_paths_text(path).value // // pub fn fs_walk(path: String) -> Array: // let paths = fs_nonempty_lines(fs_walk_paths_text(path)) // let mut entries: Array = [] // var index = 0 // while index < len(paths): // let entry_path = paths[index] // if entry_path != "": // push(entries, fs_dir_entry_for_path(entry_path)) // index = index + 1 // return entries // // pub fn fs_try_create_dir_all(path: String) -> FsOpResult: // return fs_op_result("create_dir_all", path, "", abi_fs_create_dir_all(path)) // // pub fn fs_create_dir_all(path: String) -> Unit: // let _result = fs_try_create_dir_all(path) // // pub fn fs_try_copy_file(src: String, dest: String) -> FsOpResult: // return fs_op_result("copy_file", src, dest, abi_fs_copy_file(src, dest)) // // pub fn fs_copy_file(src: String, dest: String) -> Unit: // let _result = fs_try_copy_file(src, dest) // // pub fn fs_copy_file_streaming(src: String, dest: String, chunk_size: Int) -> Int: // return abi_fs_copy_file_streaming(src, dest, chunk_size) // // pub fn fs_stream_chunks(path: String, chunk_size: Int) -> Array: // let total_len = fs_metadata(path).len // if total_len <= 0: // return [] // let safe_chunk_size = if chunk_size > 1: chunk_size else: 1 // let mut chunks: Array = [] // var index = 0 // var offset = 0 // while offset < total_len: // let remaining = total_len - offset // let current_size = if safe_chunk_size < remaining: safe_chunk_size else: remaining // let decoded = hex_decode(abi_fs_read_byte_range_hex(path, offset, current_size)) // let mut bytes: Array = [] // var byte_index = 0 // while byte_index < len(decoded): // push(bytes, byte_at(decoded, byte_index)) // byte_index = byte_index + 1 // push(chunks, FsChunk { // index: index, // offset: offset, // len: len(bytes), // bytes: bytes // }) // index = index + 1 // offset = offset + current_size // return chunks // // pub fn fs_try_move_path(src: String, dest: String) -> FsOpResult: // return fs_op_result("move_path", src, dest, abi_fs_move_path(src, dest)) // // pub fn fs_move_path(src: String, dest: String) -> Unit: // let _result = fs_try_move_path(src, dest) // // pub fn fs_try_remove_file(path: String) -> FsOpResult: // return fs_op_result("remove_file", path, "", abi_fs_remove_file(path)) // // pub fn fs_remove_file(path: String) -> Unit: // let _result = fs_try_remove_file(path) // // pub fn fs_try_remove_dir_all(path: String) -> FsOpResult: // return fs_op_result("remove_dir_all", path, "", abi_fs_remove_dir_all(path)) // // pub fn fs_remove_dir_all(path: String) -> Unit: // let _result = fs_try_remove_dir_all(path) // // pub fn fs_temp_file(prefix: String) -> String: // return abi_fs_temp_file(prefix) // // pub fn fs_temp_dir(prefix: String) -> String: // return abi_fs_temp_dir(prefix) // // pub fn fs_hash_file(path: String) -> String: // return abi_fs_hash_file(path) // // pub fn fs_path_join(base: String, child: String) -> String: // return abi_fs_path_join(base, child) // // pub fn fs_path_parent(path: String) -> String: // return abi_fs_path_parent(path) // // pub fn fs_path_file_name(path: String) -> String: // return abi_fs_path_file_name(path) // // pub fn fs_path_extension(path: String) -> String: // return abi_fs_path_extension(path) // // pub fn fs_path_stem(path: String) -> String: // return abi_fs_path_stem(path) // // # root-domain aliases: generated public std names // pub fn fs_last_status() -> Int: // return abi_fs_last_status() // // pub fn fs_last_error_kind() -> String: // return abi_fs_last_error_kind() // // pub fn fs_last_error_message() -> String: // return abi_fs_last_error_message() // # end root-domain aliases // // pub struct File: // handle: ptr // // pub fn fs_open(path: String, mode: String) -> File: // let handle = abi_fs_open(path, mode) // return File { handle: handle } // // pub fn fs_close(file: File) -> Int: // if ptr_to_int(file.handle) == 0: // return -1 // return abi_fs_close(file.handle) // // pub fn fs_read(file: File, buffer: ptr, byte_count: Int) -> Int: // if ptr_to_int(file.handle) == 0: // return 0 // return abi_fs_read(file.handle, buffer, byte_count) // // pub fn fs_write(file: File, buffer: ptr, byte_count: Int) -> Int: // if ptr_to_int(file.handle) == 0: // return 0 // return abi_fs_write(file.handle, buffer, byte_count) // // pub fn fs_seek(file: File, offset: Int, origin: Int) -> Int: // if ptr_to_int(file.handle) == 0: // return -1 // return abi_fs_seek(file.handle, offset, origin) // // pub fn fs_tell(file: File) -> Int: // if ptr_to_int(file.handle) == 0: // return -1 // return abi_fs_tell(file.handle) // // pub fn fs_flush(file: File) -> Int: // if ptr_to_int(file.handle) == 0: // return -1 // return abi_fs_flush(file.handle) //!end-kain-file //!kain-file // path = "gen_server.kn" // kind = "text" // encoding = "utf8" // bytes = 2180 // sha256 = "sha256:2af784ddac22570ce37c692c0201319c1af79665cf5f294e9004688dc92eea94" // trailing_newline = true //!kain-file-content // # Tiny GenServer-style actor helpers for KAIN. // # // # `gen_server_start_link` is a naming alias for now. The actor system can spawn // # and message stateful servers, but explicit supervision links are still a // # future runtime feature. // // struct GenServerCallOutcome: // reply: R // state: S // // actor GenServer: // state current_state: S = none // state handle_call: fn(M, S) -> GenServerCallOutcome = |request, state| GenServerCallOutcome { reply: none, state: state } // state handle_cast: fn(M, S) -> S = |request, state| state // state handle_info: fn(M, S) -> S = |message, state| state // // on Call(reply_to: P, request: M): // let handle_call = self.handle_call // let outcome = handle_call(request, self.current_state) // self.current_state = outcome.state // send reply_to.Reply(value = outcome.reply) // // on Cast(request: M): // let handle_cast = self.handle_cast // self.current_state = handle_cast(request, self.current_state) // // on Info(message: M): // let handle_info = self.handle_info // self.current_state = handle_info(message, self.current_state) // // pub fn gen_server_call_result(reply: R, state: S) -> GenServerCallOutcome: // return GenServerCallOutcome { reply: reply, state: state } // // pub fn gen_server_start(state: S, handle_call: fn(M, S) -> GenServerCallOutcome, handle_cast: fn(M, S) -> S, handle_info: fn(M, S) -> S) -> GenServer: // return spawn GenServer( // current_state = state, // handle_call = handle_call, // handle_cast = handle_cast, // handle_info = handle_info // ) // // pub fn gen_server_start_link(state: S, handle_call: fn(M, S) -> GenServerCallOutcome, handle_cast: fn(M, S) -> S, handle_info: fn(M, S) -> S) -> GenServer: // return gen_server_start(state, handle_call, handle_cast, handle_info) // // pub fn gen_server_call(server: GenServer, request: M) -> R: // let reply = ask(server, "Call", request) // return reply // // pub fn gen_server_cast(server: GenServer, request: M) -> Unit: // send server.Cast(request = request) // // pub fn gen_server_info(server: GenServer, message: M) -> Unit: // send server.Info(message = message) //!end-kain-file //!kain-file // path = "gpu.kn" // kind = "text" // encoding = "utf8" // bytes = 24527 // sha256 = "sha256:21a374a0a4e4757b487f0fc360b606b896b13f926d9396e765785a28e38f7f19" // trailing_newline = true //!kain-file-content // use std::graphics // use std::interop // use std::json // use std::math // use std::text // // pub const GPU_STAGE_VERTEX: Int = 1 // pub const GPU_STAGE_FRAGMENT: Int = 2 // pub const GPU_STAGE_COMPUTE: Int = 4 // pub const GPU_STAGE_TASK: Int = 8 // pub const GPU_STAGE_MESH: Int = 16 // pub const GPU_STAGE_RAYGEN: Int = 32 // pub const GPU_STAGE_ANY_HIT: Int = 64 // pub const GPU_STAGE_CLOSEST_HIT: Int = 128 // pub const GPU_STAGE_MISS: Int = 256 // pub const GPU_STAGE_INTERSECTION: Int = 512 // pub const GPU_STAGE_CALLABLE: Int = 1024 // pub const GPU_STAGE_COPY: Int = 2048 // pub const GPU_STAGE_RESOLVE: Int = 4096 // pub const GPU_STAGE_ALL_GRAPHICS: Int = GPU_STAGE_VERTEX | GPU_STAGE_FRAGMENT | GPU_STAGE_TASK | GPU_STAGE_MESH // pub const GPU_STAGE_ALL_RAYTRACING: Int = GPU_STAGE_RAYGEN | GPU_STAGE_ANY_HIT | GPU_STAGE_CLOSEST_HIT | GPU_STAGE_MISS | GPU_STAGE_INTERSECTION | GPU_STAGE_CALLABLE // pub const GPU_STAGE_ALL: Int = GPU_STAGE_ALL_GRAPHICS | GPU_STAGE_COMPUTE | GPU_STAGE_ALL_RAYTRACING | GPU_STAGE_COPY | GPU_STAGE_RESOLVE // // pub const GPU_QUEUE_GRAPHICS: Int = 1 // pub const GPU_QUEUE_COMPUTE: Int = 2 // pub const GPU_QUEUE_TRANSFER: Int = 4 // pub const GPU_QUEUE_PRESENT: Int = 8 // pub const GPU_QUEUE_HOST: Int = 16 // pub const GPU_QUEUE_ASYNC: Int = 32 // // pub const GPU_ACCESS_READ: Int = 1 // pub const GPU_ACCESS_WRITE: Int = 2 // pub const GPU_ACCESS_ATOMIC: Int = 4 // pub const GPU_ACCESS_PERSISTENT_MAP: Int = 8 // pub const GPU_ACCESS_READ_WRITE: Int = GPU_ACCESS_READ | GPU_ACCESS_WRITE // // pub const GPU_RESIDENCY_HOST_VISIBLE: Int = 1 // pub const GPU_RESIDENCY_HOST_COHERENT: Int = 2 // pub const GPU_RESIDENCY_DEVICE_LOCAL: Int = 4 // pub const GPU_RESIDENCY_SHARED: Int = 8 // pub const GPU_RESIDENCY_IMPORTED: Int = 16 // pub const GPU_RESIDENCY_READBACK: Int = 32 // pub const GPU_RESIDENCY_UPLOAD: Int = 64 // pub const GPU_RESIDENCY_PERSISTENT: Int = 128 // pub const GPU_RESIDENCY_ZERO_COPY: Int = 256 // pub const GPU_RESIDENCY_LAZILY_ALLOCATED: Int = 512 // pub const GPU_RESIDENCY_SPARSE: Int = 1024 // // pub const GPU_BUFFER_USAGE_TRANSFER_SRC: Int = 1 // pub const GPU_BUFFER_USAGE_TRANSFER_DST: Int = 2 // pub const GPU_BUFFER_USAGE_STORAGE: Int = 4 // pub const GPU_BUFFER_USAGE_UNIFORM: Int = 8 // pub const GPU_BUFFER_USAGE_VERTEX: Int = 16 // pub const GPU_BUFFER_USAGE_INDEX: Int = 32 // pub const GPU_BUFFER_USAGE_INDIRECT: Int = 64 // pub const GPU_BUFFER_USAGE_ACCELERATION_STRUCTURE: Int = 128 // pub const GPU_BUFFER_USAGE_SHADER_BINDING_TABLE: Int = 256 // // pub const GPU_IMAGE_USAGE_TRANSFER_SRC: Int = 1 // pub const GPU_IMAGE_USAGE_TRANSFER_DST: Int = 2 // pub const GPU_IMAGE_USAGE_SAMPLED: Int = 4 // pub const GPU_IMAGE_USAGE_STORAGE: Int = 8 // pub const GPU_IMAGE_USAGE_COLOR_ATTACHMENT: Int = 16 // pub const GPU_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT: Int = 32 // pub const GPU_IMAGE_USAGE_INPUT_ATTACHMENT: Int = 64 // pub const GPU_IMAGE_USAGE_PRESENT: Int = 128 // pub const GPU_IMAGE_USAGE_TRANSIENT: Int = 256 // // pub const GPU_DESCRIPTOR_RAW_BUFFER: String = "raw_buffer" // pub const GPU_DESCRIPTOR_RAW_IMAGE: String = "raw_image" // pub const GPU_DESCRIPTOR_STORAGE_BUFFER: String = "storage_buffer" // pub const GPU_DESCRIPTOR_UNIFORM_BUFFER: String = "uniform_buffer" // pub const GPU_DESCRIPTOR_SAMPLED_IMAGE: String = "sampled_image" // pub const GPU_DESCRIPTOR_STORAGE_IMAGE: String = "storage_image" // pub const GPU_DESCRIPTOR_ACCELERATION_STRUCTURE: String = "acceleration_structure" // // pub const GPU_LAYOUT_TIGHT: String = "tight" // pub const GPU_LAYOUT_PACKED: String = "packed" // pub const GPU_LAYOUT_STD140: String = "std140" // pub const GPU_LAYOUT_STD430: String = "std430" // pub const GPU_LAYOUT_CBUFFER: String = "cbuffer" // pub const GPU_LAYOUT_RASTER_HWC: String = "raster_hwc" // // pub struct GpuBackendState: // id: String // supported: Int // available: Int // status: String // // pub struct GpuMemoryPolicy: // residency_flags: Int // access_flags: Int // queue_flags: Int // layout_kind: String // descriptor_kind: String // // pub struct GpuResourcePolicy: // memory: GpuMemoryPolicy // usage_flags: Int // debug_name: String // // pub struct GpuBindingPlan: // binding: Int // descriptor_kind: String // stage_flags: Int // access_flags: Int // queue_flags: Int // // pub struct GpuBuffer: // handle: Any // info: KainSharedBufferInfo // byte_length: Int // element_type: String // element_size: Int // element_count: Int // policy: GpuResourcePolicy // // pub struct GpuImage: // handle: Any // info: KainSharedImageInfo // byte_length: Int // width: Int // height: Int // channels: Int // policy: GpuResourcePolicy // // pub struct GpuBufferDescriptorInfo: // kind: String // debug_name: String // contract: String // contract_version: Int // byte_length: Int // element_type: String // element_size: Int // element_count: Int // shape: Any // strides: Any // format: Any // mime_type: Any // source_runtime: String // source_backend: Any // ownership: String // adoption_path: Any // fallback_reason: Any // labels: Any // zero_copy: Bool // device: String // device_kind: String // device_ordinal: Int // device_pointer: Int // device_type_code: Int // host_accessible: Bool // writable: Bool // contiguous: Bool // dlpack_capable: Bool // cuda_array_interface_version: Int // interop_lane: String // descriptor_kind: String // layout_kind: String // usage_flags: Int // access_flags: Int // queue_flags: Int // residency_flags: Int // policy_valid: Bool // // pub fn gpu_has_flags(value: Int, flags: Int) -> Bool: // return (value & flags) == flags // // pub fn gpu_align_up_bytes(value: Int, alignment_bytes: Int) -> Int: // return align_up_int(value, alignment_bytes) // // pub fn gpu_layout(size_bytes: Int, alignment_bytes: Int) -> GpuLayoutInfo: // return gpu_layout_info(size_bytes, alignment_bytes) // // pub fn gpu_std140_vec3(value: Vec3) -> Std140: // return std140_vec3(value) // // pub fn gpu_std140_vec4(value: Vec4) -> Std140: // return std140_vec4(value) // // pub fn gpu_std140_mat3(value: Mat3) -> Std140: // return std140_mat3(value) // // pub fn gpu_std140_mat4(value: Mat4) -> Std140: // return std140_mat4(value) // // pub fn gpu_std430_vec3a(value: Vec3A) -> Std430: // return std430_vec3a(value) // // pub fn gpu_std430_vec4(value: Vec4) -> Std430: // return std430_vec4(value) // // pub fn gpu_cbuffer_mat4(value: Mat4) -> CBuffer: // return cbuffer_mat4(value) // // pub fn gpu_std140_mat4_alignment_bytes(value: Std140) -> Int: // return std140_mat4_alignment_bytes(value) // // pub fn gpu_std140_mat4_stride_bytes(value: Std140) -> Int: // return std140_mat4_stride_bytes(value) // // pub fn gpu_memory_policy(residency_flags: Int, access_flags: Int, queue_flags: Int, layout_kind: String, descriptor_kind: String) -> GpuMemoryPolicy: // return GpuMemoryPolicy { // residency_flags: residency_flags, // access_flags: access_flags, // queue_flags: queue_flags, // layout_kind: layout_kind, // descriptor_kind: descriptor_kind // } // // pub fn gpu_shared_memory_policy(access_flags: Int, queue_flags: Int, layout_kind: String, descriptor_kind: String) -> GpuMemoryPolicy: // return gpu_memory_policy( // GPU_RESIDENCY_HOST_VISIBLE | GPU_RESIDENCY_HOST_COHERENT | GPU_RESIDENCY_SHARED | GPU_RESIDENCY_ZERO_COPY, // access_flags, // queue_flags, // layout_kind, // descriptor_kind // ) // // pub fn gpu_device_local_memory_policy(access_flags: Int, queue_flags: Int, layout_kind: String, descriptor_kind: String) -> GpuMemoryPolicy: // return gpu_memory_policy( // GPU_RESIDENCY_DEVICE_LOCAL, // access_flags, // queue_flags, // layout_kind, // descriptor_kind // ) // // pub fn gpu_upload_memory_policy(access_flags: Int, queue_flags: Int, layout_kind: String, descriptor_kind: String) -> GpuMemoryPolicy: // return gpu_memory_policy( // GPU_RESIDENCY_HOST_VISIBLE | GPU_RESIDENCY_HOST_COHERENT | GPU_RESIDENCY_UPLOAD, // access_flags, // queue_flags, // layout_kind, // descriptor_kind // ) // // pub fn gpu_readback_memory_policy(access_flags: Int, queue_flags: Int, layout_kind: String, descriptor_kind: String) -> GpuMemoryPolicy: // return gpu_memory_policy( // GPU_RESIDENCY_HOST_VISIBLE | GPU_RESIDENCY_HOST_COHERENT | GPU_RESIDENCY_READBACK, // access_flags, // queue_flags, // layout_kind, // descriptor_kind // ) // // pub fn gpu_resource_policy(memory: GpuMemoryPolicy, usage_flags: Int, debug_name: String) -> GpuResourcePolicy: // return GpuResourcePolicy { // memory: memory, // usage_flags: usage_flags, // debug_name: debug_name // } // // pub fn gpu_binding_plan(binding: Int, descriptor_kind: String, stage_flags: Int, access_flags: Int, queue_flags: Int) -> GpuBindingPlan: // return GpuBindingPlan { // binding: binding, // descriptor_kind: descriptor_kind, // stage_flags: stage_flags, // access_flags: access_flags, // queue_flags: queue_flags // } // // pub fn gpu_storage_buffer_binding(binding: Int, stage_flags: Int, access_flags: Int, queue_flags: Int) -> GpuBindingPlan: // return gpu_binding_plan(binding, GPU_DESCRIPTOR_STORAGE_BUFFER, stage_flags, access_flags, queue_flags) // // pub fn gpu_uniform_buffer_binding(binding: Int, stage_flags: Int, queue_flags: Int) -> GpuBindingPlan: // return gpu_binding_plan(binding, GPU_DESCRIPTOR_UNIFORM_BUFFER, stage_flags, GPU_ACCESS_READ, queue_flags) // // pub fn gpu_sampled_image_binding(binding: Int, stage_flags: Int, queue_flags: Int) -> GpuBindingPlan: // return gpu_binding_plan(binding, GPU_DESCRIPTOR_SAMPLED_IMAGE, stage_flags, GPU_ACCESS_READ, queue_flags) // // pub fn gpu_storage_image_binding(binding: Int, stage_flags: Int, access_flags: Int, queue_flags: Int) -> GpuBindingPlan: // return gpu_binding_plan(binding, GPU_DESCRIPTOR_STORAGE_IMAGE, stage_flags, access_flags, queue_flags) // // pub fn gpu_descriptor_requires_read_only(descriptor_kind: String) -> Bool: // return descriptor_kind == GPU_DESCRIPTOR_UNIFORM_BUFFER or descriptor_kind == GPU_DESCRIPTOR_SAMPLED_IMAGE // // pub fn gpu_policy_valid(policy: GpuResourcePolicy) -> Bool: // if gpu_descriptor_requires_read_only(policy.memory.descriptor_kind): // return gpu_has_flags(policy.memory.access_flags, GPU_ACCESS_WRITE) == false // return true // // pub fn gpu_binding_plan_valid(plan: GpuBindingPlan) -> Bool: // if gpu_descriptor_requires_read_only(plan.descriptor_kind): // return gpu_has_flags(plan.access_flags, GPU_ACCESS_WRITE) == false // return true // // pub fn gpu_backend_state(backend_id: String) -> GpuBackendState: // return GpuBackendState { // id: backend_id, // supported: graphics_backend_supported(backend_id), // available: graphics_backend_available(backend_id), // status: graphics_backend_status(backend_id) // } // // pub fn gpu_backend_preferred() -> GpuBackendState: // let vulkan = gpu_backend_state("vulkan") // if vulkan.available != 0: // return vulkan // let d3d12 = gpu_backend_state("d3d12") // if d3d12.available != 0: // return d3d12 // let auto_backend = gpu_backend_state("auto") // if auto_backend.available != 0: // return auto_backend // let software = gpu_backend_state("software") // if software.available != 0: // return software // if vulkan.supported != 0: // return vulkan // if d3d12.supported != 0: // return d3d12 // if auto_backend.supported != 0: // return auto_backend // return software // // pub fn gpu_element_size_bytes(element_type: String) -> Int: // let normalized = text_lower(element_type) // if normalized == "u8" or normalized == "uint8" or normalized == "byte" or normalized == "i8" or normalized == "int8" or normalized == "sbyte": // return 1 // if normalized == "u16" or normalized == "uint16" or normalized == "i16" or normalized == "int16" or normalized == "f16" or normalized == "half" or normalized == "bf16" or normalized == "bfloat16": // return 2 // if normalized == "bool" or normalized == "u32" or normalized == "uint32" or normalized == "uint" or normalized == "i32" or normalized == "int32" or normalized == "int" or normalized == "f32" or normalized == "float32" or normalized == "float": // return 4 // if normalized == "u64" or normalized == "uint64" or normalized == "ulong" or normalized == "i64" or normalized == "int64" or normalized == "long" or normalized == "f64" or normalized == "float64" or normalized == "double": // return 8 // if normalized == "vec2" or normalized == "ivec2" or normalized == "uvec2" or normalized == "vec2" or normalized == "vec2" or normalized == "vec2" or normalized == "vec2" or normalized == "vec2" or normalized == "vec2" or normalized == "vec2" or normalized == "vec2" or normalized == "vec2": // return 8 // if normalized == "vec3" or normalized == "ivec3" or normalized == "uvec3" or normalized == "vec3" or normalized == "vec3" or normalized == "vec3" or normalized == "vec3" or normalized == "vec3" or normalized == "vec3" or normalized == "vec3" or normalized == "vec3" or normalized == "vec3": // return 16 // if normalized == "vec4" or normalized == "ivec4" or normalized == "uvec4" or normalized == "vec4" or normalized == "vec4" or normalized == "vec4" or normalized == "vec4" or normalized == "vec4" or normalized == "vec4" or normalized == "vec4" or normalized == "vec4" or normalized == "vec4": // return 16 // return 0 // // pub fn gpu_element_count(shape: Array) -> Int: // if len(shape) <= 0: // return 0 // var index = 0 // var count = 1 // while index < len(shape): // count = count * shape[index] // index = index + 1 // return count // // pub fn gpu_required_byte_length(element_type: String, shape: Array) -> Int: // return gpu_element_size_bytes(element_type) * gpu_element_count(shape) // // pub fn gpu_raster_byte_length(width: Int, height: Int, channels: Int) -> Int: // if width <= 0 or height <= 0 or channels <= 0: // return 0 // return width * height * channels // // pub fn gpu_zero_bytes(byte_length: Int) -> Array: // let bytes = [] // var index = 0 // while index < byte_length: // push(bytes, 0) // index = index + 1 // return bytes // // pub fn gpu_import_shared_buffer(handle: Any, policy: GpuResourcePolicy) -> GpuBuffer: // let info = interop_shared_buffer_info(handle) // return GpuBuffer { // handle: handle, // info: info, // byte_length: info.byte_length, // element_type: info.element_type, // element_size: info.element_size, // element_count: info.element_count, // policy: policy // } // // pub fn gpu_shared_buffer_from_bytes(bytes: Any, element_type: String, shape: Any, format: String, mime_type: String, policy: GpuResourcePolicy) -> GpuBuffer: // let handle = interop_shared_buffer_from_bytes(bytes, element_type, shape, format, mime_type) // return gpu_import_shared_buffer(handle, policy) // // pub fn gpu_shared_buffer_zeroed(element_type: String, shape: Array, format: String, mime_type: String, policy: GpuResourcePolicy) -> GpuBuffer: // return gpu_shared_buffer_from_bytes( // gpu_zero_bytes(gpu_required_byte_length(element_type, shape)), // element_type, // shape, // format, // mime_type, // policy // ) // // pub fn gpu_shared_buffer_bytes(buffer: GpuBuffer) -> Any: // return interop_shared_buffer_bytes(buffer.handle) // // pub fn gpu_shared_buffer_replace_bytes(buffer: GpuBuffer, bytes: Any) -> GpuBuffer: // let _replace = interop_shared_buffer_replace_bytes(buffer.handle, bytes) // return gpu_import_shared_buffer(buffer.handle, buffer.policy) // // pub fn gpu_import_shared_image(handle: Any, policy: GpuResourcePolicy) -> GpuImage: // let info = interop_shared_image_info(handle) // return GpuImage { // handle: handle, // info: info, // byte_length: info.byte_length, // width: info.width, // height: info.height, // channels: info.channels, // policy: policy // } // // pub fn gpu_shared_image_from_bytes(bytes: Any, width: Int, height: Int, channels: Int, layout: String, pixel_format: String, mime_type: String, policy: GpuResourcePolicy) -> GpuImage: // let handle = interop_shared_image_from_bytes(bytes, width, height, channels, layout, pixel_format, mime_type) // return gpu_import_shared_image(handle, policy) // // pub fn gpu_shared_image_zeroed(width: Int, height: Int, channels: Int, layout: String, pixel_format: String, mime_type: String, policy: GpuResourcePolicy) -> GpuImage: // return gpu_shared_image_from_bytes( // gpu_zero_bytes(gpu_raster_byte_length(width, height, channels)), // width, // height, // channels, // layout, // pixel_format, // mime_type, // policy // ) // // pub fn gpu_shared_image_bytes(image: GpuImage) -> Any: // return interop_shared_image_bytes(image.handle) // // pub fn gpu_shared_image_replace_bytes(image: GpuImage, bytes: Any) -> GpuImage: // let _replace = interop_shared_image_replace_bytes(image.handle, bytes) // return gpu_import_shared_image(image.handle, image.policy) // // pub fn gpu_buffer_descriptor(buffer: GpuBuffer) -> Any: // let payload = json_object_new() // json_object_set(payload, "kind", "buffer") // json_object_set(payload, "debug_name", buffer.policy.debug_name) // json_object_set(payload, "contract", buffer.info.contract) // json_object_set(payload, "contract_version", buffer.info.contract_version) // json_object_set(payload, "byte_length", buffer.byte_length) // json_object_set(payload, "element_type", buffer.element_type) // json_object_set(payload, "element_size", buffer.element_size) // json_object_set(payload, "element_count", buffer.element_count) // json_object_set(payload, "shape", buffer.info.shape) // json_object_set(payload, "strides", buffer.info.strides) // json_object_set(payload, "format", buffer.info.format) // json_object_set(payload, "mime_type", buffer.info.mime_type) // json_object_set(payload, "source_runtime", buffer.info.source_runtime) // json_object_set(payload, "source_backend", buffer.info.source_backend) // json_object_set(payload, "ownership", buffer.info.ownership) // json_object_set(payload, "adoption_path", buffer.info.adoption_path) // json_object_set(payload, "fallback_reason", buffer.info.fallback_reason) // json_object_set(payload, "labels", buffer.info.labels) // json_object_set(payload, "zero_copy", buffer.info.zero_copy) // json_object_set(payload, "device", buffer.info.device) // json_object_set(payload, "device_kind", buffer.info.device_kind) // json_object_set(payload, "device_ordinal", buffer.info.device_ordinal) // json_object_set(payload, "device_pointer", buffer.info.device_pointer) // json_object_set(payload, "device_type_code", buffer.info.device_type_code) // json_object_set(payload, "host_accessible", buffer.info.host_accessible) // json_object_set(payload, "writable", buffer.info.writable) // json_object_set(payload, "contiguous", buffer.info.contiguous) // json_object_set(payload, "dlpack_capable", buffer.info.dlpack_capable) // json_object_set(payload, "cuda_array_interface_version", buffer.info.cuda_array_interface_version) // json_object_set(payload, "interop_lane", buffer.info.interop_lane) // json_object_set(payload, "descriptor_kind", buffer.policy.memory.descriptor_kind) // json_object_set(payload, "layout_kind", buffer.policy.memory.layout_kind) // json_object_set(payload, "usage_flags", buffer.policy.usage_flags) // json_object_set(payload, "access_flags", buffer.policy.memory.access_flags) // json_object_set(payload, "queue_flags", buffer.policy.memory.queue_flags) // json_object_set(payload, "residency_flags", buffer.policy.memory.residency_flags) // json_object_set(payload, "policy_valid", gpu_policy_valid(buffer.policy)) // return payload // // pub fn gpu_buffer_descriptor_info(buffer: GpuBuffer) -> GpuBufferDescriptorInfo: // let payload = gpu_buffer_descriptor(buffer) // return GpuBufferDescriptorInfo { // kind: json_get_string(payload, "kind"), // debug_name: json_get_string(payload, "debug_name"), // contract: json_get_string(payload, "contract"), // contract_version: json_get_int(payload, "contract_version"), // byte_length: json_get_int(payload, "byte_length"), // element_type: json_get_string(payload, "element_type"), // element_size: json_get_int(payload, "element_size"), // element_count: json_get_int(payload, "element_count"), // shape: json_get(payload, "shape"), // strides: json_get(payload, "strides"), // format: json_get(payload, "format"), // mime_type: json_get(payload, "mime_type"), // source_runtime: json_get_string(payload, "source_runtime"), // source_backend: json_get(payload, "source_backend"), // ownership: json_get_string(payload, "ownership"), // adoption_path: json_get(payload, "adoption_path"), // fallback_reason: json_get(payload, "fallback_reason"), // labels: json_get(payload, "labels"), // zero_copy: json_get_bool(payload, "zero_copy"), // device: json_string_or(payload, "device", ""), // device_kind: json_string_or(payload, "device_kind", ""), // device_ordinal: json_int_or(payload, "device_ordinal", 0), // device_pointer: json_int_or(payload, "device_pointer", 0), // device_type_code: json_int_or(payload, "device_type_code", 0), // host_accessible: json_bool_or(payload, "host_accessible", true), // writable: json_bool_or(payload, "writable", true), // contiguous: json_bool_or(payload, "contiguous", true), // dlpack_capable: json_bool_or(payload, "dlpack_capable", false), // cuda_array_interface_version: json_int_or(payload, "cuda_array_interface_version", 0), // interop_lane: json_string_or(payload, "interop_lane", ""), // descriptor_kind: json_get_string(payload, "descriptor_kind"), // layout_kind: json_get_string(payload, "layout_kind"), // usage_flags: json_get_int(payload, "usage_flags"), // access_flags: json_get_int(payload, "access_flags"), // queue_flags: json_get_int(payload, "queue_flags"), // residency_flags: json_get_int(payload, "residency_flags"), // policy_valid: json_get_bool(payload, "policy_valid") // } // // pub fn gpu_image_descriptor(image: GpuImage) -> Any: // let payload = json_object_new() // json_object_set(payload, "kind", "image") // json_object_set(payload, "debug_name", image.policy.debug_name) // json_object_set(payload, "byte_length", image.byte_length) // json_object_set(payload, "width", image.width) // json_object_set(payload, "height", image.height) // json_object_set(payload, "channels", image.channels) // json_object_set(payload, "layout", image.info.layout) // json_object_set(payload, "pixel_format", image.info.pixel_format) // json_object_set(payload, "mime_type", image.info.mime_type) // json_object_set(payload, "source_runtime", image.info.source_runtime) // json_object_set(payload, "source_backend", image.info.source_backend) // json_object_set(payload, "ownership", image.info.ownership) // json_object_set(payload, "labels", image.info.labels) // json_object_set(payload, "descriptor_kind", image.policy.memory.descriptor_kind) // json_object_set(payload, "layout_kind", image.policy.memory.layout_kind) // json_object_set(payload, "usage_flags", image.policy.usage_flags) // json_object_set(payload, "access_flags", image.policy.memory.access_flags) // json_object_set(payload, "queue_flags", image.policy.memory.queue_flags) // json_object_set(payload, "residency_flags", image.policy.memory.residency_flags) // json_object_set(payload, "policy_valid", gpu_policy_valid(image.policy)) // return payload // // pub fn gpu_binding_descriptor(binding: GpuBindingPlan) -> Any: // let payload = json_object_new() // json_object_set(payload, "binding", binding.binding) // json_object_set(payload, "descriptor_kind", binding.descriptor_kind) // json_object_set(payload, "stage_flags", binding.stage_flags) // json_object_set(payload, "access_flags", binding.access_flags) // json_object_set(payload, "queue_flags", binding.queue_flags) // json_object_set(payload, "binding_valid", gpu_binding_plan_valid(binding)) // return payload //!end-kain-file //!kain-file // path = "graphics.kn" // kind = "text" // encoding = "utf8" // bytes = 16387 // sha256 = "sha256:e91d0803d24982ebf4d76f85efdac687bee269e1b100dd6eea6bca7eb06fd09e" // trailing_newline = true //!kain-file-content // @extern // fn abi_graphics_reset() -> Int // // @extern // fn abi_graphics_session_create(app_name: String, width: Int, height: Int) -> Int // // @extern // fn abi_graphics_session_destroy(session_id: Int) -> Int // // @extern // fn abi_graphics_session_count() -> Int // // @extern // fn abi_graphics_backend_supported(backend_id: String) -> Int // // @extern // fn abi_graphics_backend_available(backend_id: String) -> Int // // @extern // fn abi_graphics_backend_status(backend_id: String) -> String // // @extern // fn abi_graphics_backend_select(session_id: Int, backend_id: String) -> Int // // @extern // fn abi_graphics_active_backend(session_id: Int) -> String // // @extern // fn abi_graphics_begin_frame(session_id: Int, delta_ms: Float) -> Int // // @extern // fn abi_graphics_end_frame(session_id: Int) -> Int // // @extern // fn abi_graphics_present(session_id: Int) -> Int // // @extern // fn abi_graphics_frame_index(session_id: Int) -> Int // // @extern // fn abi_graphics_last_presented_frame(session_id: Int) -> Int // // @extern // fn abi_graphics_buffer_create(session_id: Int, kind: String, label: String, byte_length: Int, element_stride: Int) -> Int // // @extern // fn abi_graphics_buffer_create_from_hex(session_id: Int, kind: String, label: String, bytes_hex: String, element_stride: Int) -> Int // // @extern // fn abi_graphics_buffer_byte_length(session_id: Int, buffer_id: Int) -> Int // // @extern // fn abi_graphics_buffer_byte_at(session_id: Int, buffer_id: Int, byte_offset: Int) -> Int // // @extern // fn abi_graphics_buffer_kind(session_id: Int, buffer_id: Int) -> String // // @extern // fn abi_graphics_buffer_label(session_id: Int, buffer_id: Int) -> String // // @extern // fn abi_graphics_shader_spirv_from_hex(session_id: Int, key: String, stage: String, entry_point: String, bytes_hex: String) -> Int // // @extern // fn abi_graphics_shader_spirv_from_file(session_id: Int, key: String, stage: String, entry_point: String, path: String) -> Int // // @extern // fn abi_graphics_shader_byte_length(session_id: Int, shader_id: Int) -> Int // // @extern // fn abi_graphics_shader_byte_at(session_id: Int, shader_id: Int, byte_offset: Int) -> Int // // @extern // fn abi_graphics_shader_key(session_id: Int, shader_id: Int) -> String // // @extern // fn abi_graphics_shader_stage(session_id: Int, shader_id: Int) -> String // // @extern // fn abi_graphics_mesh_create(session_id: Int, label: String, vertex_buffer_id: Int, index_buffer_id: Int, vertex_count: Int, index_count: Int) -> Int // // @extern // fn abi_graphics_mesh_vertex_count(session_id: Int, mesh_id: Int) -> Int // // @extern // fn abi_graphics_mesh_index_count(session_id: Int, mesh_id: Int) -> Int // // @extern // fn abi_graphics_mesh_label(session_id: Int, mesh_id: Int) -> String // // @extern // fn abi_graphics_pipeline_create(session_id: Int, label: String, vertex_shader_id: Int, fragment_shader_id: Int, backend_id: String) -> Int // // @extern // fn abi_graphics_pipeline_label(session_id: Int, pipeline_id: Int) -> String // // @extern // fn abi_graphics_pipeline_backend(session_id: Int, pipeline_id: Int) -> String // // @extern // fn abi_graphics_draw_mesh(session_id: Int, pipeline_id: Int, mesh_id: Int, instance_count: Int) -> Int // // @extern // fn abi_graphics_draw_command_count(session_id: Int) -> Int // // @extern // fn abi_graphics_draw_command_kind(session_id: Int, command_index: Int) -> String // // @extern // fn abi_graphics_draw_command_mesh(session_id: Int, command_index: Int) -> Int // // @extern // fn abi_graphics_draw_command_pipeline(session_id: Int, command_index: Int) -> Int // // @extern // fn abi_graphics_draw_command_instances(session_id: Int, command_index: Int) -> Int // // @extern // fn abi_graphics_last_status() -> Int // // @extern // fn abi_graphics_last_error_kind() -> String // // @extern // fn abi_graphics_last_error_message() -> String // // pub fn native_graphics_reset() -> Int: // return abi_graphics_reset() // // pub fn native_graphics_session_create(app_name: String, width: Int, height: Int) -> Int: // return abi_graphics_session_create(app_name, width, height) // // pub fn native_graphics_session_destroy(session_id: Int) -> Int: // return abi_graphics_session_destroy(session_id) // // pub fn native_graphics_session_count() -> Int: // return abi_graphics_session_count() // // pub fn native_graphics_backend_supported(backend_id: String) -> Int: // return abi_graphics_backend_supported(backend_id) // // pub fn native_graphics_backend_available(backend_id: String) -> Int: // return abi_graphics_backend_available(backend_id) // // pub fn native_graphics_backend_status(backend_id: String) -> String: // return abi_graphics_backend_status(backend_id) // // pub fn native_graphics_backend_select(session_id: Int, backend_id: String) -> Int: // return abi_graphics_backend_select(session_id, backend_id) // // pub fn native_graphics_active_backend(session_id: Int) -> String: // return abi_graphics_active_backend(session_id) // // pub fn native_graphics_begin_frame(session_id: Int, delta_ms: Float) -> Int: // return abi_graphics_begin_frame(session_id, delta_ms) // // pub fn native_graphics_end_frame(session_id: Int) -> Int: // return abi_graphics_end_frame(session_id) // // pub fn native_graphics_present(session_id: Int) -> Int: // return abi_graphics_present(session_id) // // pub fn native_graphics_frame_index(session_id: Int) -> Int: // return abi_graphics_frame_index(session_id) // // pub fn native_graphics_last_presented_frame(session_id: Int) -> Int: // return abi_graphics_last_presented_frame(session_id) // // pub fn native_graphics_buffer_create(session_id: Int, kind: String, label: String, byte_length: Int, element_stride: Int) -> Int: // return abi_graphics_buffer_create(session_id, kind, label, byte_length, element_stride) // // pub fn native_graphics_buffer_create_from_hex(session_id: Int, kind: String, label: String, bytes_hex: String, element_stride: Int) -> Int: // return abi_graphics_buffer_create_from_hex(session_id, kind, label, bytes_hex, element_stride) // // pub fn native_graphics_buffer_byte_length(session_id: Int, buffer_id: Int) -> Int: // return abi_graphics_buffer_byte_length(session_id, buffer_id) // // pub fn native_graphics_buffer_byte_at(session_id: Int, buffer_id: Int, byte_offset: Int) -> Int: // return abi_graphics_buffer_byte_at(session_id, buffer_id, byte_offset) // // pub fn native_graphics_buffer_kind(session_id: Int, buffer_id: Int) -> String: // return abi_graphics_buffer_kind(session_id, buffer_id) // // pub fn native_graphics_buffer_label(session_id: Int, buffer_id: Int) -> String: // return abi_graphics_buffer_label(session_id, buffer_id) // // pub fn native_graphics_shader_spirv_from_hex(session_id: Int, key: String, stage: String, entry_point: String, bytes_hex: String) -> Int: // return abi_graphics_shader_spirv_from_hex(session_id, key, stage, entry_point, bytes_hex) // // pub fn native_graphics_shader_spirv_from_file(session_id: Int, key: String, stage: String, entry_point: String, path: String) -> Int: // return abi_graphics_shader_spirv_from_file(session_id, key, stage, entry_point, path) // // pub fn native_graphics_shader_byte_length(session_id: Int, shader_id: Int) -> Int: // return abi_graphics_shader_byte_length(session_id, shader_id) // // pub fn native_graphics_shader_byte_at(session_id: Int, shader_id: Int, byte_offset: Int) -> Int: // return abi_graphics_shader_byte_at(session_id, shader_id, byte_offset) // // pub fn native_graphics_shader_key(session_id: Int, shader_id: Int) -> String: // return abi_graphics_shader_key(session_id, shader_id) // // pub fn native_graphics_shader_stage(session_id: Int, shader_id: Int) -> String: // return abi_graphics_shader_stage(session_id, shader_id) // // pub fn native_graphics_mesh_create(session_id: Int, label: String, vertex_buffer_id: Int, index_buffer_id: Int, vertex_count: Int, index_count: Int) -> Int: // return abi_graphics_mesh_create(session_id, label, vertex_buffer_id, index_buffer_id, vertex_count, index_count) // // pub fn native_graphics_mesh_vertex_count(session_id: Int, mesh_id: Int) -> Int: // return abi_graphics_mesh_vertex_count(session_id, mesh_id) // // pub fn native_graphics_mesh_index_count(session_id: Int, mesh_id: Int) -> Int: // return abi_graphics_mesh_index_count(session_id, mesh_id) // // pub fn native_graphics_mesh_label(session_id: Int, mesh_id: Int) -> String: // return abi_graphics_mesh_label(session_id, mesh_id) // // pub fn native_graphics_pipeline_create(session_id: Int, label: String, vertex_shader_id: Int, fragment_shader_id: Int, backend_id: String) -> Int: // return abi_graphics_pipeline_create(session_id, label, vertex_shader_id, fragment_shader_id, backend_id) // // pub fn native_graphics_pipeline_label(session_id: Int, pipeline_id: Int) -> String: // return abi_graphics_pipeline_label(session_id, pipeline_id) // // pub fn native_graphics_pipeline_backend(session_id: Int, pipeline_id: Int) -> String: // return abi_graphics_pipeline_backend(session_id, pipeline_id) // // pub fn native_graphics_draw_mesh(session_id: Int, pipeline_id: Int, mesh_id: Int, instance_count: Int) -> Int: // return abi_graphics_draw_mesh(session_id, pipeline_id, mesh_id, instance_count) // // pub fn native_graphics_draw_command_count(session_id: Int) -> Int: // return abi_graphics_draw_command_count(session_id) // // pub fn native_graphics_draw_command_kind(session_id: Int, command_index: Int) -> String: // return abi_graphics_draw_command_kind(session_id, command_index) // // pub fn native_graphics_draw_command_mesh(session_id: Int, command_index: Int) -> Int: // return abi_graphics_draw_command_mesh(session_id, command_index) // // pub fn native_graphics_draw_command_pipeline(session_id: Int, command_index: Int) -> Int: // return abi_graphics_draw_command_pipeline(session_id, command_index) // // pub fn native_graphics_draw_command_instances(session_id: Int, command_index: Int) -> Int: // return abi_graphics_draw_command_instances(session_id, command_index) // // pub fn native_graphics_last_status() -> Int: // return abi_graphics_last_status() // // pub fn native_graphics_last_error_kind() -> String: // return abi_graphics_last_error_kind() // // pub fn native_graphics_last_error_message() -> String: // return abi_graphics_last_error_message() // // # root-domain aliases: generated public std names // pub fn graphics_reset() -> Int: // return native_graphics_reset() // // pub fn graphics_session_create(app_name: String, width: Int, height: Int) -> Int: // return native_graphics_session_create(app_name, width, height) // // pub fn graphics_session_destroy(session_id: Int) -> Int: // return native_graphics_session_destroy(session_id) // // pub fn graphics_session_count() -> Int: // return native_graphics_session_count() // // pub fn graphics_backend_supported(backend_id: String) -> Int: // return native_graphics_backend_supported(backend_id) // // pub fn graphics_backend_available(backend_id: String) -> Int: // return native_graphics_backend_available(backend_id) // // pub fn graphics_backend_status(backend_id: String) -> String: // return native_graphics_backend_status(backend_id) // // pub fn graphics_backend_select(session_id: Int, backend_id: String) -> Int: // return native_graphics_backend_select(session_id, backend_id) // // pub fn graphics_active_backend(session_id: Int) -> String: // return native_graphics_active_backend(session_id) // // pub fn graphics_begin_frame(session_id: Int, delta_ms: Float) -> Int: // return native_graphics_begin_frame(session_id, delta_ms) // // pub fn graphics_end_frame(session_id: Int) -> Int: // return native_graphics_end_frame(session_id) // // pub fn graphics_present(session_id: Int) -> Int: // return native_graphics_present(session_id) // // pub fn graphics_frame_index(session_id: Int) -> Int: // return native_graphics_frame_index(session_id) // // pub fn graphics_last_presented_frame(session_id: Int) -> Int: // return native_graphics_last_presented_frame(session_id) // // pub fn graphics_buffer_create(session_id: Int, kind: String, label: String, byte_length: Int, element_stride: Int) -> Int: // return native_graphics_buffer_create(session_id, kind, label, byte_length, element_stride) // // pub fn graphics_buffer_create_from_hex(session_id: Int, kind: String, label: String, bytes_hex: String, element_stride: Int) -> Int: // return native_graphics_buffer_create_from_hex(session_id, kind, label, bytes_hex, element_stride) // // pub fn graphics_buffer_byte_length(session_id: Int, buffer_id: Int) -> Int: // return native_graphics_buffer_byte_length(session_id, buffer_id) // // pub fn graphics_buffer_byte_at(session_id: Int, buffer_id: Int, byte_offset: Int) -> Int: // return native_graphics_buffer_byte_at(session_id, buffer_id, byte_offset) // // pub fn graphics_buffer_kind(session_id: Int, buffer_id: Int) -> String: // return native_graphics_buffer_kind(session_id, buffer_id) // // pub fn graphics_buffer_label(session_id: Int, buffer_id: Int) -> String: // return native_graphics_buffer_label(session_id, buffer_id) // // pub fn graphics_shader_spirv_from_hex(session_id: Int, key: String, stage: String, entry_point: String, bytes_hex: String) -> Int: // return native_graphics_shader_spirv_from_hex(session_id, key, stage, entry_point, bytes_hex) // // pub fn graphics_shader_spirv_from_file(session_id: Int, key: String, stage: String, entry_point: String, path: String) -> Int: // return native_graphics_shader_spirv_from_file(session_id, key, stage, entry_point, path) // // pub fn graphics_shader_byte_length(session_id: Int, shader_id: Int) -> Int: // return native_graphics_shader_byte_length(session_id, shader_id) // // pub fn graphics_shader_byte_at(session_id: Int, shader_id: Int, byte_offset: Int) -> Int: // return native_graphics_shader_byte_at(session_id, shader_id, byte_offset) // // pub fn graphics_shader_key(session_id: Int, shader_id: Int) -> String: // return native_graphics_shader_key(session_id, shader_id) // // pub fn graphics_shader_stage(session_id: Int, shader_id: Int) -> String: // return native_graphics_shader_stage(session_id, shader_id) // // pub fn graphics_mesh_create(session_id: Int, label: String, vertex_buffer_id: Int, index_buffer_id: Int, vertex_count: Int, index_count: Int) -> Int: // return native_graphics_mesh_create(session_id, label, vertex_buffer_id, index_buffer_id, vertex_count, index_count) // // pub fn graphics_mesh_vertex_count(session_id: Int, mesh_id: Int) -> Int: // return native_graphics_mesh_vertex_count(session_id, mesh_id) // // pub fn graphics_mesh_index_count(session_id: Int, mesh_id: Int) -> Int: // return native_graphics_mesh_index_count(session_id, mesh_id) // // pub fn graphics_mesh_label(session_id: Int, mesh_id: Int) -> String: // return native_graphics_mesh_label(session_id, mesh_id) // // pub fn graphics_pipeline_create(session_id: Int, label: String, vertex_shader_id: Int, fragment_shader_id: Int, backend_id: String) -> Int: // return native_graphics_pipeline_create(session_id, label, vertex_shader_id, fragment_shader_id, backend_id) // // pub fn graphics_pipeline_label(session_id: Int, pipeline_id: Int) -> String: // return native_graphics_pipeline_label(session_id, pipeline_id) // // pub fn graphics_pipeline_backend(session_id: Int, pipeline_id: Int) -> String: // return native_graphics_pipeline_backend(session_id, pipeline_id) // // pub fn graphics_draw_mesh(session_id: Int, pipeline_id: Int, mesh_id: Int, instance_count: Int) -> Int: // return native_graphics_draw_mesh(session_id, pipeline_id, mesh_id, instance_count) // // pub fn graphics_draw_command_count(session_id: Int) -> Int: // return native_graphics_draw_command_count(session_id) // // pub fn graphics_draw_command_kind(session_id: Int, command_index: Int) -> String: // return native_graphics_draw_command_kind(session_id, command_index) // // pub fn graphics_draw_command_mesh(session_id: Int, command_index: Int) -> Int: // return native_graphics_draw_command_mesh(session_id, command_index) // // pub fn graphics_draw_command_pipeline(session_id: Int, command_index: Int) -> Int: // return native_graphics_draw_command_pipeline(session_id, command_index) // // pub fn graphics_draw_command_instances(session_id: Int, command_index: Int) -> Int: // return native_graphics_draw_command_instances(session_id, command_index) // // pub fn graphics_last_status() -> Int: // return native_graphics_last_status() // // pub fn graphics_last_error_kind() -> String: // return native_graphics_last_error_kind() // // pub fn graphics_last_error_message() -> String: // return native_graphics_last_error_message() // # end root-domain aliases //!end-kain-file //!kain-file // path = "graphics_shared.kn" // kind = "text" // encoding = "utf8" // bytes = 12882 // sha256 = "sha256:5be0878be97a9f1b7ed8cd61f1fd009fda1fdcb56f4c67b4a10e0eff6fd63b3b" // trailing_newline = true //!kain-file-content // use std::gpu // use std::graphics // // pub const GRAPHICS_SHARED_KIND_VERTEX_BUFFER: String = "vertex_buffer" // pub const GRAPHICS_SHARED_KIND_INDEX_BUFFER: String = "index_buffer" // pub const GRAPHICS_SHARED_KIND_UNIFORM_BUFFER: String = "uniform_buffer" // pub const GRAPHICS_SHARED_KIND_STORAGE_BUFFER: String = "storage_buffer" // pub const GRAPHICS_SHARED_KIND_SAMPLED_IMAGE: String = "sampled_image" // pub const GRAPHICS_SHARED_KIND_STORAGE_IMAGE: String = "storage_image" // pub const GRAPHICS_SHARED_KIND_COLOR_ATTACHMENT: String = "color_attachment" // pub const GRAPHICS_SHARED_KIND_DEPTH_ATTACHMENT: String = "depth_stencil_attachment" // // pub struct GraphicsSharedBackend: // backend: GpuBackendState // preferred_queue_flags: Int // shared_residency_flags: Int // // pub struct GraphicsSharedBuffer: // resource: GpuBuffer // binding: GpuBindingPlan // graphics_kind: String // element_stride: Int // ready: Bool // // pub struct GraphicsSharedImage: // resource: GpuImage // binding: GpuBindingPlan // graphics_kind: String // ready: Bool // // fn graphics_shared_zero_copy_residency_flags() -> Int: // return GPU_RESIDENCY_HOST_VISIBLE | GPU_RESIDENCY_HOST_COHERENT | GPU_RESIDENCY_SHARED | GPU_RESIDENCY_ZERO_COPY // // fn graphics_shared_buffer_ready(resource: GpuBuffer, required_usage_flags: Int, binding: GpuBindingPlan) -> Bool: // if gpu_policy_valid(resource.policy) == false: // return false // if gpu_binding_plan_valid(binding) == false: // return false // return gpu_has_flags(resource.policy.usage_flags, required_usage_flags) // // fn graphics_shared_image_ready(resource: GpuImage, required_usage_flags: Int, binding: GpuBindingPlan) -> Bool: // if gpu_policy_valid(resource.policy) == false: // return false // if gpu_binding_plan_valid(binding) == false: // return false // return gpu_has_flags(resource.policy.usage_flags, required_usage_flags) // // pub fn graphics_shared_backend(backend_id: String) -> GraphicsSharedBackend: // let backend = gpu_backend_state(backend_id) // var preferred_queue_flags: Int = GPU_QUEUE_GRAPHICS | GPU_QUEUE_TRANSFER // if backend.id == "vulkan" or backend.id == "d3d12": // preferred_queue_flags = preferred_queue_flags | GPU_QUEUE_COMPUTE | GPU_QUEUE_PRESENT // if backend.id == "auto" or backend.id == "software": // preferred_queue_flags = preferred_queue_flags | GPU_QUEUE_HOST // return GraphicsSharedBackend { // backend: backend, // preferred_queue_flags: preferred_queue_flags, // shared_residency_flags: graphics_shared_zero_copy_residency_flags() // } // // pub fn graphics_shared_preferred_backend() -> GraphicsSharedBackend: // return graphics_shared_backend(gpu_backend_preferred().id) // // pub fn graphics_shared_vertex_policy(debug_name: String) -> GpuResourcePolicy: // return gpu_resource_policy( // gpu_shared_memory_policy( // GPU_ACCESS_READ, // GPU_QUEUE_GRAPHICS | GPU_QUEUE_TRANSFER | GPU_QUEUE_HOST, // GPU_LAYOUT_TIGHT, // GPU_DESCRIPTOR_RAW_BUFFER // ), // GPU_BUFFER_USAGE_VERTEX | GPU_BUFFER_USAGE_TRANSFER_SRC | GPU_BUFFER_USAGE_TRANSFER_DST, // debug_name // ) // // pub fn graphics_shared_index_policy(debug_name: String) -> GpuResourcePolicy: // return gpu_resource_policy( // gpu_shared_memory_policy( // GPU_ACCESS_READ, // GPU_QUEUE_GRAPHICS | GPU_QUEUE_TRANSFER | GPU_QUEUE_HOST, // GPU_LAYOUT_TIGHT, // GPU_DESCRIPTOR_RAW_BUFFER // ), // GPU_BUFFER_USAGE_INDEX | GPU_BUFFER_USAGE_TRANSFER_SRC | GPU_BUFFER_USAGE_TRANSFER_DST, // debug_name // ) // // pub fn graphics_shared_uniform_policy(debug_name: String) -> GpuResourcePolicy: // return gpu_resource_policy( // gpu_shared_memory_policy( // GPU_ACCESS_READ, // GPU_QUEUE_GRAPHICS | GPU_QUEUE_COMPUTE | GPU_QUEUE_TRANSFER | GPU_QUEUE_HOST, // GPU_LAYOUT_STD140, // GPU_DESCRIPTOR_UNIFORM_BUFFER // ), // GPU_BUFFER_USAGE_UNIFORM | GPU_BUFFER_USAGE_TRANSFER_DST, // debug_name // ) // // pub fn graphics_shared_storage_policy(debug_name: String) -> GpuResourcePolicy: // return gpu_resource_policy( // gpu_shared_memory_policy( // GPU_ACCESS_READ_WRITE, // GPU_QUEUE_GRAPHICS | GPU_QUEUE_COMPUTE | GPU_QUEUE_TRANSFER | GPU_QUEUE_HOST, // GPU_LAYOUT_STD430, // GPU_DESCRIPTOR_STORAGE_BUFFER // ), // GPU_BUFFER_USAGE_STORAGE | GPU_BUFFER_USAGE_TRANSFER_SRC | GPU_BUFFER_USAGE_TRANSFER_DST, // debug_name // ) // // pub fn graphics_shared_sampled_image_policy(debug_name: String) -> GpuResourcePolicy: // return gpu_resource_policy( // gpu_shared_memory_policy( // GPU_ACCESS_READ, // GPU_QUEUE_GRAPHICS | GPU_QUEUE_TRANSFER | GPU_QUEUE_HOST, // GPU_LAYOUT_RASTER_HWC, // GPU_DESCRIPTOR_SAMPLED_IMAGE // ), // GPU_IMAGE_USAGE_SAMPLED | GPU_IMAGE_USAGE_TRANSFER_SRC | GPU_IMAGE_USAGE_TRANSFER_DST, // debug_name // ) // // pub fn graphics_shared_storage_image_policy(debug_name: String) -> GpuResourcePolicy: // return gpu_resource_policy( // gpu_shared_memory_policy( // GPU_ACCESS_READ_WRITE, // GPU_QUEUE_GRAPHICS | GPU_QUEUE_COMPUTE | GPU_QUEUE_TRANSFER | GPU_QUEUE_HOST, // GPU_LAYOUT_RASTER_HWC, // GPU_DESCRIPTOR_STORAGE_IMAGE // ), // GPU_IMAGE_USAGE_STORAGE | GPU_IMAGE_USAGE_TRANSFER_SRC | GPU_IMAGE_USAGE_TRANSFER_DST, // debug_name // ) // // pub fn graphics_shared_color_attachment_policy(debug_name: String) -> GpuResourcePolicy: // return gpu_resource_policy( // gpu_shared_memory_policy( // GPU_ACCESS_READ_WRITE, // GPU_QUEUE_GRAPHICS | GPU_QUEUE_TRANSFER | GPU_QUEUE_HOST, // GPU_LAYOUT_RASTER_HWC, // GPU_DESCRIPTOR_RAW_IMAGE // ), // GPU_IMAGE_USAGE_COLOR_ATTACHMENT | GPU_IMAGE_USAGE_TRANSFER_SRC | GPU_IMAGE_USAGE_TRANSFER_DST, // debug_name // ) // // pub fn graphics_shared_depth_attachment_policy(debug_name: String) -> GpuResourcePolicy: // return gpu_resource_policy( // gpu_shared_memory_policy( // GPU_ACCESS_READ_WRITE, // GPU_QUEUE_GRAPHICS | GPU_QUEUE_TRANSFER | GPU_QUEUE_HOST, // GPU_LAYOUT_RASTER_HWC, // GPU_DESCRIPTOR_RAW_IMAGE // ), // GPU_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT | GPU_IMAGE_USAGE_TRANSFER_DST, // debug_name // ) // // pub fn graphics_shared_vertex_buffer(resource: GpuBuffer, element_stride: Int) -> GraphicsSharedBuffer: // let binding = gpu_binding_plan(-1, GPU_DESCRIPTOR_RAW_BUFFER, GPU_STAGE_VERTEX, GPU_ACCESS_READ, GPU_QUEUE_GRAPHICS | GPU_QUEUE_TRANSFER) // return GraphicsSharedBuffer { // resource: resource, // binding: binding, // graphics_kind: GRAPHICS_SHARED_KIND_VERTEX_BUFFER, // element_stride: element_stride, // ready: graphics_shared_buffer_ready(resource, GPU_BUFFER_USAGE_VERTEX, binding) // } // // pub fn graphics_shared_index_buffer(resource: GpuBuffer, element_stride: Int) -> GraphicsSharedBuffer: // let binding = gpu_binding_plan(-1, GPU_DESCRIPTOR_RAW_BUFFER, GPU_STAGE_VERTEX, GPU_ACCESS_READ, GPU_QUEUE_GRAPHICS | GPU_QUEUE_TRANSFER) // return GraphicsSharedBuffer { // resource: resource, // binding: binding, // graphics_kind: GRAPHICS_SHARED_KIND_INDEX_BUFFER, // element_stride: element_stride, // ready: graphics_shared_buffer_ready(resource, GPU_BUFFER_USAGE_INDEX, binding) // } // // pub fn graphics_shared_uniform_binding(resource: GpuBuffer, binding_slot: Int, stage_flags: Int) -> GraphicsSharedBuffer: // let binding = gpu_uniform_buffer_binding(binding_slot, stage_flags, GPU_QUEUE_GRAPHICS | GPU_QUEUE_COMPUTE | GPU_QUEUE_TRANSFER) // return GraphicsSharedBuffer { // resource: resource, // binding: binding, // graphics_kind: GRAPHICS_SHARED_KIND_UNIFORM_BUFFER, // element_stride: resource.element_size, // ready: graphics_shared_buffer_ready(resource, GPU_BUFFER_USAGE_UNIFORM, binding) // } // // pub fn graphics_shared_storage_binding(resource: GpuBuffer, binding_slot: Int, stage_flags: Int, access_flags: Int) -> GraphicsSharedBuffer: // let binding = gpu_storage_buffer_binding(binding_slot, stage_flags, access_flags, GPU_QUEUE_GRAPHICS | GPU_QUEUE_COMPUTE | GPU_QUEUE_TRANSFER) // return GraphicsSharedBuffer { // resource: resource, // binding: binding, // graphics_kind: GRAPHICS_SHARED_KIND_STORAGE_BUFFER, // element_stride: resource.element_size, // ready: graphics_shared_buffer_ready(resource, GPU_BUFFER_USAGE_STORAGE, binding) // } // // pub fn graphics_shared_sampled_image(resource: GpuImage, binding_slot: Int, stage_flags: Int) -> GraphicsSharedImage: // let binding = gpu_sampled_image_binding(binding_slot, stage_flags, GPU_QUEUE_GRAPHICS | GPU_QUEUE_TRANSFER) // return GraphicsSharedImage { // resource: resource, // binding: binding, // graphics_kind: GRAPHICS_SHARED_KIND_SAMPLED_IMAGE, // ready: graphics_shared_image_ready(resource, GPU_IMAGE_USAGE_SAMPLED, binding) // } // // pub fn graphics_shared_storage_image(resource: GpuImage, binding_slot: Int, stage_flags: Int, access_flags: Int) -> GraphicsSharedImage: // let binding = gpu_storage_image_binding(binding_slot, stage_flags, access_flags, GPU_QUEUE_GRAPHICS | GPU_QUEUE_COMPUTE | GPU_QUEUE_TRANSFER) // return GraphicsSharedImage { // resource: resource, // binding: binding, // graphics_kind: GRAPHICS_SHARED_KIND_STORAGE_IMAGE, // ready: graphics_shared_image_ready(resource, GPU_IMAGE_USAGE_STORAGE, binding) // } // // pub fn graphics_shared_color_attachment(resource: GpuImage) -> GraphicsSharedImage: // let binding = gpu_binding_plan(-1, GPU_DESCRIPTOR_RAW_IMAGE, GPU_STAGE_FRAGMENT, GPU_ACCESS_READ_WRITE, GPU_QUEUE_GRAPHICS | GPU_QUEUE_PRESENT | GPU_QUEUE_TRANSFER) // return GraphicsSharedImage { // resource: resource, // binding: binding, // graphics_kind: GRAPHICS_SHARED_KIND_COLOR_ATTACHMENT, // ready: graphics_shared_image_ready(resource, GPU_IMAGE_USAGE_COLOR_ATTACHMENT, binding) // } // // pub fn graphics_shared_depth_attachment(resource: GpuImage) -> GraphicsSharedImage: // let binding = gpu_binding_plan(-1, GPU_DESCRIPTOR_RAW_IMAGE, GPU_STAGE_FRAGMENT, GPU_ACCESS_READ_WRITE, GPU_QUEUE_GRAPHICS | GPU_QUEUE_TRANSFER) // return GraphicsSharedImage { // resource: resource, // binding: binding, // graphics_kind: GRAPHICS_SHARED_KIND_DEPTH_ATTACHMENT, // ready: graphics_shared_image_ready(resource, GPU_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT, binding) // } // // pub fn graphics_shared_backend_descriptor(state: GraphicsSharedBackend) -> Any: // let payload = json_object_new() // json_object_set(payload, "backend_id", state.backend.id) // json_object_set(payload, "supported", state.backend.supported) // json_object_set(payload, "available", state.backend.available) // json_object_set(payload, "status", state.backend.status) // json_object_set(payload, "preferred_queue_flags", state.preferred_queue_flags) // json_object_set(payload, "shared_residency_flags", state.shared_residency_flags) // return payload // // pub fn graphics_shared_buffer_descriptor(resource_view: GraphicsSharedBuffer) -> Any: // let payload = gpu_buffer_descriptor(resource_view.resource) // json_object_set(payload, "graphics_kind", resource_view.graphics_kind) // json_object_set(payload, "binding_slot", resource_view.binding.binding) // json_object_set(payload, "binding_descriptor_kind", resource_view.binding.descriptor_kind) // json_object_set(payload, "stage_flags", resource_view.binding.stage_flags) // json_object_set(payload, "binding_access_flags", resource_view.binding.access_flags) // json_object_set(payload, "binding_queue_flags", resource_view.binding.queue_flags) // json_object_set(payload, "element_stride", resource_view.element_stride) // json_object_set(payload, "ready", resource_view.ready) // return payload // // pub fn graphics_shared_image_descriptor(resource_view: GraphicsSharedImage) -> Any: // let payload = gpu_image_descriptor(resource_view.resource) // json_object_set(payload, "graphics_kind", resource_view.graphics_kind) // json_object_set(payload, "binding_slot", resource_view.binding.binding) // json_object_set(payload, "binding_descriptor_kind", resource_view.binding.descriptor_kind) // json_object_set(payload, "stage_flags", resource_view.binding.stage_flags) // json_object_set(payload, "binding_access_flags", resource_view.binding.access_flags) // json_object_set(payload, "binding_queue_flags", resource_view.binding.queue_flags) // json_object_set(payload, "ready", resource_view.ready) // return payload //!end-kain-file //!kain-file // path = "hash.kn" // kind = "text" // encoding = "utf8" // bytes = 6764 // sha256 = "sha256:2279e7b3a79eb2636a771689be6e8e25430481c75f9b3e4e5157cd57d2a9a76e" // trailing_newline = true //!kain-file-content // // Canonical root hashing stdlib for Kain. // // // // This module is intentionally target-neutral Kain source: deterministic // // 32-bit word mixing, byte-fed FNV-1a, CRC32 byte folding, and fingerprint // // combinators that are useful to capsules, caches, wire formats, benchmarks, // // and compiler/runtime proof blades without depending on host string layout. // // pub const HASH_U32_MASK: Int = 4294967295 // pub const HASH_BYTE_MASK: Int = 255 // pub const HASH_FNV1A32_OFFSET: Int = 2166136261 // pub const HASH_FNV1A32_PRIME: Int = 16777619 // pub const HASH_CRC32_POLY: Int = 3988292384 // pub const HASH_GOLDEN32: Int = 2654435769 // pub const HASH_EMPTY32: Int = 0 // pub const HASH_I63_MASK: Int = 9223372036854775807 // // pub struct Hash32: // value: Int // // pub struct Fingerprint32: // value: Int // words: Int // salt: Int // // pub fn hash_u32_mask(value: Int) -> Int: // return value & HASH_U32_MASK // // pub fn hash_byte_mask(value: Int) -> Int: // return value & HASH_BYTE_MASK // // pub fn hash_i63_mask(value: Int) -> Int: // return value & HASH_I63_MASK // // pub fn hash32(value: Int) -> Hash32: // return Hash32 { value: hash_u32_mask(value) } // // pub fn hash32_value(hash: Hash32) -> Int: // return hash_u32_mask(hash.value) // // pub fn hash32_is_zero(hash: Hash32) -> Bool: // return hash32_value(hash) == 0 // // pub fn rotl32(value: Int, bits: Int) -> Int: // let x = hash_u32_mask(value) // let amount = bits & 31 // if amount == 0: // return x // let left = hash_u32_mask(x << amount) // let right = x >> (32 - amount) // return hash_u32_mask(left | right) // // pub fn rotr32(value: Int, bits: Int) -> Int: // let x = hash_u32_mask(value) // let amount = bits & 31 // if amount == 0: // return x // let right = x >> amount // let left = hash_u32_mask(x << (32 - amount)) // return hash_u32_mask(left | right) // // pub fn hash_wang32(value: Int) -> Int: // var x = hash_u32_mask(value) // x = hash_u32_mask((x ^ 61) ^ (x >> 16)) // x = hash_u32_mask(x + hash_u32_mask(x << 3)) // x = hash_u32_mask(x ^ (x >> 4)) // x = hash_u32_mask(x * 668265263) // x = hash_u32_mask(x ^ (x >> 15)) // return x // // pub fn hash_u32(value: Int) -> Int: // return hash_wang32(value) // // pub fn hash_mix64(value: Int) -> Int: // var x = value // x = (x ^ (x >> 30)) * 1378784534790074129 // x = (x ^ (x >> 27)) * 1072315178057262071 // return x ^ (x >> 31) // // pub fn hash_u64(value: Int) -> Int: // return hash_mix64(value) // // pub fn hash_u32_with_seed(value: Int, seed: Int) -> Int: // let seeded = hash_u32_mask(value ^ hash_wang32(seed + HASH_GOLDEN32)) // return hash_wang32(seeded) // // pub fn hash_mix32(seed: Int, value: Int) -> Int: // let s = hash_u32_mask(seed) // let v = hash_u32_mask(value) // let folded = hash_u32_mask(v + HASH_GOLDEN32 + hash_u32_mask(s << 6) + (s >> 2)) // return hash_wang32(s ^ folded) // // pub fn hash_pair32(left: Int, right: Int) -> Int: // return hash_mix32(hash_u32(left), right) // // pub fn hash_triple32(a: Int, b: Int, c: Int) -> Int: // return hash_mix32(hash_pair32(a, b), c) // // pub fn hash_quad32(a: Int, b: Int, c: Int, d: Int) -> Int: // return hash_mix32(hash_triple32(a, b, c), d) // // pub fn hash_bool32(value: Bool) -> Int: // if value: // return hash_u32(1) // return hash_u32(0) // // pub fn hash_ordered_finish(seed: Int, words: Int) -> Int: // return hash_wang32(hash_mix32(seed, words)) // // pub fn hash_unordered_pair32(left: Int, right: Int) -> Int: // let a = hash_u32(left) // let b = hash_u32(right) // return hash_wang32(hash_u32_mask(a + b) ^ rotl32(a ^ b, 16)) // // pub fn hash_bucket_power_of_two(hash: Int, capacity: Int) -> Int: // if capacity <= 0: // return 0 // return hash_u32_mask(hash) & (capacity - 1) // // pub fn hash_bucket_mod(hash: Int, capacity: Int) -> Int: // if capacity <= 0: // return 0 // return hash_u32_mask(hash) % capacity // // pub fn hash_bucket_mod64(hash: Int, capacity: Int) -> Int: // if capacity <= 0: // return 0 // return hash_i63_mask(hash) % capacity // // pub fn hash_fnv1a32_init() -> Int: // return HASH_FNV1A32_OFFSET // // pub fn hash_fnv1a32_update_byte(hash: Int, byte: Int) -> Int: // let mixed = hash_u32_mask(hash) ^ hash_byte_mask(byte) // return hash_u32_mask(mixed * HASH_FNV1A32_PRIME) // // pub fn hash_fnv1a32_update_u32(hash: Int, value: Int) -> Int: // var h = hash_u32_mask(hash) // let x = hash_u32_mask(value) // h = hash_fnv1a32_update_byte(h, x & 255) // h = hash_fnv1a32_update_byte(h, (x >> 8) & 255) // h = hash_fnv1a32_update_byte(h, (x >> 16) & 255) // h = hash_fnv1a32_update_byte(h, (x >> 24) & 255) // return h // // pub fn hash_bytes4(byte0: Int, byte1: Int, byte2: Int, byte3: Int) -> Int: // var h = hash_fnv1a32_init() // h = hash_fnv1a32_update_byte(h, byte0) // h = hash_fnv1a32_update_byte(h, byte1) // h = hash_fnv1a32_update_byte(h, byte2) // h = hash_fnv1a32_update_byte(h, byte3) // return h // // pub fn hash_crc32_init() -> Int: // return HASH_U32_MASK // // pub fn hash_crc32_update_byte(crc: Int, byte: Int) -> Int: // var c = hash_u32_mask(crc ^ hash_byte_mask(byte)) // var bit = 0 // while bit < 8: // if (c & 1) == 1: // c = hash_u32_mask((c >> 1) ^ HASH_CRC32_POLY) // else: // c = hash_u32_mask(c >> 1) // bit = bit + 1 // return c // // pub fn hash_crc32_finish(crc: Int) -> Int: // return hash_u32_mask(crc ^ HASH_U32_MASK) // // pub fn hash_crc32_bytes4(byte0: Int, byte1: Int, byte2: Int, byte3: Int) -> Int: // var crc = hash_crc32_init() // crc = hash_crc32_update_byte(crc, byte0) // crc = hash_crc32_update_byte(crc, byte1) // crc = hash_crc32_update_byte(crc, byte2) // crc = hash_crc32_update_byte(crc, byte3) // return hash_crc32_finish(crc) // // pub fn fingerprint32_begin(salt: Int) -> Fingerprint32: // return Fingerprint32 { value: hash_u32(salt), words: 0, salt: hash_u32_mask(salt) } // // pub fn fingerprint32_add_word(fingerprint: Fingerprint32, word: Int) -> Fingerprint32: // let next_words = fingerprint.words + 1 // let next_value = hash_mix32(fingerprint.value, word) // return Fingerprint32 { value: next_value, words: next_words, salt: fingerprint.salt } // // pub fn fingerprint32_add_pair(fingerprint: Fingerprint32, left: Int, right: Int) -> Fingerprint32: // let after_left = fingerprint32_add_word(fingerprint, left) // return fingerprint32_add_word(after_left, right) // // pub fn fingerprint32_finish(fingerprint: Fingerprint32) -> Int: // return hash_ordered_finish(hash_mix32(fingerprint.value, fingerprint.salt), fingerprint.words) // // pub fn fingerprint32_words(fingerprint: Fingerprint32) -> Int: // return fingerprint.words // // pub fn fingerprint32_value(fingerprint: Fingerprint32) -> Int: // return hash_u32_mask(fingerprint.value) //!end-kain-file //!kain-file // path = "http.kn" // kind = "text" // encoding = "utf8" // bytes = 5648 // sha256 = "sha256:266c5b34ac5ed1b06c2a696859b06fc3f90114e22ad64da8e12a3f8f9281ce38" // trailing_newline = true //!kain-file-content // use std::io // use std::net // use std::uri // // pub fn request_create(method: String, url: String) -> Int: // return http_request_create(method, url) // // pub fn request_create_checked(method: String, url: String) -> Int: // let parsed = uri_parse(url) // if parsed.valid == false: // return 0 // return request_create(method, parsed.source) // // pub fn request_create_uri(method: String, parsed_uri: Uri) -> Int: // if parsed_uri.valid == false: // return 0 // return request_create(method, parsed_uri.source) // // pub fn request_set_header(request_id: Int, key: String, value: String) -> Int: // return http_request_set_header(request_id, key, value) // // pub fn request_set_body_text(request_id: Int, payload: String) -> Int: // return http_request_set_body_text(request_id, payload) // // pub fn request_set_body_buffered_text(request_id: Int, writer: BufferedWriter) -> Int with Unsafe: // return request_set_body_text(request_id, buffered_writer_materialize_text(writer)) // // pub fn request_set_body_hex(request_id: Int, payload_hex: String) -> Int: // return http_request_set_body_hex(request_id, payload_hex) // // pub fn request_set_timeout(request_id: Int, timeout_ms: Int) -> Int: // return http_request_set_timeout(request_id, timeout_ms) // // pub fn request_set_protocol(request_id: Int, protocol_name: String) -> Int: // return http_request_set_protocol(request_id, protocol_name) // // pub fn request_protocol(request_id: Int) -> String: // return http_request_protocol(request_id) // // pub fn client_send(request_id: Int) -> Int: // return http_client_send(request_id) // // pub fn response_status(response_id: Int) -> Int: // return http_response_status(response_id) // // pub fn response_protocol(response_id: Int) -> String: // return http_response_protocol(response_id) // // pub fn response_header(response_id: Int, key: String) -> String: // return http_response_header(response_id, key) // // pub fn response_body_text(response_id: Int) -> String: // return http_response_body_text(response_id) // // pub fn response_buffered_reader(response_id: Int, capacity: Int) -> BufferedReader with Unsafe: // return buffered_reader_new_from_text(capacity, response_body_text(response_id)) // // pub fn response_body_hex(response_id: Int) -> String: // return http_response_body_hex(response_id) // // pub fn request_destroy(request_id: Int) -> Int: // return http_request_destroy(request_id) // // pub fn response_destroy(response_id: Int) -> Int: // return http_response_destroy(response_id) // // pub fn server_create(host: String, port: Int) -> Int: // return http_server_create(host, port) // // pub fn server_create_localhost(port: Int) -> Int: // return http_server_create_localhost(port) // // pub fn server_listen(server_id: Int) -> Int: // return http_server_listen(server_id) // // pub fn server_local_port(server_id: Int) -> Int: // return http_server_local_port(server_id) // // pub fn server_pending_request_count(server_id: Int) -> Int: // return http_server_pending_request_count(server_id) // // pub fn route_actor(server_id: Int, method: String, path: String, actor_id: Int, message_kind: String) -> Int: // return http_route_actor(server_id, method, path, actor_id, message_kind) // // pub fn server_pump(server_id: Int, timeout_ms: Int) -> Int: // return http_server_pump(server_id, timeout_ms) // // pub fn server_pump_batch(server_id: Int, timeout_ms: Int, max_requests: Int) -> Int: // return http_server_pump_batch(server_id, timeout_ms, max_requests) // // pub fn server_next_request(server_id: Int) -> Int: // return http_server_next_request(server_id) // // pub fn request_method(incoming_request_id: Int) -> String: // return http_request_method(incoming_request_id) // // pub fn request_path(incoming_request_id: Int) -> String: // return http_request_path(incoming_request_id) // // pub fn request_query(incoming_request_id: Int) -> String: // return http_request_query(incoming_request_id) // // pub fn request_header(incoming_request_id: Int, key: String) -> String: // return http_request_header(incoming_request_id, key) // // pub fn request_body_text(incoming_request_id: Int) -> String: // return http_request_body_text(incoming_request_id) // // pub fn request_body_buffered_reader(incoming_request_id: Int, capacity: Int) -> BufferedReader with Unsafe: // return buffered_reader_new_from_text(capacity, request_body_text(incoming_request_id)) // // pub fn request_body_hex(incoming_request_id: Int) -> String: // return http_request_body_hex(incoming_request_id) // // pub fn respond_text(incoming_request_id: Int, status_code: Int, payload: String) -> Int: // return http_respond_text(incoming_request_id, status_code, payload) // // pub fn respond_buffered_text(incoming_request_id: Int, status_code: Int, writer: BufferedWriter) -> Int with Unsafe: // return respond_text(incoming_request_id, status_code, buffered_writer_materialize_text(writer)) // // pub fn respond_hex(incoming_request_id: Int, status_code: Int, payload_hex: String) -> Int: // return http_respond_hex(incoming_request_id, status_code, payload_hex) // // pub fn response_set_header_for_request(incoming_request_id: Int, key: String, value: String) -> Int: // return http_response_set_header_for_request(incoming_request_id, key, value) // // pub fn server_close(server_id: Int) -> Int: // return http_server_close(server_id) // // pub fn local_url(port: Int, path: String) -> String: // return http_local_url(port, path) // // pub fn local_uri(port: Int, path: String) -> Uri: // return uri_parse(local_url(port, path)) // // pub fn get_text(url: String) -> String: // return http_get_text(url) // // pub fn post_text(url: String, payload: String) -> String: // return http_post_text(url, payload) //!end-kain-file //!kain-file // path = "http2.kn" // kind = "text" // encoding = "utf8" // bytes = 1188 // sha256 = "sha256:078c589a3f19fb87bf1fb2b947dcdad3ffd34f673c71e08610efa699537f373f" // trailing_newline = true //!kain-file-content // use std::http // use std::net // // pub fn http2_client_state() -> Int: // return net_capability_state("http2.client") // // pub fn http2_client_supported() -> Bool: // return net_capability_supported("http2.client") // // pub fn http2_client_available() -> Bool: // return net_capability_available("http2.client") // // pub fn http2_request_upgrade(request_id: Int) -> Int: // return request_set_protocol(request_id, "http/2") // // pub fn http2_request_create(method: String, url: String) -> Int: // let request = request_create(method, url) // let _protocol = http2_request_upgrade(request) // return request // // pub fn http2_request_protocol(request_id: Int) -> String: // return request_protocol(request_id) // // pub fn http2_client_send(request_id: Int) -> Int: // return client_send(request_id) // // pub fn http2_response_protocol(response_id: Int) -> String: // return response_protocol(response_id) // // pub fn http2_response_negotiated(response_id: Int) -> Bool: // return response_protocol(response_id) == "http/2" // // pub fn http2_get_text(url: String) -> String: // let request = http2_request_create("GET", url) // let response = http2_client_send(request) // return response_body_text(response) //!end-kain-file //!kain-file // path = "input.kn" // kind = "text" // encoding = "utf8" // bytes = 9030 // sha256 = "sha256:198754921e40674e5a544712494456889cb5b188307ee0a8bab2bbc1348efa50" // trailing_newline = true //!kain-file-content // use std::json // // @extern // fn abi_input_reset() -> Int // // @extern // fn abi_input_session_create(name: String) -> Int // // @extern // fn abi_input_session_destroy(session_id: Int) -> Int // // @extern // fn abi_input_session_count() -> Int // // @extern // fn abi_input_bind_action(session_id: Int, source_kind: String, event_kind: String, code: String, action: String) -> Int // // @extern // fn abi_input_bind_axis(session_id: Int, source_kind: String, event_kind: String, code: String, axis: String, scale: Float) -> Int // // @extern // fn abi_input_push_event(session_id: Int, source_kind: String, source_id: String, event_kind: String, code: String, value: Float, text: String, confidence: Float) -> Int // // @extern // fn abi_input_push_agent_intent(session_id: Int, source_id: String, action: String, command_text: String, confidence: Float) -> Int // // @extern // fn abi_input_begin_frame(session_id: Int, delta_ms: Float) -> Int // // @extern // fn abi_input_frame_index(session_id: Int) -> Int // // @extern // fn abi_input_event_count(session_id: Int) -> Int // // @extern // fn abi_input_event_kind(session_id: Int, index: Int) -> String // // @extern // fn abi_input_event_source_kind(session_id: Int, index: Int) -> String // // @extern // fn abi_input_event_code(session_id: Int, index: Int) -> String // // @extern // fn abi_input_event_action(session_id: Int, index: Int) -> String // // @extern // fn abi_input_event_text(session_id: Int, index: Int) -> String // // @extern // fn abi_input_action_pressed(session_id: Int, action: String) -> Int // // @extern // fn abi_input_action_down(session_id: Int, action: String) -> Int // // @extern // fn abi_input_action_released(session_id: Int, action: String) -> Int // // @extern // fn abi_input_axis_value(session_id: Int, axis: String) -> Float // // @extern // fn abi_input_text_commit_count(session_id: Int) -> Int // // @extern // fn abi_input_text_commit(session_id: Int, index: Int) -> String // // @extern // fn abi_input_trace_text(session_id: Int) -> String // // @extern // fn abi_input_replay_trace(session_id: Int, trace_text: String) -> Int // // @extern // fn abi_input_last_status() -> Int // // @extern // fn abi_input_last_error_kind() -> String // // @extern // fn abi_input_last_error_message() -> String // // pub fn input_source_keyboard() -> String: // return "human.keyboard" // // pub fn input_source_pointer() -> String: // return "human.pointer" // // pub fn input_source_cli() -> String: // return "cli.stdin" // // pub fn input_source_ui_runtime() -> String: // return "ui.runtime" // // pub fn input_source_agent() -> String: // return "agent.intent" // // pub fn input_source_synthetic() -> String: // return "test.synthetic" // // pub fn input_source_native() -> String: // return "native.platform" // // pub struct InputEventRecord: // index: Int // source_kind: String // event_kind: String // code: String // action: String // text: String // // pub struct InputTraceRecord: // session_id: Int // frame_index: Int // event_count: Int // trace_json: String // // pub fn input_reset() -> Int: // return abi_input_reset() // // pub fn input_session_create(name: String) -> Int: // return abi_input_session_create(name) // // pub fn input_session_destroy(session_id: Int) -> Int: // return abi_input_session_destroy(session_id) // // pub fn input_session_count() -> Int: // return abi_input_session_count() // // pub fn input_bind_action(session_id: Int, source_kind: String, event_kind: String, code: String, action: String) -> Int: // return abi_input_bind_action(session_id, source_kind, event_kind, code, action) // // pub fn input_bind_axis(session_id: Int, source_kind: String, event_kind: String, code: String, axis: String, scale: Float) -> Int: // return abi_input_bind_axis(session_id, source_kind, event_kind, code, axis, scale) // // pub fn input_push_event(session_id: Int, source_kind: String, source_id: String, event_kind: String, code: String, value: Float, text: String, confidence: Float) -> Int: // return abi_input_push_event(session_id, source_kind, source_id, event_kind, code, value, text, confidence) // // pub fn input_push_key_down(session_id: Int, source_id: String, code: String) -> Int: // return input_push_event(session_id, "human.keyboard", source_id, "key_down", code, 1.0, "", 1.0) // // pub fn input_push_key_up(session_id: Int, source_id: String, code: String) -> Int: // return input_push_event(session_id, "human.keyboard", source_id, "key_up", code, 0.0, "", 1.0) // // pub fn input_push_text(session_id: Int, source_kind: String, source_id: String, code: String, text: String) -> Int: // return input_push_event(session_id, source_kind, source_id, "text", code, 1.0, text, 1.0) // // pub fn input_push_axis(session_id: Int, source_kind: String, source_id: String, code: String, value: Float) -> Int: // return input_push_event(session_id, source_kind, source_id, "axis", code, value, "", 1.0) // // pub fn input_push_agent_intent(session_id: Int, source_id: String, action: String, command_text: String, confidence: Float) -> Int: // return abi_input_push_agent_intent(session_id, source_id, action, command_text, confidence) // // pub fn input_begin_frame(session_id: Int, delta_ms: Float) -> Int: // return abi_input_begin_frame(session_id, delta_ms) // // pub fn input_frame_index(session_id: Int) -> Int: // return abi_input_frame_index(session_id) // // pub fn input_event_count(session_id: Int) -> Int: // return abi_input_event_count(session_id) // // pub fn input_event_kind(session_id: Int, index: Int) -> String: // return abi_input_event_kind(session_id, index) // // pub fn input_event_source_kind(session_id: Int, index: Int) -> String: // return abi_input_event_source_kind(session_id, index) // // pub fn input_event_code(session_id: Int, index: Int) -> String: // return abi_input_event_code(session_id, index) // // pub fn input_event_action(session_id: Int, index: Int) -> String: // return abi_input_event_action(session_id, index) // // pub fn input_event_text(session_id: Int, index: Int) -> String: // return abi_input_event_text(session_id, index) // // pub fn input_event_record(session_id: Int, index: Int) -> InputEventRecord: // return InputEventRecord { // index: index, // source_kind: input_event_source_kind(session_id, index), // event_kind: input_event_kind(session_id, index), // code: input_event_code(session_id, index), // action: input_event_action(session_id, index), // text: input_event_text(session_id, index), // } // // pub fn input_event_record_json(event: InputEventRecord) -> JsonObject: // let payload = json_object() // let _index = json_object_set_int(payload, "index", event.index) // let _source = json_object_set_string(payload, "source_kind", event.source_kind) // let _kind = json_object_set_string(payload, "event_kind", event.event_kind) // let _code = json_object_set_string(payload, "code", event.code) // let _action = json_object_set_string(payload, "action", event.action) // let _text = json_object_set_string(payload, "text", event.text) // return payload // // pub fn input_action_pressed(session_id: Int, action: String) -> Int: // return abi_input_action_pressed(session_id, action) // // pub fn input_action_down(session_id: Int, action: String) -> Int: // return abi_input_action_down(session_id, action) // // pub fn input_action_released(session_id: Int, action: String) -> Int: // return abi_input_action_released(session_id, action) // // pub fn input_axis_value(session_id: Int, axis: String) -> Float: // return abi_input_axis_value(session_id, axis) // // pub fn input_text_commit_count(session_id: Int) -> Int: // return abi_input_text_commit_count(session_id) // // pub fn input_text_commit(session_id: Int, index: Int) -> String: // return abi_input_text_commit(session_id, index) // // pub fn input_trace_json(session_id: Int) -> String: // return abi_input_trace_text(session_id) // // pub fn input_trace_record(session_id: Int) -> InputTraceRecord: // return InputTraceRecord { // session_id: session_id, // frame_index: input_frame_index(session_id), // event_count: input_event_count(session_id), // trace_json: input_trace_json(session_id), // } // // pub fn input_trace_record_json(trace: InputTraceRecord) -> JsonObject: // let payload = json_object() // let _session = json_object_set_int(payload, "session_id", trace.session_id) // let _frame = json_object_set_int(payload, "frame_index", trace.frame_index) // let _count = json_object_set_int(payload, "event_count", trace.event_count) // let _trace = json_object_set_string(payload, "trace_json", trace.trace_json) // return payload // // pub fn input_replay_trace_record(session_id: Int, trace: InputTraceRecord) -> Int: // return input_replay_trace_json(session_id, trace.trace_json) // // pub fn input_replay_trace_json(session_id: Int, trace_json: String) -> Int: // return abi_input_replay_trace(session_id, trace_json) // // pub fn input_last_status() -> Int: // return abi_input_last_status() // // pub fn input_last_error_kind() -> String: // return abi_input_last_error_kind() // // pub fn input_last_error_message() -> String: // return abi_input_last_error_message() //!end-kain-file //!kain-file // path = "intent.kn" // kind = "text" // encoding = "utf8" // bytes = 10731 // sha256 = "sha256:5b2ca052069d7a6def22cf0257be0ef2badd3256fe89a8eb4e3e55c4818b6bc3" // trailing_newline = true //!kain-file-content // @extern // fn abi_entangle_reset() -> Int // // @extern // fn abi_entangle_registered_count() -> Int // // @extern // fn abi_entangle_register(authority: String, mirror: String, policy: String, type_name: String) -> Int // // @extern // fn abi_entangle_get_authority(index: Int) -> String // // @extern // fn abi_entangle_get_mirror(index: Int) -> String // // @extern // fn abi_entangle_get_policy(index: Int) -> String // // @extern // fn abi_entangle_get_type_name(index: Int) -> String // // @extern // fn abi_patch_journal_count() -> Int // // @extern // fn abi_patch_last_path() -> String // // @extern // fn abi_resonate_mutation_count() -> Int // // @extern // fn abi_resonate_fire_count() -> Int // // @extern // fn abi_resonate_absorb_count() -> Int // // @extern // fn abi_resonate_last_target() -> String // // @extern // fn abi_resonate_last_old_i64() -> Int // // @extern // fn abi_resonate_last_new_i64() -> Int // // @extern // fn abi_resonate_last_dampen_ns() -> Int // // @extern // fn abi_entangle_propagation_count() -> Int // // @extern // fn abi_entangle_last_authority() -> String // // @extern // fn abi_entangle_last_mirror() -> String // // @extern // fn abi_converge_mismatch_count() -> Int // // @extern // fn abi_orchestrate_stage_count() -> Int // // @extern // fn abi_orchestrate_last_runtime() -> String // // @extern // fn abi_orchestrate_last_function() -> String // // @extern // fn abi_orchestrate_last_selector() -> String // // @extern // fn abi_orchestrate_last_dependencies() -> String // // @extern // fn abi_orchestrate_last_residency() -> String // // @extern // fn abi_orchestrate_last_transfer() -> String // // @extern // fn abi_orchestrate_last_guard() -> String // // @extern // fn abi_orchestrate_last_fallback() -> String // // @extern // fn abi_orchestrate_last_requires() -> String // // @extern // fn abi_orchestrate_last_policy() -> String // // @extern // fn abi_orchestrate_transfer_count() -> Int // // @extern // fn abi_orchestrate_fallback_count() -> Int // // @extern // fn abi_orchestrate_adaptive_stage_count() -> Int // // pub fn native_entangle_reset() -> Int: // return abi_entangle_reset() // // pub fn native_entangle_registered_count() -> Int: // return abi_entangle_registered_count() // // pub fn native_entangle_register(authority: String, mirror: String, policy: String, type_name: String) -> Int: // return abi_entangle_register(authority, mirror, policy, type_name) // // pub fn native_entangle_has_bindings() -> Bool: // return native_entangle_registered_count() > 0 // // pub fn native_entangle_get_authority(index: Int) -> String: // return abi_entangle_get_authority(index) // // pub fn native_entangle_get_mirror(index: Int) -> String: // return abi_entangle_get_mirror(index) // // pub fn native_entangle_get_policy(index: Int) -> String: // return abi_entangle_get_policy(index) // // pub fn native_entangle_get_type_name(index: Int) -> String: // return abi_entangle_get_type_name(index) // // pub fn native_patch_journal_count() -> Int: // return abi_patch_journal_count() // // pub fn native_patch_last_path() -> String: // return abi_patch_last_path() // // pub fn native_resonate_mutation_count() -> Int: // return abi_resonate_mutation_count() // // pub fn native_resonate_fire_count() -> Int: // return abi_resonate_fire_count() // // pub fn native_resonate_absorb_count() -> Int: // return abi_resonate_absorb_count() // // pub fn native_resonate_last_target() -> String: // return abi_resonate_last_target() // // pub fn native_resonate_last_old_i64() -> Int: // return abi_resonate_last_old_i64() // // pub fn native_resonate_last_new_i64() -> Int: // return abi_resonate_last_new_i64() // // pub fn native_resonate_last_dampen_ns() -> Int: // return abi_resonate_last_dampen_ns() // // pub fn native_entangle_propagation_count() -> Int: // return abi_entangle_propagation_count() // // pub fn native_entangle_last_authority() -> String: // return abi_entangle_last_authority() // // pub fn native_entangle_last_mirror() -> String: // return abi_entangle_last_mirror() // // pub fn native_converge_mismatch_count() -> Int: // return abi_converge_mismatch_count() // // pub fn native_orchestrate_stage_count() -> Int: // return abi_orchestrate_stage_count() // // pub fn native_orchestrate_last_runtime() -> String: // return abi_orchestrate_last_runtime() // // pub fn native_orchestrate_last_function() -> String: // return abi_orchestrate_last_function() // // pub fn native_orchestrate_last_selector() -> String: // return abi_orchestrate_last_selector() // // pub fn native_orchestrate_last_dependencies() -> String: // return abi_orchestrate_last_dependencies() // // pub fn native_orchestrate_last_residency() -> String: // return abi_orchestrate_last_residency() // // pub fn native_orchestrate_last_transfer() -> String: // return abi_orchestrate_last_transfer() // // pub fn native_orchestrate_last_guard() -> String: // return abi_orchestrate_last_guard() // // pub fn native_orchestrate_last_fallback() -> String: // return abi_orchestrate_last_fallback() // // pub fn native_orchestrate_last_requires() -> String: // return abi_orchestrate_last_requires() // // pub fn native_orchestrate_last_policy() -> String: // return abi_orchestrate_last_policy() // // pub fn native_orchestrate_transfer_count() -> Int: // return abi_orchestrate_transfer_count() // // pub fn native_orchestrate_fallback_count() -> Int: // return abi_orchestrate_fallback_count() // // pub fn native_orchestrate_adaptive_stage_count() -> Int: // return abi_orchestrate_adaptive_stage_count() // // pub fn native_law_status(valid: Bool) -> Int: // if valid: // return 0 // return -1 // // pub fn native_law_is_valid_status(status: Int) -> Bool: // return status == 0 // // pub fn native_patch_status(changed: Bool) -> Int: // if changed: // return 1 // return 0 // // pub fn native_patch_is_noop(status: Int) -> Bool: // return status == 0 // // pub fn native_patch_applied(status: Int) -> Bool: // return status > 0 // // pub fn native_converge_choose_int(spec_value: Int, fast_value: Int) -> Int: // if spec_value == fast_value: // return fast_value // return spec_value // // pub fn native_converge_choose_bool(spec_value: Bool, fast_value: Bool) -> Bool: // if spec_value == fast_value: // return fast_value // return spec_value // // pub fn native_converge_status(spec_value: Int, fast_value: Int) -> Int: // if spec_value == fast_value: // return 0 // return 1 // // pub fn native_orchestrate_stage_status(status: Int) -> Int: // return status // // pub fn native_orchestrate_merge_status(left: Int, right: Int) -> Int: // if left != 0: // return left // return right // // # root-domain aliases: generated public std names // pub fn entangle_reset() -> Int: // return native_entangle_reset() // // pub fn entangle_registered_count() -> Int: // return native_entangle_registered_count() // // pub fn entangle_register(authority: String, mirror: String, policy: String, type_name: String) -> Int: // return native_entangle_register(authority, mirror, policy, type_name) // // pub fn entangle_has_bindings() -> Bool: // return native_entangle_has_bindings() // // pub fn entangle_get_authority(index: Int) -> String: // return native_entangle_get_authority(index) // // pub fn entangle_get_mirror(index: Int) -> String: // return native_entangle_get_mirror(index) // // pub fn entangle_get_policy(index: Int) -> String: // return native_entangle_get_policy(index) // // pub fn entangle_get_type_name(index: Int) -> String: // return native_entangle_get_type_name(index) // // pub fn patch_journal_count() -> Int: // return native_patch_journal_count() // // pub fn patch_last_path() -> String: // return native_patch_last_path() // // pub fn resonate_mutation_count() -> Int: // return native_resonate_mutation_count() // // pub fn resonate_fire_count() -> Int: // return native_resonate_fire_count() // // pub fn resonate_absorb_count() -> Int: // return native_resonate_absorb_count() // // pub fn resonate_last_target() -> String: // return native_resonate_last_target() // // pub fn resonate_last_old_i64() -> Int: // return native_resonate_last_old_i64() // // pub fn resonate_last_new_i64() -> Int: // return native_resonate_last_new_i64() // // pub fn resonate_last_dampen_ns() -> Int: // return native_resonate_last_dampen_ns() // // pub fn entangle_propagation_count() -> Int: // return native_entangle_propagation_count() // // pub fn entangle_last_authority() -> String: // return native_entangle_last_authority() // // pub fn entangle_last_mirror() -> String: // return native_entangle_last_mirror() // // pub fn converge_mismatch_count() -> Int: // return native_converge_mismatch_count() // // pub fn orchestrate_stage_count() -> Int: // return native_orchestrate_stage_count() // // pub fn orchestrate_last_runtime() -> String: // return native_orchestrate_last_runtime() // // pub fn orchestrate_last_function() -> String: // return native_orchestrate_last_function() // // pub fn orchestrate_last_selector() -> String: // return native_orchestrate_last_selector() // // pub fn orchestrate_last_dependencies() -> String: // return native_orchestrate_last_dependencies() // // pub fn orchestrate_last_residency() -> String: // return native_orchestrate_last_residency() // // pub fn orchestrate_last_transfer() -> String: // return native_orchestrate_last_transfer() // // pub fn orchestrate_last_guard() -> String: // return native_orchestrate_last_guard() // // pub fn orchestrate_last_fallback() -> String: // return native_orchestrate_last_fallback() // // pub fn orchestrate_last_requires() -> String: // return native_orchestrate_last_requires() // // pub fn orchestrate_last_policy() -> String: // return native_orchestrate_last_policy() // // pub fn orchestrate_transfer_count() -> Int: // return native_orchestrate_transfer_count() // // pub fn orchestrate_fallback_count() -> Int: // return native_orchestrate_fallback_count() // // pub fn orchestrate_adaptive_stage_count() -> Int: // return native_orchestrate_adaptive_stage_count() // // pub fn law_status(valid: Bool) -> Int: // return native_law_status(valid) // // pub fn law_is_valid_status(status: Int) -> Bool: // return native_law_is_valid_status(status) // // pub fn patch_status(changed: Bool) -> Int: // return native_patch_status(changed) // // pub fn patch_is_noop(status: Int) -> Bool: // return native_patch_is_noop(status) // // pub fn patch_applied(status: Int) -> Bool: // return native_patch_applied(status) // // pub fn converge_choose_int(spec_value: Int, fast_value: Int) -> Int: // return native_converge_choose_int(spec_value, fast_value) // // pub fn converge_choose_bool(spec_value: Bool, fast_value: Bool) -> Bool: // return native_converge_choose_bool(spec_value, fast_value) // // pub fn converge_status(spec_value: Int, fast_value: Int) -> Int: // return native_converge_status(spec_value, fast_value) // // pub fn orchestrate_stage_status(status: Int) -> Int: // return native_orchestrate_stage_status(status) // // pub fn orchestrate_merge_status(left: Int, right: Int) -> Int: // return native_orchestrate_merge_status(left, right) // # end root-domain aliases //!end-kain-file //!kain-file // path = "interop.kn" // kind = "text" // encoding = "utf8" // bytes = 5385 // sha256 = "sha256:d957672ed755450bfd25a0875718742451a00c6ea80d083f6cc1cd72202f3362" // trailing_newline = true //!kain-file-content // // Root shared-contract interop surface for Kain. // // // // These wrappers keep authored code talking in `interop_*` vocabulary while the // // runtime continues to own the lower `kain_shared_*` builtins. // // use std::json // // pub struct KainSharedBufferInfo: // contract: String // contract_version: Int // element_type: String // element_size: Int // shape: Any // strides: Any // format: Any // mime_type: Any // source_runtime: String // source_backend: Any // ownership: String // adoption_path: Any // fallback_reason: Any // labels: Any // byte_length: Int // element_count: Int // zero_copy: Bool // device: String // device_kind: String // device_ordinal: Int // device_pointer: Int // device_type_code: Int // host_accessible: Bool // writable: Bool // contiguous: Bool // dlpack_capable: Bool // cuda_array_interface_version: Int // interop_lane: String // // pub struct KainSharedImageInfo: // contract: String // contract_version: Int // representation: String // width: Int // height: Int // channels: Int // layout: String // pixel_format: String // mime_type: String // row_stride: Int // color_space: String // alpha_mode: String // source_runtime: String // source_backend: Any // ownership: String // labels: Any // byte_length: Int // zero_copy: Bool // // pub fn interop_shared_buffer_info(target: Any) -> KainSharedBufferInfo: // let payload = kain_shared_buffer_info(target) // return KainSharedBufferInfo { // contract: json_get_string(payload, "contract"), // contract_version: json_get_int(payload, "contract_version"), // element_type: json_get_string(payload, "element_type"), // element_size: json_get_int(payload, "element_size"), // shape: json_get(payload, "shape"), // strides: json_get(payload, "strides"), // format: json_get(payload, "format"), // mime_type: json_get(payload, "mime_type"), // source_runtime: json_get_string(payload, "source_runtime"), // source_backend: json_get(payload, "source_backend"), // ownership: json_get_string(payload, "ownership"), // adoption_path: json_get(payload, "adoption_path"), // fallback_reason: json_get(payload, "fallback_reason"), // labels: json_get(payload, "labels"), // byte_length: json_get_int(payload, "byte_length"), // element_count: json_get_int(payload, "element_count"), // zero_copy: json_get_bool(payload, "zero_copy"), // device: json_string_or(payload, "device", ""), // device_kind: json_string_or(payload, "device_kind", ""), // device_ordinal: json_int_or(payload, "device_ordinal", 0), // device_pointer: json_int_or(payload, "device_pointer", 0), // device_type_code: json_int_or(payload, "device_type_code", 0), // host_accessible: json_bool_or(payload, "host_accessible", true), // writable: json_bool_or(payload, "writable", true), // contiguous: json_bool_or(payload, "contiguous", true), // dlpack_capable: json_bool_or(payload, "dlpack_capable", false), // cuda_array_interface_version: json_int_or(payload, "cuda_array_interface_version", 0), // interop_lane: json_string_or(payload, "interop_lane", "") // } // // pub fn interop_shared_buffer_bytes(target: Any) -> Array: // return kain_shared_buffer_bytes(target) // // pub fn interop_shared_buffer_from_bytes(bytes: Any, element_type: String, shape: Any, format: String, mime_type: String) -> Any: // return kain_shared_buffer_from_bytes(bytes, element_type, shape, format, mime_type) // // pub fn interop_shared_buffer_replace_bytes(target: Any, bytes: Any): // kain_shared_buffer_replace_bytes(target, bytes) // // pub fn interop_shared_image_info(target: Any) -> KainSharedImageInfo: // let payload = kain_shared_image_info(target) // return KainSharedImageInfo { // contract: json_get_string(payload, "contract"), // contract_version: json_get_int(payload, "contract_version"), // representation: json_get_string(payload, "representation"), // width: json_get_int(payload, "width"), // height: json_get_int(payload, "height"), // channels: json_get_int(payload, "channels"), // layout: json_get_string(payload, "layout"), // pixel_format: json_get_string(payload, "pixel_format"), // mime_type: json_get_string(payload, "mime_type"), // row_stride: json_get_int(payload, "row_stride"), // color_space: json_get_string(payload, "color_space"), // alpha_mode: json_get_string(payload, "alpha_mode"), // source_runtime: json_get_string(payload, "source_runtime"), // source_backend: json_get(payload, "source_backend"), // ownership: json_get_string(payload, "ownership"), // labels: json_get(payload, "labels"), // byte_length: json_get_int(payload, "byte_length"), // zero_copy: json_get_bool(payload, "zero_copy") // } // // pub fn interop_shared_image_bytes(target: Any) -> Array: // return kain_shared_image_bytes(target) // // pub fn interop_shared_image_from_bytes(bytes: Any, width: Int, height: Int, channels: Int, layout: String, pixel_format: String, mime_type: String) -> Any: // return kain_shared_image_from_bytes(bytes, width, height, channels, layout, pixel_format, mime_type) // // pub fn interop_shared_image_replace_bytes(target: Any, bytes: Any): // kain_shared_image_replace_bytes(target, bytes) //!end-kain-file //!kain-file // path = "io.kn" // kind = "text" // encoding = "utf8" // bytes = 11550 // sha256 = "sha256:f2aeb1e1f3a78c4824e93715fecc50bf2bd0dee3e8cf4b0d089389d56570eee2" // trailing_newline = true //!kain-file-content // use std::memory // // # --- RingBuffer (Circular Byte-Word Stream Buffer) --- // // pub struct RingBuffer: // buffer: ptr // capacity: Int // write_pos: Int // read_pos: Int // // pub fn ring_buffer_new(capacity: Int) -> RingBuffer: // let safe_capacity = int_max(capacity, 8) // let buffer = alloc_zeroed(safe_capacity, "Int") // return RingBuffer { // buffer: buffer, // capacity: safe_capacity, // write_pos: 0, // read_pos: 0 // } // // pub fn ring_buffer_destroy(rb: RingBuffer) -> Int: // decay rb.buffer // return 0 // // pub fn ring_buffer_available_read(rb: RingBuffer) -> Int: // let w = rb.write_pos // let r = rb.read_pos // if w >= r: // return w - r // return rb.capacity - r + w // // pub fn ring_buffer_available_write(rb: RingBuffer) -> Int: // let w = rb.write_pos // let r = rb.read_pos // if w >= r: // return rb.capacity - w + r - 1 // return r - w - 1 // // # Writes up to `count` elements from `src` pointer to the circular buffer. // # Returns the actual number of elements written. // pub fn ring_buffer_write(rb: ptr, src: ptr, count: Int) -> Int with Unsafe: // let cap = mem_load(ptr_offset(rb, 1, "Int"), "Int") // var w = mem_load(ptr_offset(rb, 2, "Int"), "Int") // let r = mem_load(ptr_offset(rb, 3, "Int"), "Int") // let buf = int_to_ptr(mem_load(rb, "Int"), "Int") // // var free_space = 0 // if w >= r: // free_space = cap - w + r - 1 // else: // free_space = r - w - 1 // // var to_write = count // if to_write > free_space: // to_write = free_space // // var i = 0 // while i < to_write: // let val = mem_load(ptr_offset(src, i, "Int"), "Int") // mem_store(ptr_offset(buf, w, "Int"), val, "Int") // w = (w + 1) % cap // i = i + 1 // // mem_store(ptr_offset(rb, 2, "Int"), w, "Int") // return to_write // // # Reads up to `count` elements from the circular buffer into `dest` pointer. // # Returns the actual number of elements read. // pub fn ring_buffer_read(rb: ptr, dest: ptr, count: Int) -> Int with Unsafe: // let cap = mem_load(ptr_offset(rb, 1, "Int"), "Int") // let w = mem_load(ptr_offset(rb, 2, "Int"), "Int") // var r = mem_load(ptr_offset(rb, 3, "Int"), "Int") // let buf = int_to_ptr(mem_load(rb, "Int"), "Int") // // var available = 0 // if w >= r: // available = w - r // else: // available = cap - r + w // // var to_read = count // if to_read > available: // to_read = available // // var i = 0 // while i < to_read: // let val = mem_load(ptr_offset(buf, r, "Int"), "Int") // mem_store(ptr_offset(dest, i, "Int"), val, "Int") // r = (r + 1) % cap // i = i + 1 // // mem_store(ptr_offset(rb, 3, "Int"), r, "Int") // return to_read // // // # --- StringBuilder (High-Performance Growable String Accumulator) --- // // pub struct StringBuilder: // buffer: ptr // capacity: Int // len: Int // // pub fn string_builder_new(initial_capacity: Int) -> StringBuilder: // let safe_capacity = int_max(initial_capacity, 8) // let buffer = alloc_zeroed(safe_capacity, "Int") // return StringBuilder { // buffer: buffer, // capacity: safe_capacity, // len: 0 // } // // pub fn string_builder_destroy(sb: StringBuilder) -> Int: // decay sb.buffer // return 0 // // # Appends a single character/codepoint to the builder. Reallocates memory when full. // pub fn string_builder_append_char(sb: ptr, c: Int) -> Int with Unsafe: // let cap = mem_load(ptr_offset(sb, 1, "Int"), "Int") // var len = mem_load(ptr_offset(sb, 2, "Int"), "Int") // var buf = int_to_ptr(mem_load(sb, "Int"), "Int") // // if len >= cap: // let new_cap = cap * 2 // let new_buf = alloc_zeroed(new_cap, "Int") // var i = 0 // while i < len: // let val = mem_load(ptr_offset(buf, i, "Int"), "Int") // mem_store(ptr_offset(new_buf, i, "Int"), val, "Int") // i = i + 1 // // decay buf // mem_store(sb, ptr_to_int(new_buf), "Int") // mem_store(ptr_offset(sb, 1, "Int"), new_cap, "Int") // buf = new_buf // cap = new_cap // // mem_store(ptr_offset(buf, len, "Int"), c, "Int") // len = len + 1 // mem_store(ptr_offset(sb, 2, "Int"), len, "Int") // return len // // # Appends a full String of characters to the builder. // pub fn string_builder_append_string(sb: ptr, str: String) -> Int with Unsafe: // let str_len = len(str) // var i = 0 // while i < str_len: // let c = ord(char_at(str, i)) // let _ignored = string_builder_append_char(sb, c) // i = i + 1 // return str_len // // # Materializes the accumulated characters into a single allocated String. // pub fn string_builder_to_string(sb: StringBuilder) -> String with Unsafe: // var result = "" // var i = 0 // while i < sb.len: // let c = mem_load(ptr_offset(sb.buffer, i, "Int"), "Int") // result = result + chr(c) // i = i + 1 // return result // // // # --- BufferedReader & BufferedWriter (Linear Composable Stream Primitives) --- // // pub struct BufferedReader: // buffer: ptr // capacity: Int // pos: Int // len: Int // // pub fn buffered_reader_new(capacity: Int) -> BufferedReader: // let safe_capacity = int_max(capacity, 8) // let buffer = alloc_zeroed(safe_capacity, "Int") // return BufferedReader { // buffer: buffer, // capacity: safe_capacity, // pos: 0, // len: 0 // } // // pub fn buffered_reader_destroy(br: BufferedReader) -> Int: // decay br.buffer // return 0 // // # Fills the buffer using a raw input source pointer, simulating direct OS block-read. // pub fn buffered_reader_fill(br: ptr, src: ptr, src_len: Int) -> Int with Unsafe: // let cap = mem_load(ptr_offset(br, 1, "Int"), "Int") // let buf = int_to_ptr(mem_load(br, "Int"), "Int") // // # Only fill if the buffer is empty // let pos = mem_load(ptr_offset(br, 2, "Int"), "Int") // let len = mem_load(ptr_offset(br, 3, "Int"), "Int") // if pos < len: // return 0 // // var to_copy = src_len // if to_copy > cap: // to_copy = cap // // var i = 0 // while i < to_copy: // let val = mem_load(ptr_offset(src, i, "Int"), "Int") // mem_store(ptr_offset(buf, i, "Int"), val, "Int") // i = i + 1 // // mem_store(ptr_offset(br, 2, "Int"), 0, "Int") # pos = 0 // mem_store(ptr_offset(br, 3, "Int"), to_copy, "Int") # len = to_copy // return to_copy // // # Reads from the buffer into a destination pointer. // pub fn buffered_reader_read(br: ptr, dest: ptr, count: Int) -> Int with Unsafe: // let buf = int_to_ptr(mem_load(br, "Int"), "Int") // var pos = mem_load(ptr_offset(br, 2, "Int"), "Int") // let len = mem_load(ptr_offset(br, 3, "Int"), "Int") // // let available = len - pos // if available <= 0: // return 0 // // var to_read = count // if to_read > available: // to_read = available // // var i = 0 // while i < to_read: // let val = mem_load(ptr_offset(buf, pos + i, "Int"), "Int") // mem_store(ptr_offset(dest, i, "Int"), val, "Int") // i = i + 1 // // mem_store(ptr_offset(br, 2, "Int"), pos + to_read, "Int") // return to_read // // pub fn buffered_reader_load_text(br: ptr, text: String) -> Int with Unsafe: // let cap = mem_load(ptr_offset(br, 1, "Int"), "Int") // let buf = int_to_ptr(mem_load(br, "Int"), "Int") // // var to_copy = len(text) // if to_copy > cap: // to_copy = cap // // var index = 0 // while index < to_copy: // mem_store(ptr_offset(buf, index, "Int"), ord(char_at(text, index)), "Int") // index = index + 1 // // mem_store(ptr_offset(br, 2, "Int"), 0, "Int") // mem_store(ptr_offset(br, 3, "Int"), to_copy, "Int") // return to_copy // // pub fn buffered_reader_new_from_text(capacity: Int, text: String) -> BufferedReader with Unsafe: // var br = buffered_reader_new(capacity) // let br_ptr: ptr = addr_of(br, "BufferedReader") // let _loaded = buffered_reader_load_text(br_ptr, text) // return br // // pub fn buffered_reader_materialize_text(br: BufferedReader) -> String with Unsafe: // var result = "" // var index = br.pos // while index < br.len: // let code = mem_load(ptr_offset(br.buffer, index, "Int"), "Int") // result = result + chr(code) // index = index + 1 // return result // // // pub struct BufferedWriter: // buffer: ptr // capacity: Int // pos: Int // // pub fn buffered_writer_new(capacity: Int) -> BufferedWriter: // let safe_capacity = int_max(capacity, 8) // let buffer = alloc_zeroed(safe_capacity, "Int") // return BufferedWriter { // buffer: buffer, // capacity: safe_capacity, // pos: 0 // } // // pub fn buffered_writer_destroy(bw: BufferedWriter) -> Int: // decay bw.buffer // return 0 // // # Writes to the buffered writer. Flushes automatically to a mock target pointer when full. // pub fn buffered_writer_write(bw: ptr, src: ptr, count: Int, flush_target: ptr) -> Int with Unsafe: // let cap = mem_load(ptr_offset(bw, 1, "Int"), "Int") // var pos = mem_load(ptr_offset(bw, 2, "Int"), "Int") // let buf = int_to_ptr(mem_load(bw, "Int"), "Int") // // var i = 0 // while i < count: // if pos >= cap: // # Buffer is full, flush to the target // var f = 0 // while f < cap: // let val = mem_load(ptr_offset(buf, f, "Int"), "Int") // mem_store(ptr_offset(flush_target, f, "Int"), val, "Int") // f = f + 1 // pos = 0 // // let val = mem_load(ptr_offset(src, i, "Int"), "Int") // mem_store(ptr_offset(buf, pos, "Int"), val, "Int") // pos = pos + 1 // i = i + 1 // // mem_store(ptr_offset(bw, 2, "Int"), pos, "Int") // return count // // # Forces a flush of all remaining buffered bytes to a destination target. // pub fn buffered_writer_flush(bw: ptr, dest: ptr) -> Int with Unsafe: // var pos = mem_load(ptr_offset(bw, 2, "Int"), "Int") // let buf = int_to_ptr(mem_load(bw, "Int"), "Int") // // if pos <= 0: // return 0 // // var i = 0 // while i < pos: // let val = mem_load(ptr_offset(buf, i, "Int"), "Int") // mem_store(ptr_offset(dest, i, "Int"), val, "Int") // i = i + 1 // // mem_store(ptr_offset(bw, 2, "Int"), 0, "Int") // return pos // // pub fn buffered_writer_push_char(bw: ptr, code: Int, flush_target: ptr) -> Int with Unsafe: // let cap = mem_load(ptr_offset(bw, 1, "Int"), "Int") // var pos = mem_load(ptr_offset(bw, 2, "Int"), "Int") // let buf = int_to_ptr(mem_load(bw, "Int"), "Int") // // if pos >= cap: // let _flushed = buffered_writer_flush(bw, flush_target) // pos = mem_load(ptr_offset(bw, 2, "Int"), "Int") // // mem_store(ptr_offset(buf, pos, "Int"), code, "Int") // pos = pos + 1 // mem_store(ptr_offset(bw, 2, "Int"), pos, "Int") // return pos // // pub fn buffered_writer_write_text(bw: ptr, text: String, flush_target: ptr) -> Int with Unsafe: // var index = 0 // while index < len(text): // let _pushed = buffered_writer_push_char(bw, ord(char_at(text, index)), flush_target) // index = index + 1 // return index // // pub fn buffered_writer_materialize_text(bw: BufferedWriter) -> String with Unsafe: // var result = "" // var index = 0 // while index < bw.pos: // let code = mem_load(ptr_offset(bw.buffer, index, "Int"), "Int") // result = result + chr(code) // index = index + 1 // return result //!end-kain-file //!kain-file // path = "js.kn" // kind = "text" // encoding = "utf8" // bytes = 10738 // sha256 = "sha256:994ad7204ac40b38b8c377d2b5a7081d55bff97c4b6b489953af0d2024a12196" // trailing_newline = true //!kain-file-content // // Root JavaScript surface for Kain. // // // // This module folds the old `stdlib/javascript/*` helpers into one root // // `std::js` lane. Raw host-backed JS builtins stay global, while this module // // gives authored Kain one stable import for bridge, Node, web, and site flows. // // pub fn js_bridge_exec(code: String): // js_exec(code) // // pub fn js_bridge_eval(code: String) -> Any: // return js_eval(code) // // pub fn js_bridge_eval_raw(code: String) -> Any: // return js_eval_raw(code) // // pub fn js_bridge_import(specifier: String) -> Any: // return js_import(specifier) // // pub fn js_bridge_require(specifier: String) -> Any: // return js_require(specifier) // // pub fn js_bridge_require_raw(specifier: String) -> Any: // return js_require_raw(specifier) // // pub fn node_import(specifier: String) -> Any: // return js_import(specifier) // // pub fn node_require(specifier: String) -> Any: // return js_require(specifier) // // pub fn js_bridge_call(target: Any, args: Any) -> Any: // return js_call(target, args) // // pub fn js_bridge_call_raw(target: Any, args: Any) -> Any: // return js_call_raw(target, args) // // pub fn js_bridge_call_method(target: Any, name: String, args: Any) -> Any: // return js_call_method(target, name, args) // // pub fn js_bridge_call_method_raw(target: Any, name: String, args: Any) -> Any: // return js_call_method_raw(target, name, args) // // pub fn js_bridge_getattr(target: Any, name: String) -> Any: // return js_getattr(target, name) // // pub fn js_bridge_getattr_raw(target: Any, name: String) -> Any: // return js_getattr_raw(target, name) // // pub fn js_bridge_setattr(target: Any, name: String, value: Any): // js_setattr(target, name, value) // // pub fn js_bridge_hasattr(target: Any, name: String) -> Bool: // return js_hasattr(target, name) // // pub fn js_bridge_buffer_info(target: Any) -> Any: // return js_buffer_info(target) // // pub fn js_bridge_buffer_bytes(target: Any) -> Any: // return js_buffer_bytes(target) // // pub fn js_bridge_document_info(target: Any) -> Any: // return js_document_info(target) // // pub fn js_bridge_document_text(target: Any) -> String: // return js_document_text(target) // // pub fn js_bridge_image_info(target: Any) -> Any: // return js_image_info(target) // // pub fn js_bridge_image_text(target: Any) -> String: // return js_image_text(target) // // pub fn js_bridge_image_bytes(target: Any) -> Any: // return js_image_bytes(target) // // pub fn js_bridge_image_buffer(target: Any) -> Any: // return js_image_buffer(target) // // pub fn js_web_fs() -> Any: // return js_bridge_import("node:fs") // // pub fn js_web_path() -> Any: // return js_bridge_import("node:path") // // pub fn js_web_json() -> Any: // return js_bridge_eval_raw("JSON") // // pub fn js_web_write_text(path: String, text: String): // js_bridge_call_method(js_web_fs(), "writeFileSync", [path, text]) // // pub fn js_web_read_text(path: String) -> String: // return js_bridge_call_method(js_web_fs(), "readFileSync", [path, "utf8"]) // // pub fn js_web_path_basename(path: String) -> String: // return js_bridge_call_method(js_web_path(), "basename", [path]) // // pub fn js_web_path_join(parts: Any) -> String: // return js_bridge_call_method(js_web_path(), "join", parts) // // pub fn js_web_json_stringify(value: Any) -> String: // return js_bridge_call_method(js_web_json(), "stringify", [value]) // // pub fn js_web_json_parse(text: String) -> Any: // return js_bridge_call_method(js_web_json(), "parse", [text]) // // pub fn js_web_buffer_info(target: Any) -> Any: // return js_bridge_buffer_info(target) // // pub fn js_web_buffer_bytes(target: Any) -> Any: // return js_bridge_buffer_bytes(target) // // pub fn js_web_document_info(target: Any) -> Any: // return js_bridge_document_info(target) // // pub fn js_web_document_text(target: Any) -> String: // return js_bridge_document_text(target) // // pub fn js_web_document_write(path: String, target: Any): // js_web_write_text(path, js_web_document_text(target)) // // pub fn js_web_image_info(target: Any) -> Any: // return js_bridge_image_info(target) // // pub fn js_web_canvas_info(target: Any) -> Any: // return js_web_image_info(target) // // pub fn js_web_image_text(target: Any) -> String: // return js_bridge_image_text(target) // // pub fn js_web_image_bytes(target: Any) -> Any: // return js_bridge_image_bytes(target) // // pub fn js_web_canvas_bytes(target: Any) -> Any: // return js_bridge_image_bytes(target) // // pub fn js_web_image_buffer(target: Any) -> Any: // return js_bridge_image_buffer(target) // // pub fn js_web_image_write(path: String, target: Any): // let info = js_web_image_info(target) // if info.mime_type == "image/svg+xml" or info.mime_type == "text/plain": // js_web_write_text(path, js_web_image_text(target)) // return // js_bridge_call_method(js_web_fs(), "writeFileSync", [path, js_web_image_buffer(target)]) // // pub fn js_web_canvas_write(path: String, target: Any): // js_web_image_write(path, target) // // pub fn js_web_shared_buffer(target: Any) -> Any: // return kain_shared_buffer_from_js(target) // // pub fn js_web_shared_image(target: Any) -> Any: // return kain_shared_image_from_js(target) // // pub fn js_web_html_document(title: String, body: String, background: String, accent: String) -> String: // let html = "\n" // let html = html + "\n" // let html = html + "\n" // let html = html + " \n" // let html = html + " \n" // let html = html + " " + title + "\n" // let html = html + " \n" // let html = html + "\n" // let html = html + "\n" // let html = html + "
\n" // let html = html + "

" + title + "

\n" // let html = html + body + "\n" // let html = html + "
\n" // let html = html + "\n" // let html = html + "\n" // return html // // pub fn js_site_runtime() -> Any: // return js_bridge_import("./helpers/web_runtime.mjs") // // pub fn js_site_load_app(path: String) -> Any: // return js_bridge_call_method(js_site_runtime(), "loadAppConfig", [path]) // // pub fn js_site_build_experience(path: String, experience_id: String) -> Any: // return js_bridge_call_method(js_site_runtime(), "buildExperience", [path, experience_id]) // // pub fn js_site_bundle_client(path: String) -> Any: // return js_bridge_call_method(js_site_runtime(), "bundleClient", [path]) // // pub fn js_site_default_experience(path: String) -> String: // return js_bridge_call_method(js_site_runtime(), "defaultExperience", [path]) // // pub fn js_site_bundle_and_build(path: String) -> Any: // return js_bridge_call_method(js_site_runtime(), "bundleAndBuild", [path]) // // pub fn js_site_build(path: String) -> Any: // return js_bridge_call_method(js_site_runtime(), "buildSite", [path]) // // pub fn js_site_serve(path: String, experience_id: String) -> Any: // return js_bridge_call_method(js_site_runtime(), "serveSite", [path, experience_id]) // // pub fn js_site_serve_default(path: String) -> Any: // return js_bridge_call_method(js_site_runtime(), "serveDefault", [path]) // // pub fn js_site_catalog(path: String) -> Any: // return js_bridge_call_method(js_site_runtime(), "buildCatalog", [path]) // // pub fn js_site_build_matrix(path: String) -> Any: // return js_bridge_call_method(js_site_runtime(), "buildMatrix", [path]) // // pub fn js_site_write_matrix(path: String) -> Any: // return js_bridge_call_method(js_site_runtime(), "writeMatrix", [path]) // // pub fn js_site_actor_plan(path: String, experience_id: String) -> Any: // return js_bridge_call_method(js_site_runtime(), "buildActorServerPlan", [path, experience_id]) // // pub fn js_site_system_contract(path: String, experience_id: String) -> Any: // return js_bridge_call_method(js_site_runtime(), "buildSiteSystemContract", [path, experience_id]) // // pub fn js_site_ui_schema(path: String, experience_id: String) -> Any: // return js_bridge_call_method(js_site_runtime(), "buildExperienceUiSchema", [path, experience_id]) // // pub fn js_site_actor_report(path: String, experience_id: String) -> String: // return js_bridge_call_method(js_site_runtime(), "actorServerReport", [path, experience_id]) // // pub fn js_site_build_report(app_manifest_path: String, template_name: String, archetypes: String, outputs: String) -> String: // let summary = js_site_write_matrix(app_manifest_path) // let catalog = js_site_catalog(app_manifest_path) // let app = js_site_load_app(app_manifest_path) // let client_features = app.site_runtime.client_features // // let report = "Kain web template build\n" // let report = report + "template: " + template_name + "\n" // let report = report + "default_experience: " + summary.default_experience + "\n" // let report = report + "experience_count: " + str(summary.experience_count) + "\n" // let report = report + "artifact_count: " + str(summary.artifact_count) + "\n" // let report = report + "output_root: " + summary.output_root + "\n" // let report = report + "server_port: " + str(summary.server_port) + "\n" // let report = report + "modes: " + str(summary.modes) + "\n" // let report = report + "catalog_default: " + catalog.default_experience + "\n" // let report = report + "client_features: " + str(client_features) + "\n" // let report = report + "outputs: " + outputs + "\n" // let report = report + "archetypes: " + archetypes // return report // // pub fn js_actor_runtime() -> Any: // return js_site_runtime() // // pub fn js_actor_server_plan(path: String, experience_id: String) -> Any: // return js_bridge_call_method(js_actor_runtime(), "buildActorServerPlan", [path, experience_id]) // // pub fn js_actor_server_report(path: String, experience_id: String) -> String: // return js_bridge_call_method(js_actor_runtime(), "actorServerReport", [path, experience_id]) //!end-kain-file //!kain-file // path = "json.kn" // kind = "text" // encoding = "utf8" // bytes = 39735 // sha256 = "sha256:86b5a376f3ab614ee140016f5f856abcd6816f7115db3014ffab98fc6adb5978" // trailing_newline = true //!kain-file-content // use std::ascii // use std::fmt // use std::io // use std::text // // pub type JsonValue = Any // pub type JsonObject = Any // pub type JsonArray = Any // // pub const JSON_TOKEN_LBRACE: String = "lbrace" // pub const JSON_TOKEN_RBRACE: String = "rbrace" // pub const JSON_TOKEN_LBRACKET: String = "lbracket" // pub const JSON_TOKEN_RBRACKET: String = "rbracket" // pub const JSON_TOKEN_COLON: String = "colon" // pub const JSON_TOKEN_COMMA: String = "comma" // pub const JSON_TOKEN_STRING: String = "string" // pub const JSON_TOKEN_NUMBER: String = "number" // pub const JSON_TOKEN_TRUE: String = "true" // pub const JSON_TOKEN_FALSE: String = "false" // pub const JSON_TOKEN_NULL: String = "null" // pub const JSON_TOKEN_WHITESPACE: String = "whitespace" // pub const JSON_TOKEN_UNKNOWN: String = "unknown" // // pub const JSON_KIND_NULL: String = "null" // pub const JSON_KIND_BOOL: String = "bool" // pub const JSON_KIND_INT: String = "int" // pub const JSON_KIND_FLOAT: String = "float" // pub const JSON_KIND_STRING: String = "string" // pub const JSON_KIND_OBJECT: String = "object" // pub const JSON_KIND_ARRAY: String = "array" // pub const JSON_KIND_UNKNOWN: String = "unknown" // // pub const JSON_KIND_CODE_NULL: Int = 0 // pub const JSON_KIND_CODE_BOOL: Int = 1 // pub const JSON_KIND_CODE_INT: Int = 2 // pub const JSON_KIND_CODE_FLOAT: Int = 3 // pub const JSON_KIND_CODE_STRING: Int = 4 // pub const JSON_KIND_CODE_OBJECT: Int = 5 // pub const JSON_KIND_CODE_ARRAY: Int = 6 // pub const JSON_KIND_CODE_UNKNOWN: Int = 7 // // pub const JSON_STATUS_OK: Int = 0 // pub const JSON_STATUS_MISSING_KEY: Int = 1 // pub const JSON_STATUS_WRONG_KIND: Int = 2 // pub const JSON_STATUS_INDEX_OUT_OF_RANGE: Int = 3 // pub const JSON_STATUS_SCAN_UNKNOWN_TOKEN: Int = 4 // pub const JSON_STATUS_SCAN_UNTERMINATED_STRING: Int = 5 // pub const JSON_STATUS_SCAN_UNBALANCED_DELIMITER: Int = 6 // pub const JSON_STATUS_SCAN_EMPTY_INPUT: Int = 7 // // pub struct JsonToken: // kind: String // start: Int // length: Int // lexeme: String // // pub struct JsonStatus: // ok: Bool // code: Int // key: String // expected_kind: String // actual_kind: String // index: Int // message: String // // pub struct JsonStringResult: // ok: Bool // value: String // status: JsonStatus // // pub struct JsonIntResult: // ok: Bool // value: Int // status: JsonStatus // // pub struct JsonFloatResult: // ok: Bool // value: Float // status: JsonStatus // // pub struct JsonBoolResult: // ok: Bool // value: Bool // status: JsonStatus // // pub struct JsonObjectResult: // ok: Bool // value: JsonObject // status: JsonStatus // // pub struct JsonArrayResult: // ok: Bool // value: JsonArray // status: JsonStatus // // pub struct JsonStringArrayResult: // ok: Bool // value: Array // status: JsonStatus // // pub struct JsonIntArrayResult: // ok: Bool // value: Array // status: JsonStatus // // pub struct JsonFloatArrayResult: // ok: Bool // value: Array // status: JsonStatus // // pub struct JsonBoolArrayResult: // ok: Bool // value: Array // status: JsonStatus // // pub struct JsonParseResult: // ok: Bool // value: JsonValue // status: JsonStatus // // pub struct JsonScanReport: // ok: Bool // code: Int // token_index: Int // balance_objects: Int // balance_arrays: Int // message: String // // fn json_token(kind: String, source: String, start: Int, length: Int) -> JsonToken: // return JsonToken { // kind: kind, // start: start, // length: length, // lexeme: substring(source, start, start + length) // } // // fn json_status_ok() -> JsonStatus: // return JsonStatus { // ok: true, // code: JSON_STATUS_OK, // key: "", // expected_kind: "", // actual_kind: "", // index: -1, // message: "" // } // // fn json_status_error(code: Int, key: String, expected_kind: String, actual_kind: String, index: Int, message: String) -> JsonStatus: // return JsonStatus { // ok: false, // code: code, // key: key, // expected_kind: expected_kind, // actual_kind: actual_kind, // index: index, // message: message // } // // fn json_missing_key_status(key: String) -> JsonStatus: // return json_status_error( // JSON_STATUS_MISSING_KEY, // key, // "", // JSON_KIND_NULL, // -1, // "missing key `" + key + "`" // ) // // fn json_wrong_kind_status(key: String, expected_kind: String, actual_kind: String, index: Int) -> JsonStatus: // var location = "field `" + key + "`" // if len(key) == 0: // location = "array item" // if index >= 0: // location = location + " at index " + to_string(index) // return json_status_error( // JSON_STATUS_WRONG_KIND, // key, // expected_kind, // actual_kind, // index, // location + " expected " + expected_kind + " but found " + actual_kind // ) // // fn json_index_status(index: Int, actual_kind: String) -> JsonStatus: // return json_status_error( // JSON_STATUS_INDEX_OUT_OF_RANGE, // "", // JSON_KIND_ARRAY, // actual_kind, // index, // "index " + to_string(index) + " was out of range for json array" // ) // // fn json_wrap_value(value: JsonValue) -> JsonObject: // let wrapper = json_object_new() // json_object_set(wrapper, "__value", value) // return wrapper // // fn json_native_kind_name(kind: Int) -> String: // if kind == 0: // return JSON_KIND_NULL // if kind == 1: // return JSON_KIND_BOOL // if kind == 2: // return JSON_KIND_INT // if kind == 3: // return JSON_KIND_FLOAT // if kind == 4: // return JSON_KIND_STRING // if kind == 5: // return JSON_KIND_OBJECT // if kind == 6: // return JSON_KIND_ARRAY // return JSON_KIND_UNKNOWN // // fn json_string_value(value: JsonValue) -> String: // return json_any_to_string(value) // // fn json_int_value(value: JsonValue) -> Int: // return json_any_to_int(value) // // fn json_float_value(value: JsonValue, actual_kind: String) -> Float: // let _kind = actual_kind // return json_any_to_float(value) // // fn json_bool_value(value: JsonValue) -> Bool: // return json_any_to_int(value) != 0 // // fn json_string_result_error(status: JsonStatus) -> JsonStringResult: // return JsonStringResult { // ok: false, // value: "", // status: status // } // // fn json_int_result_error(status: JsonStatus) -> JsonIntResult: // return JsonIntResult { // ok: false, // value: 0, // status: status // } // // fn json_float_result_error(status: JsonStatus) -> JsonFloatResult: // return JsonFloatResult { // ok: false, // value: 0.0, // status: status // } // // fn json_bool_result_error(status: JsonStatus) -> JsonBoolResult: // return JsonBoolResult { // ok: false, // value: false, // status: status // } // // fn json_object_result_error(status: JsonStatus) -> JsonObjectResult: // return JsonObjectResult { // ok: false, // value: json_object(), // status: status // } // // fn json_array_result_error(status: JsonStatus) -> JsonArrayResult: // return JsonArrayResult { // ok: false, // value: json_array(), // status: status // } // // fn json_string_array_result_error(status: JsonStatus) -> JsonStringArrayResult: // return JsonStringArrayResult { // ok: false, // value: [], // status: status // } // // fn json_int_array_result_error(status: JsonStatus) -> JsonIntArrayResult: // return JsonIntArrayResult { // ok: false, // value: [], // status: status // } // // fn json_float_array_result_error(status: JsonStatus) -> JsonFloatArrayResult: // return JsonFloatArrayResult { // ok: false, // value: [], // status: status // } // // fn json_bool_array_result_error(status: JsonStatus) -> JsonBoolArrayResult: // return JsonBoolArrayResult { // ok: false, // value: [], // status: status // } // // fn json_parse_result_error(status: JsonStatus) -> JsonParseResult: // return JsonParseResult { // ok: false, // value: json_object_new(), // status: status // } // // fn json_status_from_scan_report(report: JsonScanReport) -> JsonStatus: // if report.ok: // return json_status_ok() // return json_status_error( // report.code, // "", // "", // "", // report.token_index, // report.message // ) // // fn json_match_literal(text: String, start: Int, literal: String) -> Bool: // if start + len(literal) > len(text): // return false // var index = 0 // while index < len(literal): // if char_at(text, start + index) != char_at(literal, index): // return false // index = index + 1 // return true // // fn json_scan_string_end(text: String, start: Int) -> Int: // var index = start + 1 // var escaped = false // while index < len(text): // let ch = char_at(text, index) // if escaped: // escaped = false // else: // if ch == "\\": // escaped = true // else: // if ch == "\"": // return index + 1 // index = index + 1 // return len(text) // // fn json_scan_number_end(text: String, start: Int) -> Int: // var index = start // if char_at(text, index) == "-": // index = index + 1 // if index < len(text) and char_at(text, index) == "0": // index = index + 1 // else: // while index < len(text) and ascii_is_digit(char_at(text, index)): // index = index + 1 // if index < len(text) and char_at(text, index) == ".": // index = index + 1 // while index < len(text) and ascii_is_digit(char_at(text, index)): // index = index + 1 // if index < len(text): // let ch = char_at(text, index) // if ch == "e" or ch == "E": // index = index + 1 // if index < len(text): // let sign = char_at(text, index) // if sign == "+" or sign == "-": // index = index + 1 // while index < len(text) and ascii_is_digit(char_at(text, index)): // index = index + 1 // return index // // fn json_kind_from_rendered(rendered: String) -> String: // if rendered == "null": // return JSON_KIND_NULL // if rendered == "true" or rendered == "false": // return JSON_KIND_BOOL // if len(rendered) >= 2 and char_at(rendered, 0) == "\"" and char_at(rendered, len(rendered) - 1) == "\"": // return JSON_KIND_STRING // if len(rendered) > 0 and char_at(rendered, 0) == "{": // return JSON_KIND_OBJECT // if len(rendered) > 0 and char_at(rendered, 0) == "[": // return JSON_KIND_ARRAY // if find_substring_from(rendered, ".", 0) >= 0 or find_substring_from(rendered, "e", 0) >= 0 or find_substring_from(rendered, "E", 0) >= 0: // return JSON_KIND_FLOAT // return JSON_KIND_INT // // fn json_kind_from_value(value: JsonValue) -> String: // return json_native_kind_name(json_any_kind(value)) // // fn json_rendered_result(value: String) -> JsonStringResult: // return JsonStringResult { // ok: true, // value: value, // status: json_status_ok() // } // // fn json_value_end_token_index(tokens: Array, start_index: Int) -> Int: // let start_kind = tokens[start_index].kind // if start_kind != JSON_TOKEN_LBRACE and start_kind != JSON_TOKEN_LBRACKET: // return start_index // var object_depth = 0 // var array_depth = 0 // if start_kind == JSON_TOKEN_LBRACE: // object_depth = 1 // else: // array_depth = 1 // var index = start_index + 1 // while index < len(tokens): // let kind = tokens[index].kind // if kind == JSON_TOKEN_LBRACE: // object_depth = object_depth + 1 // else: // if kind == JSON_TOKEN_RBRACE: // object_depth = object_depth - 1 // else: // if kind == JSON_TOKEN_LBRACKET: // array_depth = array_depth + 1 // else: // if kind == JSON_TOKEN_RBRACKET: // array_depth = array_depth - 1 // if object_depth == 0 and array_depth == 0: // return index // index = index + 1 // return start_index // // fn json_field_rendered(object: JsonObject, key: String) -> JsonStringResult: // if !json_has_key(object, key): // return json_string_result_error(json_missing_key_status(key)) // let rendered = json_stringify(object) // let tokens = json_scan_significant(rendered) // let key_lexeme = fmt_json_string(key) // var object_depth = 0 // var array_depth = 0 // var index = 0 // while index < len(tokens): // let token = tokens[index] // if token.kind == JSON_TOKEN_LBRACE: // object_depth = object_depth + 1 // else: // if token.kind == JSON_TOKEN_RBRACE: // object_depth = object_depth - 1 // else: // if token.kind == JSON_TOKEN_LBRACKET: // array_depth = array_depth + 1 // else: // if token.kind == JSON_TOKEN_RBRACKET: // array_depth = array_depth - 1 // if object_depth == 1 and array_depth == 0 and token.kind == JSON_TOKEN_STRING and token.lexeme == key_lexeme: // if index + 2 >= len(tokens) or tokens[index + 1].kind != JSON_TOKEN_COLON: // return json_string_result_error(json_missing_key_status(key)) // let value_start = index + 2 // let value_end = json_value_end_token_index(tokens, value_start) // let start = tokens[value_start].start // let end = tokens[value_end].start + tokens[value_end].length // return json_rendered_result(substring(rendered, start, end)) // index = index + 1 // return json_string_result_error(json_missing_key_status(key)) // // pub fn json_parse_text(text: String) -> JsonValue: // return json_parse(text) // // pub fn json_parse_text_result(text: String) -> JsonParseResult: // let report = json_scan_report(text) // if report.ok == false: // return json_parse_result_error(json_status_from_scan_report(report)) // return JsonParseResult { // ok: true, // value: json_parse(text), // status: json_status_ok() // } // // pub fn json_parse_text_or(text: String, fallback: JsonValue) -> JsonValue: // let parsed = json_parse_text_result(text) // if parsed.ok == false: // return fallback // return parsed.value // // pub fn json_stringify(value: JsonValue) -> String: // return json_string(value) // // pub fn json_has_key(object: JsonObject, key: String) -> Bool: // return json_has(object, key) // // pub fn json_get_value(object: JsonObject, key: String) -> JsonValue: // return json_get(object, key) // // pub fn json_value_kind(value: JsonValue) -> String: // return json_kind_from_value(value) // // pub fn json_value_kind_code(value: JsonValue) -> Int: // return json_any_kind(value) // // pub fn json_is_null(value: JsonValue) -> Bool: // return json_value_kind_code(value) == JSON_KIND_CODE_NULL // // pub fn json_is_string(value: JsonValue) -> Bool: // return json_value_kind_code(value) == JSON_KIND_CODE_STRING // // pub fn json_is_int(value: JsonValue) -> Bool: // return json_value_kind_code(value) == JSON_KIND_CODE_INT // // pub fn json_is_float(value: JsonValue) -> Bool: // return json_value_kind_code(value) == JSON_KIND_CODE_FLOAT // // pub fn json_is_bool(value: JsonValue) -> Bool: // return json_value_kind_code(value) == JSON_KIND_CODE_BOOL // // pub fn json_is_object(value: JsonValue) -> Bool: // return json_value_kind_code(value) == JSON_KIND_CODE_OBJECT // // pub fn json_is_array(value: JsonValue) -> Bool: // return json_value_kind_code(value) == JSON_KIND_CODE_ARRAY // // pub fn json_string_required(object: JsonObject, key: String) -> String: // return json_get_string(object, key) // // pub fn json_int_required(object: JsonObject, key: String) -> Int: // return json_get_int(object, key) // // pub fn json_float_required(object: JsonObject, key: String) -> Float: // return json_get_float(object, key) // // pub fn json_bool_required(object: JsonObject, key: String) -> Bool: // return json_get_bool(object, key) // // pub fn json_string_or(object: JsonObject, key: String, default_value: String) -> String: // if !json_has_key(object, key): // return default_value // return json_string_required(object, key) // // pub fn json_int_or(object: JsonObject, key: String, default_value: Int) -> Int: // if !json_has_key(object, key): // return default_value // return json_int_required(object, key) // // pub fn json_float_or(object: JsonObject, key: String, default_value: Float) -> Float: // if !json_has_key(object, key): // return default_value // return json_float_required(object, key) // // pub fn json_bool_or(object: JsonObject, key: String, default_value: Bool) -> Bool: // if !json_has_key(object, key): // return default_value // return json_bool_required(object, key) // // pub fn json_string_field(object: JsonObject, key: String) -> JsonStringResult: // if !json_has_key(object, key): // return json_string_result_error(json_missing_key_status(key)) // let value = json_get_value(object, key) // let actual_kind_code = json_value_kind_code(value) // if actual_kind_code != JSON_KIND_CODE_STRING: // let actual_kind = json_native_kind_name(actual_kind_code) // return json_string_result_error(json_wrong_kind_status(key, JSON_KIND_STRING, actual_kind, -1)) // return JsonStringResult { // ok: true, // value: json_string_value(value), // status: json_status_ok() // } // // pub fn json_int_field(object: JsonObject, key: String) -> JsonIntResult: // if !json_has_key(object, key): // return json_int_result_error(json_missing_key_status(key)) // let value = json_get_value(object, key) // let actual_kind_code = json_value_kind_code(value) // if actual_kind_code != JSON_KIND_CODE_INT: // let actual_kind = json_native_kind_name(actual_kind_code) // return json_int_result_error(json_wrong_kind_status(key, JSON_KIND_INT, actual_kind, -1)) // return JsonIntResult { // ok: true, // value: json_int_value(value), // status: json_status_ok() // } // // pub fn json_float_field(object: JsonObject, key: String) -> JsonFloatResult: // if !json_has_key(object, key): // return json_float_result_error(json_missing_key_status(key)) // let value = json_get_value(object, key) // let actual_kind_code = json_value_kind_code(value) // if actual_kind_code != JSON_KIND_CODE_FLOAT and actual_kind_code != JSON_KIND_CODE_INT: // let actual_kind = json_native_kind_name(actual_kind_code) // return json_float_result_error(json_wrong_kind_status(key, JSON_KIND_FLOAT, actual_kind, -1)) // return JsonFloatResult { // ok: true, // value: json_float_value(value, json_native_kind_name(actual_kind_code)), // status: json_status_ok() // } // // pub fn json_bool_field(object: JsonObject, key: String) -> JsonBoolResult: // if !json_has_key(object, key): // return json_bool_result_error(json_missing_key_status(key)) // let value = json_get_value(object, key) // let actual_kind_code = json_value_kind_code(value) // if actual_kind_code != JSON_KIND_CODE_BOOL: // let actual_kind = json_native_kind_name(actual_kind_code) // return json_bool_result_error(json_wrong_kind_status(key, JSON_KIND_BOOL, actual_kind, -1)) // return JsonBoolResult { // ok: true, // value: json_bool_value(value), // status: json_status_ok() // } // // pub fn json_object_field(object: JsonObject, key: String) -> JsonObjectResult: // if !json_has_key(object, key): // return json_object_result_error(json_missing_key_status(key)) // let value = json_get_value(object, key) // let actual_kind_code = json_value_kind_code(value) // if actual_kind_code != JSON_KIND_CODE_OBJECT: // let actual_kind = json_native_kind_name(actual_kind_code) // return json_object_result_error(json_wrong_kind_status(key, JSON_KIND_OBJECT, actual_kind, -1)) // return JsonObjectResult { // ok: true, // value: value, // status: json_status_ok() // } // // pub fn json_array_field(object: JsonObject, key: String) -> JsonArrayResult: // if !json_has_key(object, key): // return json_array_result_error(json_missing_key_status(key)) // let value = json_get_value(object, key) // let actual_kind_code = json_value_kind_code(value) // if actual_kind_code != JSON_KIND_CODE_ARRAY: // let actual_kind = json_native_kind_name(actual_kind_code) // return json_array_result_error(json_wrong_kind_status(key, JSON_KIND_ARRAY, actual_kind, -1)) // return JsonArrayResult { // ok: true, // value: value, // status: json_status_ok() // } // // pub fn json_object() -> JsonObject: // return json_object_new() // // pub fn json_object_set_value(object: JsonObject, key: String, value: JsonValue) -> JsonObject: // json_object_set(object, key, value) // return object // // pub fn json_object_set_string(object: JsonObject, key: String, value: String) -> JsonObject: // return json_object_set_value(object, key, value) // // pub fn json_object_set_int(object: JsonObject, key: String, value: Int) -> JsonObject: // return json_object_set_value(object, key, value) // // pub fn json_object_set_float(object: JsonObject, key: String, value: Float) -> JsonObject: // return json_object_set_value(object, key, value) // // pub fn json_object_set_bool(object: JsonObject, key: String, value: Bool) -> JsonObject: // return json_object_set_value(object, key, value) // // pub fn json_object_set_object(object: JsonObject, key: String, value: JsonObject) -> JsonObject: // return json_object_set_value(object, key, value) // // pub fn json_object_set_array(object: JsonObject, key: String, value: JsonArray) -> JsonObject: // return json_object_set_value(object, key, value) // // pub fn json_array() -> JsonArray: // return json_array_new() // // pub fn json_array_push_value(array: JsonArray, value: JsonValue) -> JsonArray: // json_array_push(array, value) // return array // // pub fn json_array_push_string(array: JsonArray, value: String) -> JsonArray: // return json_array_push_value(array, value) // // pub fn json_array_push_int(array: JsonArray, value: Int) -> JsonArray: // return json_array_push_value(array, value) // // pub fn json_array_push_float(array: JsonArray, value: Float) -> JsonArray: // return json_array_push_value(array, value) // // pub fn json_array_push_bool(array: JsonArray, value: Bool) -> JsonArray: // return json_array_push_value(array, value) // // pub fn json_array_push_object(array: JsonArray, value: JsonObject) -> JsonArray: // return json_array_push_value(array, value) // // pub fn json_array_push_array(array: JsonArray, value: JsonArray) -> JsonArray: // return json_array_push_value(array, value) // // pub fn json_array_length(array: JsonArray) -> Int: // return json_array_len(array) // // pub fn json_array_value_at(array: JsonArray, index: Int) -> JsonValue: // return json_array_get(array, index) // // pub fn json_string_array(values: JsonArray) -> Array: // let mut items: Array = [] // var index = 0 // while index < json_array_length(values): // push(items, json_string_value(json_array_value_at(values, index))) // index = index + 1 // return items // // pub fn json_int_array(values: JsonArray) -> Array: // let mut items: Array = [] // var index = 0 // while index < json_array_length(values): // push(items, json_int_value(json_array_value_at(values, index))) // index = index + 1 // return items // // pub fn json_float_array(values: JsonArray) -> Array: // let mut items: Array = [] // var index = 0 // while index < json_array_length(values): // let value = json_array_value_at(values, index) // push(items, json_float_value(value, json_value_kind(value))) // index = index + 1 // return items // // pub fn json_bool_array(values: JsonArray) -> Array: // let mut items: Array = [] // var index = 0 // while index < json_array_length(values): // push(items, json_bool_value(json_array_value_at(values, index))) // index = index + 1 // return items // // pub fn json_string_array_result(values: JsonArray) -> JsonStringArrayResult: // if json_is_array(values) == false: // return json_string_array_result_error(json_wrong_kind_status("", JSON_KIND_ARRAY, json_value_kind(values), -1)) // let mut items: Array = [] // var index = 0 // while index < json_array_length(values): // let value = json_array_value_at(values, index) // let actual_kind_code = json_value_kind_code(value) // if actual_kind_code != JSON_KIND_CODE_STRING: // let actual_kind = json_native_kind_name(actual_kind_code) // return json_string_array_result_error(json_wrong_kind_status("", JSON_KIND_STRING, actual_kind, index)) // push(items, json_string_value(value)) // index = index + 1 // return JsonStringArrayResult { // ok: true, // value: items, // status: json_status_ok() // } // // pub fn json_int_array_result(values: JsonArray) -> JsonIntArrayResult: // if json_is_array(values) == false: // return json_int_array_result_error(json_wrong_kind_status("", JSON_KIND_ARRAY, json_value_kind(values), -1)) // let mut items: Array = [] // var index = 0 // while index < json_array_length(values): // let value = json_array_value_at(values, index) // let actual_kind_code = json_value_kind_code(value) // if actual_kind_code != JSON_KIND_CODE_INT: // let actual_kind = json_native_kind_name(actual_kind_code) // return json_int_array_result_error(json_wrong_kind_status("", JSON_KIND_INT, actual_kind, index)) // push(items, json_int_value(value)) // index = index + 1 // return JsonIntArrayResult { // ok: true, // value: items, // status: json_status_ok() // } // // pub fn json_float_array_result(values: JsonArray) -> JsonFloatArrayResult: // if json_is_array(values) == false: // return json_float_array_result_error(json_wrong_kind_status("", JSON_KIND_ARRAY, json_value_kind(values), -1)) // let mut items: Array = [] // var index = 0 // while index < json_array_length(values): // let value = json_array_value_at(values, index) // let actual_kind_code = json_value_kind_code(value) // if actual_kind_code != JSON_KIND_CODE_FLOAT and actual_kind_code != JSON_KIND_CODE_INT: // let actual_kind = json_native_kind_name(actual_kind_code) // return json_float_array_result_error(json_wrong_kind_status("", JSON_KIND_FLOAT, actual_kind, index)) // push(items, json_float_value(value, json_native_kind_name(actual_kind_code))) // index = index + 1 // return JsonFloatArrayResult { // ok: true, // value: items, // status: json_status_ok() // } // // pub fn json_bool_array_result(values: JsonArray) -> JsonBoolArrayResult: // if json_is_array(values) == false: // return json_bool_array_result_error(json_wrong_kind_status("", JSON_KIND_ARRAY, json_value_kind(values), -1)) // let mut items: Array = [] // var index = 0 // while index < json_array_length(values): // let value = json_array_value_at(values, index) // let actual_kind_code = json_value_kind_code(value) // if actual_kind_code != JSON_KIND_CODE_BOOL: // let actual_kind = json_native_kind_name(actual_kind_code) // return json_bool_array_result_error(json_wrong_kind_status("", JSON_KIND_BOOL, actual_kind, index)) // push(items, json_bool_value(value)) // index = index + 1 // return JsonBoolArrayResult { // ok: true, // value: items, // status: json_status_ok() // } // // pub fn json_string_array_field(object: JsonObject, key: String) -> Array: // let array_result = json_array_field(object, key) // if array_result.ok == false: // return [] // return json_string_array(array_result.value) // // pub fn json_string_array_field_result(object: JsonObject, key: String) -> JsonStringArrayResult: // let array_result = json_array_field(object, key) // if array_result.ok == false: // return json_string_array_result_error(array_result.status) // return json_string_array_result(array_result.value) // // pub fn json_int_array_field_result(object: JsonObject, key: String) -> JsonIntArrayResult: // let array_result = json_array_field(object, key) // if array_result.ok == false: // return json_int_array_result_error(array_result.status) // return json_int_array_result(array_result.value) // // pub fn json_float_array_field_result(object: JsonObject, key: String) -> JsonFloatArrayResult: // let array_result = json_array_field(object, key) // if array_result.ok == false: // return json_float_array_result_error(array_result.status) // return json_float_array_result(array_result.value) // // pub fn json_bool_array_field_result(object: JsonObject, key: String) -> JsonBoolArrayResult: // let array_result = json_array_field(object, key) // if array_result.ok == false: // return json_bool_array_result_error(array_result.status) // return json_bool_array_result(array_result.value) // // pub fn json_array_from_strings(values: Array) -> JsonArray: // let array = json_array() // var index = 0 // while index < len(values): // let _pushed = json_array_push_string(array, values[index]) // index = index + 1 // return array // // pub fn json_array_from_ints(values: Array) -> JsonArray: // let array = json_array() // var index = 0 // while index < len(values): // let _pushed = json_array_push_int(array, values[index]) // index = index + 1 // return array // // pub fn json_array_from_floats(values: Array) -> JsonArray: // let array = json_array() // var index = 0 // while index < len(values): // let _pushed = json_array_push_float(array, values[index]) // index = index + 1 // return array // // pub fn json_array_from_bools(values: Array) -> JsonArray: // let array = json_array() // var index = 0 // while index < len(values): // let _pushed = json_array_push_bool(array, values[index]) // index = index + 1 // return array // // pub fn json_object_set_string_array(object: JsonObject, key: String, values: Array) -> JsonObject: // return json_object_set_array(object, key, json_array_from_strings(values)) // // pub fn json_object_set_int_array(object: JsonObject, key: String, values: Array) -> JsonObject: // return json_object_set_array(object, key, json_array_from_ints(values)) // // pub fn json_object_set_float_array(object: JsonObject, key: String, values: Array) -> JsonObject: // return json_object_set_array(object, key, json_array_from_floats(values)) // // pub fn json_object_set_bool_array(object: JsonObject, key: String, values: Array) -> JsonObject: // return json_object_set_array(object, key, json_array_from_bools(values)) // // pub fn json_object_with_string(key: String, value: String) -> JsonObject: // return json_object_set_string(json_object(), key, value) // // pub fn json_object_with_int(key: String, value: Int) -> JsonObject: // return json_object_set_int(json_object(), key, value) // // pub fn json_object_with_float(key: String, value: Float) -> JsonObject: // return json_object_set_float(json_object(), key, value) // // pub fn json_object_with_bool(key: String, value: Bool) -> JsonObject: // return json_object_set_bool(json_object(), key, value) // // pub fn json_object_with_array(key: String, value: JsonArray) -> JsonObject: // return json_object_set_array(json_object(), key, value) // // pub fn json_object_with_object(key: String, value: JsonObject) -> JsonObject: // return json_object_set_object(json_object(), key, value) // // pub fn json_fmt_writer_push_value(writer: FmtWriter, value: JsonValue) -> FmtWriter: // return fmt_writer_push_string(writer, json_stringify(value)) // // pub fn json_string_builder_push_value(builder: ptr, value: JsonValue) -> Int with Unsafe: // return string_builder_append_string(builder, json_stringify(value)) // // pub fn json_scan(text: String) -> Array: // let mut tokens: Array = [] // var index = 0 // while index < len(text): // let ch = char_at(text, index) // if ascii_is_whitespace(ch): // var end = index + 1 // while end < len(text) and ascii_is_whitespace(char_at(text, end)): // end = end + 1 // push(tokens, json_token(JSON_TOKEN_WHITESPACE, text, index, end - index)) // index = end // else: // if ch == "{": // push(tokens, json_token(JSON_TOKEN_LBRACE, text, index, 1)) // index = index + 1 // else: // if ch == "}": // push(tokens, json_token(JSON_TOKEN_RBRACE, text, index, 1)) // index = index + 1 // else: // if ch == "[": // push(tokens, json_token(JSON_TOKEN_LBRACKET, text, index, 1)) // index = index + 1 // else: // if ch == "]": // push(tokens, json_token(JSON_TOKEN_RBRACKET, text, index, 1)) // index = index + 1 // else: // if ch == ":": // push(tokens, json_token(JSON_TOKEN_COLON, text, index, 1)) // index = index + 1 // else: // if ch == ",": // push(tokens, json_token(JSON_TOKEN_COMMA, text, index, 1)) // index = index + 1 // else: // if ch == "\"": // let end = json_scan_string_end(text, index) // push(tokens, json_token(JSON_TOKEN_STRING, text, index, end - index)) // index = end // else: // if ch == "-" or ascii_is_digit(ch): // let end = json_scan_number_end(text, index) // push(tokens, json_token(JSON_TOKEN_NUMBER, text, index, end - index)) // index = end // else: // if json_match_literal(text, index, "true"): // push(tokens, json_token(JSON_TOKEN_TRUE, text, index, 4)) // index = index + 4 // else: // if json_match_literal(text, index, "false"): // push(tokens, json_token(JSON_TOKEN_FALSE, text, index, 5)) // index = index + 5 // else: // if json_match_literal(text, index, "null"): // push(tokens, json_token(JSON_TOKEN_NULL, text, index, 4)) // index = index + 4 // else: // push(tokens, json_token(JSON_TOKEN_UNKNOWN, text, index, 1)) // index = index + 1 // return tokens // // pub fn json_scan_significant(text: String) -> Array: // let mut significant: Array = [] // let tokens = json_scan(text) // var index = 0 // while index < len(tokens): // if tokens[index].kind != JSON_TOKEN_WHITESPACE: // push(significant, tokens[index]) // index = index + 1 // return significant // // pub fn json_scan_report(text: String) -> JsonScanReport: // let tokens = json_scan_significant(text) // if len(tokens) == 0: // return JsonScanReport { // ok: false, // code: JSON_STATUS_SCAN_EMPTY_INPUT, // token_index: -1, // balance_objects: 0, // balance_arrays: 0, // message: "empty input is not valid json" // } // var object_balance = 0 // var array_balance = 0 // var index = 0 // while index < len(tokens): // let token = tokens[index] // if token.kind == JSON_TOKEN_UNKNOWN: // return JsonScanReport { // ok: false, // code: JSON_STATUS_SCAN_UNKNOWN_TOKEN, // token_index: index, // balance_objects: object_balance, // balance_arrays: array_balance, // message: "unexpected token `" + token.lexeme + "`" // } // if token.kind == JSON_TOKEN_STRING: // if token.length < 2 or char_at(token.lexeme, token.length - 1) != "\"": // return JsonScanReport { // ok: false, // code: JSON_STATUS_SCAN_UNTERMINATED_STRING, // token_index: index, // balance_objects: object_balance, // balance_arrays: array_balance, // message: "unterminated string literal" // } // if token.kind == JSON_TOKEN_LBRACE: // object_balance = object_balance + 1 // else: // if token.kind == JSON_TOKEN_RBRACE: // object_balance = object_balance - 1 // if object_balance < 0: // return JsonScanReport { // ok: false, // code: JSON_STATUS_SCAN_UNBALANCED_DELIMITER, // token_index: index, // balance_objects: object_balance, // balance_arrays: array_balance, // message: "closing object delimiter without matching opening brace" // } // else: // if token.kind == JSON_TOKEN_LBRACKET: // array_balance = array_balance + 1 // else: // if token.kind == JSON_TOKEN_RBRACKET: // array_balance = array_balance - 1 // if array_balance < 0: // return JsonScanReport { // ok: false, // code: JSON_STATUS_SCAN_UNBALANCED_DELIMITER, // token_index: index, // balance_objects: object_balance, // balance_arrays: array_balance, // message: "closing array delimiter without matching opening bracket" // } // index = index + 1 // if object_balance != 0 or array_balance != 0: // return JsonScanReport { // ok: false, // code: JSON_STATUS_SCAN_UNBALANCED_DELIMITER, // token_index: len(tokens) - 1, // balance_objects: object_balance, // balance_arrays: array_balance, // message: "json delimiters were not balanced" // } // return JsonScanReport { // ok: true, // code: JSON_STATUS_OK, // token_index: -1, // balance_objects: 0, // balance_arrays: 0, // message: "" // } //!end-kain-file //!kain-file // path = "kain.kn" // kind = "text" // encoding = "utf8" // bytes = 18101 // sha256 = "sha256:a231b8781db45f36033e3960f56900811a51e0252e3ebcc7401f6bc1d16bded8" // trailing_newline = true //!kain-file-content // // std::kain — Compiler service API // // // // This module exposes the Kain compiler as a service, allowing Kain-authored // // tooling (LSP, formatters, analyzers, linters) to use the compiler's parser, // // typechecker, indexing, and formatting capabilities through a clean Kain API. // // // // Architecture: // // Kain types (this file) → builtin bridge (crates/service-bridge) → service-api (crates/service-api) // // // // The bridge layer is registered in the Kain runtime via register_stdlib_extension. // // Complex results are returned as Value::Struct from builtins and destructured here. // // use std::json // // @extern // fn kain_service_open_workspace(root: String, target: Int) -> Any // // @extern // fn kain_service_close_workspace(workspace_id: Int) -> Any // // @extern // fn kain_service_open_document(workspace_id: Int, path: String, source: String, version: Int) -> Any // // @extern // fn kain_service_update_document(workspace_id: Int, document_id: Int, source: String, version: Int) -> Any // // @extern // fn kain_service_close_document(workspace_id: Int, document_id: Int) -> Any // // @extern // fn kain_service_check_document(workspace_id: Int, document_id: Int) -> Any // // @extern // fn kain_service_hover_at(workspace_id: Int, document_id: Int, pos_line: Int, column: Int) -> Any // // @extern // fn kain_service_definition_at(workspace_id: Int, document_id: Int, pos_line: Int, column: Int) -> Any // // @extern // fn kain_service_references_at(workspace_id: Int, document_id: Int, pos_line: Int, column: Int) -> Any // // @extern // fn kain_service_completions_at(workspace_id: Int, document_id: Int, pos_line: Int, column: Int) -> Any // // @extern // fn kain_service_document_symbols(workspace_id: Int, document_id: Int) -> Any // // @extern // fn kain_service_workspace_symbols(workspace_id: Int, query: String) -> Any // // @extern // fn kain_service_semantic_tokens(workspace_id: Int, document_id: Int) -> Any // // @extern // fn kain_service_format_document(workspace_id: Int, document_id: Int) -> Any // // // ═══════════════════════════════════════════════════════════════════ // // Types // // ═══════════════════════════════════════════════════════════════════ // // pub struct Position: // line_num: Int // col: Int // offset: Int // // pub struct Range: // start: Position // end: Position // // pub struct Location: // path: String // name: String // range: Range // // pub enum SymbolKind: // Function // Method // Struct // Enum // EnumMember // Trait // Field // Constant // Module // Actor // Component // Shader // TypeAlias // Variable // // pub enum CompletionKind: // Function // Method // Struct // Enum // EnumMember // Trait // Variable // Field // Constant // Module // Keyword // Effect // Type // Stdlib // // pub enum CompileTarget: // Llvm // C // Cpp // Rust // Wasm // Js // Ts // Hybrid // Ue5 // Ue5Editor // Usf // Spirv // Hlsl // Wgsl // Cuda // Interpret // Test // Ks // // pub struct Symbol: // name: String // detail: String // kind: SymbolKind // location: Location // container: Option // // pub struct Completion: // label: String // detail: String // kind: CompletionKind // // pub struct SemanticToken: // range: Range // token_type: Int // token_modifiers: Int // // pub struct Hover: // contents: String // location: Location // // pub struct DiagnosticLabel: // message: String // range: Range // primary: Bool // kind: Int // // pub struct DiagnosticFixIt: // message: String // replacement: String // range: Range // primary: Bool // confidence: Int // // pub struct Diagnostic: // code: String // severity: Int // kind: String // message: String // file: String // has_primary_range: Bool // primary_range: Range // labels: Array // notes: Array // help: Array // fixits: Array // // pub struct CheckResult: // passed: Bool // diagnostics: Array // typed_program_available: Bool // // pub struct FormatResult: // formatted: String // already_formatted: Bool // diagnostics: Array // // // ═══════════════════════════════════════════════════════════════════ // // Workspace and document handles (opaque Ints from the bridge) // // ═══════════════════════════════════════════════════════════════════ // // pub struct Workspace: // _id: Int // // pub struct Document: // _ws_id: Int // _doc_id: Int // // // ═══════════════════════════════════════════════════════════════════ // // Conversions: JSON-like Value → typed structs // // ═══════════════════════════════════════════════════════════════════ // // fn _position_from(value: Any) -> Position: // return Position { // line_num: json_get_int(value, "line"), // col: json_get_int(value, "column"), // offset: json_get_int(value, "offset"), // } // // fn _range_from(value: Any) -> Range: // return Range { // start: _position_from(json_get(value, "start")), // end: _position_from(json_get(value, "end")), // } // // fn _location_from(value: Any) -> Location: // return Location { // path: json_get_string(value, "path"), // name: json_get_string(value, "name"), // range: _range_from(json_get(value, "range")), // } // // fn _symbol_kind_from(code: Int) -> SymbolKind: // let kind = match code: // 1 => SymbolKind::Function // 2 => SymbolKind::Method // 3 => SymbolKind::Struct // 4 => SymbolKind::Enum // 5 => SymbolKind::EnumMember // 6 => SymbolKind::Trait // 7 => SymbolKind::Field // 8 => SymbolKind::Constant // 9 => SymbolKind::Module // 10 => SymbolKind::Actor // 11 => SymbolKind::Component // 12 => SymbolKind::Shader // 13 => SymbolKind::TypeAlias // 14 => SymbolKind::Variable // _ => SymbolKind::Variable // return kind // // fn _completion_kind_from(code: Int) -> CompletionKind: // let kind = match code: // 1 => CompletionKind::Function // 2 => CompletionKind::Method // 3 => CompletionKind::Struct // 4 => CompletionKind::Enum // 5 => CompletionKind::EnumMember // 6 => CompletionKind::Trait // 7 => CompletionKind::Variable // 8 => CompletionKind::Field // 9 => CompletionKind::Constant // 10 => CompletionKind::Module // 11 => CompletionKind::Keyword // 12 => CompletionKind::Effect // 13 => CompletionKind::Type // 14 => CompletionKind::Stdlib // _ => CompletionKind::Keyword // return kind // // fn _target_to_code(target: CompileTarget) -> Int: // let code = match target: // CompileTarget::Llvm => 6 // CompileTarget::C => 5 // CompileTarget::Cpp => 8 // CompileTarget::Rust => 7 // CompileTarget::Wasm => 1 // CompileTarget::Js => 2 // CompileTarget::Ts => 3 // CompileTarget::Hybrid => 4 // CompileTarget::Ue5 => 9 // CompileTarget::Ue5Editor => 10 // CompileTarget::Usf => 11 // CompileTarget::Spirv => 12 // CompileTarget::Hlsl => 13 // CompileTarget::Wgsl => 14 // CompileTarget::Cuda => 15 // CompileTarget::Interpret => 16 // CompileTarget::Test => 17 // CompileTarget::Ks => 18 // return code // // fn _diagnostic_label_from(value: Any) -> DiagnosticLabel: // return DiagnosticLabel { // message: json_get_string(value, "message"), // range: _range_from(json_get(value, "range")), // primary: json_get_bool(value, "primary"), // kind: json_get_int(value, "kind"), // } // // fn _diagnostic_fixit_from(value: Any) -> DiagnosticFixIt: // return DiagnosticFixIt { // message: json_get_string(value, "message"), // replacement: json_get_string(value, "replacement"), // range: _range_from(json_get(value, "range")), // primary: json_get_bool(value, "primary"), // confidence: json_get_int(value, "confidence"), // } // // fn _diagnostic_from(value: Any) -> Diagnostic: // let labels_raw = json_get(value, "labels") // let notes_raw = json_get(value, "notes") // let help_raw = json_get(value, "help") // let fixits_raw = json_get(value, "fixits") // // var labels: Array = [] // var i: Int = 0 // while i < json_array_length(labels_raw): // push(labels, _diagnostic_label_from(json_array_value_at(labels_raw, i))) // i = i + 1 // 0 // // var notes: Array = [] // i = 0 // while i < json_array_length(notes_raw): // push(notes, json_string_value(json_array_value_at(notes_raw, i))) // i = i + 1 // 0 // // var help: Array = [] // i = 0 // while i < json_array_length(help_raw): // push(help, json_string_value(json_array_value_at(help_raw, i))) // i = i + 1 // 0 // // var fixits: Array = [] // i = 0 // while i < json_array_length(fixits_raw): // push(fixits, _diagnostic_fixit_from(json_array_value_at(fixits_raw, i))) // i = i + 1 // 0 // // return Diagnostic { // code: json_get_string(value, "code"), // severity: json_get_int(value, "severity"), // kind: json_get_string(value, "kind"), // message: json_get_string(value, "message"), // file: json_get_string(value, "file"), // has_primary_range: json_get_bool(value, "has_primary_range"), // primary_range: _range_from(json_get(value, "primary_range")), // labels: labels, // notes: notes, // help: help, // fixits: fixits, // } // // fn _symbol_from(value: Any) -> Symbol: // let container_val = json_get(value, "container") // let container: Option = if json_is_null(container_val): // None // else: // Some(json_string_value(container_val)) // return Symbol { // name: json_get_string(value, "name"), // detail: json_get_string(value, "detail"), // kind: _symbol_kind_from(json_get_int(value, "kind")), // location: _location_from(json_get(value, "location")), // container: container, // } // // fn _completion_from(value: Any) -> Completion: // return Completion { // label: json_get_string(value, "label"), // detail: json_get_string(value, "detail"), // kind: _completion_kind_from(json_get_int(value, "kind")), // } // // fn _semantic_token_from(value: Any) -> SemanticToken: // return SemanticToken { // range: _range_from(json_get(value, "range")), // token_type: json_get_int(value, "token_type"), // token_modifiers: json_get_int(value, "token_modifiers"), // } // // // ═══════════════════════════════════════════════════════════════════ // // Public API // // ═══════════════════════════════════════════════════════════════════ // // // --- Workspace management --- // // pub fn open_workspace(root: String, target: CompileTarget) -> Option: // let code = _target_to_code(target) // let res = kain_service_open_workspace(root, code) // let status = json_get_int(res, "status") // if status != 0: // return None // return Some(Workspace { // _id: json_get_int(res, "workspace_id"), // }) // // pub fn close_workspace(ws: Workspace) -> Bool: // let res = kain_service_close_workspace(ws._id) // return json_get_int(res, "status") == 0 // // // --- Document management --- // // pub fn open_document(ws: Workspace, path: String, source: String, version: Int) -> Option: // let res = kain_service_open_document(ws._id, path, source, version) // let status = json_get_int(res, "status") // if status != 0: // return None // return Some(Document { // _ws_id: ws._id, // _doc_id: json_get_int(res, "document_id"), // }) // // pub fn update_document(doc: Document, source: String, version: Int) -> Bool: // let res = kain_service_update_document(doc._ws_id, doc._doc_id, source, version) // return json_get_int(res, "status") == 0 // // pub fn close_document(doc: Document) -> Bool: // let res = kain_service_close_document(doc._ws_id, doc._doc_id) // return json_get_int(res, "status") == 0 // // // --- Diagnostics --- // // pub fn check_document(doc: Document) -> CheckResult: // let res = kain_service_check_document(doc._ws_id, doc._doc_id) // let status = json_get_int(res, "status") // var diagnostics: Array = [] // if status == 0: // let diags_raw = json_get(res, "diagnostics") // var i: Int = 0 // while i < json_array_length(diags_raw): // push(diagnostics, _diagnostic_from(json_array_value_at(diags_raw, i))) // i = i + 1 // 0 // return CheckResult { // passed: len(diagnostics) == 0 and json_get_bool(res, "typed_program_available"), // diagnostics: diagnostics, // typed_program_available: json_get_bool(res, "typed_program_available"), // } // // // --- Queries --- // // pub fn hover_at(doc: Document, pos_line: Int, pos_col: Int) -> Option: // let res = kain_service_hover_at(doc._ws_id, doc._doc_id, pos_line, pos_col) // let status = json_get_int(res, "status") // if status != 0: // return None // let has_hover = json_get_bool(res, "has_hover") // if has_hover == false: // return None // return Some(Hover { // contents: json_get_string(res, "contents"), // location: _location_from(json_get(res, "location")), // }) // // pub fn definition_at(doc: Document, pos_line: Int, pos_col: Int) -> Array: // let res = kain_service_definition_at(doc._ws_id, doc._doc_id, pos_line, pos_col) // let status = json_get_int(res, "status") // if status != 0: // return [] // let locations_raw = json_get(res, "locations") // var locations: Array = [] // var i: Int = 0 // while i < json_array_length(locations_raw): // push(locations, _location_from(json_array_value_at(locations_raw, i))) // i = i + 1 // 0 // return locations // // pub fn references_at(doc: Document, pos_line: Int, pos_col: Int) -> Array: // let res = kain_service_references_at(doc._ws_id, doc._doc_id, pos_line, pos_col) // let status = json_get_int(res, "status") // if status != 0: // return [] // let locations_raw = json_get(res, "locations") // var locations: Array = [] // var i: Int = 0 // while i < json_array_length(locations_raw): // push(locations, _location_from(json_array_value_at(locations_raw, i))) // i = i + 1 // 0 // return locations // // pub fn completions_at(doc: Document, pos_line: Int, pos_col: Int) -> Array: // let res = kain_service_completions_at(doc._ws_id, doc._doc_id, pos_line, pos_col) // let status = json_get_int(res, "status") // if status != 0: // return [] // let completions_raw = json_get(res, "completions") // var completions: Array = [] // var i: Int = 0 // while i < json_array_length(completions_raw): // push(completions, _completion_from(json_array_value_at(completions_raw, i))) // i = i + 1 // 0 // return completions // // pub fn document_symbols(doc: Document) -> Array: // let res = kain_service_document_symbols(doc._ws_id, doc._doc_id) // let status = json_get_int(res, "status") // if status != 0: // return [] // let symbols_raw = json_get(res, "symbols") // var symbols: Array = [] // var i: Int = 0 // while i < json_array_length(symbols_raw): // push(symbols, _symbol_from(json_array_value_at(symbols_raw, i))) // i = i + 1 // 0 // return symbols // // pub fn workspace_symbols(ws: Workspace, query: String) -> Array: // let res = kain_service_workspace_symbols(ws._id, query) // let status = json_get_int(res, "status") // if status != 0: // return [] // let symbols_raw = json_get(res, "symbols") // var symbols: Array = [] // var i: Int = 0 // while i < json_array_length(symbols_raw): // push(symbols, _symbol_from(json_array_value_at(symbols_raw, i))) // i = i + 1 // 0 // return symbols // // pub fn semantic_tokens(doc: Document) -> Array: // let res = kain_service_semantic_tokens(doc._ws_id, doc._doc_id) // let status = json_get_int(res, "status") // if status != 0: // return [] // let tokens_raw = json_get(res, "tokens") // var tokens: Array = [] // var i: Int = 0 // while i < json_array_length(tokens_raw): // push(tokens, _semantic_token_from(json_array_value_at(tokens_raw, i))) // i = i + 1 // 0 // return tokens // // // --- Formatting --- // // pub fn format_document(doc: Document) -> FormatResult: // let res = kain_service_format_document(doc._ws_id, doc._doc_id) // let status = json_get_int(res, "status") // var diagnostics: Array = [] // if status == 0: // let diags_raw = json_get(res, "diagnostics") // var i: Int = 0 // while i < json_array_length(diags_raw): // push(diagnostics, _diagnostic_from(json_array_value_at(diags_raw, i))) // i = i + 1 // 0 // return FormatResult { // formatted: json_string_or(res, "formatted", ""), // already_formatted: json_bool_or(res, "already_formatted", false), // diagnostics: diagnostics, // } //!end-kain-file //!kain-file // path = "machine.kn" // kind = "text" // encoding = "utf8" // bytes = 5413 // sha256 = "sha256:409cc994b20bcbab0be8b87aa520e3dcd82766f41f60c398e4a8065bea56d531" // trailing_newline = true //!kain-file-content // # Machine-level CPU, topology, and VM primitives for systems blades. // // @extern // fn abi_cpu_pause() -> Int // // @extern // fn abi_cpu_rdtsc() -> Int // // @extern // fn abi_cpu_cpuid_lane(leaf: Int, subleaf: Int, lane: Int) -> Int // // @extern // fn abi_cpu_prefetch_read(address: ptr, locality: Int) -> Unit // // @extern // fn abi_cpu_prefetch_write(address: ptr, locality: Int) -> Unit // // @extern // fn abi_cpu_logical_count() -> Int // // @extern // fn abi_cpu_core_count() -> Int // // @extern // fn abi_cpu_package_count() -> Int // // @extern // fn abi_cpu_cache_line_bytes() -> Int // // @extern // fn abi_cpu_current_thread_id() -> Int // // @extern // fn abi_cpu_current_thread_affinity_mask() -> Int // // @extern // fn abi_cpu_set_current_thread_affinity(core_index: Int) -> Int // // @extern // fn abi_cpu_numa_node_count() -> Int // // @extern // fn abi_cpu_current_numa_node() -> Int // // @extern // fn abi_cpu_bind_current_thread_to_numa(node_index: Int) -> Int // // @extern // fn abi_vm_page_size() -> Int // // @extern // fn abi_vm_reserve(byte_count: Int) -> ptr // // @extern // fn abi_vm_commit(address: ptr, byte_count: Int) -> Int // // @extern // fn abi_vm_decommit(address: ptr, byte_count: Int) -> Int // // @extern // fn abi_vm_release(address: ptr, byte_count: Int) -> Int // // @extern // fn abi_vm_lock(address: ptr, byte_count: Int) -> Int // // @extern // fn abi_vm_unlock(address: ptr, byte_count: Int) -> Int // // @extern // fn abi_vm_map_huge(byte_count: Int) -> ptr // // @extern // fn abi_vm_map(byte_count: Int) -> ptr // // @extern // fn abi_vm_unmap(address: ptr, byte_count: Int) -> Int // // @extern // fn abi_vm_protect(address: ptr, byte_count: Int, mode: Int) -> Int // // pub fn pause() -> Int: // return abi_cpu_pause() // // pub fn load_fence() -> Unit with Unsafe: // lfence() // // pub fn store_fence() -> Unit with Unsafe: // sfence() // // pub fn full_fence() -> Unit with Unsafe: // mfence() // // pub fn cache_flush(address: ptr) -> Unit with Unsafe: // clflush(address) // // pub fn spin_loop_hint() -> Unit with Unsafe: // asm("pause") // // pub fn rdtsc() -> Int: // return abi_cpu_rdtsc() // // pub fn cpuid_eax(leaf: Int, subleaf: Int) -> Int: // return abi_cpu_cpuid_lane(leaf, subleaf, 0) // // pub fn cpuid_ebx(leaf: Int, subleaf: Int) -> Int: // return abi_cpu_cpuid_lane(leaf, subleaf, 1) // // pub fn cpuid_ecx(leaf: Int, subleaf: Int) -> Int: // return abi_cpu_cpuid_lane(leaf, subleaf, 2) // // pub fn cpuid_edx(leaf: Int, subleaf: Int) -> Int: // return abi_cpu_cpuid_lane(leaf, subleaf, 3) // // pub fn prefetch_read(address: ptr, locality: Int) -> Unit: // abi_cpu_prefetch_read(address, locality) // // pub fn prefetch_write(address: ptr, locality: Int) -> Unit: // abi_cpu_prefetch_write(address, locality) // // pub fn cpu_logical_count() -> Int: // return abi_cpu_logical_count() // // pub fn cpu_core_count() -> Int: // return abi_cpu_core_count() // // pub fn cpu_package_count() -> Int: // return abi_cpu_package_count() // // pub fn cpu_cache_line_bytes() -> Int: // return abi_cpu_cache_line_bytes() // // pub fn current_thread_id() -> Int: // return abi_cpu_current_thread_id() // // pub fn current_thread_affinity_mask() -> Int: // return abi_cpu_current_thread_affinity_mask() // // pub fn set_current_thread_affinity(core_index: Int) -> Int with Unsafe: // return abi_cpu_set_current_thread_affinity(core_index) // // pub fn numa_node_count() -> Int: // return abi_cpu_numa_node_count() // // pub fn numa_current_node() -> Int: // return abi_cpu_current_numa_node() // // pub fn numa_bind_current_thread(node_index: Int) -> Int with Unsafe: // return abi_cpu_bind_current_thread_to_numa(node_index) // // pub fn vm_page_size() -> Int: // return abi_vm_page_size() // // pub fn vm_reserve(byte_count: Int) -> ptr with Unsafe: // return abi_vm_reserve(byte_count) // // pub fn vm_commit(address: ptr, byte_count: Int) -> Int with Unsafe: // return abi_vm_commit(address, byte_count) // // pub fn vm_decommit(address: ptr, byte_count: Int) -> Int with Unsafe: // return abi_vm_decommit(address, byte_count) // // pub fn vm_release(address: ptr, byte_count: Int) -> Int with Unsafe: // return abi_vm_release(address, byte_count) // // pub fn vm_lock(address: ptr, byte_count: Int) -> Int with Unsafe: // return abi_vm_lock(address, byte_count) // // pub fn vm_unlock(address: ptr, byte_count: Int) -> Int with Unsafe: // return abi_vm_unlock(address, byte_count) // // pub fn vm_map_huge(byte_count: Int) -> ptr with Unsafe: // return abi_vm_map_huge(byte_count) // // pub fn vm_map(byte_count: Int) -> ptr with Unsafe: // return abi_vm_map(byte_count) // // pub fn vm_unmap(address: ptr, byte_count: Int) -> Int with Unsafe: // return abi_vm_unmap(address, byte_count) // // pub fn vm_protect_none(address: ptr, byte_count: Int) -> Int with Unsafe: // return abi_vm_protect(address, byte_count, 0) // // pub fn vm_protect_read(address: ptr, byte_count: Int) -> Int with Unsafe: // return abi_vm_protect(address, byte_count, 1) // // pub fn vm_protect_read_write(address: ptr, byte_count: Int) -> Int with Unsafe: // return abi_vm_protect(address, byte_count, 2) // // pub fn vm_protect_execute_read(address: ptr, byte_count: Int) -> Int with Unsafe: // return abi_vm_protect(address, byte_count, 3) // // pub fn vm_protect_execute_read_write(address: ptr, byte_count: Int) -> Int with Unsafe: // return abi_vm_protect(address, byte_count, 4) //!end-kain-file //!kain-file // path = "math.kn" // kind = "text" // encoding = "utf8" // bytes = 110773 // sha256 = "sha256:5a1197e9df0ba88402d309dae726fb9f8c1668df1b527fb0b608e0464511d7f5" // trailing_newline = true //!kain-file-content // // Canonical root math stdlib for Kain. // // // // This is the engine-facing math surface for native LLVM, shaders, UI, // // graphics, simulation, procedural generation, and GPU layout authoring. // // It favors explicit data layouts and free functions so the surface stays // // stable across Kain's current compiler/runtime lanes. // // pub const PI: Float = 3.141592653589793 // pub const TAU: Float = 6.283185307179586 // pub const HALF_PI: Float = 1.5707963267948966 // pub const DEG_TO_RAD: Float = 0.017453292519943295 // pub const RAD_TO_DEG: Float = 57.29577951308232 // pub const EPSILON: Float = 0.000001 // pub const HUGE_EPSILON: Float = 0.0001 // // pub fn pi() -> Float: // return PI // // pub fn tau() -> Float: // return TAU // // pub fn half_pi() -> Float: // return HALF_PI // // pub fn vec2(x: Float, y: Float) -> Vec2: // return (x, y) // // pub fn vec3(x: Float, y: Float, z: Float) -> Vec3: // return (x, y, z) // // pub fn vec4(x: Float, y: Float, z: Float, w: Float) -> Vec4: // return (x, y, z, w) // // pub fn math_min(a: Float, b: Float) -> Float: // if a <= b: // return a // return b // // pub fn math_max(a: Float, b: Float) -> Float: // if a >= b: // return a // return b // // pub fn math_clamp(value: Float, low: Float, high: Float) -> Float: // return math_min(math_max(value, low), high) // // pub fn math_int_clamp(value: Int, low: Int, high: Int) -> Int: // if value <= low: // return low // if value >= high: // return high // return value // // pub struct Vec3A: // x: Float // y: Float // z: Float // pad: Float // // pub struct Quat: // x: Float // y: Float // z: Float // w: Float // // pub struct Mat3: // row0: Vec3 // row1: Vec3 // row2: Vec3 // // pub struct Mat4: // row0: Vec4 // row1: Vec4 // row2: Vec4 // row3: Vec4 // // pub struct Affine2: // x_axis: Vec2 // y_axis: Vec2 // translation: Vec2 // // pub struct Affine3: // x_axis: Vec3 // y_axis: Vec3 // z_axis: Vec3 // translation: Vec3 // // pub struct Float8: // lo: Vec4 // hi: Vec4 // // pub struct Vec3x4: // x: Vec4 // y: Vec4 // z: Vec4 // // pub struct Vec4x8: // x: Float8 // y: Float8 // z: Float8 // w: Float8 // // pub struct GpuLayoutInfo: // alignment_bytes: Int // size_bytes: Int // stride_bytes: Int // padded_size_bytes: Int // // pub struct CBuffer: // value: T // layout: GpuLayoutInfo // // pub struct Std140: // value: T // layout: GpuLayoutInfo // // pub struct Std430: // value: T // layout: GpuLayoutInfo // // pub struct Std140Vec3: // x: Float // y: Float // z: Float // pad: Float // // pub struct Std140Mat3: // row0: Vec4 // row1: Vec4 // row2: Vec4 // // pub struct Plane: // normal: Vec3 // distance: Float // // pub struct Ray3: // origin: Vec3 // direction: Vec3 // // pub struct Aabb: // min: Vec3 // max: Vec3 // // pub struct Obb: // center: Vec3 // axis_x: Vec3 // axis_y: Vec3 // axis_z: Vec3 // half_extents: Vec3 // // pub struct BoundingSphere: // center: Vec3 // radius: Float // // pub struct Frustum: // left: Plane // right: Plane // top: Plane // bottom: Plane // near: Plane // far: Plane // // pub struct RayHit: // hit: Bool // distance: Float // position: Vec3 // normal: Vec3 // barycentric: Vec3 // // pub struct ColorRgb: // r: Float // g: Float // b: Float // // pub struct ColorRgba: // r: Float // g: Float // b: Float // a: Float // // pub struct Hsv: // h: Float // s: Float // v: Float // // pub struct Hsl: // h: Float // s: Float // l: Float // // pub fn degrees_to_radians(value: Float) -> Float: // return value * DEG_TO_RAD // // pub fn radians_to_degrees(value: Float) -> Float: // return value * RAD_TO_DEG // // pub fn saturate(value: Float) -> Float: // return math_clamp(value, 0.0, 1.0) // // pub fn sign_nonzero(value: Float) -> Float: // if value < 0.0: // return -1.0 // return 1.0 // // pub fn inverse_lerp(a: Float, b: Float, value: Float) -> Float: // let span = b - a // if abs(span) <= EPSILON: // return 0.0 // return (value - a) / span // // pub fn lerp(a: Float, b: Float, t: Float) -> Float: // return a + (b - a) * t // // pub fn smoothstep(edge0: Float, edge1: Float, value: Float) -> Float: // let t = saturate(inverse_lerp(edge0, edge1, value)) // return t * t * (3.0 - 2.0 * t) // // pub fn smootherstep(edge0: Float, edge1: Float, value: Float) -> Float: // let t = saturate(inverse_lerp(edge0, edge1, value)) // return t * t * t * (t * (t * 6.0 - 15.0) + 10.0) // // pub fn nearly_equal(a: Float, b: Float, epsilon: Float) -> Bool: // return abs(a - b) <= epsilon // // pub fn fast_sin(angle: Float) -> Float: // let wrapped = ((angle + PI) % TAU) - PI // let b = 4.0 / PI // let c = -4.0 / (PI * PI) // let y = b * wrapped + c * wrapped * abs(wrapped) // let p = 0.225 // return p * (y * abs(y) - y) + y // // pub fn fast_cos(angle: Float) -> Float: // return fast_sin(angle + HALF_PI) // // pub fn fast_atan2(y: Float, x: Float) -> Float: // if abs(x) <= EPSILON: // if y > 0.0: // return HALF_PI // if y < 0.0: // return -HALF_PI // return 0.0 // let abs_y = abs(y) + 0.0000001 // let angle_base = if x >= 0.0: // let r = (x - abs_y) / (x + abs_y) // 0.78539816339 - 0.78539816339 * r // else: // let r = (x + abs_y) / (abs_y - x) // 2.35619449019 - 0.78539816339 * r // if y < 0.0: // return -angle_base // return angle_base // // pub fn fast_acos(value: Float) -> Float: // let x = math_clamp(abs(value), 0.0, 1.0) // let step0 = -0.0187293 * x + 0.0742610 // let step1 = step0 * x - 0.2121144 // let step2 = step1 * x + 1.5707288 // let root = sqrt(math_max(1.0 - x * x, 0.0)) // let arc = step2 * root // if value < 0.0: // return PI - arc // return arc // // pub fn tan_scalar(value: Float) -> Float: // let denominator = cos(value) // if abs(denominator) <= EPSILON: // return sign_nonzero(sin(value)) * 1000000000.0 // return sin(value) / denominator // // pub fn fma_scalar(a: Float, b: Float, c: Float) -> Float: // return a * b + c // // pub fn frac_scalar(value: Float) -> Float: // return value - floor(value) // // pub fn vec2_zero() -> Vec2: // return vec2(0.0, 0.0) // // pub fn vec2_one() -> Vec2: // return vec2(1.0, 1.0) // // pub fn vec2_splat(value: Float) -> Vec2: // return vec2(value, value) // // pub fn vec3_zero() -> Vec3: // return vec3(0.0, 0.0, 0.0) // // pub fn vec3_one() -> Vec3: // return vec3(1.0, 1.0, 1.0) // // pub fn vec3_up() -> Vec3: // return vec3(0.0, 1.0, 0.0) // // pub fn vec3_right() -> Vec3: // return vec3(1.0, 0.0, 0.0) // // pub fn vec3_forward() -> Vec3: // return vec3(0.0, 0.0, 1.0) // // pub fn vec3_splat(value: Float) -> Vec3: // return vec3(value, value, value) // // pub fn vec4_zero() -> Vec4: // return vec4(0.0, 0.0, 0.0, 0.0) // // pub fn vec4_one() -> Vec4: // return vec4(1.0, 1.0, 1.0, 1.0) // // pub fn vec4_splat(value: Float) -> Vec4: // return vec4(value, value, value, value) // // pub fn vec2_dot(a: Vec2, b: Vec2) -> Float: // return a.x * b.x + a.y * b.y // // pub fn vec3_dot(a: Vec3, b: Vec3) -> Float: // return a.x * b.x + a.y * b.y + a.z * b.z // // pub fn vec4_dot(a: Vec4, b: Vec4) -> Float: // return a.x * b.x + a.y * b.y + a.z * b.z + a.w * b.w // // pub fn vec3_cross(a: Vec3, b: Vec3) -> Vec3: // return vec3(a.y * b.z - a.z * b.y, a.z * b.x - a.x * b.z, a.x * b.y - a.y * b.x) // // pub fn vec2_length(value: Vec2) -> Float: // return sqrt(vec2_dot(value, value)) // // pub fn vec3_length(value: Vec3) -> Float: // return sqrt(vec3_dot(value, value)) // // pub fn vec4_length(value: Vec4) -> Float: // return sqrt(vec4_dot(value, value)) // // pub fn vec2_length_squared(value: Vec2) -> Float: // return vec2_dot(value, value) // // pub fn vec2_add(a: Vec2, b: Vec2) -> Vec2: // return vec2(a.x + b.x, a.y + b.y) // // pub fn vec2_sub(a: Vec2, b: Vec2) -> Vec2: // return vec2(a.x - b.x, a.y - b.y) // // pub fn vec2_mul_scalar(value: Vec2, scalar: Float) -> Vec2: // return vec2(value.x * scalar, value.y * scalar) // // pub fn vec2_div_scalar(value: Vec2, scalar: Float) -> Vec2: // return vec2(value.x / scalar, value.y / scalar) // // pub fn vec2_hadamard(a: Vec2, b: Vec2) -> Vec2: // return vec2(a.x * b.x, a.y * b.y) // // pub fn vec2_floor(value: Vec2) -> Vec2: // return vec2(floor(value.x), floor(value.y)) // // pub fn vec2_frac(value: Vec2) -> Vec2: // return vec2(frac_scalar(value.x), frac_scalar(value.y)) // // pub fn vec3_add(a: Vec3, b: Vec3) -> Vec3: // return vec3(a.x + b.x, a.y + b.y, a.z + b.z) // // pub fn vec3_sub(a: Vec3, b: Vec3) -> Vec3: // return vec3(a.x - b.x, a.y - b.y, a.z - b.z) // // pub fn vec3_mul_scalar(value: Vec3, scalar: Float) -> Vec3: // return vec3(value.x * scalar, value.y * scalar, value.z * scalar) // // pub fn vec3_div_scalar(value: Vec3, scalar: Float) -> Vec3: // return vec3(value.x / scalar, value.y / scalar, value.z / scalar) // // pub fn vec3_neg(value: Vec3) -> Vec3: // return vec3(-value.x, -value.y, -value.z) // // pub fn vec3_abs(value: Vec3) -> Vec3: // return vec3(abs(value.x), abs(value.y), abs(value.z)) // // pub fn vec4_add(a: Vec4, b: Vec4) -> Vec4: // return vec4(a.x + b.x, a.y + b.y, a.z + b.z, a.w + b.w) // // pub fn vec4_sub(a: Vec4, b: Vec4) -> Vec4: // return vec4(a.x - b.x, a.y - b.y, a.z - b.z, a.w - b.w) // // pub fn vec4_mul_scalar(value: Vec4, scalar: Float) -> Vec4: // return vec4(value.x * scalar, value.y * scalar, value.z * scalar, value.w * scalar) // // pub fn vec4_div_scalar(value: Vec4, scalar: Float) -> Vec4: // return vec4(value.x / scalar, value.y / scalar, value.z / scalar, value.w / scalar) // // pub fn vec3_length_squared(value: Vec3) -> Float: // return vec3_dot(value, value) // // pub fn vec4_length_squared(value: Vec4) -> Float: // return vec4_dot(value, value) // // pub fn vec2_distance(a: Vec2, b: Vec2) -> Float: // return vec2_length(vec2_sub(a, b)) // // pub fn vec3_distance(a: Vec3, b: Vec3) -> Float: // return vec3_length(vec3_sub(a, b)) // // pub fn vec4_distance(a: Vec4, b: Vec4) -> Float: // return vec4_length(vec4_sub(a, b)) // // pub fn vec2_normalize_or_zero(value: Vec2) -> Vec2: // let length_value = vec2_length(value) // if length_value <= EPSILON: // return vec2_zero() // return vec2_div_scalar(value, length_value) // // pub fn vec3_normalize_or_zero(value: Vec3) -> Vec3: // let length_value = vec3_length(value) // if length_value <= EPSILON: // return vec3_zero() // return vec3_div_scalar(value, length_value) // // pub fn vec4_normalize_or_zero(value: Vec4) -> Vec4: // let length_value = vec4_length(value) // if length_value <= EPSILON: // return vec4_zero() // return vec4_div_scalar(value, length_value) // // pub fn vec2_perp(value: Vec2) -> Vec2: // return vec2(-value.y, value.x) // // pub fn vec2_rotate(value: Vec2, angle: Float) -> Vec2: // let c = cos(angle) // let s = sin(angle) // return vec2(value.x * c - value.y * s, value.x * s + value.y * c) // // pub fn vec2_lerp(a: Vec2, b: Vec2, t: Float) -> Vec2: // return vec2_add(a, vec2_mul_scalar(vec2_sub(b, a), t)) // // pub fn vec3_lerp(a: Vec3, b: Vec3, t: Float) -> Vec3: // return vec3_add(a, vec3_mul_scalar(vec3_sub(b, a), t)) // // pub fn vec4_lerp(a: Vec4, b: Vec4, t: Float) -> Vec4: // return vec4_add(a, vec4_mul_scalar(vec4_sub(b, a), t)) // // pub fn vec2_min(a: Vec2, b: Vec2) -> Vec2: // return vec2(math_min(a.x, b.x), math_min(a.y, b.y)) // // pub fn vec2_max(a: Vec2, b: Vec2) -> Vec2: // return vec2(math_max(a.x, b.x), math_max(a.y, b.y)) // // pub fn vec3_min(a: Vec3, b: Vec3) -> Vec3: // return vec3(math_min(a.x, b.x), math_min(a.y, b.y), math_min(a.z, b.z)) // // pub fn vec3_max(a: Vec3, b: Vec3) -> Vec3: // return vec3(math_max(a.x, b.x), math_max(a.y, b.y), math_max(a.z, b.z)) // // pub fn vec4_min(a: Vec4, b: Vec4) -> Vec4: // return vec4(math_min(a.x, b.x), math_min(a.y, b.y), math_min(a.z, b.z), math_min(a.w, b.w)) // // pub fn vec4_max(a: Vec4, b: Vec4) -> Vec4: // return vec4(math_max(a.x, b.x), math_max(a.y, b.y), math_max(a.z, b.z), math_max(a.w, b.w)) // // pub fn vec3_clamp(value: Vec3, lo: Vec3, hi: Vec3) -> Vec3: // return vec3( // math_clamp(value.x, lo.x, hi.x), // math_clamp(value.y, lo.y, hi.y), // math_clamp(value.z, lo.z, hi.z) // ) // // pub fn vec4_clamp(value: Vec4, lo: Vec4, hi: Vec4) -> Vec4: // return vec4( // math_clamp(value.x, lo.x, hi.x), // math_clamp(value.y, lo.y, hi.y), // math_clamp(value.z, lo.z, hi.z), // math_clamp(value.w, lo.w, hi.w) // ) // // pub fn vec3_hadamard(a: Vec3, b: Vec3) -> Vec3: // return vec3(a.x * b.x, a.y * b.y, a.z * b.z) // // pub fn vec3_floor(value: Vec3) -> Vec3: // return vec3(floor(value.x), floor(value.y), floor(value.z)) // // pub fn vec3_frac(value: Vec3) -> Vec3: // return vec3(frac_scalar(value.x), frac_scalar(value.y), frac_scalar(value.z)) // // pub fn vec4_hadamard(a: Vec4, b: Vec4) -> Vec4: // return vec4(a.x * b.x, a.y * b.y, a.z * b.z, a.w * b.w) // // pub fn vec3_project(a: Vec3, onto: Vec3) -> Vec3: // let denom = vec3_dot(onto, onto) // if denom <= EPSILON: // return vec3_zero() // return vec3_mul_scalar(onto, vec3_dot(a, onto) / denom) // // pub fn vec3_reject(a: Vec3, onto: Vec3) -> Vec3: // return vec3_sub(a, vec3_project(a, onto)) // // pub fn vec3_reflect(direction: Vec3, normal: Vec3) -> Vec3: // let n = vec3_normalize_or_zero(normal) // return vec3_sub(direction, vec3_mul_scalar(n, 2.0 * vec3_dot(direction, n))) // // pub fn vec3_refract(direction: Vec3, normal: Vec3, eta: Float) -> Vec3: // let n = vec3_normalize_or_zero(normal) // let d = vec3_normalize_or_zero(direction) // let cos_i = math_clamp(-vec3_dot(n, d), -1.0, 1.0) // let sin_t2 = eta * eta * (1.0 - cos_i * cos_i) // if sin_t2 > 1.0: // return vec3_zero() // let cos_t = sqrt(1.0 - sin_t2) // return vec3_add(vec3_mul_scalar(d, eta), vec3_mul_scalar(n, eta * cos_i - cos_t)) // // pub fn vec3_faceforward(normal: Vec3, incident: Vec3, reference_normal: Vec3) -> Vec3: // if vec3_dot(reference_normal, incident) < 0.0: // return normal // return vec3_neg(normal) // // pub fn vec3a(value: Vec3) -> Vec3A: // return Vec3A { x: value.x, y: value.y, z: value.z, pad: 0.0 } // // pub fn vec3a_to_vec3(value: Vec3A) -> Vec3: // return vec3(value.x, value.y, value.z) // // pub fn vec3a_length(value: Vec3A) -> Float: // return sqrt(value.x * value.x + value.y * value.y + value.z * value.z) // // pub fn vec3a_normalize_or_zero(value: Vec3A) -> Vec3A: // let length_value = vec3a_length(value) // if length_value <= EPSILON: // return Vec3A { x: 0.0, y: 0.0, z: 0.0, pad: 0.0 } // return Vec3A { // x: value.x / length_value, // y: value.y / length_value, // z: value.z / length_value, // pad: 0.0 // } // // pub fn float8_splat(value: Float) -> Float8: // return Float8 { lo: vec4_splat(value), hi: vec4_splat(value) } // // pub fn vec3x4_from_vec3(a: Vec3, b: Vec3, c: Vec3, d: Vec3) -> Vec3x4: // return Vec3x4 { // x: vec4(a.x, b.x, c.x, d.x), // y: vec4(a.y, b.y, c.y, d.y), // z: vec4(a.z, b.z, c.z, d.z) // } // // pub fn vec3x4_add(a: Vec3x4, b: Vec3x4) -> Vec3x4: // return Vec3x4 { x: vec4_add(a.x, b.x), y: vec4_add(a.y, b.y), z: vec4_add(a.z, b.z) } // // pub fn vec3x4_sub(a: Vec3x4, b: Vec3x4) -> Vec3x4: // return Vec3x4 { x: vec4_sub(a.x, b.x), y: vec4_sub(a.y, b.y), z: vec4_sub(a.z, b.z) } // // pub fn vec3x4_mul_scalar(a: Vec3x4, value: Float) -> Vec3x4: // return Vec3x4 { x: vec4_mul_scalar(a.x, value), y: vec4_mul_scalar(a.y, value), z: vec4_mul_scalar(a.z, value) } // // pub fn vec3x4_dot(a: Vec3x4, b: Vec3x4) -> Vec4: // return vec4_add(vec4_add(vec4_hadamard(a.x, b.x), vec4_hadamard(a.y, b.y)), vec4_hadamard(a.z, b.z)) // // pub fn vec3x4_length_squared(value: Vec3x4) -> Vec4: // return vec3x4_dot(value, value) // // pub fn vec3x4_normalize_or_zero(value: Vec3x4) -> Vec3x4: // let lengths = vec4( // sqrt(math_max(value.x.x * value.x.x + value.y.x * value.y.x + value.z.x * value.z.x, EPSILON)), // sqrt(math_max(value.x.y * value.x.y + value.y.y * value.y.y + value.z.y * value.z.y, EPSILON)), // sqrt(math_max(value.x.z * value.x.z + value.y.z * value.y.z + value.z.z * value.z.z, EPSILON)), // sqrt(math_max(value.x.w * value.x.w + value.y.w * value.y.w + value.z.w * value.z.w, EPSILON)) // ) // return Vec3x4 { // x: vec4(value.x.x / lengths.x, value.x.y / lengths.y, value.x.z / lengths.z, value.x.w / lengths.w), // y: vec4(value.y.x / lengths.x, value.y.y / lengths.y, value.y.z / lengths.z, value.y.w / lengths.w), // z: vec4(value.z.x / lengths.x, value.z.y / lengths.y, value.z.z / lengths.z, value.z.w / lengths.w) // } // // pub fn vec4x8_make(x_lo: Vec4, x_hi: Vec4, y_lo: Vec4, y_hi: Vec4, z_lo: Vec4, z_hi: Vec4, w_lo: Vec4, w_hi: Vec4) -> Vec4x8: // return Vec4x8 { // x: Float8 { lo: x_lo, hi: x_hi }, // y: Float8 { lo: y_lo, hi: y_hi }, // z: Float8 { lo: z_lo, hi: z_hi }, // w: Float8 { lo: w_lo, hi: w_hi } // } // // pub fn vec4x8_add(a: Vec4x8, b: Vec4x8) -> Vec4x8: // return Vec4x8 { // x: Float8 { lo: vec4_add(a.x.lo, b.x.lo), hi: vec4_add(a.x.hi, b.x.hi) }, // y: Float8 { lo: vec4_add(a.y.lo, b.y.lo), hi: vec4_add(a.y.hi, b.y.hi) }, // z: Float8 { lo: vec4_add(a.z.lo, b.z.lo), hi: vec4_add(a.z.hi, b.z.hi) }, // w: Float8 { lo: vec4_add(a.w.lo, b.w.lo), hi: vec4_add(a.w.hi, b.w.hi) } // } // // pub fn quat_identity() -> Quat: // return Quat { x: 0.0, y: 0.0, z: 0.0, w: 1.0 } // // pub fn quat_conjugate(value: Quat) -> Quat: // return Quat { x: -value.x, y: -value.y, z: -value.z, w: value.w } // // pub fn quat_dot(a: Quat, b: Quat) -> Float: // return a.x * b.x + a.y * b.y + a.z * b.z + a.w * b.w // // pub fn quat_length(value: Quat) -> Float: // return sqrt(quat_dot(value, value)) // // pub fn quat_normalize_or_identity(value: Quat) -> Quat: // let length_value = quat_length(value) // if length_value <= EPSILON: // return quat_identity() // return Quat { // x: value.x / length_value, // y: value.y / length_value, // z: value.z / length_value, // w: value.w / length_value // } // // pub fn quat_from_axis_angle(axis: Vec3, angle: Float) -> Quat: // let n = vec3_normalize_or_zero(axis) // let half_angle = angle * 0.5 // let s = sin(half_angle) // return quat_normalize_or_identity(Quat { x: n.x * s, y: n.y * s, z: n.z * s, w: cos(half_angle) }) // // pub fn quat_mul(a: Quat, b: Quat) -> Quat: // return Quat { // x: a.w * b.x + a.x * b.w + a.y * b.z - a.z * b.y, // y: a.w * b.y - a.x * b.z + a.y * b.w + a.z * b.x, // z: a.w * b.z + a.x * b.y - a.y * b.x + a.z * b.w, // w: a.w * b.w - a.x * b.x - a.y * b.y - a.z * b.z // } // // pub fn quat_rotate_vec3(rotation: Quat, value: Vec3) -> Vec3: // let q = quat_normalize_or_identity(rotation) // let u = vec3(q.x, q.y, q.z) // let s = q.w // let rotated = vec3_add(vec3_add(vec3_mul_scalar(u, 2.0 * vec3_dot(u, value)), vec3_mul_scalar(value, s * s - vec3_dot(u, u))), vec3_mul_scalar(vec3_cross(u, value), 2.0 * s)) // return rotated // // pub fn quat_nlerp(a: Quat, b: Quat, t: Float) -> Quat: // let blend = Quat { // x: lerp(a.x, b.x, t), // y: lerp(a.y, b.y, t), // z: lerp(a.z, b.z, t), // w: lerp(a.w, b.w, t) // } // return quat_normalize_or_identity(blend) // // pub fn quat_slerp(a: Quat, b: Quat, t: Float) -> Quat: // let mut_end = if quat_dot(a, b) < 0.0: // Quat { x: -b.x, y: -b.y, z: -b.z, w: -b.w } // else: // b // let cos_theta = math_clamp(quat_dot(a, mut_end), -1.0, 1.0) // if cos_theta > 0.9995: // return quat_nlerp(a, mut_end, t) // let theta = fast_acos(cos_theta) // let sin_theta = sin(theta) // let w0 = sin((1.0 - t) * theta) / sin_theta // let w1 = sin(t * theta) / sin_theta // return quat_normalize_or_identity(Quat { // x: a.x * w0 + mut_end.x * w1, // y: a.y * w0 + mut_end.y * w1, // z: a.z * w0 + mut_end.z * w1, // w: a.w * w0 + mut_end.w * w1 // }) // // pub fn mat3_identity() -> Mat3: // return Mat3 { // row0: vec3(1.0, 0.0, 0.0), // row1: vec3(0.0, 1.0, 0.0), // row2: vec3(0.0, 0.0, 1.0) // } // // pub fn mat3_mul_vec3(transform_matrix: Mat3, value: Vec3) -> Vec3: // return vec3( // vec3_dot(transform_matrix.row0, value), // vec3_dot(transform_matrix.row1, value), // vec3_dot(transform_matrix.row2, value) // ) // // pub fn mat3_transpose(transform_matrix: Mat3) -> Mat3: // return Mat3 { // row0: vec3(transform_matrix.row0.x, transform_matrix.row1.x, transform_matrix.row2.x), // row1: vec3(transform_matrix.row0.y, transform_matrix.row1.y, transform_matrix.row2.y), // row2: vec3(transform_matrix.row0.z, transform_matrix.row1.z, transform_matrix.row2.z) // } // // pub fn mat4_identity() -> Mat4: // return Mat4 { // row0: vec4(1.0, 0.0, 0.0, 0.0), // row1: vec4(0.0, 1.0, 0.0, 0.0), // row2: vec4(0.0, 0.0, 1.0, 0.0), // row3: vec4(0.0, 0.0, 0.0, 1.0) // } // // pub fn mat4_translation(offset: Vec3) -> Mat4: // return Mat4 { // row0: vec4(1.0, 0.0, 0.0, offset.x), // row1: vec4(0.0, 1.0, 0.0, offset.y), // row2: vec4(0.0, 0.0, 1.0, offset.z), // row3: vec4(0.0, 0.0, 0.0, 1.0) // } // // pub fn mat4_scale(scale: Vec3) -> Mat4: // return Mat4 { // row0: vec4(scale.x, 0.0, 0.0, 0.0), // row1: vec4(0.0, scale.y, 0.0, 0.0), // row2: vec4(0.0, 0.0, scale.z, 0.0), // row3: vec4(0.0, 0.0, 0.0, 1.0) // } // // pub fn mat4_rotation_x(angle: Float) -> Mat4: // let c = cos(angle) // let s = sin(angle) // return Mat4 { // row0: vec4(1.0, 0.0, 0.0, 0.0), // row1: vec4(0.0, c, -s, 0.0), // row2: vec4(0.0, s, c, 0.0), // row3: vec4(0.0, 0.0, 0.0, 1.0) // } // // pub fn mat4_rotation_y(angle: Float) -> Mat4: // let c = cos(angle) // let s = sin(angle) // return Mat4 { // row0: vec4(c, 0.0, s, 0.0), // row1: vec4(0.0, 1.0, 0.0, 0.0), // row2: vec4(-s, 0.0, c, 0.0), // row3: vec4(0.0, 0.0, 0.0, 1.0) // } // // pub fn mat4_rotation_z(angle: Float) -> Mat4: // let c = cos(angle) // let s = sin(angle) // return Mat4 { // row0: vec4(c, -s, 0.0, 0.0), // row1: vec4(s, c, 0.0, 0.0), // row2: vec4(0.0, 0.0, 1.0, 0.0), // row3: vec4(0.0, 0.0, 0.0, 1.0) // } // // pub fn mat4_from_quat(value: Quat) -> Mat4: // let q = quat_normalize_or_identity(value) // let xx = q.x * q.x // let yy = q.y * q.y // let zz = q.z * q.z // let xy = q.x * q.y // let xz = q.x * q.z // let yz = q.y * q.z // let wx = q.w * q.x // let wy = q.w * q.y // let wz = q.w * q.z // return Mat4 { // row0: vec4(1.0 - 2.0 * (yy + zz), 2.0 * (xy - wz), 2.0 * (xz + wy), 0.0), // row1: vec4(2.0 * (xy + wz), 1.0 - 2.0 * (xx + zz), 2.0 * (yz - wx), 0.0), // row2: vec4(2.0 * (xz - wy), 2.0 * (yz + wx), 1.0 - 2.0 * (xx + yy), 0.0), // row3: vec4(0.0, 0.0, 0.0, 1.0) // } // // pub fn mat4_rotation_xyz(angles: Vec3) -> Mat4: // return mat4_mul(mat4_mul(mat4_rotation_z(angles.z), mat4_rotation_y(angles.y)), mat4_rotation_x(angles.x)) // // pub fn mat4_transpose(transform_matrix: Mat4) -> Mat4: // return Mat4 { // row0: vec4(transform_matrix.row0.x, transform_matrix.row1.x, transform_matrix.row2.x, transform_matrix.row3.x), // row1: vec4(transform_matrix.row0.y, transform_matrix.row1.y, transform_matrix.row2.y, transform_matrix.row3.y), // row2: vec4(transform_matrix.row0.z, transform_matrix.row1.z, transform_matrix.row2.z, transform_matrix.row3.z), // row3: vec4(transform_matrix.row0.w, transform_matrix.row1.w, transform_matrix.row2.w, transform_matrix.row3.w) // } // // pub fn mat4_mul(a: Mat4, b: Mat4) -> Mat4: // let bt = mat4_transpose(b) // return Mat4 { // row0: vec4(vec4_dot(a.row0, bt.row0), vec4_dot(a.row0, bt.row1), vec4_dot(a.row0, bt.row2), vec4_dot(a.row0, bt.row3)), // row1: vec4(vec4_dot(a.row1, bt.row0), vec4_dot(a.row1, bt.row1), vec4_dot(a.row1, bt.row2), vec4_dot(a.row1, bt.row3)), // row2: vec4(vec4_dot(a.row2, bt.row0), vec4_dot(a.row2, bt.row1), vec4_dot(a.row2, bt.row2), vec4_dot(a.row2, bt.row3)), // row3: vec4(vec4_dot(a.row3, bt.row0), vec4_dot(a.row3, bt.row1), vec4_dot(a.row3, bt.row2), vec4_dot(a.row3, bt.row3)) // } // // pub fn mat4_transform_point(transform_matrix: Mat4, point: Vec3) -> Vec3: // let p = vec4(point.x, point.y, point.z, 1.0) // let x = vec4_dot(transform_matrix.row0, p) // let y = vec4_dot(transform_matrix.row1, p) // let z = vec4_dot(transform_matrix.row2, p) // let w = vec4_dot(transform_matrix.row3, p) // if abs(w) <= EPSILON: // return vec3(x, y, z) // return vec3(x / w, y / w, z / w) // // pub fn mat4_transform_vector(transform_matrix: Mat4, vector: Vec3) -> Vec3: // let p = vec4(vector.x, vector.y, vector.z, 0.0) // return vec3(vec4_dot(transform_matrix.row0, p), vec4_dot(transform_matrix.row1, p), vec4_dot(transform_matrix.row2, p)) // // pub fn mat4_from_trs(translation: Vec3, rotation: Quat, scale: Vec3) -> Mat4: // return mat4_mul(mat4_translation(translation), mat4_mul(mat4_from_quat(rotation), mat4_scale(scale))) // // pub fn mat4_perspective(fov_y_radians: Float, aspect: Float, near_plane: Float, far_plane: Float) -> Mat4: // let f = 1.0 / tan_scalar(fov_y_radians * 0.5) // let range_inv = 1.0 / (near_plane - far_plane) // return Mat4 { // row0: vec4(f / math_max(aspect, EPSILON), 0.0, 0.0, 0.0), // row1: vec4(0.0, f, 0.0, 0.0), // row2: vec4(0.0, 0.0, (far_plane + near_plane) * range_inv, (2.0 * far_plane * near_plane) * range_inv), // row3: vec4(0.0, 0.0, -1.0, 0.0) // } // // pub fn mat4_orthographic(left: Float, right: Float, bottom: Float, top: Float, near_plane: Float, far_plane: Float) -> Mat4: // let width = right - left // let height = top - bottom // let depth = far_plane - near_plane // return Mat4 { // row0: vec4(2.0 / math_max(width, EPSILON), 0.0, 0.0, -(right + left) / math_max(width, EPSILON)), // row1: vec4(0.0, 2.0 / math_max(height, EPSILON), 0.0, -(top + bottom) / math_max(height, EPSILON)), // row2: vec4(0.0, 0.0, -2.0 / math_max(depth, EPSILON), -(far_plane + near_plane) / math_max(depth, EPSILON)), // row3: vec4(0.0, 0.0, 0.0, 1.0) // } // // pub fn mat4_look_at(eye: Vec3, target: Vec3, up: Vec3) -> Mat4: // let forward = vec3_normalize_or_zero(vec3_sub(target, eye)) // let right = vec3_normalize_or_zero(vec3_cross(forward, up)) // let corrected_up = vec3_cross(right, forward) // return Mat4 { // row0: vec4(right.x, right.y, right.z, -vec3_dot(right, eye)), // row1: vec4(corrected_up.x, corrected_up.y, corrected_up.z, -vec3_dot(corrected_up, eye)), // row2: vec4(-forward.x, -forward.y, -forward.z, vec3_dot(forward, eye)), // row3: vec4(0.0, 0.0, 0.0, 1.0) // } // // pub fn affine2_identity() -> Affine2: // return Affine2 { x_axis: vec2(1.0, 0.0), y_axis: vec2(0.0, 1.0), translation: vec2_zero() } // // pub fn affine2_transform_point(transform: Affine2, point: Vec2) -> Vec2: // return vec2( // transform.x_axis.x * point.x + transform.y_axis.x * point.y + transform.translation.x, // transform.x_axis.y * point.x + transform.y_axis.y * point.y + transform.translation.y // ) // // pub fn affine3_identity() -> Affine3: // return Affine3 { x_axis: vec3_right(), y_axis: vec3_up(), z_axis: vec3_forward(), translation: vec3_zero() } // // pub fn affine3_from_trs(translation: Vec3, rotation: Quat, scale: Vec3) -> Affine3: // let basis = mat4_from_quat(rotation) // return Affine3 { // x_axis: mat4_transform_vector(basis, vec3(scale.x, 0.0, 0.0)), // y_axis: mat4_transform_vector(basis, vec3(0.0, scale.y, 0.0)), // z_axis: mat4_transform_vector(basis, vec3(0.0, 0.0, scale.z)), // translation: translation // } // // pub fn affine3_transform_point(transform: Affine3, point: Vec3) -> Vec3: // let translated = vec3_add(vec3_add(transform.translation, vec3_mul_scalar(transform.x_axis, point.x)), vec3_add(vec3_mul_scalar(transform.y_axis, point.y), vec3_mul_scalar(transform.z_axis, point.z))) // return translated // // pub fn affine3_transform_vector(transform: Affine3, vector: Vec3) -> Vec3: // return vec3_add(vec3_mul_scalar(transform.x_axis, vector.x), vec3_add(vec3_mul_scalar(transform.y_axis, vector.y), vec3_mul_scalar(transform.z_axis, vector.z))) // // pub fn affine3_to_mat4(transform: Affine3) -> Mat4: // return Mat4 { // row0: vec4(transform.x_axis.x, transform.y_axis.x, transform.z_axis.x, transform.translation.x), // row1: vec4(transform.x_axis.y, transform.y_axis.y, transform.z_axis.y, transform.translation.y), // row2: vec4(transform.x_axis.z, transform.y_axis.z, transform.z_axis.z, transform.translation.z), // row3: vec4(0.0, 0.0, 0.0, 1.0) // } // // pub fn affine3_mul(a: Affine3, b: Affine3) -> Affine3: // return Affine3 { // x_axis: affine3_transform_vector(a, b.x_axis), // y_axis: affine3_transform_vector(a, b.y_axis), // z_axis: affine3_transform_vector(a, b.z_axis), // translation: affine3_transform_point(a, b.translation) // } // // pub fn align_up_int(value: Int, alignment: Int) -> Int: // if alignment <= 0: // return value // let remainder = value % alignment // if remainder == 0: // return value // return value + alignment - remainder // // pub fn gpu_layout_info(size_bytes: Int, alignment_bytes: Int) -> GpuLayoutInfo: // let padded = align_up_int(size_bytes, alignment_bytes) // return GpuLayoutInfo { // alignment_bytes: alignment_bytes, // size_bytes: size_bytes, // stride_bytes: padded, // padded_size_bytes: padded // } // // pub fn std140_vec3(value: Vec3) -> Std140: // return Std140 { // value: Std140Vec3 { x: value.x, y: value.y, z: value.z, pad: 0.0 }, // layout: gpu_layout_info(12, 16) // } // // pub fn std140_vec4(value: Vec4) -> Std140: // return Std140 { value: value, layout: gpu_layout_info(16, 16) } // // pub fn std140_mat3(value: Mat3) -> Std140: // return Std140 { // value: Std140Mat3 { // row0: vec4(value.row0.x, value.row0.y, value.row0.z, 0.0), // row1: vec4(value.row1.x, value.row1.y, value.row1.z, 0.0), // row2: vec4(value.row2.x, value.row2.y, value.row2.z, 0.0) // }, // layout: gpu_layout_info(48, 16) // } // // pub fn std140_mat4(value: Mat4) -> Std140: // return Std140 { value: value, layout: gpu_layout_info(64, 16) } // // pub fn std430_vec3a(value: Vec3A) -> Std430: // return Std430 { value: value, layout: gpu_layout_info(16, 16) } // // pub fn std430_vec4(value: Vec4) -> Std430: // return Std430 { value: value, layout: gpu_layout_info(16, 16) } // // pub fn cbuffer_mat4(value: Mat4) -> CBuffer: // return CBuffer { value: value, layout: gpu_layout_info(64, 16) } // // pub fn std140_mat4_alignment_bytes(value: Std140) -> Int: // return value.layout.alignment_bytes // // pub fn std140_mat4_stride_bytes(value: Std140) -> Int: // return value.layout.stride_bytes // // pub fn color_rgba_red(value: ColorRgba) -> Float: // return value.r // // pub fn color_rgba_green(value: ColorRgba) -> Float: // return value.g // // pub fn color_rgba_blue(value: ColorRgba) -> Float: // return value.b // // pub fn color_rgba_alpha(value: ColorRgba) -> Float: // return value.a // // pub fn ray_hit_is_hit(value: RayHit) -> Bool: // return value.hit // // pub fn plane_from_point_normal(point: Vec3, normal: Vec3) -> Plane: // let n = vec3_normalize_or_zero(normal) // return Plane { normal: n, distance: -vec3_dot(n, point) } // // pub fn plane_signed_distance(plane: Plane, point: Vec3) -> Float: // return vec3_dot(plane.normal, point) + plane.distance // // pub fn plane_normalize(plane: Plane) -> Plane: // let len = vec3_length(plane.normal) // if len <= EPSILON: // return Plane { normal: vec3_up(), distance: 0.0 } // return Plane { normal: vec3_div_scalar(plane.normal, len), distance: plane.distance / len } // // pub fn ray3(origin: Vec3, direction: Vec3) -> Ray3: // return Ray3 { origin: origin, direction: vec3_normalize_or_zero(direction) } // // pub fn aabb_center(bounds: Aabb) -> Vec3: // return vec3_mul_scalar(vec3_add(bounds.min, bounds.max), 0.5) // // pub fn aabb_half_extents(bounds: Aabb) -> Vec3: // return vec3_mul_scalar(vec3_sub(bounds.max, bounds.min), 0.5) // // pub fn aabb_expand_point(bounds: Aabb, point: Vec3) -> Aabb: // return Aabb { min: vec3_min(bounds.min, point), max: vec3_max(bounds.max, point) } // // pub fn aabb_union(a: Aabb, b: Aabb) -> Aabb: // return Aabb { min: vec3_min(a.min, b.min), max: vec3_max(a.max, b.max) } // // pub fn aabb_contains_point(bounds: Aabb, point: Vec3) -> Bool: // let inside = point.x >= bounds.min.x and point.x <= bounds.max.x and point.y >= bounds.min.y and point.y <= bounds.max.y and point.z >= bounds.min.z and point.z <= bounds.max.z // return inside // // pub fn sphere_contains_point(sphere: BoundingSphere, point: Vec3) -> Bool: // return vec3_distance(sphere.center, point) <= sphere.radius // // pub fn closest_point_on_aabb(bounds: Aabb, point: Vec3) -> Vec3: // return vec3_clamp(point, bounds.min, bounds.max) // // pub fn closest_point_on_obb(bounds: Obb, point: Vec3) -> Vec3: // let delta = vec3_sub(point, bounds.center) // let axis_x = vec3_normalize_or_zero(bounds.axis_x) // let axis_y = vec3_normalize_or_zero(bounds.axis_y) // let axis_z = vec3_normalize_or_zero(bounds.axis_z) // let x = math_clamp(vec3_dot(delta, axis_x), -bounds.half_extents.x, bounds.half_extents.x) // let y = math_clamp(vec3_dot(delta, axis_y), -bounds.half_extents.y, bounds.half_extents.y) // let z = math_clamp(vec3_dot(delta, axis_z), -bounds.half_extents.z, bounds.half_extents.z) // return vec3_add(bounds.center, vec3_add(vec3_mul_scalar(axis_x, x), vec3_add(vec3_mul_scalar(axis_y, y), vec3_mul_scalar(axis_z, z)))) // // pub fn sphere_vs_obb(sphere: BoundingSphere, bounds: Obb) -> Bool: // let closest = closest_point_on_obb(bounds, sphere.center) // return vec3_distance(closest, sphere.center) <= sphere.radius // // pub fn ray_vs_aabb(ray: Ray3, bounds: Aabb) -> RayHit: // let inv_x = if abs(ray.direction.x) <= EPSILON: 1000000000.0 else: 1.0 / ray.direction.x // let inv_y = if abs(ray.direction.y) <= EPSILON: 1000000000.0 else: 1.0 / ray.direction.y // let inv_z = if abs(ray.direction.z) <= EPSILON: 1000000000.0 else: 1.0 / ray.direction.z // let tx1 = (bounds.min.x - ray.origin.x) * inv_x // let tx2 = (bounds.max.x - ray.origin.x) * inv_x // let ty1 = (bounds.min.y - ray.origin.y) * inv_y // let ty2 = (bounds.max.y - ray.origin.y) * inv_y // let tz1 = (bounds.min.z - ray.origin.z) * inv_z // let tz2 = (bounds.max.z - ray.origin.z) * inv_z // let tmin = math_max(math_max(math_min(tx1, tx2), math_min(ty1, ty2)), math_min(tz1, tz2)) // let tmax = math_min(math_min(math_max(tx1, tx2), math_max(ty1, ty2)), math_max(tz1, tz2)) // if tmax < 0.0 or tmin > tmax: // return RayHit { hit: false, distance: 0.0, position: vec3_zero(), normal: vec3_zero(), barycentric: vec3_zero() } // let distance_value = if tmin >= 0.0: tmin else: tmax // let position = vec3_add(ray.origin, vec3_mul_scalar(ray.direction, distance_value)) // let center = aabb_center(bounds) // let delta = vec3_sub(position, center) // let half_extents = aabb_half_extents(bounds) // let abs_delta = vec3_abs(delta) // let normal = if abs(abs_delta.x - half_extents.x) <= HUGE_EPSILON: // vec3(sign_nonzero(delta.x), 0.0, 0.0) // else if abs(abs_delta.y - half_extents.y) <= HUGE_EPSILON: // vec3(0.0, sign_nonzero(delta.y), 0.0) // else: // vec3(0.0, 0.0, sign_nonzero(delta.z)) // return RayHit { hit: true, distance: distance_value, position: position, normal: normal, barycentric: vec3_zero() } // // pub fn ray_vs_triangle(ray: Ray3, a: Vec3, b: Vec3, c: Vec3) -> RayHit: // let edge_ab = vec3_sub(b, a) // let edge_ac = vec3_sub(c, a) // let pvec = vec3_cross(ray.direction, edge_ac) // let determinant = vec3_dot(edge_ab, pvec) // if abs(determinant) <= EPSILON: // return RayHit { hit: false, distance: 0.0, position: vec3_zero(), normal: vec3_zero(), barycentric: vec3_zero() } // let inv_det = 1.0 / determinant // let tvec = vec3_sub(ray.origin, a) // let u = vec3_dot(tvec, pvec) * inv_det // if u < 0.0 or u > 1.0: // return RayHit { hit: false, distance: 0.0, position: vec3_zero(), normal: vec3_zero(), barycentric: vec3_zero() } // let qvec = vec3_cross(tvec, edge_ab) // let v = vec3_dot(ray.direction, qvec) * inv_det // if v < 0.0 or (u + v) > 1.0: // return RayHit { hit: false, distance: 0.0, position: vec3_zero(), normal: vec3_zero(), barycentric: vec3_zero() } // let distance_value = vec3_dot(edge_ac, qvec) * inv_det // if distance_value < 0.0: // return RayHit { hit: false, distance: 0.0, position: vec3_zero(), normal: vec3_zero(), barycentric: vec3_zero() } // let normal = vec3_normalize_or_zero(vec3_cross(edge_ab, edge_ac)) // return RayHit { // hit: true, // distance: distance_value, // position: vec3_add(ray.origin, vec3_mul_scalar(ray.direction, distance_value)), // normal: normal, // barycentric: vec3(1.0 - u - v, u, v) // } // // pub fn frustum_contains_point(frustum: Frustum, point: Vec3) -> Bool: // let inside = plane_signed_distance(frustum.left, point) >= 0.0 and plane_signed_distance(frustum.right, point) >= 0.0 and plane_signed_distance(frustum.top, point) >= 0.0 and plane_signed_distance(frustum.bottom, point) >= 0.0 and plane_signed_distance(frustum.near, point) >= 0.0 and plane_signed_distance(frustum.far, point) >= 0.0 // return inside // // pub fn aabb_support_point(bounds: Aabb, normal: Vec3) -> Vec3: // let support_x = if normal.x >= 0.0: bounds.max.x else: bounds.min.x // let support_y = if normal.y >= 0.0: bounds.max.y else: bounds.min.y // let support_z = if normal.z >= 0.0: bounds.max.z else: bounds.min.z // return vec3(support_x, support_y, support_z) // // pub fn plane_accepts_aabb(plane: Plane, bounds: Aabb) -> Bool: // let support_point = aabb_support_point(bounds, plane.normal) // return plane_signed_distance(plane, support_point) >= 0.0 // // pub fn frustum_vs_aabb(frustum: Frustum, bounds: Aabb) -> Bool: // return plane_accepts_aabb(frustum.left, bounds) and plane_accepts_aabb(frustum.right, bounds) and plane_accepts_aabb(frustum.top, bounds) and plane_accepts_aabb(frustum.bottom, bounds) and plane_accepts_aabb(frustum.near, bounds) and plane_accepts_aabb(frustum.far, bounds) // // pub fn bezier_quadratic_vec2(a: Vec2, b: Vec2, c: Vec2, t: Float) -> Vec2: // let u = 1.0 - t // return vec2_add(vec2_add(vec2_mul_scalar(a, u * u), vec2_mul_scalar(b, 2.0 * u * t)), vec2_mul_scalar(c, t * t)) // // pub fn bezier_quadratic_vec3(a: Vec3, b: Vec3, c: Vec3, t: Float) -> Vec3: // let u = 1.0 - t // return vec3_add(vec3_add(vec3_mul_scalar(a, u * u), vec3_mul_scalar(b, 2.0 * u * t)), vec3_mul_scalar(c, t * t)) // // pub fn bezier_quadratic_tangent_vec3(a: Vec3, b: Vec3, c: Vec3, t: Float) -> Vec3: // return vec3_normalize_or_zero(vec3_add(vec3_mul_scalar(vec3_sub(b, a), 2.0 * (1.0 - t)), vec3_mul_scalar(vec3_sub(c, b), 2.0 * t))) // // pub fn bezier_cubic_vec2(a: Vec2, b: Vec2, c: Vec2, d: Vec2, t: Float) -> Vec2: // let u = 1.0 - t // let tt = t * t // let uu = u * u // return vec2_add(vec2_add(vec2_mul_scalar(a, uu * u), vec2_mul_scalar(b, 3.0 * uu * t)), vec2_add(vec2_mul_scalar(c, 3.0 * u * tt), vec2_mul_scalar(d, tt * t))) // // pub fn bezier_cubic_vec3(a: Vec3, b: Vec3, c: Vec3, d: Vec3, t: Float) -> Vec3: // let u = 1.0 - t // let tt = t * t // let uu = u * u // return vec3_add(vec3_add(vec3_mul_scalar(a, uu * u), vec3_mul_scalar(b, 3.0 * uu * t)), vec3_add(vec3_mul_scalar(c, 3.0 * u * tt), vec3_mul_scalar(d, tt * t))) // // pub fn bezier_cubic_tangent_vec3(a: Vec3, b: Vec3, c: Vec3, d: Vec3, t: Float) -> Vec3: // let u = 1.0 - t // let tangent = vec3_add(vec3_add(vec3_mul_scalar(vec3_sub(b, a), 3.0 * u * u), vec3_mul_scalar(vec3_sub(c, b), 6.0 * u * t)), vec3_mul_scalar(vec3_sub(d, c), 3.0 * t * t)) // return vec3_normalize_or_zero(tangent) // // pub fn catmull_rom_vec3(p0: Vec3, p1: Vec3, p2: Vec3, p3: Vec3, t: Float) -> Vec3: // let t2 = t * t // let t3 = t2 * t // let term0 = vec3_mul_scalar(p1, 2.0) // let term1 = vec3_mul_scalar(vec3_sub(p2, p0), t) // let term2_base = vec3_sub(vec3_add(vec3_sub(vec3_mul_scalar(p0, 2.0), vec3_mul_scalar(p1, 5.0)), vec3_mul_scalar(p2, 4.0)), p3) // let term2 = vec3_mul_scalar(term2_base, t2) // let term3_base = vec3_sub(vec3_add(vec3_mul_scalar(p1, 3.0), p3), vec3_add(p0, vec3_mul_scalar(p2, 3.0))) // let term3 = vec3_mul_scalar(term3_base, t3) // return vec3_mul_scalar(vec3_add(vec3_add(term0, term1), vec3_add(term2, term3)), 0.5) // // pub fn catmull_rom_tangent_vec3(p0: Vec3, p1: Vec3, p2: Vec3, p3: Vec3, t: Float) -> Vec3: // let t2 = t * t // let linear_term = vec3_sub(p2, p0) // let first_poly = vec3_sub(vec3_add(vec3_sub(vec3_mul_scalar(p0, 4.0), vec3_mul_scalar(p1, 10.0)), vec3_mul_scalar(p2, 8.0)), vec3_mul_scalar(p3, 2.0)) // let second_poly = vec3_sub(vec3_add(vec3_mul_scalar(p1, 9.0), vec3_mul_scalar(p3, 3.0)), vec3_add(vec3_mul_scalar(p0, 3.0), vec3_mul_scalar(p2, 9.0))) // let tangent = vec3_add(linear_term, vec3_add(vec3_mul_scalar(first_poly, t), vec3_mul_scalar(second_poly, t2))) // return vec3_normalize_or_zero(vec3_mul_scalar(tangent, 0.5)) // // pub fn bspline_cubic_vec3(p0: Vec3, p1: Vec3, p2: Vec3, p3: Vec3, t: Float) -> Vec3: // let t2 = t * t // let t3 = t2 * t // let term0 = vec3_mul_scalar(p0, -t3 + 3.0 * t2 - 3.0 * t + 1.0) // let term1 = vec3_mul_scalar(p1, 3.0 * t3 - 6.0 * t2 + 4.0) // let term2 = vec3_mul_scalar(p2, -3.0 * t3 + 3.0 * t2 + 3.0 * t + 1.0) // let term3 = vec3_mul_scalar(p3, t3) // return vec3_div_scalar(vec3_add(vec3_add(term0, term1), vec3_add(term2, term3)), 6.0) // // pub fn color_rgb(r: Float, g: Float, b: Float) -> ColorRgb: // return ColorRgb { r: r, g: g, b: b } // // pub fn color_rgba(r: Float, g: Float, b: Float, a: Float) -> ColorRgba: // return ColorRgba { r: r, g: g, b: b, a: a } // // pub fn color_rgb_to_vec3(value: ColorRgb) -> Vec3: // return vec3(value.r, value.g, value.b) // // pub fn color_rgba_to_vec4(value: ColorRgba) -> Vec4: // return vec4(value.r, value.g, value.b, value.a) // // pub fn srgb_to_linear_scalar(value: Float) -> Float: // let clamped = saturate(value) // if clamped <= 0.04045: // return clamped / 12.92 // return pow((clamped + 0.055) / 1.055, 2.4) // // pub fn linear_to_srgb_scalar(value: Float) -> Float: // let clamped = math_max(value, 0.0) // if clamped <= 0.0031308: // return clamped * 12.92 // return 1.055 * pow(clamped, 1.0 / 2.4) - 0.055 // // pub fn srgb_to_linear(color: Vec3) -> Vec3: // return vec3( // srgb_to_linear_scalar(color.x), // srgb_to_linear_scalar(color.y), // srgb_to_linear_scalar(color.z) // ) // // pub fn linear_to_srgb(color: Vec3) -> Vec3: // return vec3( // linear_to_srgb_scalar(color.x), // linear_to_srgb_scalar(color.y), // linear_to_srgb_scalar(color.z) // ) // // pub fn rgb_to_hsv(rgb: Vec3) -> Hsv: // let max_c = math_max(rgb.x, math_max(rgb.y, rgb.z)) // let min_c = math_min(rgb.x, math_min(rgb.y, rgb.z)) // let delta = max_c - min_c // var h = 0.0 // var s = 0.0 // if delta > EPSILON: // if max_c == rgb.x: // h = ((rgb.y - rgb.z) / delta) % 6.0 // else if max_c == rgb.y: // h = ((rgb.z - rgb.x) / delta) + 2.0 // else: // h = ((rgb.x - rgb.y) / delta) + 4.0 // h = h / 6.0 // if max_c > EPSILON: // s = delta / max_c // return Hsv { h: h, s: s, v: max_c } // // pub fn hsv_to_rgb(hsv: Hsv) -> Vec3: // let h = (hsv.h % 1.0) * 6.0 // let c = hsv.v * hsv.s // let x = c * (1.0 - abs((h % 2.0) - 1.0)) // let m = hsv.v - c // if h < 1.0: // return vec3(c + m, x + m, m) // else if h < 2.0: // return vec3(x + m, c + m, m) // else if h < 3.0: // return vec3(m, c + m, x + m) // else if h < 4.0: // return vec3(m, x + m, c + m) // else if h < 5.0: // return vec3(x + m, m, c + m) // return vec3(c + m, m, x + m) // // pub fn rgb_to_hsl(rgb: Vec3) -> Hsl: // let max_c = math_max(rgb.x, math_max(rgb.y, rgb.z)) // let min_c = math_min(rgb.x, math_min(rgb.y, rgb.z)) // let delta = max_c - min_c // let lightness = (max_c + min_c) * 0.5 // var hue = 0.0 // var saturation = 0.0 // if delta > EPSILON: // saturation = delta / (1.0 - abs(2.0 * lightness - 1.0)) // if max_c == rgb.x: // hue = ((rgb.y - rgb.z) / delta) % 6.0 // else if max_c == rgb.y: // hue = ((rgb.z - rgb.x) / delta) + 2.0 // else: // hue = ((rgb.x - rgb.y) / delta) + 4.0 // hue = hue / 6.0 // return Hsl { h: hue, s: saturation, l: lightness } // // pub fn hsl_to_rgb(hsl: Hsl) -> Vec3: // let c = (1.0 - abs(2.0 * hsl.l - 1.0)) * hsl.s // let h = (hsl.h % 1.0) * 6.0 // let x = c * (1.0 - abs((h % 2.0) - 1.0)) // let m = hsl.l - c * 0.5 // if h < 1.0: // return vec3(c + m, x + m, m) // else if h < 2.0: // return vec3(x + m, c + m, m) // else if h < 3.0: // return vec3(m, c + m, x + m) // else if h < 4.0: // return vec3(m, x + m, c + m) // else if h < 5.0: // return vec3(x + m, m, c + m) // return vec3(c + m, m, x + m) // // pub fn tonemap_aces(color: Vec3) -> Vec3: // let a = 2.51 // let b = 0.03 // let c = 2.43 // let d = 0.59 // let e = 0.14 // return vec3_clamp( // vec3( // (color.x * (a * color.x + b)) / (color.x * (c * color.x + d) + e), // (color.y * (a * color.y + b)) / (color.y * (c * color.y + d) + e), // (color.z * (a * color.z + b)) / (color.z * (c * color.z + d) + e) // ), // vec3_zero(), // vec3_one() // ) // // pub fn tonemap_reinhard(color: Vec3) -> Vec3: // return vec3( // color.x / (1.0 + color.x), // color.y / (1.0 + color.y), // color.z / (1.0 + color.z) // ) // // pub fn tonemap_uncharted2(color: Vec3) -> Vec3: // let a = 0.15 // let b = 0.50 // let c = 0.10 // let d = 0.20 // let e = 0.02 // let f = 0.30 // let white = 11.2 // let white_scale = ((white * (a * white + c * b) + d * e) / (white * (a * white + b) + d * f)) - e / f // return vec3( // (((color.x * (a * color.x + c * b) + d * e) / (color.x * (a * color.x + b) + d * f)) - e / f) / white_scale, // (((color.y * (a * color.y + c * b) + d * e) / (color.y * (a * color.y + b) + d * f)) - e / f) / white_scale, // (((color.z * (a * color.z + c * b) + d * e) / (color.z * (a * color.z + b) + d * f)) - e / f) / white_scale // ) // // pub fn pack_unorm8(value: Float) -> Int: // return math_int_clamp(round(saturate(value) * 255.0) as Int, 0, 255) // // pub fn pack_unorm4x8(value: Vec4) -> Int: // let x = pack_unorm8(value.x) // let y = pack_unorm8(value.y) // let z = pack_unorm8(value.z) // let w = pack_unorm8(value.w) // return x | (y << 8) | (z << 16) | (w << 24) // // pub fn pack_rgba_to_u32(value: ColorRgba) -> Int: // return pack_unorm4x8(vec4(value.r, value.g, value.b, value.a)) // // pub fn unpack_u32_to_rgba(packed: Int) -> ColorRgba: // let r = packed & 255 // let g = (packed >> 8) & 255 // let b = (packed >> 16) & 255 // let a = (packed >> 24) & 255 // return ColorRgba { // r: r as Float / 255.0, // g: g as Float / 255.0, // b: b as Float / 255.0, // a: a as Float / 255.0 // } // // pub fn hash11(x: Float) -> Float: // return frac_scalar(sin(x * 127.1) * 43758.5453123) // // pub fn hash22(p: Vec2) -> Vec2: // let p3 = vec3_frac(vec3_hadamard(vec3(p.x, p.y, p.x), vec3(0.1031, 0.1030, 0.0973))) // let offset = vec3_add(vec3(p3.y, p3.z, p3.x), vec3(33.33, 33.33, 33.33)) // let sum = vec3_add(p3, vec3_splat(vec3_dot(p3, offset))) // let packed = vec2_hadamard(vec2(sum.x + sum.y, sum.x + sum.z), vec2(sum.z, sum.y)) // return vec2_frac(packed) // // pub fn hash33(p: Vec3) -> Vec3: // let q = vec3( // vec3_dot(p, vec3(127.1, 311.7, 74.7)), // vec3_dot(p, vec3(269.5, 183.3, 246.1)), // vec3_dot(p, vec3(113.5, 271.9, 124.6)) // ) // return vec3( // frac_scalar(sin(q.x) * 43758.5453123), // frac_scalar(sin(q.y) * 43758.5453123), // frac_scalar(sin(q.z) * 43758.5453123) // ) // // pub fn pcg32_step(state: Int) -> Int: // return (state * 747796405 + 2891336453) & 2147483647 // // pub fn noise2(p: Vec2) -> Float: // let cell = vec2_floor(p) // let local = vec2_frac(p) // let local2 = vec2_hadamard(local, local) // let curve = vec2_sub(vec2(3.0, 3.0), vec2_hadamard(vec2(2.0, 2.0), local)) // let u = vec2_hadamard(local2, curve) // let a = hash11(vec2_dot(cell, vec2(1.0, 57.0))) // let b = hash11(vec2_dot(vec2_add(cell, vec2(1.0, 0.0)), vec2(1.0, 57.0))) // let c = hash11(vec2_dot(vec2_add(cell, vec2(0.0, 1.0)), vec2(1.0, 57.0))) // let d = hash11(vec2_dot(vec2_add(cell, vec2(1.0, 1.0)), vec2(1.0, 57.0))) // return lerp(lerp(a, b, u.x), lerp(c, d, u.x), u.y) // // pub fn noise3(p: Vec3) -> Float: // let i = vec3_floor(p) // let f = vec3_frac(p) // let u = vec3_hadamard(vec3_hadamard(f, f), vec3_sub(vec3(3.0, 3.0, 3.0), vec3_hadamard(vec3(2.0, 2.0, 2.0), f))) // let n000 = frac_scalar(sin(vec3_dot(vec3_add(i, vec3(0.0, 0.0, 0.0)), vec3(127.1, 311.7, 74.7))) * 43758.5453123) // let n100 = frac_scalar(sin(vec3_dot(vec3_add(i, vec3(1.0, 0.0, 0.0)), vec3(127.1, 311.7, 74.7))) * 43758.5453123) // let n010 = frac_scalar(sin(vec3_dot(vec3_add(i, vec3(0.0, 1.0, 0.0)), vec3(127.1, 311.7, 74.7))) * 43758.5453123) // let n110 = frac_scalar(sin(vec3_dot(vec3_add(i, vec3(1.0, 1.0, 0.0)), vec3(127.1, 311.7, 74.7))) * 43758.5453123) // let n001 = frac_scalar(sin(vec3_dot(vec3_add(i, vec3(0.0, 0.0, 1.0)), vec3(127.1, 311.7, 74.7))) * 43758.5453123) // let n101 = frac_scalar(sin(vec3_dot(vec3_add(i, vec3(1.0, 0.0, 1.0)), vec3(127.1, 311.7, 74.7))) * 43758.5453123) // let n011 = frac_scalar(sin(vec3_dot(vec3_add(i, vec3(0.0, 1.0, 1.0)), vec3(127.1, 311.7, 74.7))) * 43758.5453123) // let n111 = frac_scalar(sin(vec3_dot(vec3_add(i, vec3(1.0, 1.0, 1.0)), vec3(127.1, 311.7, 74.7))) * 43758.5453123) // let nx00 = lerp(n000, n100, u.x) // let nx10 = lerp(n010, n110, u.x) // let nx01 = lerp(n001, n101, u.x) // let nx11 = lerp(n011, n111, u.x) // let nxy0 = lerp(nx00, nx10, u.y) // let nxy1 = lerp(nx01, nx11, u.y) // return lerp(nxy0, nxy1, u.z) // // pub fn fbm2(p: Vec2, octaves: Int) -> Float: // var value = 0.0 // var amplitude = 0.5 // var frequency = 1.0 // var index = 0 // while index < octaves: // value = value + noise2(vec2_mul_scalar(p, frequency)) * amplitude // amplitude = amplitude * 0.5 // frequency = frequency * 2.0 // index = index + 1 // return value // // pub fn fbm3(p: Vec3, octaves: Int) -> Float: // var value = 0.0 // var amplitude = 0.5 // var frequency = 1.0 // var total_amplitude = 0.0 // var index = 0 // while index < octaves: // value = value + noise3(vec3_mul_scalar(p, frequency)) * amplitude // total_amplitude = total_amplitude + amplitude // amplitude = amplitude * 0.5 // frequency = frequency * 2.0 // index = index + 1 // if total_amplitude <= EPSILON: // return 0.0 // return value / total_amplitude // // pub fn worley_noise(uv: Vec2, scale: Float, randomness: Float, seed: Float) -> Float: // let scaled_uv = vec2_mul_scalar(uv, scale) // let n = vec2_floor(scaled_uv) // let f = vec2_frac(scaled_uv) // var best = 8.0 // var j = -1 // while j <= 1: // var i = -1 // while i <= 1: // let g = vec2(i as Float, j as Float) // let jitter = vec2_add(vec2_add(n, g), vec2(seed, seed)) // let o = vec2_mul_scalar(hash22(jitter), randomness) // let r = vec2_sub(vec2_add(g, o), f) // let d = vec2_dot(r, r) // if d < best: // best = d // i = i + 1 // j = j + 1 // return sqrt(best) // // pub fn blue_noise_dither_approx(pixel_x: Int, pixel_y: Int, frame: Int) -> Float: // let x = pixel_x as Float * 0.754877666 // let y = pixel_y as Float * 0.569840296 // let z = frame as Float * 0.438289001 // return frac_scalar(x + y + z + hash11(x + y * 7.0 + z * 13.0)) // // // ============================================================================ // // CONSTANTS (data-driven: all magic numbers named below) // // ============================================================================ // // pub const E: Float = 2.718281828459045 // pub const LOG2_E: Float = 1.4426950408889634 // pub const LOG10_E: Float = 0.4342944819032518 // pub const LN_2: Float = 0.6931471805599453 // pub const LN_10: Float = 2.302585092994046 // pub const SQRT_2: Float = 1.4142135623730951 // pub const SQRT_3: Float = 1.7320508075688772 // pub const SQRT_HALF: Float = 0.7071067811865476 // pub const INV_PI: Float = 0.3183098861837907 // pub const TWO_OVER_PI: Float = 0.6366197723675814 // pub const FOUR_OVER_PI: Float = 1.2732395447351628 // pub const PHI: Float = 1.618033988749895 // pub const GOLDEN_ANGLE: Float = 2.399963229728653 // pub const EULER_MASCHERONI: Float = 0.5772156649015329 // pub const INFINITY_F: Float = 1000000000.0 // // // Easing reference constants (bounce, elastic, back) // pub const EASE_BACK_AMOUNT: Float = 1.70158 // pub const EASE_BACK_AMOUNT_2: Float = 2.59489 // pub const EASE_ELASTIC_AMPLITUDE: Float = 1.0 // pub const EASE_ELASTIC_PERIOD: Float = 0.3 // pub const EASE_BOUNCE_B1: Float = 1.0 / 2.75 // pub const EASE_BOUNCE_B2: Float = 2.0 / 2.75 // pub const EASE_BOUNCE_B3: Float = 1.5 / 2.75 // pub const EASE_BOUNCE_B4: Float = 2.5 / 2.75 // pub const EASE_BOUNCE_B5: Float = 2.25 / 2.75 // pub const EASE_BOUNCE_B6: Float = 2.625 / 2.75 // // // Harmonic constants for spherical harmonics // pub const SH_SQRT_PI: Float = 1.772453850905516 // pub const SH_SQRT_3: Float = 1.7320508075688772 // pub const SH_SQRT_5: Float = 2.23606797749979 // pub const SH_SQRT_7: Float = 2.6457513110645907 // pub const SH_SQRT_15: Float = 3.872983346207417 // pub const SH_SQRT_35: Float = 5.916079783099616 // // // ============================================================================ // // NATURAL LOG (via series, must precede hyperbolic/complex functions) // // ============================================================================ // // pub fn ln_scalar(x: Float) -> Float: // if x <= 0.0: // return 0.0 // if abs(x - 1.0) <= EPSILON: // return 0.0 // var normalized = x // var exponent = 0 // while normalized >= 2.0: // normalized = normalized * 0.5 // exponent = exponent + 1 // while normalized < 1.0: // normalized = normalized * 2.0 // exponent = exponent - 1 // let y = (normalized - 1.0) / (normalized + 1.0) // let y2 = y * y // let series = y * (1.0 + y2 * (1.0 / 3.0 + y2 * (1.0 / 5.0 + y2 * (1.0 / 7.0 + y2 * (1.0 / 9.0 + y2 / 11.0))))) // return 2.0 * series + exponent as Float * LN_2 // // // ============================================================================ // // EXACT TRIG (scalar wrappers around built-in intrinsics) // // ============================================================================ // // pub fn sin_scalar(value: Float) -> Float: // return sin(value) // // pub fn cos_scalar(value: Float) -> Float: // return cos(value) // // pub fn tan_scalar_exact(value: Float) -> Float: // let c = cos(value) // if abs(c) <= EPSILON: // return INFINITY_F // return sin(value) / c // // pub fn asin_scalar(value: Float) -> Float: // let x = math_clamp(value, -1.0, 1.0) // let step0 = -0.0187293 * x + 0.0742610 // let step1 = step0 * x - 0.2121144 // let step2 = step1 * x + 1.5707288 // let root = sqrt(math_max(1.0 - x * x, 0.0)) // return HALF_PI - step2 * root // // pub fn acos_scalar(value: Float) -> Float: // let x = math_clamp(value, -1.0, 1.0) // let step0 = -0.0187293 * x + 0.0742610 // let step1 = step0 * x - 0.2121144 // let step2 = step1 * x + 1.5707288 // let root = sqrt(math_max(1.0 - x * x, 0.0)) // let arc = step2 * root // if value < 0.0: // return PI - arc // return arc // // pub fn atan_scalar(value: Float) -> Float: // return atan2_scalar(value, 1.0) // // pub fn atan2_scalar(y: Float, x: Float) -> Float: // if abs(x) <= EPSILON: // if y > 0.0: // return HALF_PI // if y < 0.0: // return -HALF_PI // return 0.0 // let abs_y = abs(y) + 0.0000001 // let angle_base = if x >= 0.0: // let r = (x - abs_y) / (x + abs_y) // 0.78539816339 - 0.78539816339 * r // else: // let r = (x + abs_y) / (abs_y - x) // 2.35619449019 - 0.78539816339 * r // if y < 0.0: // return -angle_base // return angle_base // // pub fn sinh_scalar(value: Float) -> Float: // let ep = pow(E, value) // let en = pow(E, -value) // return (ep - en) * 0.5 // // pub fn cosh_scalar(value: Float) -> Float: // let ep = pow(E, value) // let en = pow(E, -value) // return (ep + en) * 0.5 // // pub fn tanh_scalar(value: Float) -> Float: // let ep = pow(E, value) // let en = pow(E, -value) // if abs(ep + en) <= EPSILON: // return 1.0 // return (ep - en) / (ep + en) // // pub fn asinh_scalar(value: Float) -> Float: // return ln_scalar(value + sqrt(value * value + 1.0)) // // pub fn acosh_scalar(value: Float) -> Float: // if value < 1.0: // return 0.0 // return ln_scalar(value + sqrt(value * value - 1.0)) // // pub fn atanh_scalar(value: Float) -> Float: // let clamped = math_clamp(value, -0.999999, 0.999999) // return 0.5 * ln_scalar((1.0 + clamped) / (1.0 - clamped)) // // pub fn sec_scalar(value: Float) -> Float: // let c = cos(value) // if abs(c) <= EPSILON: // return INFINITY_F // return 1.0 / c // // pub fn csc_scalar(value: Float) -> Float: // let s = sin(value) // if abs(s) <= EPSILON: // return INFINITY_F // return 1.0 / s // // pub fn cot_scalar(value: Float) -> Float: // let s = sin(value) // let c = cos(value) // if abs(s) <= EPSILON: // return INFINITY_F // return c / s // // // ============================================================================ // // COMPLEX NUMBERS // // ============================================================================ // // pub struct Complex: // re: Float // im: Float // // pub fn complex(re: Float, im: Float) -> Complex: // return Complex { re: re, im: im } // // pub fn complex_zero() -> Complex: // return Complex { re: 0.0, im: 0.0 } // // pub fn complex_one() -> Complex: // return Complex { re: 1.0, im: 0.0 } // // pub fn complex_i() -> Complex: // return Complex { re: 0.0, im: 1.0 } // // pub fn complex_add(a: Complex, b: Complex) -> Complex: // return Complex { re: a.re + b.re, im: a.im + b.im } // // pub fn complex_sub(a: Complex, b: Complex) -> Complex: // return Complex { re: a.re - b.re, im: a.im - b.im } // // pub fn complex_mul(a: Complex, b: Complex) -> Complex: // return Complex { // re: a.re * b.re - a.im * b.im, // im: a.re * b.im + a.im * b.re // } // // pub fn complex_div(a: Complex, b: Complex) -> Complex: // let denom = b.re * b.re + b.im * b.im // if abs(denom) <= EPSILON: // return Complex { re: INFINITY_F, im: INFINITY_F } // return Complex { // re: (a.re * b.re + a.im * b.im) / denom, // im: (a.im * b.re - a.re * b.im) / denom // } // // pub fn complex_conj(value: Complex) -> Complex: // return Complex { re: value.re, im: -value.im } // // pub fn complex_abs(value: Complex) -> Float: // return sqrt(value.re * value.re + value.im * value.im) // // pub fn complex_abs_squared(value: Complex) -> Float: // return value.re * value.re + value.im * value.im // // pub fn complex_arg(value: Complex) -> Float: // return atan2_scalar(value.im, value.re) // // pub fn complex_inv(value: Complex) -> Complex: // return complex_div(Complex { re: 1.0, im: 0.0 }, value) // // pub fn complex_neg(value: Complex) -> Complex: // return Complex { re: -value.re, im: -value.im } // // pub fn complex_mul_scalar(value: Complex, scalar: Float) -> Complex: // return Complex { re: value.re * scalar, im: value.im * scalar } // // pub fn complex_from_polar(r: Float, theta: Float) -> Complex: // return Complex { re: r * cos(theta), im: r * sin(theta) } // // pub fn complex_to_polar(value: Complex) -> Vec2: // return vec2(complex_abs(value), complex_arg(value)) // // pub fn complex_sqrt(value: Complex) -> Complex: // let r = complex_abs(value) // let theta = complex_arg(value) * 0.5 // let sqrt_r = sqrt(r) // return Complex { re: sqrt_r * cos(theta), im: sqrt_r * sin(theta) } // // pub fn complex_exp(value: Complex) -> Complex: // let er = pow(E, value.re) // return Complex { re: er * cos(value.im), im: er * sin(value.im) } // // pub fn complex_log(value: Complex) -> Complex: // return Complex { re: ln_scalar(complex_abs(value)), im: complex_arg(value) } // // pub fn complex_pow(base: Complex, exponent: Complex) -> Complex: // return complex_exp(complex_mul(exponent, complex_log(base))) // // pub fn complex_sin(value: Complex) -> Complex: // return Complex { // re: sin(value.re) * cosh_scalar(value.im), // im: cos(value.re) * sinh_scalar(value.im) // } // // pub fn complex_cos(value: Complex) -> Complex: // return Complex { // re: cos(value.re) * cosh_scalar(value.im), // im: -sin(value.re) * sinh_scalar(value.im) // } // // pub fn complex_tan(value: Complex) -> Complex: // return complex_div(complex_sin(value), complex_cos(value)) // // pub fn complex_to_vec2(value: Complex) -> Vec2: // return vec2(value.re, value.im) // // pub fn complex_from_vec2(value: Vec2) -> Complex: // return Complex { re: value.x, im: value.y } // // pub fn complex_lerp(a: Complex, b: Complex, t: Float) -> Complex: // return Complex { // re: lerp(a.re, b.re, t), // im: lerp(a.im, b.im, t) // } // // // ============================================================================ // // DUAL QUATERNIONS (rigid transform skinning) // // ============================================================================ // // pub struct DualQuat: // real: Quat // dual: Quat // // pub fn dual_quat_identity() -> DualQuat: // return DualQuat { real: quat_identity(), dual: Quat { x: 0.0, y: 0.0, z: 0.0, w: 0.0 } } // // pub fn dual_quat_from_quat_translation(rotation: Quat, translation: Vec3) -> DualQuat: // let q = quat_normalize_or_identity(rotation) // let dual = Quat { // x: 0.5 * (translation.x * q.w + translation.y * q.z - translation.z * q.y), // y: 0.5 * (-translation.x * q.z + translation.y * q.w + translation.z * q.x), // z: 0.5 * (translation.x * q.y - translation.y * q.x + translation.z * q.w), // w: -0.5 * (translation.x * q.x + translation.y * q.y + translation.z * q.z) // } // return DualQuat { real: q, dual: dual } // // pub fn dual_quat_conjugate(value: DualQuat) -> DualQuat: // return DualQuat { // real: quat_conjugate(value.real), // dual: quat_conjugate(value.dual) // } // // pub fn dual_quat_mul(a: DualQuat, b: DualQuat) -> DualQuat: // return DualQuat { // real: quat_mul(a.real, b.real), // dual: quat_add(quat_mul(a.real, b.dual), quat_mul(a.dual, b.real)) // } // // pub fn dual_quat_normalize(value: DualQuat) -> DualQuat: // let len = quat_length(value.real) // if len <= EPSILON: // return dual_quat_identity() // let inv_len = 1.0 / len // return DualQuat { // real: Quat { // x: value.real.x * inv_len, // y: value.real.y * inv_len, // z: value.real.z * inv_len, // w: value.real.w * inv_len // }, // dual: Quat { // x: value.dual.x * inv_len, // y: value.dual.y * inv_len, // z: value.dual.z * inv_len, // w: value.dual.w * inv_len // } // } // // pub fn dual_quat_transform_point(dq: DualQuat, point: Vec3) -> Vec3: // let rotated = quat_rotate_vec3(dq.real, point) // let translation = vec3( // 2.0 * (-dq.dual.w * dq.real.x + dq.dual.x * dq.real.w - dq.dual.y * dq.real.z + dq.dual.z * dq.real.y), // 2.0 * (-dq.dual.w * dq.real.y + dq.dual.x * dq.real.z + dq.dual.y * dq.real.w - dq.dual.z * dq.real.x), // 2.0 * (-dq.dual.w * dq.real.z - dq.dual.x * dq.real.y + dq.dual.y * dq.real.x + dq.dual.z * dq.real.w) // ) // return vec3_add(rotated, translation) // // // ============================================================================ // // QUATERNION POWER-UPS // // ============================================================================ // // pub fn quat_inverse(value: Quat) -> Quat: // let len_sq = quat_dot(value, value) // if len_sq <= EPSILON: // return quat_identity() // let conj = quat_conjugate(value) // return Quat { // x: conj.x / len_sq, // y: conj.y / len_sq, // z: conj.z / len_sq, // w: conj.w / len_sq // } // // pub fn quat_add(a: Quat, b: Quat) -> Quat: // return Quat { x: a.x + b.x, y: a.y + b.y, z: a.z + b.z, w: a.w + b.w } // // pub fn quat_mul_scalar(value: Quat, scalar: Float) -> Quat: // return Quat { x: value.x * scalar, y: value.y * scalar, z: value.z * scalar, w: value.w * scalar } // // pub fn quat_from_euler_xyz(euler: Vec3) -> Quat: // let cx = cos(euler.x * 0.5) // let sx = sin(euler.x * 0.5) // let cy = cos(euler.y * 0.5) // let sy = sin(euler.y * 0.5) // let cz = cos(euler.z * 0.5) // let sz = sin(euler.z * 0.5) // return Quat { // x: sx * cy * cz - cx * sy * sz, // y: cx * sy * cz + sx * cy * sz, // z: cx * cy * sz - sx * sy * cz, // w: cx * cy * cz + sx * sy * sz // } // // pub fn quat_from_euler_zyx(euler: Vec3) -> Quat: // let cx = cos(euler.x * 0.5) // let sx = sin(euler.x * 0.5) // let cy = cos(euler.y * 0.5) // let sy = sin(euler.y * 0.5) // let cz = cos(euler.z * 0.5) // let sz = sin(euler.z * 0.5) // return Quat { // x: sx * cy * cz - cx * sy * sz, // y: cx * sy * cz + sx * cy * sz, // z: cx * cy * sz - sx * sy * cz, // w: cx * cy * cz + sx * sy * sz // } // // pub fn quat_to_euler_xyz(value: Quat) -> Vec3: // let q = quat_normalize_or_identity(value) // let sin_pitch = -2.0 * (q.y * q.z - q.w * q.x) // let pitch = if abs(sin_pitch) >= 1.0: // HALF_PI * sign_nonzero(sin_pitch) // else: // asin_scalar(sin_pitch) // let yaw = atan2_scalar(q.x * q.z + q.w * q.y, 0.5 - (q.x * q.x + q.y * q.y)) // let roll = atan2_scalar(q.x * q.y + q.w * q.z, 0.5 - (q.y * q.y + q.z * q.z)) // return vec3(roll, yaw, pitch) // // pub fn quat_look_rotation(forward: Vec3, up: Vec3) -> Quat: // let fwd = vec3_normalize_or_zero(forward) // let right = vec3_normalize_or_zero(vec3_cross(fwd, up)) // let corrected_up = vec3_cross(right, fwd) // let m00 = right.x // let m01 = right.y // let m02 = right.z // let m10 = corrected_up.x // let m11 = corrected_up.y // let m12 = corrected_up.z // let m20 = -fwd.x // let m21 = -fwd.y // let m22 = -fwd.z // let trace = m00 + m11 + m22 // if trace > 0.0: // let s = 0.5 / sqrt(trace + 1.0) // return Quat { // x: (m12 - m21) * s, // y: (m20 - m02) * s, // z: (m01 - m10) * s, // w: 0.25 / s // } // else if m00 > m11 and m00 > m22: // let s = 2.0 * sqrt(1.0 + m00 - m11 - m22) // return Quat { // x: 0.25 * s, // y: (m01 + m10) / s, // z: (m02 + m20) / s, // w: (m12 - m21) / s // } // else if m11 > m22: // let s = 2.0 * sqrt(1.0 + m11 - m00 - m22) // return Quat { // x: (m01 + m10) / s, // y: 0.25 * s, // z: (m12 + m21) / s, // w: (m20 - m02) / s // } // else: // let s = 2.0 * sqrt(1.0 + m22 - m00 - m11) // return Quat { // x: (m02 + m20) / s, // y: (m12 + m21) / s, // z: 0.25 * s, // w: (m01 - m10) / s // } // // pub fn quat_exp(value: Quat) -> Quat: // let v = vec3(value.x, value.y, value.z) // let v_len = vec3_length(v) // if v_len <= EPSILON: // return Quat { x: 0.0, y: 0.0, z: 0.0, w: cos(value.w) } // let s = sin(v_len) / v_len // return Quat { // x: value.x * s, // y: value.y * s, // z: value.z * s, // w: cos(v_len) // } // // pub fn quat_log(value: Quat) -> Quat: // let q = quat_normalize_or_identity(value) // let v_len = sqrt(math_max(q.x * q.x + q.y * q.y + q.z * q.z, 0.0)) // if v_len <= EPSILON: // return Quat { x: 0.0, y: 0.0, z: 0.0, w: 0.0 } // let half_angle = atan2_scalar(v_len, q.w) // let scale = half_angle / v_len // return Quat { // x: q.x * scale, // y: q.y * scale, // z: q.z * scale, // w: 0.0 // } // // pub fn quat_swing(value: Quat, axis: Vec3) -> Quat: // let q = quat_normalize_or_identity(value) // let n = vec3_normalize_or_zero(axis) // let dot = q.x * n.x + q.y * n.y + q.z * n.z // let twist = Quat { // x: n.x * dot, // y: n.y * dot, // z: n.z * dot, // w: q.w // } // let twist_len = quat_length(twist) // if twist_len <= EPSILON: // return Quat { x: 0.0, y: 0.0, z: 0.0, w: 1.0 } // let twist_norm = Quat { // x: twist.x / twist_len, // y: twist.y / twist_len, // z: twist.z / twist_len, // w: twist.w / twist_len // } // return quat_mul(q, quat_conjugate(twist_norm)) // // pub fn quat_twist(value: Quat, axis: Vec3) -> Quat: // let q = quat_normalize_or_identity(value) // let n = vec3_normalize_or_zero(axis) // let dot = q.x * n.x + q.y * n.y + q.z * n.z // let result = Quat { // x: n.x * dot, // y: n.y * dot, // z: n.z * dot, // w: q.w // } // let len = quat_length(result) // if len <= EPSILON: // return quat_identity() // return Quat { // x: result.x / len, // y: result.y / len, // z: result.z / len, // w: result.w / len // } // // pub fn quat_angular_distance(a: Quat, b: Quat) -> Float: // let dot = math_clamp(abs(quat_dot(a, b)), 0.0, 1.0) // return 2.0 * acos_scalar(dot) // // pub fn quat_from_to_rotation(from: Vec3, to: Vec3) -> Quat: // let a = vec3_normalize_or_zero(from) // let b = vec3_normalize_or_zero(to) // let dot = vec3_dot(a, b) // if dot >= 0.999999: // return quat_identity() // if dot <= -0.999999: // let axis = vec3_normalize_or_zero(vec3_cross(a, vec3(1.0, 0.0, 0.0))) // if vec3_length(axis) <= EPSILON: // let axis = vec3_normalize_or_zero(vec3_cross(a, vec3(0.0, 1.0, 0.0))) // return quat_from_axis_angle(axis, PI) // let axis = vec3_normalize_or_zero(vec3_cross(a, b)) // let cos_half = sqrt((1.0 + dot) * 0.5) // let sin_half = sqrt((1.0 - dot) * 0.5) // return Quat { // x: axis.x * sin_half, // y: axis.y * sin_half, // z: axis.z * sin_half, // w: cos_half // } // // // ============================================================================ // // MATRIX POWER-UPS // // ============================================================================ // // pub struct DecomposeResult: // translation: Vec3 // rotation: Quat // scale: Vec3 // // pub fn mat3_determinant(value: Mat3) -> Float: // let a = value.row0.x * (value.row1.y * value.row2.z - value.row1.z * value.row2.y) // let b = value.row0.y * (value.row1.x * value.row2.z - value.row1.z * value.row2.x) // let c = value.row0.z * (value.row1.x * value.row2.y - value.row1.y * value.row2.x) // return a - b + c // // pub fn mat3_inverse(value: Mat3) -> Mat3: // let a = value.row0.x // let b = value.row0.y // let c = value.row0.z // let d = value.row1.x // let e = value.row1.y // let f = value.row1.z // let g = value.row2.x // let h = value.row2.y // let i_val = value.row2.z // let det = a * (e * i_val - f * h) - b * (d * i_val - f * g) + c * (d * h - e * g) // if abs(det) <= EPSILON: // return mat3_identity() // let inv_det = 1.0 / det // return Mat3 { // row0: vec3((e * i_val - f * h) * inv_det, (c * h - b * i_val) * inv_det, (b * f - c * e) * inv_det), // row1: vec3((f * g - d * i_val) * inv_det, (a * i_val - c * g) * inv_det, (c * d - a * f) * inv_det), // row2: vec3((d * h - e * g) * inv_det, (b * g - a * h) * inv_det, (a * e - b * d) * inv_det) // } // // pub fn mat3_mul_mat3(a: Mat3, b: Mat3) -> Mat3: // let bt = mat3_transpose(b) // return Mat3 { // row0: vec3(vec3_dot(a.row0, bt.row0), vec3_dot(a.row0, bt.row1), vec3_dot(a.row0, bt.row2)), // row1: vec3(vec3_dot(a.row1, bt.row0), vec3_dot(a.row1, bt.row1), vec3_dot(a.row1, bt.row2)), // row2: vec3(vec3_dot(a.row2, bt.row0), vec3_dot(a.row2, bt.row1), vec3_dot(a.row2, bt.row2)) // } // // pub fn mat3_from_mat4(value: Mat4) -> Mat3: // return Mat3 { // row0: vec3(value.row0.x, value.row0.y, value.row0.z), // row1: vec3(value.row1.x, value.row1.y, value.row1.z), // row2: vec3(value.row2.x, value.row2.y, value.row2.z) // } // // pub fn mat4_determinant(value: Mat4) -> Float: // let a00 = value.row0.x // let a01 = value.row0.y // let a02 = value.row0.z // let a03 = value.row0.w // let a10 = value.row1.x // let a11 = value.row1.y // let a12 = value.row1.z // let a13 = value.row1.w // let a20 = value.row2.x // let a21 = value.row2.y // let a22 = value.row2.z // let a23 = value.row2.w // let a30 = value.row3.x // let a31 = value.row3.y // let a32 = value.row3.z // let a33 = value.row3.w // let b00 = a00 * a11 - a01 * a10 // let b01 = a00 * a12 - a02 * a10 // let b02 = a00 * a13 - a03 * a10 // let b03 = a01 * a12 - a02 * a11 // let b04 = a01 * a13 - a03 * a11 // let b05 = a02 * a13 - a03 * a12 // let b06 = a20 * a31 - a21 * a30 // let b07 = a20 * a32 - a22 * a30 // let b08 = a20 * a33 - a23 * a30 // let b09 = a21 * a32 - a22 * a31 // let b10 = a21 * a33 - a23 * a31 // let b11 = a22 * a33 - a23 * a32 // return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06 // // pub fn mat4_inverse(value: Mat4) -> Mat4: // let a00 = value.row0.x // let a01 = value.row0.y // let a02 = value.row0.z // let a03 = value.row0.w // let a10 = value.row1.x // let a11 = value.row1.y // let a12 = value.row1.z // let a13 = value.row1.w // let a20 = value.row2.x // let a21 = value.row2.y // let a22 = value.row2.z // let a23 = value.row2.w // let a30 = value.row3.x // let a31 = value.row3.y // let a32 = value.row3.z // let a33 = value.row3.w // let b00 = a00 * a11 - a01 * a10 // let b01 = a00 * a12 - a02 * a10 // let b02 = a00 * a13 - a03 * a10 // let b03 = a01 * a12 - a02 * a11 // let b04 = a01 * a13 - a03 * a11 // let b05 = a02 * a13 - a03 * a12 // let b06 = a20 * a31 - a21 * a30 // let b07 = a20 * a32 - a22 * a30 // let b08 = a20 * a33 - a23 * a30 // let b09 = a21 * a32 - a22 * a31 // let b10 = a21 * a33 - a23 * a31 // let b11 = a22 * a33 - a23 * a32 // let det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06 // if abs(det) <= EPSILON: // return mat4_identity() // let inv_det = 1.0 / det // return Mat4 { // row0: vec4((a11 * b11 - a12 * b10 + a13 * b09) * inv_det, (a02 * b10 - a01 * b11 - a03 * b09) * inv_det, (a31 * b05 - a32 * b04 + a33 * b03) * inv_det, (a22 * b04 - a21 * b05 - a23 * b03) * inv_det), // row1: vec4((a12 * b08 - a10 * b11 - a13 * b07) * inv_det, (a00 * b11 - a02 * b08 + a03 * b07) * inv_det, (a32 * b02 - a30 * b05 - a33 * b01) * inv_det, (a20 * b05 - a22 * b02 + a23 * b01) * inv_det), // row2: vec4((a10 * b10 - a11 * b08 + a13 * b06) * inv_det, (a01 * b08 - a00 * b10 - a03 * b06) * inv_det, (a30 * b04 - a31 * b02 + a33 * b00) * inv_det, (a21 * b02 - a20 * b04 - a23 * b00) * inv_det), // row3: vec4((a11 * b07 - a10 * b09 - a12 * b06) * inv_det, (a00 * b09 - a01 * b07 + a02 * b06) * inv_det, (a31 * b01 - a30 * b03 - a32 * b00) * inv_det, (a20 * b03 - a21 * b01 + a22 * b00) * inv_det) // } // // pub fn mat4_decompose(value: Mat4) -> DecomposeResult: // // Extract translation // let translation = vec3(value.row0.w, value.row1.w, value.row2.w) // // Extract scale from column magnitudes // let col0 = vec3(value.row0.x, value.row1.x, value.row2.x) // let col1 = vec3(value.row0.y, value.row1.y, value.row2.y) // let col2 = vec3(value.row0.z, value.row1.z, value.row2.z) // let sx = vec3_length(col0) // let sy = vec3_length(col1) // let sz = vec3_length(col2) // let scale = vec3(sx, sy, sz) // // Normalize columns into rotation matrix // let r0x = if sx > EPSILON: col0.x / sx else: 0.0 // let r0y = if sx > EPSILON: col0.y / sx else: 0.0 // let r0z = if sx > EPSILON: col0.z / sx else: 0.0 // let r1x = if sy > EPSILON: col1.x / sy else: 0.0 // let r1y = if sy > EPSILON: col1.y / sy else: 0.0 // let r1z = if sy > EPSILON: col1.z / sy else: 0.0 // let r2x = if sz > EPSILON: col2.x / sz else: 0.0 // let r2y = if sz > EPSILON: col2.y / sz else: 0.0 // let r2z = if sz > EPSILON: col2.z / sz else: 0.0 // let trace = r0x + r1y + r2z // if trace > 0.0: // let s = 0.5 / sqrt(trace + 1.0) // return DecomposeResult { // translation: translation, // rotation: Quat { x: (r1z - r2y) * s, y: (r2x - r0z) * s, z: (r0y - r1x) * s, w: 0.25 / s }, // scale: scale // } // else if r0x > r1y and r0x > r2z: // let s = 2.0 * sqrt(1.0 + r0x - r1y - r2z) // return DecomposeResult { // translation: translation, // rotation: Quat { x: 0.25 * s, y: (r0y + r1x) / s, z: (r0z + r2x) / s, w: (r1z - r2y) / s }, // scale: scale // } // else if r1y > r2z: // let s = 2.0 * sqrt(1.0 + r1y - r0x - r2z) // return DecomposeResult { // translation: translation, // rotation: Quat { x: (r0y + r1x) / s, y: 0.25 * s, z: (r1z + r2y) / s, w: (r2x - r0z) / s }, // scale: scale // } // else: // let s = 2.0 * sqrt(1.0 + r2z - r0x - r1y) // return DecomposeResult { // translation: translation, // rotation: Quat { x: (r0z + r2x) / s, y: (r1z + r2y) / s, z: 0.25 * s, w: (r0y - r1x) / s }, // scale: scale // } // // pub fn mat4_reflection(plane: Plane) -> Mat4: // let n = vec3_normalize_or_zero(plane.normal) // let d = plane.distance // let nx = n.x // let ny = n.y // let nz = n.z // let nx2 = nx * nx // let ny2 = ny * ny // let nz2 = nz * nz // let nxy = nx * ny // let nxz = nx * nz // let nyz = ny * nz // let nd2 = 2.0 * d // return Mat4 { // row0: vec4(1.0 - 2.0 * nx2, -2.0 * nxy, -2.0 * nxz, -nx * nd2), // row1: vec4(-2.0 * nxy, 1.0 - 2.0 * ny2, -2.0 * nyz, -ny * nd2), // row2: vec4(-2.0 * nxz, -2.0 * nyz, 1.0 - 2.0 * nz2, -nz * nd2), // row3: vec4(0.0, 0.0, 0.0, 1.0) // } // // // ============================================================================ // // EASING LIBRARY (30+ functions, all data-driven) // // ============================================================================ // // pub fn ease_linear(t: Float) -> Float: // return saturate(t) // // pub fn ease_in_sine(t: Float) -> Float: // return 1.0 - cos((saturate(t) * PI) * 0.5) // // pub fn ease_out_sine(t: Float) -> Float: // return sin((saturate(t) * PI) * 0.5) // // pub fn ease_in_out_sine(t: Float) -> Float: // return -(cos(PI * saturate(t)) - 1.0) * 0.5 // // pub fn ease_in_quad(t: Float) -> Float: // let x = saturate(t) // return x * x // // pub fn ease_out_quad(t: Float) -> Float: // let x = saturate(t) // return -x * (x - 2.0) // // pub fn ease_in_out_quad(t: Float) -> Float: // let x = saturate(t) // if x < 0.5: // return 2.0 * x * x // return 1.0 - pow(-2.0 * x + 2.0, 2.0) * 0.5 // // pub fn ease_in_cubic(t: Float) -> Float: // let x = saturate(t) // return x * x * x // // pub fn ease_out_cubic(t: Float) -> Float: // let x = saturate(t) // return 1.0 - pow(1.0 - x, 3.0) // // pub fn ease_in_out_cubic(t: Float) -> Float: // let x = saturate(t) // if x < 0.5: // return 4.0 * x * x * x // return 1.0 - pow(-2.0 * x + 2.0, 3.0) * 0.5 // // pub fn ease_in_quart(t: Float) -> Float: // let x = saturate(t) // return x * x * x * x // // pub fn ease_out_quart(t: Float) -> Float: // let x = saturate(t) // return 1.0 - pow(1.0 - x, 4.0) // // pub fn ease_in_out_quart(t: Float) -> Float: // let x = saturate(t) // if x < 0.5: // return 8.0 * x * x * x * x // return 1.0 - pow(-2.0 * x + 2.0, 4.0) * 0.5 // // pub fn ease_in_quint(t: Float) -> Float: // let x = saturate(t) // return x * x * x * x * x // // pub fn ease_out_quint(t: Float) -> Float: // let x = saturate(t) // return 1.0 - pow(1.0 - x, 5.0) // // pub fn ease_in_out_quint(t: Float) -> Float: // let x = saturate(t) // if x < 0.5: // return 16.0 * x * x * x * x * x // return 1.0 - pow(-2.0 * x + 2.0, 5.0) * 0.5 // // pub fn ease_in_expo(t: Float) -> Float: // let x = saturate(t) // if x <= 0.0: // return 0.0 // return pow(2.0, 10.0 * (x - 1.0)) // // pub fn ease_out_expo(t: Float) -> Float: // let x = saturate(t) // if x >= 1.0: // return 1.0 // return 1.0 - pow(2.0, -10.0 * x) // // pub fn ease_in_out_expo(t: Float) -> Float: // let x = saturate(t) // if x <= 0.0: // return 0.0 // if x >= 1.0: // return 1.0 // if x < 0.5: // return pow(2.0, 20.0 * x - 10.0) * 0.5 // return (2.0 - pow(2.0, -20.0 * x + 10.0)) * 0.5 // // pub fn ease_in_circ(t: Float) -> Float: // let x = saturate(t) // return 1.0 - sqrt(1.0 - pow(x, 2.0)) // // pub fn ease_out_circ(t: Float) -> Float: // let x = saturate(t) - 1.0 // return sqrt(1.0 - x * x) // // pub fn ease_in_out_circ(t: Float) -> Float: // let x = saturate(t) // if x < 0.5: // return (1.0 - sqrt(1.0 - pow(2.0 * x, 2.0))) * 0.5 // return (sqrt(1.0 - pow(-2.0 * x + 2.0, 2.0)) + 1.0) * 0.5 // // pub fn ease_in_back(t: Float) -> Float: // let x = saturate(t) // let c = EASE_BACK_AMOUNT // return (c + 1.0) * x * x * x - c * x * x // // pub fn ease_out_back(t: Float) -> Float: // let x = saturate(t) - 1.0 // let c = EASE_BACK_AMOUNT // return 1.0 + (c + 1.0) * x * x * x + c * x * x // // pub fn ease_in_out_back(t: Float) -> Float: // let x = saturate(t) // let c = EASE_BACK_AMOUNT_2 // if x < 0.5: // return pow(2.0 * x, 2.0) * ((c + 1.0) * 2.0 * x - c) * 0.5 // return (pow(2.0 * x - 2.0, 2.0) * ((c + 1.0) * (x * 2.0 - 2.0) + c) + 2.0) * 0.5 // // pub fn ease_in_elastic(t: Float) -> Float: // let x = saturate(t) // if x <= 0.0: // return 0.0 // if x >= 1.0: // return 1.0 // let p = EASE_ELASTIC_PERIOD // let a = EASE_ELASTIC_AMPLITUDE // let s = p / TAU * asin_scalar(1.0 / a) // return -(a * pow(2.0, 10.0 * (x - 1.0)) * sin((x - 1.0 - s) * TAU / p)) // // pub fn ease_out_elastic(t: Float) -> Float: // let x = saturate(t) // if x <= 0.0: // return 0.0 // if x >= 1.0: // return 1.0 // let p = EASE_ELASTIC_PERIOD // let a = EASE_ELASTIC_AMPLITUDE // let s = p / TAU * asin_scalar(1.0 / a) // return a * pow(2.0, -10.0 * x) * sin((x - s) * TAU / p) + 1.0 // // pub fn ease_in_out_elastic(t: Float) -> Float: // let x = saturate(t) // if x <= 0.0: // return 0.0 // if x >= 1.0: // return 1.0 // let p = EASE_ELASTIC_PERIOD // let a = EASE_ELASTIC_AMPLITUDE // let s = p / TAU * asin_scalar(1.0 / a) // if x < 0.5: // return -0.5 * (a * pow(2.0, 20.0 * x - 10.0) * sin((20.0 * x - 11.125 + s) * TAU / p)) // return a * pow(2.0, -20.0 * x + 10.0) * sin((20.0 * x - 11.125 + s) * TAU / p) * 0.5 + 1.0 // // pub fn ease_in_bounce(t: Float) -> Float: // return 1.0 - ease_out_bounce(1.0 - saturate(t)) // // pub fn ease_out_bounce(t: Float) -> Float: // let x = saturate(t) // if x < EASE_BOUNCE_B1: // return EASE_BOUNCE_B5 * x * x // else if x < EASE_BOUNCE_B2: // let x2 = x - EASE_BOUNCE_B3 // return EASE_BOUNCE_B5 * x2 * x2 + 0.75 // else if x < EASE_BOUNCE_B4: // let x2 = x - EASE_BOUNCE_B6 // return EASE_BOUNCE_B5 * x2 * x2 + 0.9375 // else: // let x2 = x - 0.984375 // return EASE_BOUNCE_B5 * x2 * x2 + 0.984375 // // pub fn ease_in_out_bounce(t: Float) -> Float: // let x = saturate(t) // if x < 0.5: // return (1.0 - ease_out_bounce(1.0 - 2.0 * x)) * 0.5 // return (1.0 + ease_out_bounce(2.0 * x - 1.0)) * 0.5 // // // ============================================================================ // // SPECIAL FUNCTIONS // // ============================================================================ // // pub fn erf(value: Float) -> Float: // // Abramowitz & Stegun approximation 7.1.26 // let x = abs(value) // let t = 1.0 / (1.0 + 0.3275911 * x) // let a1 = 0.254829592 // let a2 = -0.284496736 // let a3 = 1.421413741 // let a4 = -1.453152027 // let a5 = 1.061405429 // let y = 1.0 - t * (a1 + t * (a2 + t * (a3 + t * (a4 + t * a5)))) * pow(E, -x * x) // if value < 0.0: // return -y // return y // // pub fn erfc(value: Float) -> Float: // return 1.0 - erf(value) // // pub fn gamma(value: Float) -> Float: // let gamma_x_local = value - 1.0 // let gamma_g_val = 7.0 // let gamma_c = [0.99999999999980993, 676.5203681218851, -1259.1392167224028, 771.32342877765313, -176.61502916214059, 12.507343278686905, -0.13857109526572012, 0.0000099843695780195716, 0.00000015056327351493116] // if gamma_x_local < 0.5: // return PI / (sin(PI * gamma_x_local) * gamma(1.0 - gamma_x_local)) // let x_adj = gamma_x_local - 1.0 // let first = gamma_c[0] // var ag_val = first // let gamma_index = 1 // while gamma_index < 9: // ag_val = ag_val + gamma_c[gamma_index] / (x_adj + gamma_index as Float) // gamma_index = gamma_index + 1 // let gamma_t = x_adj + gamma_g_val + 0.5 // return sqrt(TAU) * pow(gamma_t, x_adj + 0.5) * pow(E, -gamma_t) * ag_val // // pub fn lgamma(value: Float) -> Float: // return ln_scalar(abs(gamma(value))) // // pub fn digamma(value: Float) -> Float: // let x = value // let ln_x = ln_scalar(x) // let inv_2x = 1.0 / (2.0 * x) // let inv_12x2 = 1.0 / (12.0 * x * x) // let inv_120x4 = 1.0 / (120.0 * x * x * x * x) // let inv_252x6 = 1.0 / (252.0 * pow(x, 6.0)) // return ln_x - inv_2x - inv_12x2 + inv_120x4 - inv_252x6 // // // ============================================================================ // // NUMBER THEORY (discrete math helpers) // // ============================================================================ // // pub fn gcd(a: Int, b: Int) -> Int: // var x = a // var y = b // while y != 0: // let temp = y // y = x % y // x = temp // return x // // pub fn lcm(a: Int, b: Int) -> Int: // if a == 0 or b == 0: // return 0 // return (a / gcd(a, b)) * b // // pub fn extended_euclidean(a: Int, b: Int) -> Vec3: // var old_r = a // var r = b // var old_s = 1 // var s = 0 // var old_t = 1 // var t = 0 // while r != 0: // let quotient = old_r / r // let temp_r = r // r = old_r - quotient * r // old_r = temp_r // let temp_s = s // s = old_s - quotient * s // old_s = temp_s // let temp_t = t // t = old_t - quotient * t // old_t = temp_t // return vec3(old_s as Float, old_t as Float, old_r as Float) // // pub fn mod_inverse(a: Int, m: Int) -> Int: // let result = extended_euclidean(a, m) // let g = round(result.z) as Int // if g != 1: // return 0 // let x = round(result.x) as Int // if x < 0: // return x + m // return x // // pub fn mod_pow(base: Int, exponent: Int, modulus: Int) -> Int: // if modulus <= 1: // return 0 // var result = 1 // var b = base % modulus // var e = exponent // while e > 0: // if (e & 1) == 1: // result = (result * b) % modulus // b = (b * b) % modulus // e = e >> 1 // return result // // pub fn factorial(n: Int) -> Int: // if n <= 1: // return 1 // var result = 1 // var index = 2 // while index <= n: // result = result * index // index = index + 1 // return result // // pub fn binomial(n: Int, k: Int) -> Int: // if k < 0 or k > n: // return 0 // if k == 0 or k == n: // return 1 // let r = math_int_clamp(k, 0, n - k) // var result = 1 // var index = 1 // while index <= r: // result = (result * (n - r + index)) / index // index = index + 1 // return result // // pub fn is_prime(n: Int) -> Bool: // if n <= 1: // return false // if n <= 3: // return true // if n % 2 == 0 or n % 3 == 0: // return false // var index = 5 // while index * index <= n: // if n % index == 0 or n % (index + 2) == 0: // return false // index = index + 6 // return true // // pub fn fibonacci_fast(n: Int) -> Int: // if n <= 0: // return 0 // if n == 1: // return 1 // var a = 0 // var b = 1 // var bit = 31 // while bit >= 0: // let temp_a = a * (2 * b - a) // let temp_b = a * a + b * b // a = temp_a // b = temp_b // if ((n >> bit) & 1) == 1: // let new_a = a + b // a = b // b = new_a // bit = bit - 1 // return a // // pub fn next_power_of_two(n: Int) -> Int: // if n <= 0: // return 1 // var value = n - 1 // value = value | (value >> 1) // value = value | (value >> 2) // value = value | (value >> 4) // value = value | (value >> 8) // value = value | (value >> 16) // return value + 1 // // pub fn is_power_of_two(n: Int) -> Bool: // if n <= 0: // return false // return (n & (n - 1)) == 0 // // // ============================================================================ // // NUMERICAL METHODS // // ============================================================================ // // pub fn newton_raphson(f: fn(Float) -> Float, f_prime: fn(Float) -> Float, initial: Float, tolerance: Float, max_iters: Int) -> Float: // var x = initial // var iter = 0 // while iter < max_iters: // let fx = f(x) // if abs(fx) <= tolerance: // return x // let fpx = f_prime(x) // if abs(fpx) <= EPSILON: // return x // x = x - fx / fpx // iter = iter + 1 // return x // // pub fn bisection(f: fn(Float) -> Float, lo: Float, hi: Float, tolerance: Float, max_iters: Int) -> Float: // var a = lo // var b = hi // var fa = f(a) // var fb = f(b) // if abs(fa) <= tolerance: // return a // if abs(fb) <= tolerance: // return b // if fa * fb > 0.0: // return a // var iter = 0 // while iter < max_iters: // let mid = (a + b) * 0.5 // let fmid = f(mid) // if abs(fmid) <= tolerance or (b - a) * 0.5 <= tolerance: // return mid // if fa * fmid < 0.0: // b = mid // fb = fmid // else: // a = mid // fa = fmid // iter = iter + 1 // return (a + b) * 0.5 // // pub fn adaptive_simpson(f: fn(Float) -> Float, a: Float, b: Float, tolerance: Float, max_depth: Int) -> Float: // let h = b - a // let c = (a + b) * 0.5 // let fa = f(a) // let fb = f(b) // let fc = f(c) // let s = (h / 6.0) * (fa + 4.0 * fc + fb) // return adaptive_simpson_recursive(f, a, b, c, fa, fb, fc, s, tolerance, max_depth, 0) // // fn adaptive_simpson_recursive(f: fn(Float) -> Float, a: Float, b: Float, c: Float, fa: Float, fb: Float, fc: Float, whole: Float, tolerance: Float, max_depth: Int, depth: Int) -> Float: // let left_c = (a + c) * 0.5 // let right_c = (c + b) * 0.5 // let fl = f(left_c) // let fr = f(right_c) // let h = b - a // let left_s = (h / 12.0) * (fa + 4.0 * fl + fc) // let right_s = (h / 12.0) * (fc + 4.0 * fr + fb) // let split = left_s + right_s // if depth >= max_depth or abs(split - whole) <= 15.0 * tolerance: // return split + (split - whole) / 15.0 // let left_result = adaptive_simpson_recursive(f, a, c, left_c, fa, fc, fl, left_s, tolerance * 0.5, max_depth, depth + 1) // let right_result = adaptive_simpson_recursive(f, c, b, right_c, fc, fb, fr, right_s, tolerance * 0.5, max_depth, depth + 1) // return left_result + right_result // // // ============================================================================ // // PERLIN NOISE (gradient-based, not value noise) // // ============================================================================ // // // Permutation table for Perlin noise (data-driven) // pub fn perm_table(index: Int) -> Int: // let perms = [151,160,137,91,90,15,131,13,201,95,96,53,194,233,7,225, // 140,36,103,30,69,142,8,99,37,240,21,10,23,190,6,148, // 247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32, // 57,177,33,88,237,149,56,87,174,20,125,136,171,168,68,175, // 74,165,71,134,139,48,27,166,77,146,158,231,83,111,229,122, // 60,211,133,230,220,105,92,41,55,46,245,40,244,102,143,54, // 65,25,63,161,1,216,80,73,209,76,132,187,208,89,18,169, // 200,196,135,130,116,188,159,86,164,100,109,198,173,186,3,64, // 52,217,226,250,124,123,5,202,38,147,118,126,255,82,85,212, // 207,206,59,227,47,16,58,17,182,189,28,42,223,183,170,213, // 119,248,152,2,44,154,163,70,221,153,101,155,167,43,172,9, // 129,22,39,253,19,98,108,110,79,113,224,232,178,185,112,104, // 218,246,97,228,251,34,242,193,238,210,144,12,191,179,162,241, // 81,51,145,235,249,14,239,107,49,192,214,31,181,199,106,157, // 184,84,204,176,115,121,50,45,127,4,150,254,138,236,205,93, // 222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180] // return perms[index & 255] // // fn perm_index(index: Int) -> Int: // return perm_table(index) // // fn grad2(hash: Int, x: Float, y: Float) -> Float: // let h = hash & 3 // let u = if h < 2: x else: -x // let v = if h == 0 or h == 3: y else: -y // return u + v // // fn grad3(hash: Int, x: Float, y: Float, z: Float) -> Float: // let h = hash & 15 // let u = if h < 8: x else: y // let v = if h < 4: y else: (if h == 12 or h == 14: x else: z) // return (if (h & 1) == 0: u else: -u) + (if (h & 2) == 0: v else: -v) // // fn fade(t: Float) -> Float: // return t * t * t * (t * (t * 6.0 - 15.0) + 10.0) // // pub fn perlin2(p: Vec2) -> Float: // let ix = floor(p.x) as Int // let iy = floor(p.y) as Int // let fx = p.x - floor(p.x) // let fy = p.y - floor(p.y) // let u = fade(fx) // let v = fade(fy) // let aa = perm_index(perm_index(ix) + iy) // let ab = perm_index(perm_index(ix) + iy + 1) // let ba = perm_index(perm_index(ix + 1) + iy) // let bb = perm_index(perm_index(ix + 1) + iy + 1) // let x1 = lerp(grad2(aa, fx, fy), grad2(ba, fx - 1.0, fy), u) // let x2 = lerp(grad2(ab, fx, fy - 1.0), grad2(bb, fx - 1.0, fy - 1.0), u) // return lerp(x1, x2, v) // // pub fn perlin3(p: Vec3) -> Float: // let ix = floor(p.x) as Int // let iy = floor(p.y) as Int // let iz = floor(p.z) as Int // let fx = p.x - floor(p.x) // let fy = p.y - floor(p.y) // let fz = p.z - floor(p.z) // let u = fade(fx) // let v = fade(fy) // let w = fade(fz) // let a0 = perm_index(perm_index(ix) + iy) // let b0 = perm_index(perm_index(ix + 1) + iy) // let a1 = perm_index(perm_index(ix) + iy + 1) // let b1 = perm_index(perm_index(ix + 1) + iy + 1) // let aa = perm_index(a0 + iz) // let ba = perm_index(b0 + iz) // let ab = perm_index(a1 + iz) // let bb = perm_index(b1 + iz) // let aaa = perm_index(aa + 1) // let baa = perm_index(ba + 1) // let aba = perm_index(ab + 1) // let bba = perm_index(bb + 1) // let x1 = lerp(grad3(aa, fx, fy, fz), grad3(ba, fx - 1.0, fy, fz), u) // let x2 = lerp(grad3(ab, fx, fy - 1.0, fz), grad3(bb, fx - 1.0, fy - 1.0, fz), u) // let y1 = lerp(x1, x2, v) // let x3 = lerp(grad3(aaa, fx, fy, fz - 1.0), grad3(baa, fx - 1.0, fy, fz - 1.0), u) // let x4 = lerp(grad3(aba, fx, fy - 1.0, fz - 1.0), grad3(bba, fx - 1.0, fy - 1.0, fz - 1.0), u) // let y2 = lerp(x3, x4, v) // return lerp(y1, y2, w) // // pub fn perlin_fbm2(p: Vec2, octaves: Int) -> Float: // var value = 0.0 // var amplitude = 0.5 // var frequency = 1.0 // var index = 0 // while index < octaves: // value = value + perlin2(vec2_mul_scalar(p, frequency)) * amplitude // amplitude = amplitude * 0.5 // frequency = frequency * 2.0 // index = index + 1 // return value // // pub fn perlin_fbm3(p: Vec3, octaves: Int) -> Float: // var value = 0.0 // var amplitude = 0.5 // var frequency = 1.0 // var index = 0 // while index < octaves: // value = value + perlin3(vec3_mul_scalar(p, frequency)) * amplitude // amplitude = amplitude * 0.5 // frequency = frequency * 2.0 // index = index + 1 // return value // // // ============================================================================ // // SIMPLEX NOISE // // ============================================================================ // // // Skew factors for simplex // pub const SIMPLEX_F2: Float = 0.5 * (SQRT_3 - 1.0) // pub const SIMPLEX_G2: Float = (3.0 - SQRT_3) / 6.0 // pub const SIMPLEX_F3: Float = 1.0 / 3.0 // pub const SIMPLEX_G3: Float = 1.0 / 6.0 // // pub fn simplex2(p: Vec2) -> Float: // let s = (p.x + p.y) * SIMPLEX_F2 // let i = floor(p.x + s) as Int // let j = floor(p.y + s) as Int // let t = (i + j) as Float * SIMPLEX_G2 // let x0 = p.x - (i as Float - t) // let y0 = p.y - (j as Float - t) // var i1 = 0 // var j1 = 1 // if x0 > y0: // i1 = 1 // j1 = 0 // let x1 = x0 - i1 as Float + SIMPLEX_G2 // let y1 = y0 - j1 as Float + SIMPLEX_G2 // let x2 = x0 - 1.0 + 2.0 * SIMPLEX_G2 // let y2 = y0 - 1.0 + 2.0 * SIMPLEX_G2 // let ii = i & 255 // let jj = j & 255 // let gi0 = perm_index(ii + perm_index(jj)) % 12 // let gi1 = perm_index(ii + i1 + perm_index(jj + j1)) % 12 // let gi2 = perm_index(ii + 1 + perm_index(jj + 1)) % 12 // var n0 = 0.0 // var t0 = 0.5 - x0 * x0 - y0 * y0 // if t0 > 0.0: // t0 = t0 * t0 // n0 = t0 * t0 * grad2(gi0, x0, y0) // var t1 = 0.5 - x1 * x1 - y1 * y1 // var n1 = 0.0 // if t1 > 0.0: // t1 = t1 * t1 // n1 = t1 * t1 * grad2(gi1, x1, y1) // var t2 = 0.5 - x2 * x2 - y2 * y2 // var n2 = 0.0 // if t2 > 0.0: // t2 = t2 * t2 // n2 = t2 * t2 * grad2(gi2, x2, y2) // return 70.0 * (n0 + n1 + n2) // // pub fn simplex3(p: Vec3) -> Float: // let s = (p.x + p.y + p.z) * SIMPLEX_F3 // let i = floor(p.x + s) as Int // let j = floor(p.y + s) as Int // let k = floor(p.z + s) as Int // let t = (i + j + k) as Float * SIMPLEX_G3 // let x0 = p.x - (i as Float - t) // let y0 = p.y - (j as Float - t) // let z0 = p.z - (k as Float - t) // var i1 = 0 // var j1 = 0 // var k1 = 0 // var i2 = 0 // var j2 = 0 // var k2 = 0 // if x0 >= y0: // if y0 >= z0: // i1 = 1 // j1 = 0 // k1 = 0 // i2 = 1 // j2 = 1 // k2 = 0 // else if x0 >= z0: // i1 = 1 // j1 = 0 // k1 = 0 // i2 = 1 // j2 = 0 // k2 = 1 // else: // i1 = 0 // j1 = 0 // k1 = 1 // i2 = 1 // j2 = 0 // k2 = 1 // else: // if y0 < z0: // i1 = 0 // j1 = 0 // k1 = 1 // i2 = 0 // j2 = 1 // k2 = 1 // else if x0 < z0: // i1 = 0 // j1 = 1 // k1 = 0 // i2 = 0 // j2 = 1 // k2 = 1 // else: // i1 = 0 // j1 = 1 // k1 = 0 // i2 = 1 // j2 = 1 // k2 = 0 // let x1 = x0 - i1 as Float + SIMPLEX_G3 // let y1 = y0 - j1 as Float + SIMPLEX_G3 // let z1 = z0 - k1 as Float + SIMPLEX_G3 // let x2 = x0 - i2 as Float + 2.0 * SIMPLEX_G3 // let y2 = y0 - j2 as Float + 2.0 * SIMPLEX_G3 // let z2 = z0 - k2 as Float + 2.0 * SIMPLEX_G3 // let x3 = x0 - 1.0 + 3.0 * SIMPLEX_G3 // let y3 = y0 - 1.0 + 3.0 * SIMPLEX_G3 // let z3 = z0 - 1.0 + 3.0 * SIMPLEX_G3 // let ii = i & 255 // let jj = j & 255 // let kk = k & 255 // let gi0 = perm_index(ii + perm_index(jj + perm_index(kk))) % 12 // let gi1 = perm_index(ii + i1 + perm_index(jj + j1 + perm_index(kk + k1))) % 12 // let gi2 = perm_index(ii + i2 + perm_index(jj + j2 + perm_index(kk + k2))) % 12 // let gi3 = perm_index(ii + 1 + perm_index(jj + 1 + perm_index(kk + 1))) % 12 // var n0 = 0.0 // var t0_val = 0.6 - x0 * x0 - y0 * y0 - z0 * z0 // if t0_val > 0.0: // t0_val = t0_val * t0_val // n0 = t0_val * t0_val * grad3(gi0, x0, y0, z0) // var n1 = 0.0 // var t1_val = 0.6 - x1 * x1 - y1 * y1 - z1 * z1 // if t1_val > 0.0: // t1_val = t1_val * t1_val // n1 = t1_val * t1_val * grad3(gi1, x1, y1, z1) // var n2 = 0.0 // var t2_val = 0.6 - x2 * x2 - y2 * y2 - z2 * z2 // if t2_val > 0.0: // t2_val = t2_val * t2_val // n2 = t2_val * t2_val * grad3(gi2, x2, y2, z2) // var n3 = 0.0 // var t3_val = 0.6 - x3 * x3 - y3 * y3 - z3 * z3 // if t3_val > 0.0: // t3_val = t3_val * t3_val // n3 = t3_val * t3_val * grad3(gi3, x3, y3, z3) // return 32.0 * (n0 + n1 + n2 + n3) // // // ============================================================================ // // COORDINATE SYSTEMS // // ============================================================================ // // pub struct SphericalCoords: // radius: Float // theta: Float // phi: Float // // pub fn cartesian_to_spherical(p: Vec3) -> SphericalCoords: // let r = vec3_length(p) // if r <= EPSILON: // return SphericalCoords { radius: 0.0, theta: 0.0, phi: 0.0 } // return SphericalCoords { // radius: r, // theta: acos_scalar(p.z / r), // phi: atan2_scalar(p.y, p.x) // } // // pub fn spherical_to_cartesian(s: SphericalCoords) -> Vec3: // let st = sin(s.theta) // return vec3( // s.radius * st * cos(s.phi), // s.radius * st * sin(s.phi), // s.radius * cos(s.theta) // ) // // pub struct CylindricalCoords: // radius: Float // theta: Float // height: Float // // pub fn cartesian_to_cylindrical(p: Vec3) -> CylindricalCoords: // let r = sqrt(p.x * p.x + p.y * p.y) // return CylindricalCoords { // radius: r, // theta: atan2_scalar(p.y, p.x), // height: p.z // } // // pub fn cylindrical_to_cartesian(c: CylindricalCoords) -> Vec3: // return vec3( // c.radius * cos(c.theta), // c.radius * sin(c.theta), // c.height // ) // // // ============================================================================ // // PACKING (half-float, octahedral normal, snorm) // // ============================================================================ // // pub fn pack_half(value: Float) -> Int: // // Float-to-half packing via manual exponent/mantissa extraction // // Uses mathematical decomposition without bitcast // if value < 0.0: // return pack_half(-value) | (1 << 15) // let clamped = math_min(value, 65504.0) // if clamped <= EPSILON: // return 0 // // Normalize to fraction + exponent // var frac = clamped // var exp = 0 // while frac >= 2.0: // frac = frac * 0.5 // exp = exp + 1 // while frac < 1.0: // frac = frac * 2.0 // exp = exp - 1 // let half_exp = exp + 15 // if half_exp >= 31: // return (15 << 10) | 31744 // if half_exp <= 0: // return 0 // let half_mant = round((frac - 1.0) * 1024.0) as Int // return (half_exp << 10) | (half_mant & 1023) // // pub fn unpack_half(packed: Int) -> Float: // let sign = (packed >> 15) & 1 // let exp = (packed >> 10) & 31 // let mant = packed & 1023 // if exp == 0: // return 0.0 // if exp == 31: // return 0.0 // let fraction = 1.0 + mant as Float / 1024.0 // let exponent_val = exp as Float - 15.0 // let result = fraction * pow(2.0, exponent_val) // if sign == 1: // return -result // return result // // pub fn pack_snorm8(value: Float) -> Int: // return math_int_clamp(round(math_clamp(value, -1.0, 1.0) * 127.0) as Int, -127, 127) // // pub fn unpack_snorm8(packed: Int) -> Float: // return math_max(packed as Float / 127.0, -1.0) // // pub fn pack_octahedral_normal(normal: Vec3) -> Vec2: // let n = vec3_normalize_or_zero(normal) // let inv_sum = 1.0 / (abs(n.x) + abs(n.y) + abs(n.z)) // var u = n.x * inv_sum // var v = n.y * inv_sum // if n.z < 0.0: // let prev_u = u // u = (1.0 - abs(v)) * sign_nonzero(u) // v = (1.0 - abs(prev_u)) * sign_nonzero(v) // return vec2(u, v) // // pub fn unpack_octahedral_normal(packed: Vec2) -> Vec3: // let u = packed.x // let v = packed.y // let z = 1.0 - abs(u) - abs(v) // let uz = if z >= 0.0: u else: (1.0 - abs(v)) * sign_nonzero(u) // let vz = if z >= 0.0: v else: (1.0 - abs(u)) * sign_nonzero(v) // let nz = math_clamp(z, -1.0, 1.0) // return vec3_normalize_or_zero(vec3(uz, vz, nz)) // // // ============================================================================ // // SPHERICAL HARMONICS (order 0-2 basis evaluation) // // ============================================================================ // // pub struct ShCoeffs: // c00: Float // c11: Float // c10: Float // c1n1: Float // c22: Float // c21: Float // c20: Float // c2n1: Float // c2n2: Float // // pub fn sh_basis_0(dir: Vec3) -> Float: // return 0.28209479177387814 // 1/(2*sqrt(pi)) // // pub fn sh_basis_1_1(dir: Vec3) -> Float: // return -0.4886025119029199 * dir.y // -sqrt(3/(4*pi)) * y // // pub fn sh_basis_1_0(dir: Vec3) -> Float: // return 0.4886025119029199 * dir.z // sqrt(3/(4*pi)) * z // // pub fn sh_basis_1n1(dir: Vec3) -> Float: // return -0.4886025119029199 * dir.x // -sqrt(3/(4*pi)) * x // // pub fn sh_basis_2_2(dir: Vec3) -> Float: // return 1.0925484305920792 * dir.x * dir.y // sqrt(15/(4*pi)) * xy // // pub fn sh_basis_2_1(dir: Vec3) -> Float: // return -1.0925484305920792 * dir.y * dir.z // -sqrt(15/(4*pi)) * yz // // pub fn sh_basis_2_0(dir: Vec3) -> Float: // return 0.31539156525252005 * (3.0 * dir.z * dir.z - 1.0) // (1/4)*sqrt(5/pi) * (3z^2 - 1) // // pub fn sh_basis_2n1(dir: Vec3) -> Float: // return -1.0925484305920792 * dir.x * dir.z // -sqrt(15/(4*pi)) * xz // // pub fn sh_basis_2n2(dir: Vec3) -> Float: // return 0.5462742152960396 * (dir.x * dir.x - dir.y * dir.y) // (1/2)*sqrt(15/(4*pi)) * (x^2 - y^2) // // pub fn sh_eval(dir: Vec3, coeffs: ShCoeffs) -> Float: // return coeffs.c00 * sh_basis_0(dir) + coeffs.c11 * sh_basis_1_1(dir) + coeffs.c10 * sh_basis_1_0(dir) + coeffs.c1n1 * sh_basis_1n1(dir) + coeffs.c22 * sh_basis_2_2(dir) + coeffs.c21 * sh_basis_2_1(dir) + coeffs.c20 * sh_basis_2_0(dir) + coeffs.c2n1 * sh_basis_2n1(dir) + coeffs.c2n2 * sh_basis_2n2(dir) // // pub fn sh_project_dir(dir: Vec3, value: Float) -> ShCoeffs: // return ShCoeffs { // c00: value * sh_basis_0(dir), // c11: value * sh_basis_1_1(dir), // c10: value * sh_basis_1_0(dir), // c1n1: value * sh_basis_1n1(dir), // c22: value * sh_basis_2_2(dir), // c21: value * sh_basis_2_1(dir), // c20: value * sh_basis_2_0(dir), // c2n1: value * sh_basis_2n1(dir), // c2n2: value * sh_basis_2n2(dir) // } // // pub fn sh_add(a: ShCoeffs, b: ShCoeffs) -> ShCoeffs: // return ShCoeffs { // c00: a.c00 + b.c00, c11: a.c11 + b.c11, c10: a.c10 + b.c10, c1n1: a.c1n1 + b.c1n1, // c22: a.c22 + b.c22, c21: a.c21 + b.c21, c20: a.c20 + b.c20, c2n1: a.c2n1 + b.c2n1, c2n2: a.c2n2 + b.c2n2 // } // // pub fn sh_mul_scalar(coeffs: ShCoeffs, scalar: Float) -> ShCoeffs: // return ShCoeffs { // c00: coeffs.c00 * scalar, c11: coeffs.c11 * scalar, c10: coeffs.c10 * scalar, c1n1: coeffs.c1n1 * scalar, // c22: coeffs.c22 * scalar, c21: coeffs.c21 * scalar, c20: coeffs.c20 * scalar, c2n1: coeffs.c2n1 * scalar, c2n2: coeffs.c2n2 * scalar // } // // // ============================================================================ // // PHYSICS HELPERS (frame-independent motion, damping, integration) // // ============================================================================ // // pub struct SpringResult: // position: Float // velocity: Float // // pub fn spring_damper_implicit(position: Float, velocity: Float, target: Float, stiffness: Float, damping: Float, dt: Float) -> SpringResult: // let f = 1.0 / (1.0 + dt * damping + dt * dt * stiffness) // let new_vel = (velocity + dt * stiffness * (target - position)) * f // let new_pos = position + dt * new_vel // return SpringResult { position: new_pos, velocity: new_vel } // // pub fn smooth_damp(current: Float, target: Float, velocity: Float, smooth_time: Float, max_speed: Float, dt: Float) -> SpringResult: // let omega = 2.0 / math_max(smooth_time, EPSILON) // let x = omega * dt // let exp_factor = 1.0 / (1.0 + x + 0.48 * x * x + 0.235 * x * x * x) // let change = current - target // let max_change = max_speed * smooth_time // let clamped_change = math_clamp(change, -max_change, max_change) // let target_adj = current - clamped_change // let temp = (velocity + omega * clamped_change * dt) * exp_factor // let new_pos = target_adj + (clamped_change + temp) * dt // let new_vel = (temp - omega * dt * exp_factor) // if (target - current > 0.0) == (new_pos > target): // return SpringResult { position: target, velocity: new_vel } // return SpringResult { position: new_pos, velocity: new_vel } // // pub fn critically_damped_spring(current: Float, velocity: Float, target: Float, half_life: Float, dt: Float) -> SpringResult: // let omega = LN_2 / math_max(half_life, EPSILON) // let x = omega * dt // let exp_factor = 1.0 / (1.0 + x + 0.48 * x * x + 0.235 * x * x * x) // let new_pos = target + (current - target + velocity * dt) * exp_factor // let new_vel = (velocity - omega * (new_pos - target) * dt) * exp_factor // return SpringResult { position: new_pos, velocity: new_vel } // // pub struct PidController: // p_gain: Float // i_gain: Float // d_gain: Float // integral: Float // prev_error: Float // // pub fn pid_controller_new(p_gain: Float, i_gain: Float, d_gain: Float) -> PidController: // return PidController { p_gain: p_gain, i_gain: i_gain, d_gain: d_gain, integral: 0.0, prev_error: 0.0 } // // pub fn pid_controller_update(ctrl: PidController, setpoint: Float, measurement: Float, dt: Float) -> PidController: // let error = setpoint - measurement // let integral = ctrl.integral + error * dt // let derivative = (error - ctrl.prev_error) / math_max(dt, EPSILON) // let output = ctrl.p_gain * error + ctrl.i_gain * integral + ctrl.d_gain * derivative // return PidController { // p_gain: ctrl.p_gain, // i_gain: ctrl.i_gain, // d_gain: ctrl.d_gain, // integral: integral, // prev_error: error // } // // pub fn pid_get_output(ctrl: PidController) -> Float: // return ctrl.p_gain * ctrl.prev_error + ctrl.i_gain * ctrl.integral // // //!end-kain-file //!kain-file // path = "mcp.kn" // kind = "text" // encoding = "utf8" // bytes = 26550 // sha256 = "sha256:6f6a1ee2d9a6c05e373af992b5eed44e51d768301ff458286f0a30a7b56ce3a0" // trailing_newline = true //!kain-file-content // // ============================================================================ // // std::mcp — Model Context Protocol // // ============================================================================ // // Kain-native MCP server construction for the 2025-03-26 protocol revision. // // // // This module provides universal JSON-RPC 2.0 framing, the lifecycle handshake, // // content-type constructors, stdio transport I/O, structured logging to stderr, // // and a reference event loop. Streamable HTTP transport is a future lane. // // // // Import: use std::mcp // // // // Runtime primitives used directly (no @extern wrappers needed): // // read_line() — block until newline on stdin, return line ("" on EOF) // // stdout_write(s) — write to stdout, flush // // stderr_write(s) — write to stderr, flush // // use std::json // // // =========================================================================== // // Protocol constants // // =========================================================================== // // pub const MCP_PROTOCOL_VERSION: String = "2025-03-26" // pub const MCP_JSONRPC_VERSION: String = "2.0" // // // JSON-RPC 2.0 standard error codes // pub const MCP_ERROR_PARSE: Int = -32700 // pub const MCP_ERROR_INVALID_REQUEST: Int = -32600 // pub const MCP_ERROR_METHOD_NOT_FOUND: Int = -32601 // pub const MCP_ERROR_INVALID_PARAMS: Int = -32602 // pub const MCP_ERROR_INTERNAL: Int = -32603 // // // MCP server-defined error codes // pub const MCP_ERROR_TOOL_NOT_FOUND: Int = -32001 // pub const MCP_ERROR_RESOURCE_NOT_FOUND: Int = -32002 // pub const MCP_ERROR_PROMPT_NOT_FOUND: Int = -32003 // // // =========================================================================== // // Type definitions // // =========================================================================== // // pub struct McpServer: // name: String // version: String // instructions: String // // pub struct McpToolDef: // name: String // description: String // input_schema_json: String // pre-serialized JSON Schema string, e.g. "{\"type\":\"object\",\"properties\":{}}" // // pub struct McpCallResult: // content_json: String // pre-built JSON content array, e.g. "[{\"type\":\"text\",\"text\":\"...\"}]" // is_error: Bool // // pub struct McpResourceDef: // uri: String // name: String // description: String // mime_type: String // // pub struct McpPromptDef: // name: String // description: String // // // Parsed incoming request (for manual dispatch loops) // pub struct McpRequest: // raw_json: String // method: String // has_id: Bool // id_value: JsonValue // params_value: JsonValue // request_obj: JsonObject // // // =========================================================================== // // Server lifecycle // // =========================================================================== // // pub fn mcp_server_new(name: String, version: String) -> McpServer: // return McpServer { // name: name, // version: version, // instructions: "" // } // // pub fn mcp_server_with_instructions(name: String, version: String, instructions: String) -> McpServer: // return McpServer { // name: name, // version: version, // instructions: instructions // } // // // =========================================================================== // // Tool definition helpers // // =========================================================================== // // // Create a tool definition. schema_json is a JSON Schema string like: // // {"type":"object","properties":{"city":{"type":"string","description":"City name"}},"required":["city"]} // pub fn mcp_tool_def(name: String, description: String, schema_json: String) -> McpToolDef: // return McpToolDef { // name: name, // description: description, // input_schema_json: schema_json // } // // // Create a tool definition with no input parameters. // pub fn mcp_tool_def_no_args(name: String, description: String) -> McpToolDef: // return McpToolDef { // name: name, // description: description, // input_schema_json: "{\"type\":\"object\",\"properties\":{}}" // } // // // Create a resource definition for the catalog/list surface. // pub fn mcp_resource_def(uri: String, name: String, description: String, mime_type: String) -> McpResourceDef: // return McpResourceDef { // uri: uri, // name: name, // description: description, // mime_type: mime_type // } // // // Create a prompt definition for the catalog/list surface. // pub fn mcp_prompt_def(name: String, description: String) -> McpPromptDef: // return McpPromptDef { // name: name, // description: description // } // // // Set a field on a JsonObject where the value may be any JSON type. // // MCP ids and tool payloads can be string, numeric, object, array, or null. // fn mcp_object_set_any(obj: JsonObject, key: String, value: JsonValue) -> JsonObject: // return json_object_set_value(obj, key, value) // // // JSON kind code constants (matching std::json JSON_KIND_CODE_*) // const MCP_KIND_NULL: Int = 0 // const MCP_KIND_BOOL: Int = 1 // const MCP_KIND_INT: Int = 2 // const MCP_KIND_FLOAT: Int = 3 // const MCP_KIND_STRING: Int = 4 // const MCP_KIND_OBJECT: Int = 5 // const MCP_KIND_ARRAY: Int = 6 // // // =========================================================================== // // JSON-RPC 2.0 message builders // // =========================================================================== // // // Build a success response: {"jsonrpc":"2.0","id":,"result":} // pub fn mcp_build_response(id_value: JsonValue, result: JsonObject) -> JsonObject: // let resp = json_object() // let _a = json_object_set_string(resp, "jsonrpc", MCP_JSONRPC_VERSION) // let _b = mcp_object_set_any(resp, "id", id_value) // let _c = json_object_set_object(resp, "result", result) // return resp // // // Build an error response: {"jsonrpc":"2.0","id":,"error":{"code":,"message":}} // pub fn mcp_build_error(id_value: JsonValue, code: Int, message: String) -> JsonObject: // let err = json_object() // let _a = json_object_set_int(err, "code", code) // let _b = json_object_set_string(err, "message", message) // let resp = json_object() // let _c = json_object_set_string(resp, "jsonrpc", MCP_JSONRPC_VERSION) // let _d = mcp_object_set_any(resp, "id", id_value) // let _e = json_object_set_object(resp, "error", err) // return resp // // // Build a notification (no id field): {"jsonrpc":"2.0","method":,"params":

} // pub fn mcp_build_notification(method: String, params: JsonObject) -> JsonObject: // let notif = json_object() // let _a = json_object_set_string(notif, "jsonrpc", MCP_JSONRPC_VERSION) // let _b = json_object_set_string(notif, "method", method) // let _c = json_object_set_object(notif, "params", params) // return notif // // // =========================================================================== // // MCP initialize handshake // // =========================================================================== // // // Build the initialize response result. Pass to mcp_build_response() with the id. // pub fn mcp_build_initialize_result( // server: McpServer, // supports_tools: Bool, // supports_resources: Bool, // supports_prompts: Bool, // supports_logging: Bool // ) -> JsonObject: // let result = json_object() // let _a = json_object_set_string(result, "protocolVersion", MCP_PROTOCOL_VERSION) // // // capabilities object // let caps = json_object() // if supports_tools: // let tc = json_object() // let _t1 = json_object_set_bool(tc, "listChanged", false) // let _t2 = json_object_set_object(caps, "tools", tc) // if supports_resources: // let rc = json_object() // let _r1 = json_object_set_bool(rc, "subscribe", false) // let _r2 = json_object_set_bool(rc, "listChanged", false) // let _r3 = json_object_set_object(caps, "resources", rc) // if supports_prompts: // let pc = json_object() // let _p1 = json_object_set_bool(pc, "listChanged", false) // let _p2 = json_object_set_object(caps, "prompts", pc) // if supports_logging: // let _l1 = json_object_set_object(caps, "logging", json_object()) // let _b = json_object_set_object(result, "capabilities", caps) // // // serverInfo // let info = json_object() // let _i1 = json_object_set_string(info, "name", server.name) // let _i2 = json_object_set_string(info, "version", server.version) // let _c = json_object_set_object(result, "serverInfo", info) // // // instructions // if len(server.instructions) > 0: // let _d = json_object_set_string(result, "instructions", server.instructions) // // return result // // // =========================================================================== // // MCP tools/list result builder // // =========================================================================== // // pub fn mcp_build_tools_list(tools: Array) -> JsonObject: // let result = json_object() // let arr = json_array() // var i: Int = 0 // while i < len(tools): // let t = json_object() // let _a = json_object_set_string(t, "name", tools[i].name) // let _b = json_object_set_string(t, "description", tools[i].description) // let schema_val = json_parse_text(tools[i].input_schema_json) // let _c = mcp_object_set_any(t, "inputSchema", schema_val) // let _d = json_array_push_object(arr, t) // i = i + 1 // let _e = json_object_set_array(result, "tools", arr) // return result // // // Build a {"resources":[...]} JSON object from resource definitions. // pub fn mcp_build_resources_list(resources: Array) -> JsonObject: // let result = json_object() // let arr = json_array() // var i: Int = 0 // while i < len(resources): // let r = json_object() // let _a = json_object_set_string(r, "uri", resources[i].uri) // let _b = json_object_set_string(r, "name", resources[i].name) // let _c = json_object_set_string(r, "description", resources[i].description) // let _d = json_object_set_string(r, "mimeType", resources[i].mime_type) // let _e = json_array_push_object(arr, r) // i = i + 1 // let _f = json_object_set_array(result, "resources", arr) // return result // // // Build a {"prompts":[...]} JSON object from prompt definitions. // pub fn mcp_build_prompts_list(prompts: Array) -> JsonObject: // let result = json_object() // let arr = json_array() // var i: Int = 0 // while i < len(prompts): // let p = json_object() // let _a = json_object_set_string(p, "name", prompts[i].name) // let _b = json_object_set_string(p, "description", prompts[i].description) // let _c = json_array_push_object(arr, p) // i = i + 1 // let _d = json_object_set_array(result, "prompts", arr) // return result // // // =========================================================================== // // JSON string escaping (for safe embedding inside JSON strings) // // =========================================================================== // // pub fn mcp_json_escape(s: String) -> String: // var escaped = "\"" // var i: Int = 0 // while i < len(s): // let ch = char_at(s, i) // if ch == "\"": // escaped = escaped + "\\\"" // else: // if ch == "\\": // escaped = escaped + "\\\\" // else: // if ch == "\n": // escaped = escaped + "\\n" // else: // if ch == "\r": // escaped = escaped + "\\r" // else: // if ch == "\t": // escaped = escaped + "\\t" // else: // escaped = escaped + ch // i = i + 1 // escaped = escaped + "\"" // return escaped // // // =========================================================================== // // Content type constructors // // =========================================================================== // // // Build a {"type":"text","text":"..."} JSON fragment string. // pub fn mcp_content_text(text: String) -> String: // return "{\"type\":\"text\",\"text\":" + mcp_json_escape(text) + "}" // // // Build a {"type":"image","data":"...","mimeType":"..."} JSON fragment string. // pub fn mcp_content_image(base64_data: String, mime_type: String) -> String: // return "{\"type\":\"image\",\"data\":" + mcp_json_escape(base64_data) + ",\"mimeType\":" + mcp_json_escape(mime_type) + "}" // // // Build a {"type":"audio","data":"...","mimeType":"..."} JSON fragment string. // pub fn mcp_content_audio(base64_data: String, mime_type: String) -> String: // return "{\"type\":\"audio\",\"data\":" + mcp_json_escape(base64_data) + ",\"mimeType\":" + mcp_json_escape(mime_type) + "}" // // // Build a {"type":"resource","resource":{...}} JSON fragment string for embedded text content. // pub fn mcp_content_embedded_resource_text(uri: String, mime_type: String, text: String) -> String: // return "{\"type\":\"resource\",\"resource\":{\"uri\":" + mcp_json_escape(uri) + ",\"mimeType\":" + mcp_json_escape(mime_type) + ",\"text\":" + mcp_json_escape(text) + "}}" // // // Build a {"type":"resource","resource":{...}} JSON fragment string for embedded binary content. // pub fn mcp_content_embedded_resource_blob(uri: String, mime_type: String, blob_base64: String) -> String: // return "{\"type\":\"resource\",\"resource\":{\"uri\":" + mcp_json_escape(uri) + ",\"mimeType\":" + mcp_json_escape(mime_type) + ",\"blob\":" + mcp_json_escape(blob_base64) + "}}" // // // Build a content array from a single text item: [{"type":"text","text":"..."}] // pub fn mcp_content_array_text(text: String) -> String: // return "[" + mcp_content_text(text) + "]" // // // Build a content array from a single image item. // pub fn mcp_content_array_image(base64_data: String, mime_type: String) -> String: // return "[" + mcp_content_image(base64_data, mime_type) + "]" // // // Build a content array from a single audio item. // pub fn mcp_content_array_audio(base64_data: String, mime_type: String) -> String: // return "[" + mcp_content_audio(base64_data, mime_type) + "]" // // // Build a content array from a single embedded text resource item. // pub fn mcp_content_array_embedded_resource_text(uri: String, mime_type: String, text: String) -> String: // return "[" + mcp_content_embedded_resource_text(uri, mime_type, text) + "]" // // // Build a content array from a single embedded binary resource item. // pub fn mcp_content_array_embedded_resource_blob(uri: String, mime_type: String, blob_base64: String) -> String: // return "[" + mcp_content_embedded_resource_blob(uri, mime_type, blob_base64) + "]" // // // =========================================================================== // // McpCallResult constructors (for tools/call responses) // // =========================================================================== // // pub fn mcp_text_result(text: String) -> McpCallResult: // return McpCallResult { // content_json: mcp_content_array_text(text), // is_error: false // } // // pub fn mcp_error_result(message: String) -> McpCallResult: // return McpCallResult { // content_json: mcp_content_array_text(message), // is_error: true // } // // pub fn mcp_image_result(base64_data: String, mime_type: String) -> McpCallResult: // return McpCallResult { // content_json: mcp_content_array_image(base64_data, mime_type), // is_error: false // } // // // Build the full tools/call response result object from an McpCallResult. // pub fn mcp_build_call_result_parts(content_json: String, is_error: Bool) -> JsonObject: // var error_text = "false" // if is_error: // error_text = "true" // return json_parse_text("{\"content\":" + content_json + ",\"isError\":" + error_text + "}") // // pub fn mcp_build_call_result(cr: McpCallResult) -> JsonObject: // return mcp_build_call_result_parts(cr.content_json, cr.is_error) // // // =========================================================================== // // Transport: stdio message I/O // // =========================================================================== // // // Read one newline-delimited JSON-RPC message from stdin. Returns "" on EOF. // pub fn mcp_read_message() -> String: // return read_line() // // // Write one JSON-RPC message to stdout. Appends newline, flushes. // // The message MUST be compact single-line JSON with no embedded newlines. // pub fn mcp_write_message(msg: String) -> Unit: // stdout_write(msg + "\n") // // // Serialize a JsonObject and write it to stdout as a JSON-RPC message. // pub fn mcp_write_response(obj: JsonObject) -> Unit: // mcp_write_message(json_stringify(obj)) // // // =========================================================================== // // Logging (all output goes to STDERR — never touches stdout) // // =========================================================================== // // pub const MCP_LOG_DEBUG: String = "debug" // pub const MCP_LOG_INFO: String = "info" // pub const MCP_LOG_NOTICE: String = "notice" // pub const MCP_LOG_WARNING: String = "warning" // pub const MCP_LOG_ERROR: String = "error" // pub const MCP_LOG_CRITICAL: String = "critical" // pub const MCP_LOG_ALERT: String = "alert" // pub const MCP_LOG_EMERGENCY: String = "emergency" // // pub fn mcp_log(level: String, message: String) -> Unit: // stderr_write("[mcp:" + level + "] " + message + "\n") // // pub fn mcp_debug(msg: String) -> Unit: // mcp_log(MCP_LOG_DEBUG, msg) // // pub fn mcp_info(msg: String) -> Unit: // mcp_log(MCP_LOG_INFO, msg) // // pub fn mcp_warn(msg: String) -> Unit: // mcp_log(MCP_LOG_WARNING, msg) // // pub fn mcp_error_log(msg: String) -> Unit: // mcp_log(MCP_LOG_ERROR, msg) // // // =========================================================================== // // Reference stdio event loop (batteries-included) // // =========================================================================== // // // Run a complete MCP stdio server. Blocks until stdin EOF. // // // // The server handles: initialize, ping, tools/list. // // tools/call is STUBBED — the caller must replace the dispatch in their own // // loop, or use the manual dispatch API below. // // // // Returns 0 on clean shutdown, non-zero on fatal error. // pub fn mcp_run_stdio(server: McpServer, tools: Array) -> Int: // var running = true // var initialized = false // // mcp_info(server.name + " v" + server.version + " starting (" + // to_string(len(tools)) + " tools registered)") // // while running: // let raw_line = read_line() // if raw_line == "": // mcp_info("stdin closed — shutting down") // running = false // continue // // let request = json_parse_text(raw_line) // let kind = json_value_kind_code(request) // if kind != MCP_KIND_OBJECT: // mcp_warn("non-object JSON on stdin — ignoring") // continue // // let req_obj = request // JsonValue as JsonObject (same underlying type) // // let method = json_string_required(req_obj, "method") // let has_id = json_has_key(req_obj, "id") // var id_val: JsonValue = json_parse_text("null") // if has_id: // id_val = json_get_value(req_obj, "id") // // // ---- initialize ---- // if method == "initialize": // mcp_info("initialize request") // let result = mcp_build_initialize_result( // server, // len(tools) > 0, // tools capability if we have tools // false, // resources: not yet // false, // prompts: not yet // true // logging: always // ) // mcp_write_response(mcp_build_response(id_val, result)) // initialized = true // // // ---- notifications/initialized ---- // else: // if method == "notifications/initialized": // mcp_info("client ready — entering operation phase") // // notification — no response // // // ---- ping ---- // else: // if method == "ping": // mcp_write_response(mcp_build_response(id_val, json_object())) // // // ---- tools/list ---- // else: // if method == "tools/list": // let tl = mcp_build_tools_list(tools) // mcp_write_response(mcp_build_response(id_val, tl)) // // // ---- tools/call (STUB — caller must override) ---- // else: // if method == "tools/call": // let stub_result = mcp_error_result( // "Tool dispatch not configured. Use the manual dispatch API " + // "(mcp_read_request / mcp_send_response) to wire your own handlers." // ) // let cr = mcp_build_call_result(stub_result) // mcp_write_response(mcp_build_response(id_val, cr)) // // // ---- unknown method ---- // else: // if method != "": // mcp_warn("unknown method: " + method) // if has_id and method != "": // mcp_write_response( // mcp_build_error(id_val, MCP_ERROR_METHOD_NOT_FOUND, // "Method not found: " + method) // ) // // mcp_info("server stopped") // return 0 // // // =========================================================================== // // Manual dispatch API (for custom tool routing) // // =========================================================================== // // // Read and parse one request. Returns McpRequest with method/id/params extracted. // // On EOF or parse failure, method will be "". // pub fn mcp_read_request() -> McpRequest: // let raw_line = read_line() // var req_obj: JsonObject = json_object() // var method = "" // var has_id = false // var id_val: JsonValue = json_parse_text("null") // var params_val: JsonValue = json_parse_text("null") // // if raw_line != "": // let parsed = json_parse_text(raw_line) // if json_value_kind_code(parsed) == MCP_KIND_OBJECT: // req_obj = parsed // method = json_string_required(req_obj, "method") // has_id = json_has_key(req_obj, "id") // if has_id: // id_val = json_get_value(req_obj, "id") // if json_has_key(req_obj, "params"): // params_val = json_get_value(req_obj, "params") // // return McpRequest { // raw_json: raw_line, // method: method, // has_id: has_id, // id_value: id_val, // params_value: params_val, // request_obj: req_obj // } // // // Send a success response for a request. // pub fn mcp_send_response(req: McpRequest, result: JsonObject) -> Unit: // if req.has_id: // mcp_write_response(mcp_build_response(req.id_value, result)) // // // Send an error response for a request. // pub fn mcp_send_error(req: McpRequest, code: Int, message: String) -> Unit: // if req.has_id: // mcp_write_response(mcp_build_error(req.id_value, code, message)) // // // Check if a request is the "initialize" method. // pub fn mcp_is_initialize(req: McpRequest) -> Bool: // return req.method == "initialize" // // // Check if a request is the "tools/list" method. // pub fn mcp_is_tools_list(req: McpRequest) -> Bool: // return req.method == "tools/list" // // // Check if a request is the "tools/call" method. // pub fn mcp_is_tools_call(req: McpRequest) -> Bool: // return req.method == "tools/call" // // // Check if a request is the "ping" method. // pub fn mcp_is_ping(req: McpRequest) -> Bool: // return req.method == "ping" // // // Check if a request is a notification (no id field). // pub fn mcp_is_notification(req: McpRequest) -> Bool: // return req.has_id == false and req.method != "" // // // Check if the request is an EOF/disconnect (empty method, empty raw_json). // pub fn mcp_is_eof(req: McpRequest) -> Bool: // return req.raw_json == "" // // // =========================================================================== // // Parameter extraction helpers (for tools/call dispatch) // // =========================================================================== // // // Extract the tool name from a tools/call request params. // pub fn mcp_tool_call_name(req: McpRequest) -> String: // if json_has_key(req.request_obj, "params"): // let params_val = json_get_value(req.request_obj, "params") // if json_value_kind_code(params_val) == MCP_KIND_OBJECT: // return json_string_required(params_val, "name") // return "" // // // Extract the tool arguments from a tools/call request params. // // Returns a JsonObject (empty object if extraction fails). // pub fn mcp_tool_call_args(req: McpRequest) -> JsonObject: // if json_has_key(req.request_obj, "params"): // let params_val = json_get_value(req.request_obj, "params") // if json_value_kind_code(params_val) == MCP_KIND_OBJECT: // if json_has_key(params_val, "arguments"): // let args_val = json_get_value(params_val, "arguments") // if json_value_kind_code(args_val) == MCP_KIND_OBJECT: // return args_val // return json_object() // // // =========================================================================== // // Internal: string parsers (no dependency on std::math etc.) // // =========================================================================== // // fn mcp_str_to_int(s: String) -> Int: // var result: Int = 0 // var sign: Int = 1 // var i: Int = 0 // var started = false // if len(s) == 0: // return 0 // while i < len(s): // let ch = char_at(s, i) // if ch == "-" and started == false: // sign = -1 // started = true // else: // if ch >= "0" and ch <= "9": // result = result * 10 + (ord(ch) - 48) // started = true // i = i + 1 // return result * sign // // fn mcp_str_to_float(s: String) -> Float: // var whole: Float = 0.0 // var frac: Float = 0.0 // var divisor: Float = 1.0 // var sign: Float = 1.0 // var in_frac = false // var i: Int = 0 // var started = false // if len(s) == 0: // return 0.0 // while i < len(s): // let ch = char_at(s, i) // if ch == "-" and started == false: // sign = -1.0 // started = true // else: // if ch == ".": // in_frac = true // else: // if ch >= "0" and ch <= "9": // let d = Float(ord(ch) - 48) // if in_frac: // divisor = divisor * 10.0 // frac = frac * 10.0 + d // else: // whole = whole * 10.0 + d // started = true // i = i + 1 // if divisor > 1.0: // whole = whole + frac / divisor // return whole * sign //!end-kain-file //!kain-file // path = "memory.kn" // kind = "text" // encoding = "utf8" // bytes = 2701 // sha256 = "sha256:8bd7b4f8d5fc01298c6b7cf66532b0b17ae653210065a99ba640e11aac64ece3" // trailing_newline = true //!kain-file-content // # Systems memory surface for explicit volatile and atomic operations. // // const ATOMIC_RELAXED: Int = 0 // const ATOMIC_ACQUIRE: Int = 1 // const ATOMIC_RELEASE: Int = 2 // const ATOMIC_ACQ_REL: Int = 3 // const ATOMIC_SEQ_CST: Int = 4 // // pub fn volatile_load_int(address: ptr) -> Int with Unsafe: // return volatile_load(address, "Int") // // pub fn volatile_store_int(address: ptr, value: Int) -> Int with Unsafe: // volatile_store(address, value, "Int") // return value // // pub fn atomic_load_relaxed(address: ptr) -> Int with Unsafe: // return atomic_load(address, "Int", "relaxed") // // pub fn atomic_load_acquire(address: ptr) -> Int with Unsafe: // return atomic_load(address, "Int", "acquire") // // pub fn atomic_load_seqcst(address: ptr) -> Int with Unsafe: // return atomic_load(address, "Int", "seq_cst") // // pub fn atomic_store_relaxed(address: ptr, value: Int) -> Int with Unsafe: // atomic_store(address, value, "Int", "relaxed") // return value // // pub fn atomic_store_release(address: ptr, value: Int) -> Int with Unsafe: // atomic_store(address, value, "Int", "release") // return value // // pub fn atomic_store_seqcst(address: ptr, value: Int) -> Int with Unsafe: // atomic_store(address, value, "Int", "seq_cst") // return value // // pub fn atomic_add_acqrel(address: ptr, value: Int) -> Int with Unsafe: // return atomic_add(address, value, "Int", "acq_rel") // // pub fn atomic_sub_acqrel(address: ptr, value: Int) -> Int with Unsafe: // return atomic_sub(address, value, "Int", "acq_rel") // // pub fn atomic_and_acqrel(address: ptr, value: Int) -> Int with Unsafe: // return atomic_and(address, value, "Int", "acq_rel") // // pub fn atomic_or_acqrel(address: ptr, value: Int) -> Int with Unsafe: // return atomic_or(address, value, "Int", "acq_rel") // // pub fn atomic_xor_acqrel(address: ptr, value: Int) -> Int with Unsafe: // return atomic_xor(address, value, "Int", "acq_rel") // // pub fn atomic_exchange_acqrel(address: ptr, value: Int) -> Int with Unsafe: // return atomic_exchange(address, value, "Int", "acq_rel") // // pub fn atomic_compare_exchange_seqcst(address: ptr, expected: Int, desired: Int) -> Bool with Unsafe: // return atomic_compare_exchange(address, expected, desired, "Int", "seq_cst", "seq_cst") // // pub fn atomic_fence_acquire() -> Int with Unsafe: // atomic_fence("acquire") // return 0 // // pub fn atomic_fence_release() -> Int with Unsafe: // atomic_fence("release") // return 0 // // pub fn atomic_fence_acqrel() -> Int with Unsafe: // atomic_fence("acq_rel") // return 0 // // pub fn atomic_fence_seqcst() -> Int with Unsafe: // atomic_fence("seq_cst") // return 0 //!end-kain-file //!kain-file // path = "mmio.kn" // kind = "text" // encoding = "utf8" // bytes = 2168 // sha256 = "sha256:65cba80ef9457fb238d0c9b1ee8f8ae1698c68ed35eb84980a77efb7d64b8ab3" // trailing_newline = true //!kain-file-content // use std::memory // use std::machine // // pub const MMIO_ACCESS_RO: Int = 1 // pub const MMIO_ACCESS_WO: Int = 2 // pub const MMIO_ACCESS_RW: Int = 3 // pub const MMIO_ACCESS_W1C: Int = 4 // // pub const MMIO_ENDIAN_NATIVE: Int = 0 // pub const MMIO_ENDIAN_LITTLE: Int = 1 // pub const MMIO_ENDIAN_BIG: Int = 2 // // pub fn mmio_bit_mask(width: Int) -> Int: // if width <= 0: // return 0 // if width >= 63: // return -1 // return (1 << width) - 1 // // pub fn mmio_field_get(word: Int, bit_offset: Int, width: Int) -> Int: // return (word >> bit_offset) & mmio_bit_mask(width) // // pub fn mmio_field_set(word: Int, bit_offset: Int, width: Int, value: Int) -> Int: // let mask = mmio_bit_mask(width) << bit_offset // let cleared = word & (mask ^ -1) // let shifted = (value << bit_offset) & mask // return cleared | shifted // // pub fn mmio_field_w1c(word: Int, bit_offset: Int, width: Int, clear_bits: Int) -> Int: // let mask = (clear_bits & mmio_bit_mask(width)) << bit_offset // return word & (mask ^ -1) // // pub fn mmio_swap16(value: Int) -> Int: // return ((value & 255) << 8) | ((value >> 8) & 255) // // pub fn mmio_swap32(value: Int) -> Int: // let b0 = (value & 255) << 24 // let b1 = ((value >> 8) & 255) << 16 // let b2 = ((value >> 16) & 255) << 8 // let b3 = (value >> 24) & 255 // return b0 | b1 | b2 | b3 // // pub fn mmio_to_little32(value: Int) -> Int: // return value // // pub fn mmio_from_little32(value: Int) -> Int: // return value // // pub fn mmio_to_big32(value: Int) -> Int: // return mmio_swap32(value) // // pub fn mmio_from_big32(value: Int) -> Int: // return mmio_swap32(value) // // pub fn mmio_read_int(address: ptr) -> Int with Unsafe: // load_fence() // let value = volatile_load_int(address) // load_fence() // return value // // pub fn mmio_write_int(address: ptr, value: Int) -> Int with Unsafe: // store_fence() // let stored = volatile_store_int(address, value) // store_fence() // return stored // // pub fn mmio_write_one_to_clear(address: ptr, bit_offset: Int, width: Int, clear_bits: Int) -> Int with Unsafe: // let current = mmio_read_int(address) // let next = mmio_field_w1c(current, bit_offset, width, clear_bits) // return mmio_write_int(address, next) //!end-kain-file //!kain-file // path = "net.kn" // kind = "text" // encoding = "utf8" // bytes = 11016 // sha256 = "sha256:3682377306754c1651dbda5724b889e5a90a70d309580542dedfc819452eeb1d" // trailing_newline = true //!kain-file-content // use std::io // // @extern // fn abi_net_reset() -> Int // // @extern // fn abi_net_platform_available() -> Int // // @extern // fn abi_net_platform_name() -> String // // @extern // fn abi_net_capability_state(capability_key: String) -> Int // // @extern // fn abi_tcp_connect(host: String, port: Int, timeout_ms: Int) -> Int // // @extern // fn abi_tcp_listen(host: String, port: Int) -> Int // // @extern // fn abi_tcp_listener_local_port(listener_id: Int) -> Int // // @extern // fn abi_tcp_accept(listener_id: Int, timeout_ms: Int) -> Int // // @extern // fn abi_tcp_read_text(connection_id: Int) -> String // // @extern // fn abi_tcp_read_hex(connection_id: Int) -> String // // @extern // fn abi_tcp_write_text(connection_id: Int, payload: String) -> Int // // @extern // fn abi_tcp_write_hex(connection_id: Int, payload_hex: String) -> Int // // @extern // fn abi_tcp_close(connection_id: Int) -> Int // // @extern // fn abi_tcp_listener_close(listener_id: Int) -> Int // // @extern // fn abi_http_request_create(method: String, url: String) -> Int // // @extern // fn abi_http_request_set_header(request_id: Int, key: String, value: String) -> Int // // @extern // fn abi_http_request_set_body_text(request_id: Int, payload: String) -> Int // // @extern // fn abi_http_request_set_body_hex(request_id: Int, payload_hex: String) -> Int // // @extern // fn abi_http_request_set_timeout(request_id: Int, timeout_ms: Int) -> Int // // @extern // fn abi_http_request_set_protocol(request_id: Int, protocol_name: String) -> Int // // @extern // fn abi_http_request_protocol(request_id: Int) -> String // // @extern // fn abi_http_client_send(request_id: Int) -> Int // // @extern // fn abi_http_response_status(response_id: Int) -> Int // // @extern // fn abi_http_response_protocol(response_id: Int) -> String // // @extern // fn abi_http_response_header(response_id: Int, key: String) -> String // // @extern // fn abi_http_response_body_text(response_id: Int) -> String // // @extern // fn abi_http_response_body_hex(response_id: Int) -> String // // @extern // fn abi_http_request_destroy(request_id: Int) -> Int // // @extern // fn abi_http_response_destroy(response_id: Int) -> Int // // @extern // fn abi_http_server_create(host: String, port: Int) -> Int // // @extern // fn abi_http_server_listen(server_id: Int) -> Int // // @extern // fn abi_http_server_local_port(server_id: Int) -> Int // // @extern // fn abi_http_server_route_actor(server_id: Int, method: String, path: String, actor_id: Int, message_kind: String) -> Int // // @extern // fn abi_http_server_pump(server_id: Int, timeout_ms: Int) -> Int // // @extern // fn abi_http_server_pump_batch(server_id: Int, timeout_ms: Int, max_requests: Int) -> Int // // @extern // fn abi_http_server_pending_request_count(server_id: Int) -> Int // // @extern // fn abi_http_server_next_request(server_id: Int) -> Int // // @extern // fn abi_http_request_method(incoming_request_id: Int) -> String // // @extern // fn abi_http_request_path(incoming_request_id: Int) -> String // // @extern // fn abi_http_request_query(incoming_request_id: Int) -> String // // @extern // fn abi_http_request_header(incoming_request_id: Int, key: String) -> String // // @extern // fn abi_http_request_body_text(incoming_request_id: Int) -> String // // @extern // fn abi_http_request_body_hex(incoming_request_id: Int) -> String // // @extern // fn abi_http_respond_text(incoming_request_id: Int, status_code: Int, payload: String) -> Int // // @extern // fn abi_http_respond_hex(incoming_request_id: Int, status_code: Int, payload_hex: String) -> Int // // @extern // fn abi_http_response_set_header_for_request(incoming_request_id: Int, key: String, value: String) -> Int // // @extern // fn abi_http_server_close(server_id: Int) -> Int // // @extern // fn abi_http_local_url(port: Int, path: String) -> String // // @extern // fn abi_net_last_status() -> Int // // @extern // fn abi_net_last_error_kind() -> String // // @extern // fn abi_net_last_error_message() -> String // // pub fn net_reset() -> Int: // return abi_net_reset() // // pub fn net_platform_available() -> Int: // return abi_net_platform_available() // // pub fn net_platform_name() -> String: // return abi_net_platform_name() // // pub fn net_capability_state(capability_key: String) -> Int: // return abi_net_capability_state(capability_key) // // pub fn net_capability_supported(capability_key: String) -> Bool: // return net_capability_state(capability_key) > 0 // // pub fn net_capability_available(capability_key: String) -> Bool: // return net_capability_state(capability_key) == 2 // // pub fn tcp_connect(host: String, port: Int, timeout_ms: Int) -> Int: // return abi_tcp_connect(host, port, timeout_ms) // // pub fn tcp_listen(host: String, port: Int) -> Int: // return abi_tcp_listen(host, port) // // pub fn tcp_listener_local_port(listener_id: Int) -> Int: // return abi_tcp_listener_local_port(listener_id) // // pub fn tcp_accept(listener_id: Int, timeout_ms: Int) -> Int: // return abi_tcp_accept(listener_id, timeout_ms) // // pub fn tcp_read_text(connection_id: Int) -> String: // return abi_tcp_read_text(connection_id) // // pub fn tcp_buffered_reader(connection_id: Int, capacity: Int) -> BufferedReader with Unsafe: // return buffered_reader_new_from_text(capacity, tcp_read_text(connection_id)) // // pub fn tcp_read_hex(connection_id: Int) -> String: // return abi_tcp_read_hex(connection_id) // // pub fn tcp_write_text(connection_id: Int, payload: String) -> Int: // return abi_tcp_write_text(connection_id, payload) // // pub fn tcp_write_buffered_text(connection_id: Int, writer: BufferedWriter) -> Int with Unsafe: // return tcp_write_text(connection_id, buffered_writer_materialize_text(writer)) // // pub fn tcp_write_hex(connection_id: Int, payload_hex: String) -> Int: // return abi_tcp_write_hex(connection_id, payload_hex) // // pub fn tcp_close(connection_id: Int) -> Int: // return abi_tcp_close(connection_id) // // pub fn tcp_listener_close(listener_id: Int) -> Int: // return abi_tcp_listener_close(listener_id) // // pub fn http_request_create(method: String, url: String) -> Int: // return abi_http_request_create(method, url) // // pub fn http_request_set_header(request_id: Int, key: String, value: String) -> Int: // return abi_http_request_set_header(request_id, key, value) // // pub fn http_request_set_body_text(request_id: Int, payload: String) -> Int: // return abi_http_request_set_body_text(request_id, payload) // // pub fn http_request_set_body_hex(request_id: Int, payload_hex: String) -> Int: // return abi_http_request_set_body_hex(request_id, payload_hex) // // pub fn http_request_set_timeout(request_id: Int, timeout_ms: Int) -> Int: // return abi_http_request_set_timeout(request_id, timeout_ms) // // pub fn http_request_set_protocol(request_id: Int, protocol_name: String) -> Int: // return abi_http_request_set_protocol(request_id, protocol_name) // // pub fn http_request_protocol(request_id: Int) -> String: // return abi_http_request_protocol(request_id) // // pub fn http_client_send(request_id: Int) -> Int: // return abi_http_client_send(request_id) // // pub fn http_response_status(response_id: Int) -> Int: // return abi_http_response_status(response_id) // // pub fn http_response_protocol(response_id: Int) -> String: // return abi_http_response_protocol(response_id) // // pub fn http_response_header(response_id: Int, key: String) -> String: // return abi_http_response_header(response_id, key) // // pub fn http_response_body_text(response_id: Int) -> String: // return abi_http_response_body_text(response_id) // // pub fn http_response_body_hex(response_id: Int) -> String: // return abi_http_response_body_hex(response_id) // // pub fn http_request_destroy(request_id: Int) -> Int: // return abi_http_request_destroy(request_id) // // pub fn http_response_destroy(response_id: Int) -> Int: // return abi_http_response_destroy(response_id) // // pub fn http_server_create(host: String, port: Int) -> Int: // return abi_http_server_create(host, port) // // pub fn http_server_create_localhost(port: Int) -> Int: // return abi_http_server_create("127.0.0.1", port) // // pub fn http_server_listen(server_id: Int) -> Int: // return abi_http_server_listen(server_id) // // pub fn http_server_local_port(server_id: Int) -> Int: // return abi_http_server_local_port(server_id) // // pub fn http_route_actor(server_id: Int, method: String, path: String, actor_id: Int, message_kind: String) -> Int: // return abi_http_server_route_actor(server_id, method, path, actor_id, message_kind) // // pub fn http_server_pump(server_id: Int, timeout_ms: Int) -> Int: // return abi_http_server_pump(server_id, timeout_ms) // // pub fn http_server_pump_batch(server_id: Int, timeout_ms: Int, max_requests: Int) -> Int: // return abi_http_server_pump_batch(server_id, timeout_ms, max_requests) // // pub fn http_server_pending_request_count(server_id: Int) -> Int: // return abi_http_server_pending_request_count(server_id) // // pub fn http_server_next_request(server_id: Int) -> Int: // return abi_http_server_next_request(server_id) // // pub fn http_request_method(incoming_request_id: Int) -> String: // return abi_http_request_method(incoming_request_id) // // pub fn http_request_path(incoming_request_id: Int) -> String: // return abi_http_request_path(incoming_request_id) // // pub fn http_request_query(incoming_request_id: Int) -> String: // return abi_http_request_query(incoming_request_id) // // pub fn http_request_header(incoming_request_id: Int, key: String) -> String: // return abi_http_request_header(incoming_request_id, key) // // pub fn http_request_body_text(incoming_request_id: Int) -> String: // return abi_http_request_body_text(incoming_request_id) // // pub fn http_request_body_hex(incoming_request_id: Int) -> String: // return abi_http_request_body_hex(incoming_request_id) // // pub fn http_respond_text(incoming_request_id: Int, status_code: Int, payload: String) -> Int: // return abi_http_respond_text(incoming_request_id, status_code, payload) // // pub fn http_respond_hex(incoming_request_id: Int, status_code: Int, payload_hex: String) -> Int: // return abi_http_respond_hex(incoming_request_id, status_code, payload_hex) // // pub fn http_response_set_header_for_request(incoming_request_id: Int, key: String, value: String) -> Int: // return abi_http_response_set_header_for_request(incoming_request_id, key, value) // // pub fn http_server_close(server_id: Int) -> Int: // return abi_http_server_close(server_id) // // pub fn http_local_url(port: Int, path: String) -> String: // return abi_http_local_url(port, path) // // pub fn http_get_text(url: String) -> String: // let request = http_request_create("GET", url) // let response = http_client_send(request) // return http_response_body_text(response) // // pub fn http_post_text(url: String, payload: String) -> String: // let request = http_request_create("POST", url) // let _body = http_request_set_body_text(request, payload) // let response = http_client_send(request) // return http_response_body_text(response) // // pub fn net_last_status() -> Int: // return abi_net_last_status() // // pub fn net_last_error_kind() -> String: // return abi_net_last_error_kind() // // pub fn net_last_error_message() -> String: // return abi_net_last_error_message() //!end-kain-file //!kain-file // path = "os.kn" // kind = "text" // encoding = "utf8" // bytes = 33931 // sha256 = "sha256:ee027dc548810075fc8ee91dd9f30a46665e1ee51052c2d501375aa2e4424547" // trailing_newline = true //!kain-file-content // // ============================================================================ // // std::os — The Mothership OS Module // // ============================================================================ // // // // Uses the 'import os' mental model: one module, everything the OS gives you. // // // // Architecture: // // Layer 0 ─ raw @extern ABIs (fs, process, machine, platform, runtime, time) // // Layer 1 ─ this module: Python-like unified facade // // Layer 2 ─ std::os::path (os_path.kn) for path manipulation // // // // Usage: // // use std::os // // let cwd = os_getcwd() // // let files = os_listdir(".") // // let home = os_getenv("HOME") // // os_makedirs("a/b/c") // // // // Zig inspiration per X:\reference\zigos: // // - Platform-specific raw bindings → os.linux.zig / os.windows.zig pattern // // - Sub-modules for syscall/DLL imports → kernel32.zig, ntdll.zig // // - Cross-platform posix layer atop raw os → our wrappers here // // - Higher stdlib (fs, process, net) consume os as substrate // // ============================================================================ // // use std::target // use std::platform // use std::base64 // use std::fs // use std::process // use std::machine // use std::time // use std::path // // @extern // fn abi_os_setenv(key: String, value: String) -> Int // // @extern // fn abi_os_getenv(key: String) -> String // // @extern // fn abi_os_unsetenv(key: String) -> Int // // @extern // fn abi_os_chdir(path: String) -> Int // // @extern // fn abi_os_getppid() -> Int // // @extern // fn abi_os_getlogin() -> String // // @extern // fn abi_os_getuid() -> Int // // @extern // fn abi_os_getgid() -> Int // // @extern // fn abi_os_symlink(src: String, dst: String) -> Int // // @extern // fn abi_os_readlink(path: String) -> String // // @extern // fn abi_os_urandom(byte_count: Int) -> String // // @extern // fn abi_os_terminal_columns() -> Int // // @extern // fn abi_os_terminal_rows() -> Int // // @extern // fn abi_os_last_status() -> Int // // @extern // fn abi_os_last_error_kind() -> String // // @extern // fn abi_os_last_error_message() -> String // // // ─── Raw syscall escape hatch (Layer 0 direct kernel ABI) ─────────────── // // @extern // fn abi_os_syscall0(sysno: Int) -> Int // // @extern // fn abi_os_syscall1(sysno: Int, arg1: Int) -> Int // // @extern // fn abi_os_syscall2(sysno: Int, arg1: Int, arg2: Int) -> Int // // @extern // fn abi_os_syscall3(sysno: Int, arg1: Int, arg2: Int, arg3: Int) -> Int // // @extern // fn abi_os_syscall4(sysno: Int, arg1: Int, arg2: Int, arg3: Int, arg4: Int) -> Int // // @extern // fn abi_os_syscall5(sysno: Int, arg1: Int, arg2: Int, arg3: Int, arg4: Int, arg5: Int) -> Int // // @extern // fn abi_os_syscall6(sysno: Int, arg1: Int, arg2: Int, arg3: Int, arg4: Int, arg5: Int, arg6: Int) -> Int // // // ─── Memory mappings ──────────────────────────────────────────────────── // // @extern // fn abi_os_mmap_anon(byte_count: Int, prot: Int, flags: Int) -> Int // // @extern // fn abi_os_mmap_file(byte_count: Int, prot: Int, flags: Int, fd: Int, offset: Int) -> Int // // @extern // fn abi_os_munmap(addr: Int, byte_count: Int) -> Int // // @extern // fn abi_os_mprotect(addr: Int, byte_count: Int, prot: Int) -> Int // // @extern // fn abi_os_madvise(addr: Int, byte_count: Int, advice: Int) -> Int // // @extern // fn abi_os_msync(addr: Int, byte_count: Int, flags: Int) -> Int // // @extern // fn abi_os_mlock(addr: Int, byte_count: Int) -> Int // // @extern // fn abi_os_munlock(addr: Int, byte_count: Int) -> Int // // // ─── Process primitives ───────────────────────────────────────────────── // // @extern // fn abi_os_fork() -> Int // // @extern // fn abi_os_execve(path: String, argv: ptr, envp: ptr) -> Int // // @extern // fn abi_os_waitpid(pid: Int, options: Int) -> Int // // // ─── io_uring ─────────────────────────────────────────────────────────── // // @extern // fn abi_os_io_uring_setup(entries: Int) -> Int // // @extern // fn abi_os_io_uring_enter(ring_fd: Int, to_submit: Int, min_complete: Int, flags: Int) -> Int // // // ============================================================================ // // SECTION 1: Platform Constants & Detection // // ============================================================================ // // // ─── Path & line separators ────────────────────────────────────────────── // pub const OS_SEP: String = "/" // pub const OS_ALT_SEP: String = "\\" // pub const OS_LINESEP: String = "\n" // pub const OS_PATHSEP: String = ":" // pub const OS_DEVNULL: String = "/dev/null" // // // ─── Platform enums ────────────────────────────────────────────────────── // pub enum OsKind: // Windows // Linux // Macos // Wasi // Freestanding // Unknown // // pub enum ArchKind: // X86_64 // Aarch64 // Wasm32 // Unknown // // // ─── Platform name (Python: os.name) ───────────────────────────────────── // pub fn os_name() -> String: // let tgt = target_current() // var name = "unknown" // match tgt.os: // OS::Windows => name = "nt" // OS::Linux => name = "posix" // OS::Macos => name = "posix" // OS::Wasi => name = "wasi" // _ => name = "unknown" // return name // // pub fn os_platform_name() -> String: // let tgt = target_current() // var name = "unknown" // match tgt.os: // OS::Windows => name = "windows" // OS::Linux => name = "linux" // OS::Macos => name = "darwin" // OS::Wasi => name = "wasi" // _ => name = "unknown" // return name // // pub fn os_arch_name() -> String: // let tgt = target_current() // var name = "unknown" // match tgt.arch: // Arch::X86_64 => name = "x86_64" // Arch::Aarch64 => name = "aarch64" // Arch::Wasm32 => name = "wasm32" // _ => name = "unknown" // return name // // // ─── Boolean platform checks ───────────────────────────────────────────── // // NOTE: Use match not == for enum comparison — LLVM codegen for enum == // // is not yet reliable; match arms produce correct branching. // // Also avoid `return` inside match arms (LLVM codegen limitation). // pub fn os_is_windows() -> Bool: // let tgt = target_current() // var result = false // match tgt.os: // OS::Windows => result = true // _ => result = false // return result // // pub fn os_is_linux() -> Bool: // let tgt = target_current() // var result = false // match tgt.os: // OS::Linux => result = true // _ => result = false // return result // // pub fn os_is_macos() -> Bool: // let tgt = target_current() // var result = false // match tgt.os: // OS::Macos => result = true // _ => result = false // return result // // pub fn os_is_wasi() -> Bool: // let tgt = target_current() // var result = false // match tgt.os: // OS::Wasi => result = true // _ => result = false // return result // // pub fn os_is_64bit() -> Bool: // let tgt = target_current() // return tgt.is_64bit // // // ─── Version / uname ───────────────────────────────────────────────────── // pub struct OsUname: // sysname: String // release: String // version: String // machine: String // nodename: String // // pub fn os_uname() -> OsUname: // let tgt = target_current() // var sysname = "Unknown" // var machine_name = "Unknown" // // match tgt.os: // OS::Windows => sysname = "Windows" // OS::Linux => sysname = "Linux" // OS::Macos => sysname = "Darwin" // _ => sysname = "Unknown" // // match tgt.arch: // Arch::X86_64 => machine_name = "x86_64" // Arch::Aarch64 => machine_name = "aarch64" // Arch::Wasm32 => machine_name = "wasm32" // _ => machine_name = "unknown" // // return OsUname { // sysname: sysname, // release: platform_current_name(), // version: platform_current_name(), // machine: machine_name, // nodename: "" // } // // // ============================================================================ // // SECTION 2: Environment Variables // // ============================================================================ // // Python: os.environ, os.getenv(), os.putenv(), os.unsetenv() // // pub fn os_getenv(key: String) -> String: // return abi_os_getenv(key) // // pub fn os_getenv_default(key: String, default_value: String) -> String: // let val = abi_os_getenv(key) // if len(val) == 0: // return default_value // return val // // // ─── Set/unset environment ─────────────────────────────────────────────── // pub fn os_setenv(key: String, value: String) -> Bool: // return abi_os_setenv(key, value) == 0 // // pub fn os_unsetenv(key: String) -> Bool: // return abi_os_unsetenv(key) == 0 // // // ============================================================================ // // SECTION 3: Process Identity // // ============================================================================ // // Python: os.getpid(), os.getppid(), os.getuid(), os.getgid(), os.getlogin() // // pub fn os_getpid() -> Int: // return process_current_id() // // pub fn os_getppid() -> Int: // return abi_os_getppid() // // pub fn os_getlogin() -> String: // return abi_os_getlogin() // // pub fn os_getuid() -> Int: // return abi_os_getuid() // // pub fn os_getgid() -> Int: // return abi_os_getgid() // // // ============================================================================ // // SECTION 4: Working Directory // // ============================================================================ // // Python: os.getcwd(), os.chdir() // // pub fn os_getcwd() -> String: // return process_current_working_directory() // // pub fn os_chdir(path: String) -> Bool: // return abi_os_chdir(path) == 0 // // // ============================================================================ // // SECTION 5: Filesystem Operations // // ============================================================================ // // Python: os.listdir, os.scandir, os.mkdir, os.makedirs, os.remove, os.rmdir, // // os.rename, os.replace, os.stat, os.lstat, os.symlink, os.readlink // // // ─── Directory listing ─────────────────────────────────────────────────── // pub struct OsDirEntry: // name: String // path: String // is_file: Bool // is_dir: Bool // is_symlink: Bool // size: Int // modified_millis: Int // // pub fn os_listdir(path: String) -> Array: // let raw_paths = fs_read_dir_paths(path) // var names: Array = [] // var i: Int = 0 // while i < len(raw_paths): // let full = raw_paths[i] // var name = full // var sep_idx = len(full) - 1 // while sep_idx >= 0: // let ch = char_at(full, sep_idx) // if ch == "/" or ch == "\\": // name = substring(full, sep_idx + 1, len(full)) // sep_idx = -1 // sep_idx = sep_idx - 1 // push(names, name) // i = i + 1 // return names // // pub fn os_scandir(path: String) -> Array: // var result: Array = [] // let raw_paths = fs_read_dir_paths(path) // var i: Int = 0 // while i < len(raw_paths): // let full = raw_paths[i] // if len(full) > 0: // // Use text-based metadata to avoid fs_metadata struct parse crash // let raw_text = fs_metadata_text(full) // let file_type = _meta_field(raw_text, "file_type") // let len_val = _meta_int(raw_text, "len") // let modified = _meta_int(raw_text, "modified_millis") // var name = full // var sep_idx = len(full) - 1 // while sep_idx >= 0: // let ch = char_at(full, sep_idx) // if ch == "/" or ch == "\\": // name = substring(full, sep_idx + 1, len(full)) // sep_idx = -1 // sep_idx = sep_idx - 1 // let entry = OsDirEntry { // name: name, // path: full, // is_file: file_type == "file", // is_dir: file_type == "dir", // is_symlink: file_type == "symlink", // size: len_val, // modified_millis: modified // } // push(result, entry) // i = i + 1 // return result // // // ─── Directory creation ────────────────────────────────────────────────── // pub fn os_mkdir(path: String) -> Bool: // return abi_fs_create_dir_all(path) == 0 // // pub fn os_makedirs(path: String) -> Bool: // return abi_fs_create_dir_all(path) == 0 // // // ─── File/directory removal ────────────────────────────────────────────── // pub fn os_remove(path: String) -> Bool: // return abi_fs_remove_file(path) == 0 // // pub fn os_rmdir(path: String) -> Bool: // return abi_fs_remove_dir_all(path) == 0 // // pub fn os_removedirs(path: String) -> Bool: // return abi_fs_remove_dir_all(path) == 0 // // // ─── Rename / move ─────────────────────────────────────────────────────── // pub fn os_rename(src: String, dst: String) -> Bool: // return abi_fs_move_path(src, dst) == 0 // // pub fn os_replace(src: String, dst: String) -> Bool: // return abi_fs_move_path(src, dst) == 0 // // // ─── File stat ─────────────────────────────────────────────────────────── // pub struct OsStatResult: // size: Int // mode: Int // is_file: Bool // is_dir: Bool // is_symlink: Bool // created_millis: Int // modified_millis: Int // accessed_millis: Int // // pub fn os_stat(path: String) -> OsStatResult: // // Use text-based metadata to avoid fs_metadata struct parse crash (runtime bug) // let raw_text = fs_metadata_text(path) // let file_type = _meta_field(raw_text, "file_type") // let len_val = _meta_int(raw_text, "len") // let created = _meta_int(raw_text, "created_millis") // let modified = _meta_int(raw_text, "modified_millis") // let accessed = _meta_int(raw_text, "accessed_millis") // return OsStatResult { // size: len_val, // mode: 0, // is_file: file_type == "file", // is_dir: file_type == "dir", // is_symlink: file_type == "symlink", // created_millis: created, // modified_millis: modified, // accessed_millis: accessed // } // // fn _meta_field(text: String, key: String) -> String: // let prefix = key + "=" // var i: Int = 0 // while i < len(text): // // Check if this line starts with the prefix // if i + len(prefix) <= len(text): // var matched = true // var j: Int = 0 // while j < len(prefix): // if char_at(text, i + j) != char_at(prefix, j): // matched = false // j = len(prefix) // j = j + 1 // if matched: // var start = i + len(prefix) // var end = start // while end < len(text) and char_at(text, end) != "\n": // end = end + 1 // return substring(text, start, end) // // Skip to next line // while i < len(text) and char_at(text, i) != "\n": // i = i + 1 // i = i + 1 // return "" // // fn _meta_int(text: String, key: String) -> Int: // let val = _meta_field(text, key) // if len(val) == 0: // return 0 // var result: Int = 0 // var sign: Int = 1 // var i: Int = 0 // if char_at(val, 0) == "-": // sign = -1 // i = 1 // while i < len(val): // let ch = char_at(val, i) // if ch >= "0" and ch <= "9": // result = result * 10 + (ord(ch) - ord("0")) // i = i + 1 // return result * sign // // // ─── Symlinks ──────────────────────────────────────────────────────────── // pub fn os_symlink(src: String, dst: String) -> Bool: // return abi_os_symlink(src, dst) == 0 // // pub fn os_readlink(path: String) -> String: // return abi_os_readlink(path) // // // ─── Convenience: existence checks ─────────────────────────────────────── // pub fn os_exists(path: String) -> Bool: // return fs_exists(path) // // pub fn os_isfile(path: String) -> Bool: // return fs_is_file(path) // // pub fn os_isdir(path: String) -> Bool: // return fs_is_dir(path) // // // ─── Temp files ────────────────────────────────────────────────────────── // pub fn os_tmpfile(prefix: String) -> String: // return fs_temp_file(prefix) // // pub fn os_tmpdir(prefix: String) -> String: // return fs_temp_dir(prefix) // // // ─── Text I/O convenience ──────────────────────────────────────────────── // pub fn os_read_text(path: String) -> String: // return fs_read_text(path) // // pub fn os_write_text(path: String, content: String) -> Bool: // let status = abi_fs_write_text(path, content) // return status == 0 // // pub fn os_append_text(path: String, content: String) -> Bool: // let status = abi_fs_append_text(path, content) // return status == 0 // // pub fn os_atomic_write_text(path: String, content: String) -> Bool: // let status = abi_fs_atomic_write_text(path, content) // return status == 0 // // // ============================================================================ // // SECTION 6: Process Execution // // ============================================================================ // // Python: os.system(), os.popen() // // pub fn os_system(command: String) -> Int: // var shell = "/bin/sh" // var shell_arg = "-c" // let tgt = target_current() // match tgt.os: // OS::Windows => shell = os_getenv_default("ComSpec", "C:/Windows/System32/cmd.exe") // _ => shell = shell // match tgt.os: // OS::Windows => shell_arg = "/c" // _ => shell_arg = shell_arg // let _result = process_output_text(shell, shell_arg, command, "", 30000) // return process_last_status() // // pub fn os_popen_read(command: String, timeout_ms: Int) -> String: // var shell = "/bin/sh" // var shell_arg = "-c" // let tgt = target_current() // match tgt.os: // OS::Windows => shell = os_getenv_default("ComSpec", "C:/Windows/System32/cmd.exe") // _ => shell = shell // match tgt.os: // OS::Windows => shell_arg = "/c" // _ => shell_arg = shell_arg // return process_output_text(shell, shell_arg, command, "", timeout_ms) // // pub fn os_popen_status(command: String, timeout_ms: Int) -> Int: // let _output = os_popen_read(command, timeout_ms) // return process_last_status() // // // ============================================================================ // // SECTION 7: System Information // // ============================================================================ // // Python: os.cpu_count(), os.urandom(), os.get_terminal_size() // // pub fn os_cpu_count() -> Int: // return cpu_logical_count() // // pub fn os_cpu_core_count() -> Int: // return cpu_core_count() // // pub fn os_cpu_package_count() -> Int: // return cpu_package_count() // // // ─── Random bytes ──────────────────────────────────────────────────────── // pub fn os_urandom(byte_count: Int) -> String: // return abi_os_urandom(byte_count) // // pub fn os_urandom_bytes(byte_count: Int) -> Array: // let raw = hex_decode(abi_os_urandom(byte_count)) // let bytes = [] // var index: Int = 0 // while index < len(raw): // push(bytes, byte_at(raw, index)) // index = index + 1 // return bytes // // // ─── Terminal size ─────────────────────────────────────────────────────── // pub struct OsTerminalSize: // columns: Int // rows: Int // // pub fn os_get_terminal_size() -> OsTerminalSize: // let columns = abi_os_terminal_columns() // let rows = abi_os_terminal_rows() // return OsTerminalSize { // columns: if columns > 0: columns else: 80, // rows: if rows > 0: rows else: 24 // } // // // ─── Page size ─────────────────────────────────────────────────────────── // pub fn os_getpagesize() -> Int: // return vm_page_size() // // // ============================================================================ // // SECTION 8: Time Utilities // // ============================================================================ // // pub fn os_sleep_millis(ms: Int) -> Unit: // let _ = sleep_millis(ms) // // pub fn os_now_millis() -> Int: // return now_millis() // // // ============================================================================ // // SECTION 9: File Descriptor / Handle Operations // // ============================================================================ // // Zig-style: fd_t operations for the low-level crowd. // // pub struct OsFile: // handle: ptr // path: String // mode: String // // pub fn os_open(path: String, mode: String) -> OsFile: // let h = abi_fs_open(path, mode) // return OsFile { handle: h, path: path, mode: mode } // // pub fn os_close(file: OsFile) -> Int: // return abi_fs_close(file.handle) // // pub fn os_read(file: OsFile, buffer: ptr, byte_count: Int) -> Int: // return abi_fs_read(file.handle, buffer, byte_count) // // pub fn os_write(file: OsFile, buffer: ptr, byte_count: Int) -> Int: // return abi_fs_write(file.handle, buffer, byte_count) // // pub fn os_seek(file: OsFile, offset: Int, origin: Int) -> Int: // return abi_fs_seek(file.handle, offset, origin) // // pub fn os_tell(file: OsFile) -> Int: // return abi_fs_tell(file.handle) // // pub fn os_flush(file: OsFile) -> Int: // return abi_fs_flush(file.handle) // // // ============================================================================ // // SECTION 10: Error Utilities // // ============================================================================ // // pub struct OsError: // kind: String // code: Int // message: String // // pub fn os_last_error() -> OsError: // let os_status = abi_os_last_status() // if os_status != 0: // return OsError { // kind: abi_os_last_error_kind(), // code: os_status, // message: abi_os_last_error_message() // } // let process_status = process_last_status() // if process_status != 0: // return OsError { // kind: process_last_error_kind(), // code: process_status, // message: process_last_error_message() // } // return OsError { // kind: fs_last_error_kind(), // code: fs_last_status(), // message: fs_last_error_message() // } // // // ============================================================================ // // SECTION 11: Raw Syscall Escape Hatch // // ============================================================================ // // The nuclear option. When you need to talk to the kernel directly. // // No libc, no runtime bridge, just inline asm → kernel. // // Available on Linux x86_64 and aarch64; stubs on Windows. // // // // Architecture: // // os_syscall(nr, a1, a2, a3, a4, a5, a6) → Int // // Dispatches to the right abi_os_syscallN variant by arg count. // // // // Common Linux syscall numbers: // // 0 = read 1 = write 9 = mmap // // 11 = munmap 25 = mremap 35 = nanosleep // // 57 = fork 59 = execve 61 = wait4 // // 231 = exit_group 291 = epoll_create 425 = io_uring_setup // // See /usr/include/asm/unistd_64.h for the full table. // // pub fn os_syscall(sysno: Int, a1: Int, a2: Int, a3: Int, a4: Int, a5: Int, a6: Int) -> Int: // return abi_os_syscall6(sysno, a1, a2, a3, a4, a5, a6) // // pub fn os_syscall0(nr: Int) -> Int: // return abi_os_syscall0(nr) // // pub fn os_syscall1(nr: Int, a1: Int) -> Int: // return abi_os_syscall1(nr, a1) // // pub fn os_syscall2(nr: Int, a1: Int, a2: Int) -> Int: // return abi_os_syscall2(nr, a1, a2) // // pub fn os_syscall3(nr: Int, a1: Int, a2: Int, a3: Int) -> Int: // return abi_os_syscall3(nr, a1, a2, a3) // // pub fn os_syscall4(nr: Int, a1: Int, a2: Int, a3: Int, a4: Int) -> Int: // return abi_os_syscall4(nr, a1, a2, a3, a4) // // pub fn os_syscall5(nr: Int, a1: Int, a2: Int, a3: Int, a4: Int, a5: Int) -> Int: // return abi_os_syscall5(nr, a1, a2, a3, a4, a5) // // pub fn os_syscall6(nr: Int, a1: Int, a2: Int, a3: Int, a4: Int, a5: Int, a6: Int) -> Int: // return abi_os_syscall6(nr, a1, a2, a3, a4, a5, a6) // // // ============================================================================ // // SECTION 12: Memory Mappings // // ============================================================================ // // Real mmap / munmap / mprotect — typed, safe-enough wrappers over raw OS. // // This is where zero-copy file I/O, shared memory, JIT pages, and hugetlb live. // // // ─── Protection constants ──────────────────────────────────────────────── // pub const MMAP_PROT_NONE: Int = 0 // pub const MMAP_PROT_READ: Int = 1 // pub const MMAP_PROT_WRITE: Int = 2 // pub const MMAP_PROT_RW: Int = 3 // READ | WRITE // pub const MMAP_PROT_EXEC: Int = 4 // pub const MMAP_PROT_RX: Int = 5 // READ | EXEC // pub const MMAP_PROT_RWX: Int = 7 // READ | WRITE | EXEC (danger zone) // // // ─── Map flags ─────────────────────────────────────────────────────────── // pub const MMAP_SHARED: Int = 1 // pub const MMAP_PRIVATE: Int = 2 // pub const MMAP_FIXED: Int = 16 // pub const MMAP_HUGETLB: Int = 64 // // // ─── madvise hints ─────────────────────────────────────────────────────── // pub const MADV_NORMAL: Int = 0 // pub const MADV_RANDOM: Int = 1 // pub const MADV_SEQUENTIAL: Int = 2 // pub const MADV_WILLNEED: Int = 3 // pub const MADV_DONTNEED: Int = 4 // pub const MADV_FREE: Int = 8 // pub const MADV_HUGEPAGE: Int = 14 // // // ─── Map anonymous memory ──────────────────────────────────────────────── // pub fn os_mmap_anon(byte_count: Int) -> Int: // return abi_os_mmap_anon(byte_count, MMAP_PROT_RW, MMAP_PRIVATE) // // pub fn os_mmap_anon_prot(byte_count: Int, prot: Int) -> Int: // return abi_os_mmap_anon(byte_count, prot, MMAP_PRIVATE) // // pub fn os_mmap_anon_flags(byte_count: Int, prot: Int, flags: Int) -> Int: // return abi_os_mmap_anon(byte_count, prot, flags) // // // ─── Map a file into memory (zero-copy file I/O) ──────────────────────── // pub fn os_mmap_file(byte_count: Int, prot: Int, flags: Int, fd: Int, offset: Int) -> Int: // return abi_os_mmap_file(byte_count, prot, flags, fd, offset) // // pub fn os_mmap_file_read(path: String) -> (Int, Int): // // Returns (addr, byte_count) or (-1, _) on error. // // Opens file via raw syscall read/open (fd-based), maps it read-only. // // NOTE: This requires raw syscall support (Linux). On unsupported // // platforms, returns (-1, 0). Users can call os_mmap_file directly // // with a platform-specific file descriptor. // // // // On Linux x86_64: SYS_open = 2, SYS_read = 0, SYS_mmap = 9 // // A real implementation would: // // let fd = os_syscall2(2, path, 0) // SYS_open(O_RDONLY) // // ... manually stat, mmap via raw syscalls ... // // For now this is a placeholder — use raw syscalls directly. // return (-1, 0) // // // ─── Tear down a mapping ───────────────────────────────────────────────── // pub fn os_munmap(addr: Int, byte_count: Int) -> Bool: // return abi_os_munmap(addr, byte_count) == 0 // // // ─── Change page protection (JIT code pages, sandboxing) ──────────────── // pub fn os_mprotect(addr: Int, byte_count: Int, prot: Int) -> Bool: // return abi_os_mprotect(addr, byte_count, prot) == 0 // // pub fn os_make_rwx(addr: Int, byte_count: Int) -> Bool: // return os_mprotect(addr, byte_count, MMAP_PROT_RWX) // // pub fn os_make_rx(addr: Int, byte_count: Int) -> Bool: // return os_mprotect(addr, byte_count, MMAP_PROT_RX) // // // ─── Memory advice ─────────────────────────────────────────────────────── // pub fn os_madvise(addr: Int, byte_count: Int, advice: Int) -> Bool: // return abi_os_madvise(addr, byte_count, advice) == 0 // // pub fn os_madvise_sequential(addr: Int, byte_count: Int) -> Bool: // return os_madvise(addr, byte_count, MADV_SEQUENTIAL) // // pub fn os_madvise_willneed(addr: Int, byte_count: Int) -> Bool: // return os_madvise(addr, byte_count, MADV_WILLNEED) // // pub fn os_madvise_dontneed(addr: Int, byte_count: Int) -> Bool: // return os_madvise(addr, byte_count, MADV_DONTNEED) // // pub fn os_madvise_hugepage(addr: Int, byte_count: Int) -> Bool: // return os_madvise(addr, byte_count, MADV_HUGEPAGE) // // // ─── Synchronize & lock ────────────────────────────────────────────────── // pub fn os_msync(addr: Int, byte_count: Int) -> Bool: // return abi_os_msync(addr, byte_count, 0) == 0 // // pub fn os_mlock(addr: Int, byte_count: Int) -> Bool: // return abi_os_mlock(addr, byte_count) == 0 // // pub fn os_munlock(addr: Int, byte_count: Int) -> Bool: // return abi_os_munlock(addr, byte_count) == 0 // // // ============================================================================ // // SECTION 13: Process Primitives // // ============================================================================ // // fork / execve / waitpid — raw process control. // // Bypasses the shell path (cmd.exe /c, /bin/sh -c) entirely. // // pub fn os_fork() -> Int: // // Returns: 0 in child, >0 child PID in parent, -1 on error // return abi_os_fork() // // pub fn os_execve(path: String, argv: Array, envp: Array) -> Int: // // Only returns -1 on error; on success the process image is replaced. // // Note: requires runtime support to marshal Array → C char** // // See os_run() for a higher-level shell-based spawn. // // For raw execve, call abi_os_syscall directly (Linux: SYS_execve = 59). // return -1 // // pub fn os_waitpid(pid: Int, options: Int) -> Int: // // Returns encoded (pid << 32) | status or -1 on error // return abi_os_waitpid(pid, options) // // // waitpid constants // pub const WNOHANG: Int = 1 // pub const WUNTRACED: Int = 2 // pub const WCONTINUED: Int = 8 // // pub fn os_waitpid_block(pid: Int) -> (Int, Int): // // Block until child exits. Returns (pid, status). // let raw = os_waitpid(pid, 0) // if raw < 0: // return (-1, 0) // let low32 = 4294967295 // 0xffffffff // let status = raw & low32 // let child_pid = raw >> 32 // return (child_pid, status) // // pub fn os_waitpid_nohang(pid: Int) -> (Int, Int): // // Non-blocking check. Returns (pid, status) or (-1, 0) if not exited. // let raw = os_waitpid(pid, WNOHANG) // if raw < 0: // return (-1, 0) // let low32 = 4294967295 // 0xffffffff // let status = raw & low32 // let child_pid = raw >> 32 // if child_pid == 0: // return (-1, 0) // return (child_pid, status) // // // ============================================================================ // // SECTION 14: io_uring (Linux >= 5.1) // // ============================================================================ // // Kernel-side async I/O submission. // // No threads, no blocking, no libuv — just an SQ and CQ ring buffer. // // This is the primitive that makes "actors are lightweight" real. // // pub fn os_io_uring_setup(entries: Int) -> Int: // return abi_os_io_uring_setup(entries) // // pub fn os_io_uring_enter(ring_fd: Int, to_submit: Int, min_complete: Int) -> Int: // return abi_os_io_uring_enter(ring_fd, to_submit, min_complete, 0) //!end-kain-file //!kain-file // path = "os_path.kn" // kind = "text" // encoding = "utf8" // bytes = 19876 // sha256 = "sha256:fd2c8d90f54b32e8db40fe335efe20c25daf2cdf135de0db64dafde967c6ac60" // trailing_newline = true //!kain-file-content // // ============================================================================ // // std::os::path — Path Manipulation Powerhouse // // ============================================================================ // // Python os.path + pathlib vibes, Kain performance. // // Extends std::path with richer cross-platform path operations. // // // // Usage: // // use std::os::path // // let full = os_path_join("a", "b", "c.txt") // "a/b/c.txt" // // let (dir, name) = os_path_split(full) // ("a/b", "c.txt") // // let ext = os_path_splitext("file.tar.gz") // ("file.tar", ".gz") // // if os_path_exists("/some/path"): ... // // // // Architecture note: // // This is the Kain equivalent of os_path_*.kn → std::os::path. // // The underscore convention maps to :: in the import path. // // ============================================================================ // // use std::target // use std::fs // use std::path // use std::process // // // ============================================================================ // // SECTION 1: Path Constants & Separators // // ============================================================================ // // pub fn os_path_sep() -> String: // return path_sep() // // pub fn os_path_altsep() -> String: // // Windows: "\" (the alt is "/" on Windows) // // Linux: "" (no alt separator) // let tgt = target_current() // var sep = "" // match tgt.os: // OS::Windows => sep = "/" // _ => sep = "" // return sep // // pub fn os_path_extsep() -> String: // return "." // // pub fn os_path_pathsep() -> String: // return path_delimiter() // // pub fn os_path_devnull() -> String: // let tgt = target_current() // var devnull = "/dev/null" // match tgt.os: // OS::Windows => devnull = "nul" // _ => devnull = "/dev/null" // return devnull // // // ============================================================================ // // SECTION 2: Path Assembly & Decomposition // // ============================================================================ // // // ─── join(components...) → combined path ───────────────────────────────── // pub fn os_path_join(a: String, b: String) -> String: // return path_join(a, b) // // // ─── split(path) → (head, tail) ────────────────────────────────────────── // pub fn os_path_split(path: String) -> (String, String): // let dir = path_parent(path) // let name = path_file_name(path) // return (dir, name) // // // ─── dirname / basename ────────────────────────────────────────────────── // pub fn os_path_dirname(path: String) -> String: // return path_parent(path) // // pub fn os_path_basename(path: String) -> String: // return path_file_name(path) // // // ─── splitext(path) → (root, ext) ──────────────────────────────────────── // // "file.tar.gz" → ("file.tar", ".gz") // pub fn os_path_splitext(path: String) -> (String, String): // let base = path_file_name(path) // if len(base) == 0: // return (path, "") // // // Find last dot // var dot_idx = -1 // var i = len(base) - 1 // while i >= 0: // let ch = char_at(base, i) // if ch == ".": // dot_idx = i // i = -1 // i = i - 1 // // if dot_idx <= 0: // return (path, "") // // let root = substring(path, 0, len(path) - (len(base) - dot_idx)) // let ext = substring(path, len(path) - (len(base) - dot_idx), len(path)) // return (root, ext) // // // ─── splitdrive(path) → (drive, tail) ──────────────────────────────────── // // Windows: "C:/foo" → ("C:", "/foo") // // Linux: "/foo" → ("", "/foo") // pub fn os_path_splitdrive(path: String) -> (String, String): // if len(path) >= 2: // let second = char_at(path, 1) // if second == ":": // return (substring(path, 0, 2), substring(path, 2, len(path))) // return ("", path) // // // ─── commonpath(paths) → longest common parent ─────────────────────────── // pub fn os_path_commonpath(paths: Array) -> String: // if len(paths) == 0: // return "" // if len(paths) == 1: // let (dir, _) = os_path_split(paths[0]) // return dir // // // Split all into components // var components_list: Array> = [] // var min_len = 999999 // var i: Int = 0 // while i < len(paths): // let comps = os_path_split_components(paths[i]) // push(components_list, comps) // if len(comps) < min_len: // min_len = len(comps) // i = i + 1 // // // Find common prefix // var common_idx = 0 // while common_idx < min_len: // let first_comp = components_list[0][common_idx] // var match_all = true // var j: Int = 1 // while j < len(components_list): // let other_comp = components_list[j][common_idx] // if first_comp != other_comp: // match_all = false // j = len(components_list) // j = j + 1 // if match_all == false: // common_idx = min_len // break // else: // common_idx = common_idx + 1 // // if common_idx == 0: // return "" // // // Rebuild path from common components // var result = "" // var k: Int = 0 // while k < common_idx: // if k > 0: // let sep = path_sep() // result = result + sep // result = result + components_list[0][k] // k = k + 1 // // return result // // // ─── split_components(path) → Array of path parts ──────────────────────── // fn os_path_split_components(path: String) -> Array: // var result: Array = [] // if len(path) == 0: // return result // // var start = 0 // var i = 0 // // Handle leading slash / drive letter // if char_at(path, 0) == "/" or char_at(path, 0) == "\\": // push(result, substring(path, 0, 1)) // start = 1 // i = 1 // // while i < len(path): // let ch = char_at(path, i) // if ch == "/" or ch == "\\": // if i > start: // push(result, substring(path, start, i)) // start = i + 1 // i = i + 1 // // if start < len(path): // push(result, substring(path, start, len(path))) // // return result // // // ============================================================================ // // SECTION 3: Path Normalization & Resolution // // ============================================================================ // // // ─── normpath(path) → clean normalized path ────────────────────────────── // // "a//b/./c/../d" → "a/b/d" // pub fn os_path_normpath(path: String) -> String: // let comps = os_path_split_components(path) // var stack: Array = [] // // var i: Int = 0 // while i < len(comps): // let comp = comps[i] // if comp == "." or len(comp) == 0: // // skip // i = i + 1 // elif comp == "..": // // pop if possible // if len(stack) > 0: // let last = stack[len(stack) - 1] // if last != ".." and last != "/" and last != "\\": // // Remove last element // var new_stack: Array = [] // var j: Int = 0 // while j < len(stack) - 1: // push(new_stack, stack[j]) // j = j + 1 // stack = new_stack // else: // push(stack, comp) // i = i + 1 // else: // push(stack, comp) // i = i + 1 // // // Rebuild // var result = "" // var k: Int = 0 // while k < len(stack): // if k > 0: // result = result + path_sep() // result = result + stack[k] // k = k + 1 // // if len(result) == 0 and os_path_isabs(path): // return path_sep() // return result // // // ─── abspath(path) → absolute path ─────────────────────────────────────── // pub fn os_path_abspath(path: String) -> String: // if os_path_isabs(path): // return os_path_normpath(path) // let cwd = os_path_getcwd() // let joined = path_join(cwd, path) // return os_path_normpath(joined) // // // Helper: getcwd (uses process module to avoid duplicate @extern) // fn os_path_getcwd() -> String: // return process_current_working_directory() // // // ─── relpath(path, start) → relative path ──────────────────────────────── // pub fn os_path_relpath(path: String, start: String) -> String: // // Simplified implementation // let abs_path = os_path_abspath(path) // let abs_start = os_path_abspath(start) // // let path_comps = os_path_split_components(abs_path) // let start_comps = os_path_split_components(abs_start) // // // Find common prefix // var common_len = 0 // while common_len < len(path_comps) and common_len < len(start_comps): // if path_comps[common_len] == start_comps[common_len]: // common_len = common_len + 1 // else: // common_len = len(path_comps) + 1 // // // Build "../" for each remaining start component // var result = "" // var ups = len(start_comps) - common_len // var u: Int = 0 // while u < ups: // if len(result) > 0: // result = result + path_sep() // result = result + ".." // u = u + 1 // // // Append remaining path components // var p: Int = common_len // while p < len(path_comps): // if len(result) > 0: // result = result + path_sep() // result = result + path_comps[p] // p = p + 1 // // if len(result) == 0: // return "." // return result // // // ─── realpath(path) → canonical absolute path with symlinks resolved ───── // pub fn os_path_realpath(path: String) -> String: // // Best-effort: normalize absolute path (true symlink resolution needs OS ABI) // return os_path_abspath(path) // // // ============================================================================ // // SECTION 4: Path Predicates // // ============================================================================ // // pub fn os_path_isabs(path: String) -> Bool: // return path_is_absolute(path) // // pub fn os_path_exists(path: String) -> Bool: // return fs_exists(path) // // pub fn os_path_isfile(path: String) -> Bool: // return fs_is_file(path) // // pub fn os_path_isdir(path: String) -> Bool: // return fs_is_dir(path) // // // ─── ismount ───────────────────────────────────────────────────────────── // pub fn os_path_ismount(path: String) -> Bool: // let tgt = target_current() // var is_windows = false // match tgt.os: // OS::Windows => is_windows = true // _ => is_windows = false // if is_windows: // if len(path) == 3: // let second = char_at(path, 1) // let third = char_at(path, 2) // if second == ":" and (third == "\\" or third == "/"): // return true // return false // return path == "/" or path == "//" // // // ─── islink ────────────────────────────────────────────────────────────── // pub fn os_path_islink(path: String) -> Bool: // // Use text-based metadata to avoid fs_metadata struct parse crash // let raw_text = fs_metadata_text(path) // return _ospath_meta_field(raw_text, "file_type") == "symlink" // // // ─── samefile ──────────────────────────────────────────────────────────── // pub fn os_path_samefile(path_a: String, path_b: String) -> Bool: // let a = os_path_normpath(os_path_abspath(path_a)) // let b = os_path_normpath(os_path_abspath(path_b)) // return a == b // // // ============================================================================ // // SECTION 5: Path Metadata // // ============================================================================ // // pub fn os_path_getsize(path: String) -> Int: // let raw_text = fs_metadata_text(path) // return _ospath_meta_int(raw_text, "len") // // pub fn os_path_getmtime(path: String) -> Int: // let raw_text = fs_metadata_text(path) // return _ospath_meta_int(raw_text, "modified_millis") // // pub fn os_path_getctime(path: String) -> Int: // let raw_text = fs_metadata_text(path) // return _ospath_meta_int(raw_text, "created_millis") // // pub fn os_path_getatime(path: String) -> Int: // let raw_text = fs_metadata_text(path) // return _ospath_meta_int(raw_text, "accessed_millis") // // // ============================================================================ // // SECTION 6: Path Expansion // // ============================================================================ // // // ─── expanduser(path) → expand ~ and ~user ─────────────────────────────── // pub fn os_path_expanduser(path: String) -> String: // if len(path) == 0: // return path // // let first = char_at(path, 0) // if first != "~": // return path // // if len(path) == 1 or char_at(path, 1) == "/" or char_at(path, 1) == "\\": // var home = "" // let tgt = target_current() // var is_windows = false // match tgt.os: // OS::Windows => is_windows = true // _ => is_windows = false // if is_windows: // let home_drive = os_path_getenv("HOMEDRIVE") // let home_path = os_path_getenv("HOMEPATH") // if len(home_drive) > 0 and len(home_path) > 0: // home = home_drive + home_path // else: // home = os_path_getenv("USERPROFILE") // else: // home = os_path_getenv("HOME") // if len(home) > 0: // if len(path) > 1: // return home + substring(path, 1, len(path)) // return home // return path // // // ─── expandvars(path) → expand $VAR / %VAR% ────────────────────────────── // pub fn os_path_expandvars(path: String) -> String: // // Simplified: expand $NAME and %NAME% patterns // var result = "" // var i = 0 // while i < len(path): // let ch = char_at(path, i) // if ch == "%": // // Windows style: %VAR% // var end = i + 1 // while end < len(path) and char_at(path, end) != "%": // end = end + 1 // if end < len(path): // let var_name = substring(path, i + 1, end) // let var_val = os_path_getenv(var_name) // result = result + var_val // i = end + 1 // else: // result = result + substring(path, i, i + 1) // i = i + 1 // elif ch == "$": // // Unix style: $VAR or ${VAR} // if i + 1 < len(path): // var end = i + 1 // let next = char_at(path, i + 1) // if next == "{": // while end < len(path) and char_at(path, end) != "}": // end = end + 1 // if end < len(path): // let var_name = substring(path, i + 2, end) // let var_val = os_path_getenv(var_name) // result = result + var_val // i = end + 1 // else: // i = i + 1 // else: // while end < len(path) and _is_path_var_char(char_at(path, end)): // end = end + 1 // if end > i + 1: // let var_name = substring(path, i + 1, end) // let var_val = os_path_getenv(var_name) // result = result + var_val // i = end // else: // result = result + substring(path, i, i + 1) // i = i + 1 // else: // result = result + substring(path, i, i + 1) // i = i + 1 // else: // result = result + substring(path, i, i + 1) // i = i + 1 // return result // // fn _is_path_var_char(ch: String) -> Bool: // return (ch >= "a" and ch <= "z") or (ch >= "A" and ch <= "Z") or (ch >= "0" and ch <= "9") or ch == "_" // // // Helper: getenv (forward to process module) // fn os_path_getenv(key: String) -> String: // return process_environment(key) // // // ============================================================================ // // SECTION 7: Convenience Composition // // ============================================================================ // // // ─── with_suffix(path, new_suffix) → path with extension swapped ───────── // pub fn os_path_with_suffix(path: String, suffix: String) -> String: // let (root, _) = os_path_splitext(path) // return root + suffix // // // ─── with_name(path, new_name) → path with filename swapped ────────────── // pub fn os_path_with_name(path: String, name: String) -> String: // let dir = path_parent(path) // if len(dir) == 0: // return name // return path_join(dir, name) // // // ─── with_stem(path, new_stem) → keep extension, swap stem ─────────────── // pub fn os_path_with_stem(path: String, stem: String) -> String: // let (root, ext) = os_path_splitext(path) // return stem + ext // // // ============================================================================ // // INTERNAL: Metadata Helpers // // ============================================================================ // // fn _ospath_meta_field(text: String, key: String) -> String: // let prefix = key + "=" // var i: Int = 0 // while i < len(text): // if i + len(prefix) <= len(text): // var matched = true // var j: Int = 0 // while j < len(prefix): // if char_at(text, i + j) != char_at(prefix, j): // matched = false // j = len(prefix) // j = j + 1 // if matched: // var start = i + len(prefix) // var end = start // while end < len(text) and char_at(text, end) != "\n": // end = end + 1 // return substring(text, start, end) // while i < len(text) and char_at(text, i) != "\n": // i = i + 1 // i = i + 1 // return "" // // fn _ospath_meta_int(text: String, key: String) -> Int: // let val = _ospath_meta_field(text, key) // if len(val) == 0: // return 0 // var result: Int = 0 // var sign: Int = 1 // var i: Int = 0 // if char_at(val, 0) == "-": // sign = -1 // i = 1 // while i < len(val): // let ch = char_at(val, i) // if ch >= "0" and ch <= "9": // result = result * 10 + (ord(ch) - ord("0")) // i = i + 1 // return result * sign //!end-kain-file //!kain-file // path = "path.kn" // kind = "text" // encoding = "utf8" // bytes = 7867 // sha256 = "sha256:1e3e94ebc97bfa6c3b6ca820a5d2f3ff4773b033f012526a7ed4bee0a057d0ec" // trailing_newline = true //!kain-file-content // use std::target // // pub fn path_sep() -> String: // let tgt = target_current() // var sep = "/" // match tgt.os: // OS::Windows => sep = "\\" // _ => sep = "/" // return sep // // pub fn path_delimiter() -> String: // let tgt = target_current() // var delimiter = ":" // match tgt.os: // OS::Windows => delimiter = ";" // _ => delimiter = ":" // return delimiter // // pub fn path_is_absolute(path: String) -> Bool: // if len(path) == 0: // return false // // let first = char_at(path, 0) // if first == "/" or first == "\\": // return true // // if len(path) >= 3: // let second = char_at(path, 1) // let third = char_at(path, 2) // if second == ":" and (third == "\\" or third == "/"): // return true // // return false // // pub fn path_join(base: String, child: String) -> String: // if len(base) == 0: // return child // if len(child) == 0: // return base // // let tgt = target_current() // var sep = "/" // match tgt.os: // OS::Windows => sep = "\\" // _ => sep = "/" // // let last = char_at(base, len(base) - 1) // if last == "/" or last == "\\": // return base + child // return base + sep + child // // pub fn path_parent(path: String) -> String: // if len(path) == 0: // return "" // // var index = len(path) - 1 // while index >= 0: // let ch = char_at(path, index) // if ch == "/" or ch == "\\": // if index == 0: // return substring(path, 0, 1) // return substring(path, 0, index) // index = index - 1 // return "" // // pub fn path_file_name(path: String) -> String: // if len(path) == 0: // return "" // // var index = len(path) - 1 // while index >= 0: // let ch = char_at(path, index) // if ch == "/" or ch == "\\": // return substring(path, index + 1, len(path)) // index = index - 1 // return path // // pub fn path_extension(path: String) -> String: // var file_name = path // if len(path) > 0: // var path_index = len(path) - 1 // while path_index >= 0: // let path_ch = char_at(path, path_index) // if path_ch == "/" or path_ch == "\\": // file_name = substring(path, path_index + 1, len(path)) // path_index = -1 // else: // path_index = path_index - 1 // if len(file_name) == 0: // return "" // // var index = len(file_name) - 1 // while index >= 0: // let ch = char_at(file_name, index) // if ch == ".": // if index + 1 >= len(file_name): // return "" // return substring(file_name, index + 1, len(file_name)) // index = index - 1 // return "" // // pub fn path_stem(path: String) -> String: // var file_name = path // if len(path) > 0: // var path_index = len(path) - 1 // while path_index >= 0: // let path_ch = char_at(path, path_index) // if path_ch == "/" or path_ch == "\\": // file_name = substring(path, path_index + 1, len(path)) // path_index = -1 // else: // path_index = path_index - 1 // if len(file_name) == 0: // return "" // // var index = len(file_name) - 1 // while index >= 0: // let ch = char_at(file_name, index) // if ch == ".": // if index == 0: // return file_name // return substring(file_name, 0, index) // index = index - 1 // return file_name // // pub fn path_normalize(path: String) -> String: // if len(path) == 0: // return "." // // let tgt = target_current() // var sep = "/" // match tgt.os: // OS::Windows => sep = "\\" // _ => sep = "/" // // var is_abs = false // let first = char_at(path, 0) // if first == "/" or first == "\\": // is_abs = true // elif len(path) >= 3: // let second = char_at(path, 1) // let third = char_at(path, 2) // if second == ":" and (third == "\\" or third == "/"): // is_abs = true // // let mut parts: Array = [] // var current = "" // var index: Int = 0 // while index < len(path): // let ch = char_at(path, index) // if ch == "/" or ch == "\\": // if len(current) > 0: // push(parts, current) // current = "" // else: // current = current + ch // index = index + 1 // if len(current) > 0: // push(parts, current) // // let mut resolved: Array = [] // var part_index: Int = 0 // while part_index < len(parts): // let part = parts[part_index] // if part == "" or part == ".": // 0 // else: // if part == "..": // if len(resolved) > 0 and resolved[len(resolved) - 1] != "..": // let _pop = pop(resolved) // else: // if is_abs == false: // push(resolved, part) // else: // push(resolved, part) // part_index = part_index + 1 // // var result = "" // if is_abs: // result = result + sep // // var resolved_index: Int = 0 // while resolved_index < len(resolved): // if resolved_index > 0: // result = result + sep // result = result + resolved[resolved_index] // resolved_index = resolved_index + 1 // // if len(result) == 0: // return "." // return result // // pub fn path_canonicalize(path: String) -> String: // if len(path) == 0: // return "." // // let tgt = target_current() // var sep = "/" // match tgt.os: // OS::Windows => sep = "\\" // _ => sep = "/" // // var is_abs = false // let first = char_at(path, 0) // if first == "/" or first == "\\": // is_abs = true // elif len(path) >= 3: // let second = char_at(path, 1) // let third = char_at(path, 2) // if second == ":" and (third == "\\" or third == "/"): // is_abs = true // // let mut parts: Array = [] // var current = "" // var index: Int = 0 // while index < len(path): // let ch = char_at(path, index) // if ch == "/" or ch == "\\": // if len(current) > 0: // push(parts, current) // current = "" // else: // current = current + ch // index = index + 1 // if len(current) > 0: // push(parts, current) // // let mut resolved: Array = [] // var part_index: Int = 0 // while part_index < len(parts): // let part = parts[part_index] // if part == "" or part == ".": // 0 // else: // if part == "..": // if len(resolved) > 0 and resolved[len(resolved) - 1] != "..": // let _pop = pop(resolved) // else: // if is_abs == false: // push(resolved, part) // else: // push(resolved, part) // part_index = part_index + 1 // // var result = "" // if is_abs: // result = result + sep // // var resolved_index: Int = 0 // while resolved_index < len(resolved): // if resolved_index > 0: // result = result + sep // result = result + resolved[resolved_index] // resolved_index = resolved_index + 1 // // if len(result) == 0: // return "." // return result // // pub fn path_split(path: String) -> Array: // let mut parts: Array = [] // var current = "" // var index: Int = 0 // while index < len(path): // let ch = char_at(path, index) // if ch == "/" or ch == "\\": // if len(current) > 0: // push(parts, current) // current = "" // else: // current = current + ch // index = index + 1 // if len(current) > 0: // push(parts, current) // return parts //!end-kain-file //!kain-file // path = "platform.kn" // kind = "text" // encoding = "utf8" // bytes = 3421 // sha256 = "sha256:3650fcd501949019f2339b9da842a52c94b5476f2a2f7bf19f848eb3950e24e4" // trailing_newline = true //!kain-file-content // @extern // fn abi_platform_current_kind() -> Int // // @extern // fn abi_platform_current_name() -> String // // @extern // fn abi_platform_current_service_mask() -> Int // // @extern // fn abi_platform_current_optional_service_mask() -> Int // // @extern // fn abi_platform_library_open(path: String) -> Int // // @extern // fn abi_platform_library_close(handle: Int) -> Int // // @extern // fn abi_platform_library_resolve(handle: Int, symbol_name: String) -> Int // // @extern // fn abi_platform_library_is_valid(handle: Int) -> Int // // @extern // fn abi_platform_library_live_count() -> Int // // @extern // fn abi_platform_library_last_status() -> Int // // @extern // fn abi_platform_library_last_error_kind() -> String // // @extern // fn abi_platform_library_last_error_message() -> String // // pub fn native_platform_current_kind() -> Int: // return abi_platform_current_kind() // // pub fn native_platform_current_name() -> String: // return abi_platform_current_name() // // pub fn native_platform_current_service_mask() -> Int: // return abi_platform_current_service_mask() // // pub fn native_platform_current_optional_service_mask() -> Int: // return abi_platform_current_optional_service_mask() // // pub fn native_platform_library_open(path: String) -> Int: // return abi_platform_library_open(path) // // pub fn native_platform_library_close(handle: Int) -> Int: // return abi_platform_library_close(handle) // // pub fn native_platform_library_resolve(handle: Int, symbol_name: String) -> Int: // return abi_platform_library_resolve(handle, symbol_name) // // pub fn native_platform_library_is_valid(handle: Int) -> Bool: // return abi_platform_library_is_valid(handle) != 0 // // pub fn native_platform_library_live_count() -> Int: // return abi_platform_library_live_count() // // pub fn native_platform_library_last_status() -> Int: // return abi_platform_library_last_status() // // pub fn native_platform_library_last_error_kind() -> String: // return abi_platform_library_last_error_kind() // // pub fn native_platform_library_last_error_message() -> String: // return abi_platform_library_last_error_message() // // # root-domain aliases: generated public std names // pub fn platform_current_kind() -> Int: // return native_platform_current_kind() // // pub fn platform_current_name() -> String: // return native_platform_current_name() // // pub fn platform_current_service_mask() -> Int: // return native_platform_current_service_mask() // // pub fn platform_current_optional_service_mask() -> Int: // return native_platform_current_optional_service_mask() // // pub fn platform_library_open(path: String) -> Int: // return native_platform_library_open(path) // // pub fn platform_library_close(handle: Int) -> Int: // return native_platform_library_close(handle) // // pub fn platform_library_resolve(handle: Int, symbol_name: String) -> Int: // return native_platform_library_resolve(handle, symbol_name) // // pub fn platform_library_is_valid(handle: Int) -> Bool: // return native_platform_library_is_valid(handle) // // pub fn platform_library_live_count() -> Int: // return native_platform_library_live_count() // // pub fn platform_library_last_status() -> Int: // return native_platform_library_last_status() // // pub fn platform_library_last_error_kind() -> String: // return native_platform_library_last_error_kind() // // pub fn platform_library_last_error_message() -> String: // return native_platform_library_last_error_message() // # end root-domain aliases //!end-kain-file //!kain-file // path = "process.kn" // kind = "text" // encoding = "utf8" // bytes = 12619 // sha256 = "sha256:482bb43d786e63c00ed00d9888911d52a560f6e8e5b11f9e630d07a016dce9f4" // trailing_newline = true //!kain-file-content // use std::io // use std::path // use std::time // // @extern // fn abi_process_reset() -> Int // // @extern // fn abi_process_platform_available() -> Int // // @extern // fn abi_process_arg_count() -> Int // // @extern // fn abi_process_arg(index: Int) -> String // // @extern // fn abi_process_current_working_directory() -> String // // @extern // fn abi_process_environment(key: String) -> String // // @extern // fn abi_process_current_executable_path() -> String // // @extern // fn abi_process_current_id() -> Int // // @extern // fn abi_process_spec_create(executable: String) -> Int // // @extern // fn abi_process_spec_destroy(spec_id: Int) -> Int // // @extern // fn abi_process_spec_count() -> Int // // @extern // fn abi_process_spec_add_arg(spec_id: Int, argument: String) -> Int // // @extern // fn abi_process_spec_set_cwd(spec_id: Int, cwd_path: String) -> Int // // @extern // fn abi_process_spec_set_env(spec_id: Int, key: String, value: String) -> Int // // @extern // fn abi_process_spec_set_inherit_environment(spec_id: Int, enabled: Int) -> Int // // @extern // fn abi_process_spec_set_stdin_mode(spec_id: Int, mode: String) -> Int // // @extern // fn abi_process_spec_set_stdout_mode(spec_id: Int, mode: String) -> Int // // @extern // fn abi_process_spec_set_stderr_mode(spec_id: Int, mode: String) -> Int // // @extern // fn abi_process_spawn(spec_id: Int) -> Int // // @extern // fn abi_process_spawn_pty(spec_id: Int, columns: Int, rows: Int) -> Int // // @extern // fn abi_process_count() -> Int // // @extern // fn abi_process_close(process_id: Int) -> Int // // @extern // fn abi_process_poll(process_id: Int) -> Int // // @extern // fn abi_process_wait(process_id: Int, timeout_ms: Int) -> Int // // @extern // fn abi_process_is_running(process_id: Int) -> Int // // @extern // fn abi_process_exit_code(process_id: Int) -> Int // // @extern // fn abi_process_os_pid(process_id: Int) -> Int // // @extern // fn abi_process_terminate(process_id: Int) -> Int // // @extern // fn abi_process_kill(process_id: Int) -> Int // // @extern // fn abi_process_stdin_write_text(process_id: Int, text: String) -> Int // // @extern // fn abi_process_stdin_write_hex(process_id: Int, bytes_hex: String) -> Int // // @extern // fn abi_process_stdin_close(process_id: Int) -> Int // // @extern // fn abi_process_stdout_read_text(process_id: Int) -> String // // @extern // fn abi_process_stdout_read_hex(process_id: Int) -> String // // @extern // fn abi_process_stderr_read_text(process_id: Int) -> String // // @extern // fn abi_process_stderr_read_hex(process_id: Int) -> String // // @extern // fn abi_process_stdout_capture_text(process_id: Int) -> String // // @extern // fn abi_process_stdout_capture_hex(process_id: Int) -> String // // @extern // fn abi_process_stderr_capture_text(process_id: Int) -> String // // @extern // fn abi_process_stderr_capture_hex(process_id: Int) -> String // // @extern // fn abi_process_pty_write_text(process_id: Int, text: String) -> Int // // @extern // fn abi_process_pty_write_hex(process_id: Int, bytes_hex: String) -> Int // // @extern // fn abi_process_pty_resize(process_id: Int, columns: Int, rows: Int) -> Int // // @extern // fn abi_process_pty_read_text(process_id: Int) -> String // // @extern // fn abi_process_pty_read_hex(process_id: Int) -> String // // @extern // fn abi_process_pty_capture_text(process_id: Int) -> String // // @extern // fn abi_process_pty_capture_hex(process_id: Int) -> String // // @extern // fn abi_process_output_text(executable: String, arg0: String, arg1: String, arg2: String, timeout_ms: Int) -> String // // @extern // fn abi_process_last_status() -> Int // // @extern // fn abi_process_last_error_kind() -> String // // @extern // fn abi_process_last_error_message() -> String // // pub fn process_stdio_inherit() -> String: // return "inherit" // // pub fn process_stdio_pipe() -> String: // return "pipe" // // pub fn process_stdio_null() -> String: // return "null" // // pub fn process_reset() -> Int: // return abi_process_reset() // // pub fn process_platform_available() -> Int: // return abi_process_platform_available() // // fn process_args_include_executable(arguments: Array) -> Bool: // if len(arguments) == 0: // return false // let first = arguments[0] // if first == "": // return false // let executable = abi_process_current_executable_path() // if executable == "": // return false // if first == executable: // return true // let first_name = to_lower(path_file_name(first)) // let executable_name = to_lower(path_file_name(executable)) // if executable_name == "": // return false // return first_name == executable_name // // pub fn process_args() -> Array: // let count = abi_process_arg_count() // let values = [] // var index = 0 // while index < count: // push(values, abi_process_arg(index)) // index = index + 1 // return values // // pub fn process_user_args() -> Array: // // Native and interpreter lanes do not always agree on whether argv[0] carries the executable. // let values = process_args() // let skip = if process_args_include_executable(values): // 1 // else: // 0 // let user_values = [] // var index = skip // while index < len(values): // push(user_values, values[index]) // index = index + 1 // return user_values // // pub fn process_arg_count() -> Int: // return abi_process_arg_count() // // pub fn process_arg(index: Int) -> String: // return abi_process_arg(index) // // pub fn process_current_working_directory() -> String: // return abi_process_current_working_directory() // // pub fn process_environment(key: String) -> String: // return abi_process_environment(key) // // pub fn process_current_executable_path() -> String: // return abi_process_current_executable_path() // // pub fn process_current_executable_name() -> String: // return path_file_name(process_current_executable_path()) // // pub fn process_current_id() -> Int: // return abi_process_current_id() // // pub fn process_spec_create(executable: String) -> Int: // return abi_process_spec_create(executable) // // pub fn process_spec_destroy(spec_id: Int) -> Int: // return abi_process_spec_destroy(spec_id) // // pub fn process_spec_count() -> Int: // return abi_process_spec_count() // // pub fn process_spec_add_arg(spec_id: Int, argument: String) -> Int: // return abi_process_spec_add_arg(spec_id, argument) // // pub fn process_spec_set_cwd(spec_id: Int, cwd_path: String) -> Int: // return abi_process_spec_set_cwd(spec_id, cwd_path) // // pub fn process_spec_set_env(spec_id: Int, key: String, value: String) -> Int: // return abi_process_spec_set_env(spec_id, key, value) // // pub fn process_spec_set_inherit_environment(spec_id: Int, enabled: Int) -> Int: // return abi_process_spec_set_inherit_environment(spec_id, enabled) // // pub fn process_spec_set_stdio_modes(spec_id: Int, stdin_mode: String, stdout_mode: String, stderr_mode: String) -> Int: // let stdin_status = abi_process_spec_set_stdin_mode(spec_id, stdin_mode) // if stdin_status != 0: // return stdin_status // let stdout_status = abi_process_spec_set_stdout_mode(spec_id, stdout_mode) // if stdout_status != 0: // return stdout_status // return abi_process_spec_set_stderr_mode(spec_id, stderr_mode) // // pub fn process_spec_set_pipe_stdio(spec_id: Int) -> Int: // return process_spec_set_stdio_modes(spec_id, "pipe", "pipe", "pipe") // // pub fn process_spec_create_piped(executable: String) -> Int: // let spec_id = process_spec_create(executable) // let _stdio = process_spec_set_pipe_stdio(spec_id) // return spec_id // // pub fn process_spawn(spec_id: Int) -> Int: // return abi_process_spawn(spec_id) // // pub fn process_spawn_pty(spec_id: Int, columns: Int, rows: Int) -> Int: // return abi_process_spawn_pty(spec_id, columns, rows) // // pub fn process_count() -> Int: // return abi_process_count() // // pub fn process_close(process_id: Int) -> Int: // return abi_process_close(process_id) // // pub fn process_poll(process_id: Int) -> Int: // return abi_process_poll(process_id) // // pub fn process_wait(process_id: Int, timeout_ms: Int) -> Int: // return abi_process_wait(process_id, timeout_ms) // // pub fn process_is_running(process_id: Int) -> Int: // return abi_process_is_running(process_id) // // pub fn process_exit_code(process_id: Int) -> Int: // return abi_process_exit_code(process_id) // // pub fn process_os_pid(process_id: Int) -> Int: // return abi_process_os_pid(process_id) // // pub fn process_terminate(process_id: Int) -> Int: // return abi_process_terminate(process_id) // // pub fn process_kill(process_id: Int) -> Int: // return abi_process_kill(process_id) // // pub fn process_stdin_write_text(process_id: Int, text: String) -> Int: // return abi_process_stdin_write_text(process_id, text) // // pub fn process_stdin_write_hex(process_id: Int, bytes_hex: String) -> Int: // return abi_process_stdin_write_hex(process_id, bytes_hex) // // pub fn process_stdin_close(process_id: Int) -> Int: // return abi_process_stdin_close(process_id) // // pub fn process_stdout_read_text(process_id: Int) -> String: // return abi_process_stdout_read_text(process_id) // // pub fn process_stdout_buffered_reader(process_id: Int, capacity: Int) -> BufferedReader with Unsafe: // return buffered_reader_new_from_text(capacity, process_stdout_read_text(process_id)) // // pub fn process_stdout_read_hex(process_id: Int) -> String: // return abi_process_stdout_read_hex(process_id) // // pub fn process_stderr_read_text(process_id: Int) -> String: // return abi_process_stderr_read_text(process_id) // // pub fn process_stderr_buffered_reader(process_id: Int, capacity: Int) -> BufferedReader with Unsafe: // return buffered_reader_new_from_text(capacity, process_stderr_read_text(process_id)) // // pub fn process_stderr_read_hex(process_id: Int) -> String: // return abi_process_stderr_read_hex(process_id) // // pub fn process_stdout_capture_text(process_id: Int) -> String: // return abi_process_stdout_capture_text(process_id) // // pub fn process_stdout_capture_hex(process_id: Int) -> String: // return abi_process_stdout_capture_hex(process_id) // // pub fn process_stderr_capture_text(process_id: Int) -> String: // return abi_process_stderr_capture_text(process_id) // // pub fn process_stderr_capture_hex(process_id: Int) -> String: // return abi_process_stderr_capture_hex(process_id) // // pub fn process_pty_write_text(process_id: Int, text: String) -> Int: // return abi_process_pty_write_text(process_id, text) // // pub fn process_stdin_write_buffered_text(process_id: Int, writer: BufferedWriter) -> Int with Unsafe: // return process_stdin_write_text(process_id, buffered_writer_materialize_text(writer)) // // pub fn process_pty_write_hex(process_id: Int, bytes_hex: String) -> Int: // return abi_process_pty_write_hex(process_id, bytes_hex) // // pub fn process_pty_write_buffered_text(process_id: Int, writer: BufferedWriter) -> Int with Unsafe: // return process_pty_write_text(process_id, buffered_writer_materialize_text(writer)) // // pub fn process_pty_resize(process_id: Int, columns: Int, rows: Int) -> Int: // return abi_process_pty_resize(process_id, columns, rows) // // pub fn process_pty_read_text(process_id: Int) -> String: // return abi_process_pty_read_text(process_id) // // pub fn process_pty_buffered_reader(process_id: Int, capacity: Int) -> BufferedReader with Unsafe: // return buffered_reader_new_from_text(capacity, process_pty_read_text(process_id)) // // pub fn process_pty_read_hex(process_id: Int) -> String: // return abi_process_pty_read_hex(process_id) // // pub fn process_pty_capture_text(process_id: Int) -> String: // return abi_process_pty_capture_text(process_id) // // pub fn process_pty_capture_hex(process_id: Int) -> String: // return abi_process_pty_capture_hex(process_id) // // pub fn process_output_text(executable: String, arg0: String, arg1: String, arg2: String, timeout_ms: Int) -> String: // return abi_process_output_text(executable, arg0, arg1, arg2, timeout_ms) // // pub fn process_collect_output_until_exit(process_id: Int, timeout_ms: Int, poll_sleep_ms: Int) -> Int: // let waited = 0 // while timeout_ms < 0 or waited <= timeout_ms: // let ready = process_poll(process_id) // let _stdout = process_stdout_read_text(process_id) // let _stderr = process_stderr_read_text(process_id) // let _pty = process_pty_read_text(process_id) // if ready == 1: // return 1 // if timeout_ms >= 0 and waited == timeout_ms: // return 0 // let _sleep = sleep_millis(poll_sleep_ms) // waited = waited + poll_sleep_ms // return 0 // // pub fn process_last_status() -> Int: // return abi_process_last_status() // // pub fn process_last_error_kind() -> String: // return abi_process_last_error_kind() // // pub fn process_last_error_message() -> String: // return abi_process_last_error_message() //!end-kain-file //!kain-file // path = "proof.kn" // kind = "text" // encoding = "utf8" // bytes = 12293 // sha256 = "sha256:5665159daa39156ee6c0c9b32a89811fb18bbaf361efcabb1658be7d57cba157" // trailing_newline = true //!kain-file-content // use std::build // use std::z3 // // pub const PROOF_STATUS_SKIP: Int = 1 // pub const PROOF_STATUS_PROVED: Int = 2 // pub const PROOF_STATUS_WITNESS: Int = 3 // pub const PROOF_STATUS_UNKNOWN: Int = 4 // pub const PROOF_EXPECT_ANY: Int = 0 // pub const PROOF_BACKEND_Z3: String = "z3" // // pub struct ProofOutcome: // status: Int // label: String // detail: String // evidence: String // model: String // // pub struct ProofExpectation: // expected_status: Int // label: String // allow_skip: Bool // // pub struct ProofCase: // label: String // description: String // suite_label: String // backend: String // evidence_ref: String // tags: Array // expectation: ProofExpectation // // pub struct ProofAssessment: // case_spec: ProofCase // outcome: ProofOutcome // accepted: Bool // summary: String // // pub struct ProofSuiteSummary: // label: String // total: Int // accepted: Int // rejected: Int // skipped: Int // proved: Int // witness: Int // unknown: Int // // pub fn proof_status_name(status: Int) -> String: // if status == PROOF_EXPECT_ANY: // return "any" // if status == PROOF_STATUS_SKIP: // return "skip" // if status == PROOF_STATUS_PROVED: // return "proved" // if status == PROOF_STATUS_WITNESS: // return "witness" // if status == PROOF_STATUS_UNKNOWN: // return "unknown" // return "status-" + to_string(status) // // pub fn proof_expectation(expected_status: Int) -> ProofExpectation: // return ProofExpectation { // expected_status: expected_status, // label: proof_status_name(expected_status), // allow_skip: false // } // // pub fn proof_expect_any() -> ProofExpectation: // return proof_expectation(PROOF_EXPECT_ANY) // // pub fn proof_expect_proved() -> ProofExpectation: // return proof_expectation(PROOF_STATUS_PROVED) // // pub fn proof_expect_witness() -> ProofExpectation: // return proof_expectation(PROOF_STATUS_WITNESS) // // pub fn proof_expect_unknown() -> ProofExpectation: // return proof_expectation(PROOF_STATUS_UNKNOWN) // // pub fn proof_expectation_allow_skip(expectation: ProofExpectation) -> ProofExpectation: // let mut next = expectation // next.allow_skip = true // return next // // impl ProofExpectation: // fn named(_self: Self_, value: String) -> ProofExpectation: // let mut next = _self // next.label = value // return next // // fn allow_skip(_self: Self_) -> ProofExpectation: // return proof_expectation_allow_skip(_self) // // pub fn proof_outcome(status: Int, label: String, detail: String, evidence: String, model: String) -> ProofOutcome: // return ProofOutcome { // status: status, // label: label, // detail: detail, // evidence: evidence, // model: model // } // // pub fn proof_skip(label: String, reason: String) -> ProofOutcome: // return proof_outcome(PROOF_STATUS_SKIP, label, reason, "", "") // // pub fn proof_proved(label: String, evidence: String) -> ProofOutcome: // return proof_outcome(PROOF_STATUS_PROVED, label, "solver returned unsat", evidence, "") // // pub fn proof_witness(label: String, evidence: String, model: String) -> ProofOutcome: // return proof_outcome(PROOF_STATUS_WITNESS, label, "solver returned sat", evidence, model) // // pub fn proof_unknown(label: String, detail: String, evidence: String) -> ProofOutcome: // return proof_outcome(PROOF_STATUS_UNKNOWN, label, detail, evidence, "") // // pub fn proof_outcome_is_skip(outcome: ProofOutcome) -> Bool: // return outcome.status == PROOF_STATUS_SKIP // // pub fn proof_outcome_is_proved(outcome: ProofOutcome) -> Bool: // return outcome.status == PROOF_STATUS_PROVED // // pub fn proof_outcome_is_witness(outcome: ProofOutcome) -> Bool: // return outcome.status == PROOF_STATUS_WITNESS // // pub fn proof_outcome_is_unknown(outcome: ProofOutcome) -> Bool: // return outcome.status == PROOF_STATUS_UNKNOWN // // pub fn proof_outcome_summary(outcome: ProofOutcome) -> String: // if outcome.model != "": // return outcome.detail + " // " + outcome.model // if outcome.evidence != "": // return outcome.detail + " // " + outcome.evidence // if outcome.detail != "": // return outcome.detail // return proof_status_name(outcome.status) // // pub fn proof_case(label: String) -> ProofCase: // return ProofCase { // label: label, // description: "", // suite_label: "", // backend: PROOF_BACKEND_Z3, // evidence_ref: "", // tags: [], // expectation: proof_expect_any() // } // // pub fn proof_proved_case(label: String) -> ProofCase: // return proof_case(label).expect_proved() // // pub fn proof_witness_case(label: String) -> ProofCase: // return proof_case(label).expect_witness() // // impl ProofCase: // fn description(_self: Self_, value: String) -> ProofCase: // let mut next = _self // next.description = value // return next // // fn suite(_self: Self_, value: String) -> ProofCase: // let mut next = _self // next.suite_label = value // return next // // fn backend(_self: Self_, value: String) -> ProofCase: // let mut next = _self // next.backend = value // return next // // fn evidence(_self: Self_, value: String) -> ProofCase: // let mut next = _self // next.evidence_ref = value // return next // // fn tag(_self: Self_, value: String) -> ProofCase: // let mut next = _self // push(next.tags, value) // return next // // fn expect(_self: Self_, value: ProofExpectation) -> ProofCase: // let mut next = _self // next.expectation = value // return next // // fn expect_any(_self: Self_) -> ProofCase: // return _self.expect(proof_expect_any()) // // fn expect_proved(_self: Self_) -> ProofCase: // return _self.expect(proof_expect_proved()) // // fn expect_witness(_self: Self_) -> ProofCase: // return _self.expect(proof_expect_witness()) // // fn expect_unknown(_self: Self_) -> ProofCase: // return _self.expect(proof_expect_unknown()) // // fn allow_skip(_self: Self_) -> ProofCase: // let mut next = _self // next.expectation = proof_expectation_allow_skip(next.expectation) // return next // // fn proof_join_strings(items: Array, separator: String) -> String: // if len(items) == 0: // return "" // var index: Int = 0 // var text: String = "" // while index < len(items): // if index > 0: // text = text + separator // text = text + items[index] // index = index + 1 // return text // // pub fn proof_case_summary(spec: ProofCase) -> String: // var summary = spec.label + " [" + spec.backend + "] expect=" + spec.expectation.label // if spec.suite_label != "": // summary = summary + " suite=" + spec.suite_label // if len(spec.tags) > 0: // summary = summary + " tags=" + proof_join_strings(spec.tags, ",") // if spec.evidence_ref != "": // summary = summary + " evidence=" + spec.evidence_ref // return summary // // pub fn proof_case_accepts(spec: ProofCase, outcome: ProofOutcome) -> Bool: // if proof_outcome_is_skip(outcome): // return spec.expectation.allow_skip // if spec.expectation.expected_status == PROOF_EXPECT_ANY: // return true // return outcome.status == spec.expectation.expected_status // // pub fn proof_case_outcome_from_result(spec: ProofCase, backend_subject: Any, result: Any) -> ProofOutcome: // // Keep backend dispatch data-driven so future proof engines can plug into // // the same authored case surface without rewriting every call site. // if spec.backend == "" or spec.backend == PROOF_BACKEND_Z3: // if z3_available() == false: // return proof_skip(spec.label, "z3 backend unavailable") // return proof_check_result(spec.label, backend_subject, result) // return proof_skip(spec.label, "unsupported proof backend: " + spec.backend) // // pub fn proof_case_outcome(spec: ProofCase, backend_subject: Any) -> ProofOutcome: // if spec.backend == "" or spec.backend == PROOF_BACKEND_Z3: // if z3_available() == false: // return proof_skip(spec.label, "z3 backend unavailable") // return proof_check(spec.label, backend_subject) // return proof_skip(spec.label, "unsupported proof backend: " + spec.backend) // // pub fn proof_case_assess(spec: ProofCase, outcome: ProofOutcome) -> ProofAssessment: // let accepted = proof_case_accepts(spec, outcome) // var summary = "expected " + spec.expectation.label + ", got " + proof_status_name(outcome.status) // if outcome.detail != "": // summary = summary + " // " + outcome.detail // if outcome.model != "": // summary = summary + " // " + outcome.model // if outcome.model == "" and outcome.evidence != "": // summary = summary + " // " + outcome.evidence // if spec.description != "": // summary = spec.description + " // " + summary // return ProofAssessment { // case_spec: spec, // outcome: outcome, // accepted: accepted, // summary: summary // } // // pub fn proof_case_check_result(spec: ProofCase, backend_subject: Any, result: Any) -> ProofAssessment: // return proof_case_assess(spec, proof_case_outcome_from_result(spec, backend_subject, result)) // // pub fn proof_case_check(spec: ProofCase, backend_subject: Any) -> ProofAssessment: // return proof_case_assess(spec, proof_case_outcome(spec, backend_subject)) // // pub fn proof_assessment_ok(assessment: ProofAssessment) -> Bool: // return assessment.accepted // // pub fn proof_assessment_summary(assessment: ProofAssessment) -> String: // return assessment.summary // // pub fn proof_suite_summary(label: String, assessments: Array) -> ProofSuiteSummary: // var index: Int = 0 // var accepted: Int = 0 // var rejected: Int = 0 // var skipped: Int = 0 // var proved: Int = 0 // var witness: Int = 0 // var unknown: Int = 0 // while index < len(assessments): // let assessment = assessments[index] // if assessment.accepted: // accepted = accepted + 1 // if assessment.accepted == false: // rejected = rejected + 1 // if proof_outcome_is_skip(assessment.outcome): // skipped = skipped + 1 // if proof_outcome_is_proved(assessment.outcome): // proved = proved + 1 // if proof_outcome_is_witness(assessment.outcome): // witness = witness + 1 // if proof_outcome_is_unknown(assessment.outcome): // unknown = unknown + 1 // index = index + 1 // return ProofSuiteSummary { // label: label, // total: len(assessments), // accepted: accepted, // rejected: rejected, // skipped: skipped, // proved: proved, // witness: witness, // unknown: unknown // } // // pub fn proof_suite_ok(summary: ProofSuiteSummary) -> Bool: // return summary.rejected == 0 // // pub fn proof_suite_summary_text(summary: ProofSuiteSummary) -> String: // var text = "accepted " + to_string(summary.accepted) + "/" + to_string(summary.total) // text = text + ", rejected " + to_string(summary.rejected) // text = text + ", skipped " + to_string(summary.skipped) // text = text + ", proved " + to_string(summary.proved) // text = text + ", witness " + to_string(summary.witness) // text = text + ", unknown " + to_string(summary.unknown) // return text // // pub fn proof_check_result(label: String, solver: Any, result: Any) -> ProofOutcome: // let result_name = z3_result_name(result) // if z3_is_unsat(result): // return proof_proved(label, result_name) // if z3_is_sat(result): // return proof_witness(label, result_name, z3_repr(z3_solver_model(solver))) // return proof_unknown(label, "solver returned " + result_name, result_name) // // pub fn proof_check(label: String, solver: Any) -> ProofOutcome: // return proof_check_result(label, solver, z3_solver_check(solver)) // // pub fn proof_task(id: String) -> BuildTaskSpec: // return build_task_of_kind(id, BUILD_KIND_PROOF) // // pub fn proof_obligation(id: String) -> BuildTaskSpec: // return proof_task(id) // // pub fn z3_proof(id: String) -> BuildTaskSpec: // return proof_task(id) // // pub fn proof_smt2(id: String, entry: String) -> BuildTaskSpec: // return proof_obligation(id).entry(entry) //!end-kain-file //!kain-file // path = "python.kn" // kind = "text" // encoding = "utf8" // bytes = 18291 // sha256 = "sha256:50ef3eaa685bb928dd846f876471d256a6469b635d0e5783d5b7d4bbef252233" // trailing_newline = true //!kain-file-content // // Root Python surface for Kain. // // // // This is the generic low-level lane for embedded Python interop. // // // // Package access should come through first-class `import ...` in authored Kain. // // `use std::python` exists for explicit bridge calls, module checks, and // // controlled materialization between live Python objects and Kain-owned data. // // use std::gpu // use std::interop // use std::json // // @extern // fn py_call_async_args(target: Any, args: Any) -> Any // // @extern // fn py_call_async_attr(target: Any, attr: String, args: Any) -> Any // // @extern // fn py_awaitable_future(awaitable: Any) -> Any // // @extern // fn py_future_state(future: Any) -> Int // // @extern // fn py_future_done(future: Any) -> Bool // // @extern // fn py_future_await(future: Any) -> Any // // @extern // fn py_future_cancel(future: Any) -> Int // // @extern // fn py_future_close(future: Any) -> Int // // @extern // fn py_actor_callback_register(actor_id: Int, message_name: String) -> Any // // @extern // fn py_actor_callback_function(callback: Any) -> Any // // @extern // fn py_actor_callback_close(callback: Any) -> Int // // @extern // fn py_actor_callback_delivered_count(callback: Any) -> Int // // @extern // fn py_region_begin() -> Any // // @extern // fn py_region_end(region: Any) -> Int // // @extern // fn py_region_import(region: Any, name: String) -> Any // // @extern // fn py_region_getattr_raw(region: Any, target: Any, name: String) -> Any // // @extern // fn py_region_call_raw_args(region: Any, target: Any, args: Any) -> Any // // @extern // fn py_region_call_raw_attr(region: Any, target: Any, attr: String, args: Any) -> Any // // @extern // fn py_region_call_raw_f64_trunc_i64(region: Any, target: Any, arg: Float) -> Int // // @extern // fn py_region_call_attr_raw_f64_trunc_i64(region: Any, target: Any, attr: String, arg: Float) -> Int // // @extern // fn py_region_buffer_view(region: Any, target: Any) -> Any // // @extern // fn py_region_buffer_view_checksum37(region: Any, target: Any, iterations: Int, modulus: Int) -> Int // // @extern // fn py_region_import_cache_hits(region: Any) -> Int // // @extern // fn py_region_import_cache_misses(region: Any) -> Int // // @extern // fn py_region_attr_cache_hits(region: Any) -> Int // // @extern // fn py_region_attr_cache_misses(region: Any) -> Int // // @extern // fn py_region_views_opened(region: Any) -> Int // // @extern // fn py_region_views_released(region: Any) -> Int // // @extern // fn py_region_call_count(region: Any) -> Int // // @extern // fn py_region_generic_call_count(region: Any) -> Int // // @extern // fn py_region_fast_call_count(region: Any) -> Int // // @extern // fn py_buffer_view(target: Any) -> Any // // @extern // fn py_buffer_view_byte_length(view: Any) -> Int // // @extern // fn py_buffer_view_element_count(view: Any) -> Int // // @extern // fn py_buffer_view_element_size(view: Any) -> Int // // @extern // fn py_buffer_view_c_contiguous(view: Any) -> Int // // @extern // fn py_buffer_view_writable(view: Any) -> Int // // @extern // fn py_buffer_view_release(view: Any) // // pub fn python_bootstrap(): // py_exec("import importlib.util\n\ndef __kain_module_available(name):\n return importlib.util.find_spec(name) is not None\n") // // pub fn python_exec(code: String): // py_exec(code) // // pub fn python_eval(code: String) -> Any: // return py_eval(code) // // pub fn python_eval_raw(code: String) -> Any: // return py_eval_raw(code) // // pub fn python_import(name: String) -> Any: // return py_import(name) // // pub fn python_module_available(name: String) -> Bool: // python_bootstrap() // return py_call("__kain_module_available", [name]) // // pub fn python_require_module(name: String) -> Any: // assert(python_module_available(name), "python module missing: " + name) // return py_import(name) // // pub fn python_region_begin() -> Any: // return py_region_begin() // // pub fn python_region_end(region: Any) -> Int: // return py_region_end(region) // // pub fn python_region_import(region: Any, name: String) -> Any: // return py_region_import(region, name) // // pub fn python_region_getattr(region: Any, target: Any, name: String) -> Any: // return py_region_getattr_raw(region, target, name) // // pub fn python_region_getattr_raw(region: Any, target: Any, name: String) -> Any: // return py_region_getattr_raw(region, target, name) // // pub fn python_region_bind_attr(region: Any, target: Any, name: String) -> Any: // return py_region_getattr_raw(region, target, name) // // pub fn python_region_call_raw(region: Any, target: Any, args: Any) -> Any: // return py_region_call_raw_args(region, target, args) // // pub fn python_region_call_attr_raw(region: Any, target: Any, attr: String, args: Any) -> Any: // return py_region_call_raw_attr(region, target, attr, args) // // pub fn python_region_call_raw_f64_trunc_i64(region: Any, target: Any, arg: Float) -> Int: // return py_region_call_raw_f64_trunc_i64(region, target, arg) // // pub fn python_region_call_attr_raw_f64_trunc_i64(region: Any, target: Any, attr: String, arg: Float) -> Int: // return py_region_call_attr_raw_f64_trunc_i64(region, target, attr, arg) // // pub fn python_region_buffer_view(region: Any, target: Any) -> Any: // return py_region_buffer_view(region, target) // // pub fn python_region_buffer_view_checksum37(region: Any, target: Any, iterations: Int, modulus: Int) -> Int: // return py_region_buffer_view_checksum37(region, target, iterations, modulus) // // pub fn python_region_import_cache_hits(region: Any) -> Int: // return py_region_import_cache_hits(region) // // pub fn python_region_import_cache_misses(region: Any) -> Int: // return py_region_import_cache_misses(region) // // pub fn python_region_attr_cache_hits(region: Any) -> Int: // return py_region_attr_cache_hits(region) // // pub fn python_region_attr_cache_misses(region: Any) -> Int: // return py_region_attr_cache_misses(region) // // pub fn python_region_views_opened(region: Any) -> Int: // return py_region_views_opened(region) // // pub fn python_region_views_released(region: Any) -> Int: // return py_region_views_released(region) // // pub fn python_region_call_count(region: Any) -> Int: // return py_region_call_count(region) // // pub fn python_region_generic_call_count(region: Any) -> Int: // return py_region_generic_call_count(region) // // pub fn python_region_fast_call_count(region: Any) -> Int: // return py_region_fast_call_count(region) // // pub fn python_buffer_view(target: Any) -> Any: // return py_buffer_view(target) // // pub fn python_buffer_view_byte_length(view: Any) -> Int: // return py_buffer_view_byte_length(view) // // pub fn python_buffer_view_element_count(view: Any) -> Int: // return py_buffer_view_element_count(view) // // pub fn python_buffer_view_element_size(view: Any) -> Int: // return py_buffer_view_element_size(view) // // pub fn python_buffer_view_c_contiguous(view: Any) -> Int: // return py_buffer_view_c_contiguous(view) // // pub fn python_buffer_view_writable(view: Any) -> Int: // return py_buffer_view_writable(view) // // pub fn python_buffer_view_release(view: Any): // py_buffer_view_release(view) // // pub fn python_call(target: Any, args: Any) -> Any: // return py_call(target, args) // // pub fn python_call_kwargs(target: Any, args: Any, kwargs: Any) -> Any: // return py_call(target, args, kwargs) // // pub fn python_call_attr(target: Any, attr: String, args: Any) -> Any: // return py_call(target, attr, args) // // pub fn python_call_attr_kwargs(target: Any, attr: String, args: Any, kwargs: Any) -> Any: // return py_call(target, attr, args, kwargs) // // pub fn python_call_raw(target: Any, args: Any) -> Any: // return py_call_raw(target, args) // // pub fn python_call_attr_raw(target: Any, attr: String, args: Any) -> Any: // return py_call_raw(target, attr, args) // // pub fn python_getattr(target: Any, name: String) -> Any: // return py_getattr(target, name) // // pub fn python_getattr_raw(target: Any, name: String) -> Any: // return py_getattr_raw(target, name) // // pub fn python_setattr(target: Any, name: String, value: Any): // py_setattr(target, name, value) // // pub fn python_hasattr(target: Any, name: String) -> Bool: // return py_hasattr(target, name) // // pub fn python_call_async(target: Any, args: Any) -> Any: // return py_call_async_args(target, args) // // pub fn python_call_attr_async(target: Any, attr: String, args: Any) -> Any: // return py_call_async_attr(target, attr, args) // // pub fn python_future_from_awaitable(awaitable: Any) -> Any: // return py_awaitable_future(awaitable) // // pub fn python_future_state(future: Any) -> Int: // return py_future_state(future) // // pub fn python_future_done(future: Any) -> Bool: // return py_future_done(future) // // pub fn python_future_await(future: Any) -> Any: // return py_future_await(future) // // pub fn python_future_cancel(future: Any) -> Int: // return py_future_cancel(future) // // pub fn python_future_close(future: Any) -> Int: // return py_future_close(future) // // pub fn python_actor_callback(actor_id: Int, message_name: String) -> Any: // return py_actor_callback_register(actor_id, message_name) // // pub fn python_actor_callback_callable(callback: Any) -> Any: // return py_actor_callback_function(callback) // // pub fn python_actor_callback_close(callback: Any) -> Int: // return py_actor_callback_close(callback) // // pub fn python_actor_callback_delivered(callback: Any) -> Int: // return py_actor_callback_delivered_count(callback) // // pub fn python_shared_buffer(target: Any) -> Any: // return kain_shared_buffer_from_py(target) // // pub fn python_shared_image(target: Any) -> Any: // return kain_shared_image_from_py(target) // // pub fn python_image(target: Any) -> Any: // return kain_image_from_py(target) // // pub fn python_image_shared(target: Any) -> Any: // return kain_image_from_py_shared(target) // // pub fn python_image_owned(target: Any) -> Any: // return kain_image_from_py_owned(target) // // pub fn python_image_to(image: Any, backend: String) -> Any: // return kain_image_to_py(image, backend) // // pub fn python_tensor(target: Any) -> Any: // return kain_tensor_from_py(target) // // pub fn python_tensor_shared(target: Any) -> Any: // return kain_tensor_from_py_shared(target) // // pub fn python_tensor_owned(target: Any) -> Any: // return kain_tensor_from_py_owned(target) // // pub fn python_tensor_to(tensor: Any, backend: String) -> Any: // return kain_tensor_to_py(tensor, backend) // // fn python_tensor_interop_mime_type(device_kind: String, interop_lane: String) -> String: // if interop_lane == "cuda_array_interface": // return "application/x-cuda-array-interface" // if interop_lane == "dlpack" or interop_lane == "dlpack_device": // return "application/x-dlpack" // if device_kind != "" and device_kind != "cpu": // return "application/x-kain-python-device-tensor" // return "application/x-kain-python-tensor" // // fn python_tensor_interop_adoption_path(interop_lane: String) -> String: // if interop_lane != "": // return interop_lane // return "python_tensor_shared" // // fn python_tensor_attr_value(tensor: Any, name: String) -> Any: // return python_getattr_raw(tensor, name) // // fn python_tensor_attr_int(tensor: Any, name: String) -> Int: // return json_any_to_int(python_tensor_attr_value(tensor, name)) // // fn python_tensor_attr_bool(tensor: Any, name: String) -> Bool: // return python_tensor_attr_int(tensor, name) != 0 // // fn python_tensor_attr_string(tensor: Any, name: String) -> String: // return json_any_to_string(python_tensor_attr_value(tensor, name)) // // fn python_tensor_attr_optional_string(tensor: Any, name: String) -> String: // let value = python_tensor_attr_value(tensor, name) // if json_any_kind(value) == JSON_KIND_CODE_NULL: // return "" // return json_any_to_string(value) // // fn python_tensor_interop_labels(source_backend: Any, device_kind: String, interop_lane: String) -> Any: // let labels = json_object() // json_object_set(labels, "source_backend", source_backend) // json_object_set(labels, "device_kind", device_kind) // json_object_set(labels, "interop_lane", interop_lane) // return labels // // fn python_tensor_interop_info_from_tensor(tensor: Any) -> KainSharedBufferInfo: // let info = kain_tensor_info(tensor) // let shape = python_tensor_attr_value(info, "shape") // let strides = python_tensor_attr_value(info, "strides") // let element_type = python_tensor_attr_string(info, "element_type") // let element_size = python_tensor_attr_int(info, "element_size") // let dtype = python_tensor_attr_string(info, "dtype") // let source_runtime = python_tensor_attr_string(info, "source_runtime") // let source_backend = python_tensor_attr_value(info, "source_backend") // let ownership = python_tensor_attr_string(info, "ownership") // let byte_length = python_tensor_attr_int(info, "byte_length") // let element_count = python_tensor_attr_int(info, "element_count") // let device = python_tensor_attr_optional_string(info, "device") // let device_kind = python_tensor_attr_optional_string(info, "device_kind") // let device_ordinal = python_tensor_attr_int(info, "device_ordinal") // let device_pointer = python_tensor_attr_int(info, "device_pointer") // let device_type_code = python_tensor_attr_int(info, "device_type_code") // let host_accessible = python_tensor_attr_bool(info, "host_accessible") // let writable = python_tensor_attr_bool(info, "writable") // let contiguous = python_tensor_attr_bool(info, "is_contiguous") // let dlpack_capable = python_tensor_attr_bool(info, "dlpack_capable") // let cuda_array_interface_version = python_tensor_attr_int(info, "cuda_array_interface_version") // let interop_lane = python_tensor_attr_optional_string(info, "interop_lane") // return KainSharedBufferInfo { // contract: "kain.python.tensor.interop", // contract_version: 1, // element_type: element_type, // element_size: element_size, // shape: shape, // strides: strides, // format: dtype, // mime_type: python_tensor_interop_mime_type(device_kind, interop_lane), // source_runtime: source_runtime, // source_backend: source_backend, // ownership: ownership, // adoption_path: python_tensor_interop_adoption_path(interop_lane), // fallback_reason: "", // labels: python_tensor_interop_labels(source_backend, device_kind, interop_lane), // byte_length: byte_length, // element_count: element_count, // zero_copy: ownership == "shared", // device: device, // device_kind: device_kind, // device_ordinal: device_ordinal, // device_pointer: device_pointer, // device_type_code: device_type_code, // host_accessible: host_accessible, // writable: writable, // contiguous: contiguous, // dlpack_capable: dlpack_capable, // cuda_array_interface_version: cuda_array_interface_version, // interop_lane: interop_lane // } // // fn python_tensor_gpu_residency_flags(info: KainSharedBufferInfo) -> Int: // let flags = GPU_RESIDENCY_IMPORTED | GPU_RESIDENCY_ZERO_COPY // if info.host_accessible: // return flags | GPU_RESIDENCY_HOST_VISIBLE | GPU_RESIDENCY_HOST_COHERENT | GPU_RESIDENCY_SHARED // if info.device_kind == "cuda" or info.device_type_code == 2 or info.device_pointer > 0: // return flags | GPU_RESIDENCY_DEVICE_LOCAL // return flags // // fn python_tensor_gpu_queue_flags(info: KainSharedBufferInfo) -> Int: // let flags = GPU_QUEUE_COMPUTE | GPU_QUEUE_TRANSFER // if info.host_accessible: // return flags | GPU_QUEUE_HOST // return flags // // fn python_tensor_info_array_dim(value: Any, index: Int) -> Int: // if json_any_kind(value) != JSON_KIND_CODE_ARRAY: // return 0 // if index < 0 or index >= json_array_len(value): // return 0 // return json_any_to_int(json_array_get(value, index)) // // fn python_gpu_buffer_from_tensor_info(tensor: Any, info: KainSharedBufferInfo, policy: GpuResourcePolicy) -> GpuBuffer: // return GpuBuffer { // handle: tensor, // info: info, // byte_length: info.byte_length, // element_type: info.element_type, // element_size: info.element_size, // element_count: info.element_count, // policy: policy // } // // pub fn python_tensor_interop_info(target: Any) -> KainSharedBufferInfo: // let tensor = python_tensor_shared(target) // return python_tensor_interop_info_from_tensor(tensor) // // pub fn python_tensor_shape_dim(info: KainSharedBufferInfo, index: Int) -> Int: // return python_tensor_info_array_dim(info.shape, index) // // pub fn python_tensor_stride_dim(info: KainSharedBufferInfo, index: Int) -> Int: // return python_tensor_info_array_dim(info.strides, index) // // pub fn python_shared_buffer_gpu(target: Any, policy: GpuResourcePolicy) -> GpuBuffer: // return gpu_import_shared_buffer(python_shared_buffer(target), policy) // // pub fn python_gpu_buffer(target: Any, policy: GpuResourcePolicy) -> GpuBuffer: // let tensor = python_tensor_shared(target) // let info = python_tensor_interop_info_from_tensor(tensor) // return python_gpu_buffer_from_tensor_info(tensor, info, policy) // // pub fn python_gpu_storage_buffer(target: Any, debug_name: String) -> GpuBuffer: // let tensor = python_tensor_shared(target) // let info = python_tensor_interop_info_from_tensor(tensor) // let policy = gpu_resource_policy( // gpu_memory_policy( // python_tensor_gpu_residency_flags(info), // GPU_ACCESS_READ_WRITE, // python_tensor_gpu_queue_flags(info), // GPU_LAYOUT_TIGHT, // GPU_DESCRIPTOR_STORAGE_BUFFER // ), // GPU_BUFFER_USAGE_STORAGE | GPU_BUFFER_USAGE_TRANSFER_SRC | GPU_BUFFER_USAGE_TRANSFER_DST, // debug_name // ) // return python_gpu_buffer_from_tensor_info(tensor, info, policy) // // pub fn python_gpu_uniform_buffer(target: Any, debug_name: String) -> GpuBuffer: // let tensor = python_tensor_shared(target) // let info = python_tensor_interop_info_from_tensor(tensor) // let policy = gpu_resource_policy( // gpu_memory_policy( // python_tensor_gpu_residency_flags(info), // GPU_ACCESS_READ, // python_tensor_gpu_queue_flags(info), // GPU_LAYOUT_TIGHT, // GPU_DESCRIPTOR_UNIFORM_BUFFER // ), // GPU_BUFFER_USAGE_UNIFORM | GPU_BUFFER_USAGE_TRANSFER_DST, // debug_name // ) // return python_gpu_buffer_from_tensor_info(tensor, info, policy) // // pub fn python_geometry(target: Any) -> Any: // return kain_geometry_from_py(target) // // pub fn python_geometry_shared(target: Any) -> Any: // return kain_geometry_from_py_shared(target) // // pub fn python_geometry_owned(target: Any) -> Any: // return kain_geometry_from_py_owned(target) // // pub fn python_geometry_to(geometry: Any, backend: String) -> Any: // return kain_geometry_to_py(geometry, backend) //!end-kain-file //!kain-file // path = "random.kn" // kind = "text" // encoding = "utf8" // bytes = 10058 // sha256 = "sha256:08d9fd79e6b2ce292f9d581f5a4ec25feaffcaa2aad2d54f0eed91cc68f8488e" // trailing_newline = true //!kain-file-content // use std::math // // pub struct Xoshiro128: // s0: Int // s1: Int // s2: Int // s3: Int // // pub struct XoshiroNextResult: // rng: Xoshiro128 // value: Int // // pub struct IntResult: // rng: Xoshiro128 // value: Int // // pub struct FloatResult: // rng: Xoshiro128 // value: Float // // pub struct FloatNormResult: // rng: Xoshiro128 // value: Float // // pub fn rotl(x: Int, k: Int) -> Int: // let masked = x & 4294967295 // let left = (masked << k) & 4294967295 // let right = masked >> (32 - k) // return left | right // // fn xoshiro_scramble_scalar(s1: Int) -> Int: // let s1_masked = s1 & 4294967295 // # rotl(s1 * 5, 7) * 9 // let rotated = rotl((s1_masked * 5) & 4294967295, 7) // return (rotated * 9) & 4294967295 // // pub converge xoshiro_scramble(s1: Int) -> Int: // spec reference: // return xoshiro_scramble_scalar(s1) // fast llvm_lane when target("llvm"): // return xoshiro_scramble_scalar(s1) // fast avx2_lane when capability("cpu.x86.avx2"): // return xoshiro_scramble_scalar(s1) // verify random(8) // // pub fn xoshiro128_new(seed: Int) -> Xoshiro128: // # A simple SplitMix32-like generator to initialize state from a single seed // var s = seed & 4294967295 // if s == 0: // s = 123456789 // // # Generate 4 states // var state = s // // state = (state + 2654435769) & 4294967295 // var z = state // z = ((z ^ (z >> 16)) * 2246822519) & 4294967295 // z = ((z ^ (z >> 13)) * 3266489917) & 4294967295 // let s0 = z ^ (z >> 16) // // state = (state + 2654435769) & 4294967295 // z = state // z = ((z ^ (z >> 16)) * 2246822519) & 4294967295 // z = ((z ^ (z >> 13)) * 3266489917) & 4294967295 // let s1 = z ^ (z >> 16) // // state = (state + 2654435769) & 4294967295 // z = state // z = ((z ^ (z >> 16)) * 2246822519) & 4294967295 // z = ((z ^ (z >> 13)) * 3266489917) & 4294967295 // let s2 = z ^ (z >> 16) // // state = (state + 2654435769) & 4294967295 // z = state // z = ((z ^ (z >> 16)) * 2246822519) & 4294967295 // z = ((z ^ (z >> 13)) * 3266489917) & 4294967295 // let s3 = z ^ (z >> 16) // // return Xoshiro128 { s0: s0, s1: s1, s2: s2, s3: s3 } // // pub fn xoshiro128_next(rng: Xoshiro128) -> XoshiroNextResult: // let s0 = rng.s0 // let s1 = rng.s1 // let s2 = rng.s2 // let s3 = rng.s3 // // let result = xoshiro_scramble(s1) // // let t = (s1 << 9) & 4294967295 // // let new_s2 = s2 ^ s0 // let new_s3 = s3 ^ s1 // let new_s1 = s1 ^ s2 // let new_s0 = s0 ^ s3 // // let final_s2 = new_s2 ^ t // let final_s3 = rotl(new_s3, 11) // // let next_rng = Xoshiro128 { s0: new_s0, s1: new_s1, s2: final_s2, s3: final_s3 } // return XoshiroNextResult { rng: next_rng, value: result } // // pub fn random_int_in_range(rng: Xoshiro128, min: Int, max: Int) -> IntResult: // let range = max - min + 1 // if range <= 0: // return IntResult { rng: rng, value: min } // // # Unbiased Lemire's bounded integer algorithm // var current_rng = rng // var x = 0 // var m = 0 // var l = 0 // // let t = (4294967296 - range) % range // // var done = false // while done == false: // let next_res = xoshiro128_next(current_rng) // current_rng = next_res.rng // x = next_res.value // // m = x * range // l = m & 4294967295 // if l >= t: // done = true // // let value = min + (m >> 32) // return IntResult { rng: current_rng, value: value } // // pub fn random_float(rng: Xoshiro128) -> FloatResult: // let next_res = xoshiro128_next(rng) // let float_val = (next_res.value * 1.0) / 4294967296.0 // return FloatResult { rng: next_res.rng, value: float_val } // // pub fn math_ln(x: Float) -> Float: // if x <= 0.0: // return -999999.0 // // var val = x // var k = 0 // while val < 0.5: // val = val * 2.0 // k = k - 1 // while val > 1.0: // val = val * 0.5 // k = k + 1 // // let y = (val - 1.0) / (val + 1.0) // let y2 = y * y // var term = y // var sum = y // var denom = 3.0 // var i = 0 // while i < 7: // term = term * y2 // sum = sum + term / denom // denom = denom + 2.0 // i = i + 1 // // let ln_2 = 0.6931471805599453 // return 2.0 * sum + (k * 1.0) * ln_2 // // pub fn random_float_norm(rng: Xoshiro128) -> FloatNormResult: // # Box-Muller transform for normal distribution // let r1 = random_float(rng) // # Clamp u1 to (0, 1] to avoid log(0) // let u1 = 1.0 - r1.value // let r2 = random_float(r1.rng) // let u2 = r2.value // // let z0 = sqrt(-2.0 * math_ln(u1)) * cos(2.0 * pi() * u2) // return FloatNormResult { rng: r2.rng, value: z0 } // // # --- Shattered Parallel High-Throughput Entropy Buffer (Alien Metal Lane) --- // // pub struct ShatteredRngBuffer: // buffer: ptr // lanes: Int // // pub fn shattered_rng_buffer_new(seed: Int, lanes: Int) -> ShatteredRngBuffer: // var safe_lanes = lanes // if safe_lanes < 1: // safe_lanes = 1 // let total_words = safe_lanes * 4 // let buffer: ptr = alloc_zeroed(total_words, "Int") // // var s = seed & 4294967295 // if s == 0: // s = 123456789 // // var state = s // var i = 0 // while i < safe_lanes: // state = (state + 2654435769) & 4294967295 // var z = state // z = ((z ^ (z >> 16)) * 2246822519) & 4294967295 // z = ((z ^ (z >> 13)) * 3266489917) & 4294967295 // let s0 = z ^ (z >> 16) // // state = (state + 2654435769) & 4294967295 // z = state // z = ((z ^ (z >> 16)) * 2246822519) & 4294967295 // z = ((z ^ (z >> 13)) * 3266489917) & 4294967295 // let s1 = z ^ (z >> 16) // // state = (state + 2654435769) & 4294967295 // z = state // z = ((z ^ (z >> 16)) * 2246822519) & 4294967295 // z = ((z ^ (z >> 13)) * 3266489917) & 4294967295 // let s2 = z ^ (z >> 16) // // state = (state + 2654435769) & 4294967295 // z = state // z = ((z ^ (z >> 16)) * 2246822519) & 4294967295 // z = ((z ^ (z >> 13)) * 3266489917) & 4294967295 // let s3 = z ^ (z >> 16) // // let base = i * 4 // mem_store(ptr_offset(buffer, base + 0, "Int"), s0, "Int") // mem_store(ptr_offset(buffer, base + 1, "Int"), s1, "Int") // mem_store(ptr_offset(buffer, base + 2, "Int"), s2, "Int") // mem_store(ptr_offset(buffer, base + 3, "Int"), s3, "Int") // i = i + 1 // // return ShatteredRngBuffer { buffer: buffer, lanes: safe_lanes } // // pub fn shattered_rng_buffer_destroy(rng: ShatteredRngBuffer) -> Int: // decay rng.buffer // return 0 // // pub fn shattered_rng_buffer_update(buf: ptr, output: ptr, lanes: Int) -> Int with Unsafe: // var i = 0 // while i < lanes: // let base = i * 4 // let s0 = mem_load(ptr_offset(buf, base + 0, "Int"), "Int") // let s1 = mem_load(ptr_offset(buf, base + 1, "Int"), "Int") // let s2 = mem_load(ptr_offset(buf, base + 2, "Int"), "Int") // let s3 = mem_load(ptr_offset(buf, base + 3, "Int"), "Int") // // let result = xoshiro_scramble(s1) // let t = (s1 << 9) & 4294967295 // // let new_s2 = s2 ^ s0 // let new_s3 = s3 ^ s1 // let new_s1 = s1 ^ s2 // let new_s0 = s0 ^ s3 // // let final_s2 = new_s2 ^ t // let final_s3 = rotl(new_s3, 11) // // mem_store(ptr_offset(buf, base + 0, "Int"), new_s0, "Int") // mem_store(ptr_offset(buf, base + 1, "Int"), new_s1, "Int") // mem_store(ptr_offset(buf, base + 2, "Int"), final_s2, "Int") // mem_store(ptr_offset(buf, base + 3, "Int"), final_s3, "Int") // // mem_store(ptr_offset(output, i, "Int"), result, "Int") // i = i + 1 // return lanes // // pub fn shattered_rng_buffer_next_block(rng: ShatteredRngBuffer, output: ptr) -> Int with Unsafe: // return shattered_rng_buffer_update(rng.buffer, output, rng.lanes) // // # --- Global / Ambient PRNG Authority Worlds and Patches --- // // component RandomDummyPanel(): // render // // world AmbientRandomWorld: // state seed0: Int = 12345 // state seed1: Int = 67890 // state seed2: Int = 11121 // state seed3: Int = 31415 // surface web => RandomDummyPanel // // world AmbientRandomMirrorWorld: // state seed0_copy: Int = 12345 // state seed1_copy: Int = 67890 // state seed2_copy: Int = 11121 // state seed3_copy: Int = 31415 // surface web => RandomDummyPanel // // entangle AmbientRandomWorld.seed0 <-> AmbientRandomMirrorWorld.seed0_copy with single_writer // entangle AmbientRandomWorld.seed1 <-> AmbientRandomMirrorWorld.seed1_copy with single_writer // entangle AmbientRandomWorld.seed2 <-> AmbientRandomMirrorWorld.seed2_copy with single_writer // entangle AmbientRandomWorld.seed3 <-> AmbientRandomMirrorWorld.seed3_copy with single_writer // // pub patch patch_random_next(world_ref: AmbientRandomWorld) -> Int: // let s0 = world_ref.seed0 // let s1 = world_ref.seed1 // let s2 = world_ref.seed2 // let s3 = world_ref.seed3 // // # Scramble step // let result = (rotl((s1 * 5) & 4294967295, 7) * 9) & 4294967295 // // let t = (s1 << 9) & 4294967295 // // let new_s2 = s2 ^ s0 // let new_s3 = s3 ^ s1 // let new_s1 = s1 ^ s2 // let new_s0 = s0 ^ s3 // // let final_s2 = new_s2 ^ t // let final_s3 = rotl(new_s3, 11) // // world_ref.seed0 = new_s0 // world_ref.seed1 = new_s1 // world_ref.seed2 = final_s2 // world_ref.seed3 = final_s3 // return result // // pub fn random_ambient_next() -> Int: // return patch_random_next(AmbientRandomWorld) // // pub fn random_ambient_float() -> Float: // let next_val = random_ambient_next() // return (next_val * 1.0) / 4294967296.0 // // pub fn random_ambient_int_in_range(min: Int, max: Int) -> Int: // let range = max - min + 1 // if range <= 0: // return min // // let t = (4294967296 - range) % range // // var done = false // var x = 0 // var m = 0 // var l = 0 // // while done == false: // x = random_ambient_next() // m = x * range // l = m & 4294967295 // if l >= t: // done = true // // return min + (m >> 32) //!end-kain-file //!kain-file // path = "reflect.kn" // kind = "text" // encoding = "utf8" // bytes = 2725 // sha256 = "sha256:a94ca10bb3b24d9df85318955e111e7ec10f17996745b7f26767dd6ef64c0005" // trailing_newline = true //!kain-file-content // use std::runtime // // pub enum TypeKind: // Int // Float // Bool // String // Struct // Enum // Actor // World // Ptr // Unknown // // pub struct TypeDescriptor: // kind: TypeKind // name: String // size_bytes: Int // field_count: Int // // fn reflect_is_digit_code(code: Int) -> Bool: // return code >= 48 and code <= 57 // // fn reflect_text_is_int_literal(text: String) -> Bool: // let text_len = len(text) // if text_len <= 0: // return false // // var index = 0 // let first = ord(char_at(text, 0)) // if first == 45 or first == 43: // index = 1 // if text_len == 1: // return false // // while index < text_len: // if reflect_is_digit_code(ord(char_at(text, index))) == false: // return false // index = index + 1 // // return true // // fn reflect_text_is_float_literal(text: String) -> Bool: // let text_len = len(text) // if text_len <= 0: // return false // // var index = 0 // var dot_count = 0 // var digit_count = 0 // let first = ord(char_at(text, 0)) // if first == 45 or first == 43: // index = 1 // if text_len == 1: // return false // // while index < text_len: // let code = ord(char_at(text, index)) // if code == 46: // dot_count = dot_count + 1 // if dot_count > 1: // return false // elif reflect_is_digit_code(code): // digit_count = digit_count + 1 // else: // return false // index = index + 1 // // return dot_count == 1 and digit_count > 0 // // pub fn reflect_type_kind(val: Any) -> TypeKind: // # Compile-time or runtime type-tag extraction helper // let typ_name = to_string(val) // if typ_name == "Int": // return TypeKind::Int // elif typ_name == "Float": // return TypeKind::Float // elif typ_name == "Bool": // return TypeKind::Bool // elif typ_name == "String": // return TypeKind::String // elif typ_name == "ptr": // return TypeKind::Ptr // elif typ_name == "true" or typ_name == "false": // return TypeKind::Bool // elif reflect_text_is_int_literal(typ_name): // return TypeKind::Int // elif reflect_text_is_float_literal(typ_name): // return TypeKind::Float // return TypeKind::Struct // // pub fn reflect_type_name(val: Any) -> String: // return to_string(val) // // pub fn reflect_descriptor(val: Any) -> TypeDescriptor: // let k = reflect_type_kind(val) // let n = reflect_type_name(val) // // var size = 8 // if k == TypeKind::Bool: // size = 1 // elif k == TypeKind::Int or k == TypeKind::Float or k == TypeKind::Ptr: // size = 8 // // return TypeDescriptor { // kind: k, // name: n, // size_bytes: size, // field_count: 0 // } //!end-kain-file //!kain-file // path = "reload.kn" // kind = "text" // encoding = "utf8" // bytes = 6692 // sha256 = "sha256:dbcad5688e6b550e143cdc5fe474897ef51d502166ae640218fe4bee76c41293" // trailing_newline = true //!kain-file-content // use std::actor // use std::intent // use std::runtime // use std::ui // // pub struct ReloadGeneration: // session_id: Int // generation: Int // revision_key: String // // pub struct ReloadSnapshotRecord: // session_id: Int // generation: Int // revision_key: String // patch_journal_count: Int // entangle_binding_count: Int // actor_queue_depth: Int // runtime_pulse_total: Int // runtime_teleport_total: Int // // pub struct ReloadMigrationPlan: // session_id: Int // generation: Int // revision_key: String // lane: String // state_migration: String // actor_quiesce: String // gpu_swap_boundary: String // restart_mode: String // patch_journal_count: Int // entangle_binding_count: Int // actor_queue_depth: Int // orchestrate_stage_count: Int // runtime_pulse_total: Int // // pub fn native_reload_begin(session_id: Int, revision_key: String) -> Int: // return native_ui_hot_reload_begin(session_id, revision_key) // // pub fn native_reload_commit(session_id: Int) -> Int: // return native_ui_hot_reload_commit(session_id) // // pub fn native_reload_generation(session_id: Int) -> Int: // return native_ui_hot_reload_generation(session_id) // // pub fn native_reload_key(session_id: Int) -> String: // return native_ui_hot_reload_key(session_id) // // pub fn native_reload_snapshot(session_id: Int) -> ReloadGeneration: // return ReloadGeneration { // session_id: session_id, // generation: native_reload_generation(session_id), // revision_key: native_reload_key(session_id), // } // // pub fn native_reload_package_surface() -> String: // return "std::reload" // // pub fn native_reload_default_state_migration() -> String: // return "auto-structural" // // pub fn native_reload_default_actor_quiesce() -> String: // return "turn-boundary" // // pub fn native_reload_gpu_swap_boundary() -> String: // return "frame-boundary" // // pub fn native_reload_default_restart_mode() -> String: // return "restart-with-snapshot-restore" // // pub fn native_reload_lane_noop() -> String: // return "noop" // // pub fn native_reload_lane_presentation() -> String: // return "presentation-only" // // pub fn native_reload_lane_structural() -> String: // return "structural-migrate" // // pub fn native_reload_lane_actor() -> String: // return "quiesce-and-migrate" // // pub fn native_reload_lane_gpu() -> String: // return "frame-boundary-gpu-swap" // // pub fn native_reload_snapshot_record(session_id: Int) -> ReloadSnapshotRecord: // let snapshot = native_reload_snapshot(session_id) // return ReloadSnapshotRecord { // session_id: snapshot.session_id, // generation: snapshot.generation, // revision_key: snapshot.revision_key, // patch_journal_count: patch_journal_count(), // entangle_binding_count: entangle_registered_count(), // actor_queue_depth: actor_scheduler_queue_depth(), // runtime_pulse_total: runtime_machine_pulse_total_fire_count(), // runtime_teleport_total: runtime_machine_teleport_count(), // } // // fn native_reload_plan_for_lane(session_id: Int, lane: String) -> ReloadMigrationPlan: // let snapshot = native_reload_snapshot_record(session_id) // return ReloadMigrationPlan { // session_id: snapshot.session_id, // generation: snapshot.generation, // revision_key: snapshot.revision_key, // lane: lane, // state_migration: native_reload_default_state_migration(), // actor_quiesce: native_reload_default_actor_quiesce(), // gpu_swap_boundary: native_reload_gpu_swap_boundary(), // restart_mode: native_reload_default_restart_mode(), // patch_journal_count: snapshot.patch_journal_count, // entangle_binding_count: snapshot.entangle_binding_count, // actor_queue_depth: snapshot.actor_queue_depth, // orchestrate_stage_count: orchestrate_stage_count(), // runtime_pulse_total: snapshot.runtime_pulse_total, // } // // pub fn native_reload_default_migration_plan(session_id: Int) -> ReloadMigrationPlan: // return native_reload_plan_for_lane(session_id, native_reload_lane_presentation()) // // pub fn native_reload_structural_migration_plan(session_id: Int) -> ReloadMigrationPlan: // return native_reload_plan_for_lane(session_id, native_reload_lane_structural()) // // pub fn native_reload_actor_migration_plan(session_id: Int) -> ReloadMigrationPlan: // return native_reload_plan_for_lane(session_id, native_reload_lane_actor()) // // pub fn native_reload_gpu_migration_plan(session_id: Int) -> ReloadMigrationPlan: // return native_reload_plan_for_lane(session_id, native_reload_lane_gpu()) // // # root-domain aliases: generated public std names // pub fn reload_begin(session_id: Int, revision_key: String) -> Int: // return native_reload_begin(session_id, revision_key) // // pub fn reload_commit(session_id: Int) -> Int: // return native_reload_commit(session_id) // // pub fn reload_generation(session_id: Int) -> Int: // return native_reload_generation(session_id) // // pub fn reload_key(session_id: Int) -> String: // return native_reload_key(session_id) // // pub fn reload_snapshot(session_id: Int) -> ReloadGeneration: // return native_reload_snapshot(session_id) // // pub fn reload_snapshot_record(session_id: Int) -> ReloadSnapshotRecord: // return native_reload_snapshot_record(session_id) // // pub fn reload_package_surface() -> String: // return native_reload_package_surface() // // pub fn reload_default_state_migration() -> String: // return native_reload_default_state_migration() // // pub fn reload_default_actor_quiesce() -> String: // return native_reload_default_actor_quiesce() // // pub fn reload_gpu_swap_boundary() -> String: // return native_reload_gpu_swap_boundary() // // pub fn reload_default_restart_mode() -> String: // return native_reload_default_restart_mode() // // pub fn reload_lane_noop() -> String: // return native_reload_lane_noop() // // pub fn reload_lane_presentation() -> String: // return native_reload_lane_presentation() // // pub fn reload_lane_structural() -> String: // return native_reload_lane_structural() // // pub fn reload_lane_actor() -> String: // return native_reload_lane_actor() // // pub fn reload_lane_gpu() -> String: // return native_reload_lane_gpu() // // pub fn reload_default_migration_plan(session_id: Int) -> ReloadMigrationPlan: // return native_reload_default_migration_plan(session_id) // // pub fn reload_structural_migration_plan(session_id: Int) -> ReloadMigrationPlan: // return native_reload_structural_migration_plan(session_id) // // pub fn reload_actor_migration_plan(session_id: Int) -> ReloadMigrationPlan: // return native_reload_actor_migration_plan(session_id) // // pub fn reload_gpu_migration_plan(session_id: Int) -> ReloadMigrationPlan: // return native_reload_gpu_migration_plan(session_id) // # end root-domain aliases //!end-kain-file //!kain-file // path = "requirements.md" // kind = "text" // encoding = "utf8" // bytes = 23706 // sha256 = "sha256:57b7beb445514c1befdc71a1deaa14500730c5b01326e398ccaa3154eecb9bee" // trailing_newline = true //!kain-file-content // # Kain Root Stdlib Requirements // // This file is the authoritative backlog and delivery contract for finishing the root `std::*` surface. // // It exists so future work does not collapse into vague parity anxiety, donor-language cargo culting, or random one-off helpers that never become a coherent standard library. If a capability matters for authored Kain at the root `std::*` level, it should be tracked here until it is honestly finished. // // This backlog is derived from: // // - the live root atlas in `stdlib/STDLIB_MAP.llm.md` // - the current top-level `stdlib/*.kn` surface // - the local donor baseline in `reference/langs/zig/lib/std` // - secondary systems-language expectations from Rust, Go, and OTP-style runtime ergonomics, translated into Kain-shaped public surfaces instead of donor-file cosplay // // Current reality: // // - Kain root stdlib atlas currently reports `61` modules, `2681` public symbols, and `3383` total symbols. // - The root profile is still much thinner than Zig's local `lib/std` capability envelope. // - Kain is already unusually strong in `std::math`, `std::gpu`, `std::graphics`, `std::ui`, `std::build`, `std::bench`, `std::attrition`, `std::certify`, `std::actor`, and semantic/runtime-facing surfaces such as `std::intent` and `std::runtime`. // - Kain is still obviously missing a large amount of boring-but-necessary authoring, systems, container, path, stream, encoding, archive, and binary-introspection depth. // // This document tracks capability parity, not donor file-count parity. We do not need a one-file clone of Zig. We do need a root stdlib that does not feel visibly unfinished. // // ## Scope // // - This document governs the root native profile only: top-level `stdlib/*.kn`. // - Overlay trees, blade-local helpers, and ad hoc package shims do not satisfy missing root requirements by themselves. // - If a capability belongs in authored Kain everywhere, it needs a root `std::*` story here. // - If a missing capability is blocked by compiler, typechecker, lowering, or runtime truth, fix the owning subsystem instead of encoding a permanent workaround in demos. // // ## Status Legend // // - `TODO` = missing or not started // - `PARTIAL` = some surface exists, but it is too thin, too stringly typed, too `Any`-shaped, too donor-incomplete, or not proven enough for v1 // - `BLOCKED` = work is understood but cannot complete until an owning compiler/runtime dependency lands // - `DONE` = public surface, implementation, smoketest integration, and required evidence are all complete // - `WAIVED` = only allowed with an explicit reason, date, and replacement plan; do not use this casually // // ## Operating Rules // // 1. Treat this file as the live root-stdlib source of truth. // 1. Do not silently delete incomplete rows. If scope changes, split or rename the row and keep the history legible. // 1. When you finish a requirement, update its `Status` to `DONE` in this file during the same change. // 1. If you partially finish something, leave it `PARTIAL` and tighten the requirement text so the remaining gap is obvious. // 1. If a row is blocked on compiler/runtime work, mark it `BLOCKED` and name the owning surface in the row notes or commit message. // 1. Do not count overlay-only, blade-only, or ad hoc helper code as stdlib completion. // 1. Do not hand-edit `stdlib/STDLIB_MAP.llm.md` or `stdlib/stdlib.map.json`. // 1. Prefer typed structs, enums, views, iterators, and builders over text blobs and `Any` handles when a capability is meant to be a reusable public API. // 1. Prefer Kain-shaped semantic leverage over donor mimicry. If Zig has three modules and Kain can honestly subsume them into one stronger surface, do that, but update this backlog accordingly. // 1. Keep the public root import obvious. If a capability becomes large enough to deserve its own root module, do not bury it forever inside an unrelated module. // 1. Ensure before writing you are well versed in Kain and read the $lang-skills including $lang-semantics, $lang-systems, $lang-stdlib, and other applicable skills ($lang-gpu, $lang-projects, and $lang-interop etc) // // ## Definition Of Done // // A stdlib requirement is not complete until all applicable items below are true: // // 1. The public root `std::*` API exists in `stdlib/*.kn`. // 1. Any required compiler, portable-crate, or `runtime/native` backing work exists and is wired end-to-end. // 1. The generated atlas is refreshed: // - `cargo run -q -p kain-stdlib-map --bin kain_stdlib_map_tool -- --write` // - `cargo run -q -p kain-stdlib-map --bin kain_stdlib_map_tool -- --check` // 1. The new surface is meshed into `smoketest/`: // - add or extend `smoketest/src/stdlib/*_lane.kn` // - import and call the lane from `smoketest/src/main.kn` // - add any new files to `smoketest/build.kn` // - bump `total_tracks` in `smoketest/src/main.kn` if a new track is added // - when practical, make at least one non-stdlib track or blade consume the new surface so it is not an isolated vanity test // 1. If the capability is runtime-backed, add or extend the relevant conformance lane under `runtime/conformance/`. // 1. If the capability is performance-sensitive, branchless, allocator-heavy, or claims to beat conventional designs, add or extend a benchmark lane under `benchmark/`. // 1. If the capability owns resources, sessions, handles, or teardown-sensitive state, add or extend an attrition lane under `attrition/`. // 1. If the capability relies on unsafe math, pointer/index arithmetic, packed bit layouts, or branchless invariants, add or extend a Z3 proof case and leave a code comment pointing at the proof path. // 1. Update `MEMORY.md` when the change materially alters how future agents should understand stdlib completion, caveats, or evidence. // // ## Delivery Rules For New Families // // - Use dedicated root modules when a family is broad and obvious to authors, for example `std::json`, `std::fmt`, `std::io`, or `std::random`. // - Expanding an existing module is fine when the capability is naturally local, for example `std::fs` gaining typed metadata or `std::process` gaining richer status objects. // - Do not keep growing stringly-typed shims forever. `fs_metadata_text`, semantic string counters, and similar transitional shapes should graduate to typed public records. // - Do not hide major missing families behind internal helpers or blade-local code. If the family matters generally, promote it. // - A donor capability is considered covered only if authored Kain can use it through a sane public surface, not merely because some Rust crate or runtime helper exists somewhere in the repo. // // ## Validation Surfaces // // Prefer extending existing proof surfaces when possible: // // - `blades/stdlib-foundations` // - `blades/stdlib-domains` // - `blades/network-domains` // - `blades/hash-domains` // - `blades/math-domains` // - `smoketest/` // - `runtime/conformance/native_stdlib_bridge` // - `runtime/conformance/net_runtime` // - `runtime/conformance/process_runtime` // - `runtime/conformance/input_runtime` // - `runtime/conformance/ui_runtime` // - `runtime/conformance/graphics_runtime` // - `runtime/conformance/platform_parity` // // If none of the above is the right owner, add the smallest honest new blade, conformance lane, benchmark case, attrition case, or proof pack necessary. // // ## Priority Model // // - `P0` = v1 root-stdlib completeness blockers; these should not be casually deferred // - `P1` = important systems-completeness work that should follow immediately after `P0` if not landed inside the same arc // - `P2` = deeper parity and advanced tooling families that still belong here, but can land after the root v1 floor is real // - `KX` = Kain-only leverage; these are not donor parity chores, they are the semantic surfaces we should be better at than everyone else // // ## Current Strong Surfaces // // These are not "finished forever," but they are not the obvious parity holes right now: // // - `std::math` // - `std::gpu` // - `std::graphics` // - `std::graphics::shared` // - `std::ui` // - `std::build` // - `std::bench` // - `std::attrition` // - `std::certify` // // Do not churn these just to imitate Zig structure. Expand them only when a concrete missing capability demands it. // // ## P0 - Root Authoring And Systems Foundations // // Every row below is a v1-facing gap compared to a serious systems language stdlib. // // | Status | Priority | Surface | Requirement | // | --- | --- | --- | --- | // | `DONE` | `P0` | `std::text` plus new `std::bytes` | The authoring floor now covers zero-copy text views, zero-copy byte views, explicit text-byte conversion, basic escape/unescape, byte builders, text-builder interop, and owned byte/text materialization instead of forcing every caller into ad hoc string-as-bytes glue. | // | `DONE` | `P0` | new `std::ascii` or `std::text` subfamily | Expose ASCII classification, case fold, digit/hex helpers, whitespace checks, and predictable byte-level transforms instead of forcing every caller to re-encode them manually. | // | `DONE` | `P0` | new `std::unicode` | Add UTF-8 validation, codepoint iteration, encoding/decoding helpers, normalization hooks, case mapping where practical, and explicit invalid-sequence behavior. | // | `DONE` | `P0` | new `std::base64` plus binary encodings | Base64, URL-safe base64, base16/hex encode-decode, and related helpers now exist as a root family instead of being scattered across unrelated domains. | // | `DONE` | `P0` | new `std::fmt` | Root formatting now ships spec-driven string, number, and bool rendering plus `FmtWriter` and `std::io::StringBuilder` integration for buffered accumulation and stream-backed authoring sinks instead of staying a string-only helper shelf. | // | `DONE` | `P0` | new `std::json` | Root JSON now ships typed field and array result structs, structured scan/status reporting, richer object/array encode helpers, writer/builder integration, and a repaired LLVM/native bridge that preserves string, float, bool, object, and array value lanes through JSON-aware `Any` lowering and owned-return transfer fixes verified by focused runtime lanes and Z3 proofs. | // | `DONE` | `P0` | new `std::uri` | Add URI/URL parsing, normalization, authority/path/query helpers, percent encoding/decoding, and typed integration with HTTP/TLS surfaces. | // | `DONE` | `P0` | new `std::semver` | Add semantic version parse/format/compare and version-range matching so package/build/runtime metadata is not forced into raw strings. | // | `DONE` | `P0` | `std::collections` generic container floor | Done with `IntQueue`/`Deque`/`PriorityQueue`, `SlotMap`, and zero-allocation `IntrusiveHashMap` (`uthash` evolution), now complete with standard `ArrayList` and `HashMap` structures. | // | `DONE` | `P0` | `std::collections` algorithms and data-structure depth | Add generic `SlotMap`, bitset/bitmap, static string map or trie-like lookup, sort/search/select/dedup helpers, and data-oriented container shapes such as multi-array or SoA storage where justified. | // | `DONE` | `P0` | `std::alloc` | Keep bump/arena/pool, but add allocator traits/interfaces, growable buffer support, allocation result structs, span helpers, and integration points the generic containers can actually use. | // | `DONE` | `P0` | `std::fs` plus likely new `std::path` | Expand from `join` plus text/hex wrappers into a full path toolkit: parent, file name, stem, extension, normalize, canonicalize, relative path, absolute path, split, and platform-safe separators. | // | `DONE` | `P0` | `std::fs` typed metadata and directory surfaces | Replace text-shaped metadata and path listings with typed metadata, typed directory entries, structured error/status, richer temp/workspace helpers, and honest file/dir kind reporting. | // | `DONE` | `P0` | `std::fs` file handles | Add open/read/write/append/seek/flush/close file handles and explicit binary/text read models. Root stdlib should not stay permanently path-only. | // | `DONE` | `P0` | new `std::io` | Add reader/writer/seek/stream abstractions, buffered I/O, in-memory streams, adapters between file/process/net/http bodies, and a sane common I/O vocabulary. | // | `DONE` | `P0` | `std::time` | Grow beyond millis/sleep/deadline. Add `Duration`, monotonic `Instant`, wall-clock time, conversion helpers, deadlines/timeouts, interval helpers, and timing primitives that benchmarks and async code can share. | // | `DONE` | `P0` | new `std::random` | Add deterministic and nondeterministic RNG families, seeded generators, split/fork helpers, fast non-crypto RNG for benchmarks/simulations, and public binary output APIs. | // | `DONE` | `P0` | new `std::atomic` | Add public atomics, ordering vocabulary, typed atomic cells, compare/exchange, fetch ops, and memory-order helpers so low-level authored Kain stops reinventing them piecemeal. | // | `DONE` | `P0` | new `std::sync` | Root sync now ships a real Kain-native floor with an intrusive MCS mutex, padded SPSC teleport channel, `Once`, and `WaitGroup`, meshed through smoketest plus benchmark/attrition evidence and backed by Z3 index/counter proofs. | // | `DONE` | `P0` | new `std::thread` | Add spawn/join, names, affinity, ids, and thread-local or per-thread helpers where appropriate. Today we only have tiny machine-thread fragments. | // | `DONE` | `P0` | `std::diagnostics` plus likely new `std::debug` or `std::log` | Expand from status helpers into structured error values, trace/log helpers, human and machine renderers, progress emitters, and debug-facing utilities that do not require everyone to wire bespoke logging. | // // ## P1 - Systems, Network, Crypto, Process, And Platform Depth // // These are the next obvious completeness gaps once the authoring floor is honest. // // | Status | Priority | Surface | Requirement | // | --- | --- | --- | --- | // | `PARTIAL` | `P1` | new `std::os` or expansions across `std::platform` and `std::process` | Add env reads/writes, cwd, user/temp/home/config/cache dirs, host/process identity, page-size and memory facts, signal/terminal basics, and platform feature reporting. | // | `TODO` | `P1` | new `std::posix` | Expose POSIX-specific handles/constants/helpers cleanly when authored Kain genuinely needs them, without poisoning the generic root APIs. | // | `PARTIAL` | `P1` | `std::platform` | Expand beyond dynamic library open/resolve/close into richer platform capability discovery, library metadata, and OS integration helpers. | // | `DONE` | `P1` | new `std::target` or `std::meta` target lane | Add public target triples, ABI and calling-convention vocab, arch/os/env/object-format descriptors, and CPU feature tables where authored tools need them. | // | `PARTIAL` | `P1` | `std::process` | Replace pure id/status/string handling with typed process specs, typed exit status, pipelines, env snapshots, current-process helpers, stream-backed stdin/stdout/stderr, and tighter `std::io` integration. | // | `PARTIAL` | `P1` | `std::net` | Add address types, UDP, DNS resolution, non-blocking/timeouts, Unix-domain sockets where supported, listener/connection option structs, and typed errors instead of raw ids everywhere. | // | `PARTIAL` | `P1` | `std::http` | Add typed methods, status codes, headers, body streaming, chunked transfer, client/server config structs, and better integration with `std::uri`, `std::io`, and `std::tls`. | // | `PARTIAL` | `P1` | `std::tls` | Add configuration structs, certificate loading/inspection, verification policy, handshake state, session info, and better error surfacing. | // | `PARTIAL` | `P1` | `std::http2` | Grow past basic request helpers into streams, headers, state, and protocol-level controls or else explicitly narrow its scope. | // | `PARTIAL` | `P1` | `std::crypto` | Expand beyond SHA-256, HMAC-SHA256, BLAKE3, and random hex into bytes-based APIs, streaming digests, KDF/HKDF/PBKDF2/Argon2-class primitives, AEAD, signatures, key exchange, and certificate helpers where appropriate. | // | `PARTIAL` | `P1` | `std::hash` | Add 64-bit and larger families, streaming hash builders, stable typed fingerprint helpers, and better integration with generic collections and routing use cases. | // | `PARTIAL` | `P1` | `std::memory` and `std::machine` | Add typed slices/spans, cache-line and page helpers, memory-mapped regions where justified, and a cleaner public low-level systems vocabulary than scattered raw pointer math alone. | // | `DONE` | `P1` | new `std::reflect` or `std::meta` | Expose public reflection/introspection helpers where authored Kain packages, serializers, UI systems, and debug tools need them. Kain has reflection ownership deeper in the repo; the root stdlib surface is still thin here. | // // ## KX - Kain-Native Semantic Leverage // // This is where Kain should stop merely catching up and start having surfaces other languages do not. // // | Status | Priority | Surface | Requirement | // | --- | --- | --- | --- | // | `PARTIAL` | `KX` | `std::intent` | Replace string-and-counter-only semantic inspection with typed `EntangleBinding`, patch journal records, converge lane records, law verdicts, and orchestration stage records. Add query surfaces that make semantic tooling composable. | // | `PARTIAL` | `KX` | `std::actor` | Expand supervision, tracing, mailbox policy, ask/reply telemetry, restart history, and typed helper records so actor-heavy authored Kain has a richer public runtime vocabulary. | // | `PARTIAL` | `KX` | `std::gen_server` | Graduate from the tiny alias layer into real link/monitor/timeouts/deferred replies/continuations/state helpers if we want OTP-like ergonomics to be a first-class Kain story. | // | `PARTIAL` | `KX` | `std::runtime` | Add typed capability descriptors, telemetry records, converge cache and lane metadata, machine facts, and runtime report structs instead of only scalar counters. | // | `PARTIAL` | `KX` | `std::reload` | Add typed world/actor/resource migration structs, snapshot schemas, compatibility helpers, and reload evidence helpers so hot reload is not just string constants and session ids. | // | `TODO` | `KX` | semantic serialization surface | Add a deterministic root-stdlib story for serializing world state, actor messages, patch journals, entangle graphs, and reload snapshots. This can be a new module or a coordinated family across `std::intent`, `std::actor`, and `std::json`. | // | `TODO` | `KX` | message/channel/mailbox helpers | Decide whether parts of non-actor coordination belong in `std::sync`, `std::actor`, or a new message/mailbox module, then give Kain an honest public surface for them. | // | `PARTIAL` | `KX` | `std::gpu`, `std::graphics`, `std::graphics::shared`, `std::ui` | Keep the strong rendering/resource surface, but add more typed bridges between semantic state, resource graphs, UI data, and runtime ownership rules where that lowers repeated boilerplate. | // | `PARTIAL` | `KX` | new `std::z3` | Add an optional host-solver lane over Python `z3-solver` so authored Kain can build SMT constraints, inspect models, and pressure proof/test workflows without pretending the runtime bundles Z3. Keep the surface Kain-shaped, gateable, and honest about the external Python dependency. | // | `PARTIAL` | `KX` | `std::test` and `std::proof` | Expand from task constructors and basic outcomes into richer authored assertions, property-style helpers, structured witness/proof result records, and solver-friendly harness helpers. Declarative `ProofCase` / `ProofAssessment` / suite-summary records now exist, and `std::test` can assert named proof cases over the optional `std::z3` backend, but the broader proof DSL, property generators, and durable harness/report story are still incomplete. | // | `DONE` | `KX` | new `std::mcp` | Native MCP (Model Context Protocol) server construction for the 2025-03-26 spec now exists in `stdlib/mcp.kn`: JSON-RPC 2.0 framing, lifecycle handshake, tool/resource/prompt registration, content-type constructors (text/image/audio/embedded-resource), stdio transport I/O, structured stderr logging, and a reference event loop. Streamable HTTP transport remains a deferred lane. This is Kain-exclusive AI-tooling leverage — no other systems language ships a native MCP stdlib. | // // ## P2 - Archives, Compression, Binary Formats, And Deep Systems Tooling // // These are still part of a serious stdlib story. They may land after the `P0` floor, but they belong on the board until they are real or honestly waived./proof result records, and solver-friendly harness helpers. Declarative `ProofCase` / `ProofAssessment` / suite-summary records now exist, and `std::test` can assert named proof cases over the optional `std::z3` backend, but the broader proof DSL, property generators, and durable harness/report story are still incomplete. | // // ## P2 - Archives, Compression, Binary Formats, And Deep Systems Tooling // // These are still part of a serious stdlib story. They may land after the `P0` floor, but they belong on the board until they are real or honestly waived. // // | Status | Priority | Surface | Requirement | // | --- | --- | --- | --- | // | `DONE` | `P2` | new `std::compress` | Add compression/decompression families such as flate/zlib and modern codecs such as zstd where justified, with stream integration instead of one-shot-only helpers. | // | `DONE` | `P2` | new `std::tar` | Add tar read/write/introspection helpers and typed archive entry surfaces. | // | `DONE` | `P2` | new `std::zip` | Add zip read/write/introspection helpers and typed archive entry surfaces. | // | `DONE` | `P2` | new `std::elf` | Add ELF constants, headers, sections, symbols, relocations, and introspection helpers where authored toolchains or profilers need them. | // | `TODO` | `P2` | new `std::dwarf` | Add DWARF constants and targeted parsing/introspection helpers if we want serious debug-format work from authored Kain. | // | `TODO` | `P2` | new `std::macho` | Add Mach-O object and binary introspection helpers. | // | `TODO` | `P2` | new `std::coff` | Add COFF and PE-style object introspection helpers where Windows-facing tooling needs them. | // | `TODO` | `P2` | new `std::pdb` | Add PDB-oriented debug info introspection helpers where Windows tool flows need them. | // | `DONE` | `P2` | new `std::wasm` | Add public authored helpers for WASM module introspection or manipulation if we want the root stdlib to own that tooling story directly. | // // ## Likely Remaining Root Modules // // These names are not sacred, but they are the most obvious concrete root families still missing from the live tree right now: // // - `stdlib/os.kn` // - `stdlib/posix.kn` // - `stdlib/dwarf.kn` // - `stdlib/macho.kn` // - `stdlib/coff.kn` // - `stdlib/pdb.kn` // // If a future implementation chooses a different public module split, update both this section and the requirement rows so the difference is explicit. // // ## Completion Worksheet // // When landing work for any row above, leave a short completion note in the commit or PR description and update the row status here. If helpful, copy this checklist into your work log: // // - [ ] Public root API landed in `stdlib/*.kn` // - [ ] Owning runtime/bootstrap/crate work landed if required // - [ ] `stdlib/STDLIB_MAP.llm.md` and `stdlib/stdlib.map.json` regenerated and checked // - [ ] `smoketest/src/stdlib/*_lane.kn` added or updated // - [ ] `smoketest/src/main.kn` wired // - [ ] `smoketest/build.kn` inputs wired // - [ ] `smoketest` total track count updated if new track added // - [ ] Cross-track or blade-level consumer added when practical // - [ ] Benchmark lane added for performance-sensitive work // - [ ] Attrition lane added for teardown/resource-sensitive work // - [ ] Z3 proof added for unsafe invariants // - [ ] Runtime conformance updated for ABI-backed surfaces // - [ ] `MEMORY.md` updated if the work changes durable operator truth // - [ ] Requirement row status changed in this file // // ## Final Rule // // Do not call the Kain root stdlib "complete" because the directory looks busy or the symbol count is big. // // Call it complete when the missing capability families above are either: // // - `DONE` with real public surfaces and evidence, or // - `WAIVED` with an explicit reason that a future agent can respect without guessing. // // Until then, this file stays live. //!end-kain-file //!kain-file // path = "result.kn" // kind = "text" // encoding = "utf8" // bytes = 1712 // sha256 = "sha256:23e85d5cc6452b3f10d1f833fe573da9841442aff0147b7720e3da8c1b3b25f8" // trailing_newline = true //!kain-file-content // pub fn native_result_ok() -> Int: // return 0 // // pub fn native_result_cancelled() -> Int: // return 1 // // pub fn native_result_invalid_argument() -> Int: // return -1 // // pub fn native_result_not_found() -> Int: // return -2 // // pub fn native_result_capacity_exceeded() -> Int: // return -3 // // pub fn native_result_runtime_unavailable() -> Int: // return -4 // // pub fn native_result_is_ok(status: Int) -> Bool: // return status == native_result_ok() // // pub fn native_result_is_error(status: Int) -> Bool: // return status < native_result_ok() // // pub fn native_result_is_control(status: Int) -> Bool: // return status > native_result_ok() // // pub fn native_result_combine(left: Int, right: Int) -> Int: // if left != 0: // return left // return right // // # root-domain aliases: generated public std names // pub fn result_ok() -> Int: // return native_result_ok() // // pub fn result_cancelled() -> Int: // return native_result_cancelled() // // pub fn result_invalid_argument() -> Int: // return native_result_invalid_argument() // // pub fn result_not_found() -> Int: // return native_result_not_found() // // pub fn result_capacity_exceeded() -> Int: // return native_result_capacity_exceeded() // // pub fn result_runtime_unavailable() -> Int: // return native_result_runtime_unavailable() // // pub fn result_is_ok(status: Int) -> Bool: // return native_result_is_ok(status) // // pub fn result_is_error(status: Int) -> Bool: // return native_result_is_error(status) // // pub fn result_is_control(status: Int) -> Bool: // return native_result_is_control(status) // // pub fn result_combine(left: Int, right: Int) -> Int: // return native_result_combine(left, right) // # end root-domain aliases //!end-kain-file //!kain-file // path = "runtime.kn" // kind = "text" // encoding = "utf8" // bytes = 11903 // sha256 = "sha256:b6aba73c5cc008a5e51b0da6c99926eeee3b8175fea7cc4526ef6d12b5ed53c5" // trailing_newline = true //!kain-file-content // @extern // fn abi_runtime_init() -> Int // // @extern // fn abi_runtime_shutdown() -> Int // // @extern // fn abi_runtime_heap_validate() -> Int // // @extern // fn abi_attrition_checkpoint(label: String, subject_id: Int) -> Int // // @extern // fn abi_attrition_note_progress(iteration: Int, checksum: Int) -> Int // // @extern // fn abi_attrition_result_set(checksum: Int, run_status: Int, run_failure: String) -> Int // // @extern // fn abi_cpu_feature_mask() -> Int // // @extern // fn abi_cpu_feature_fingerprint() -> Int // // @extern // fn abi_cpu_capability_mask_for_key(capability_key: String) -> Int // // @extern // fn abi_cpu_has_capability(capability_key: String) -> Int // // @extern // fn abi_simd_i64_dot_i32_domain_scalar_mod(left: ptr, right: ptr, cells: Int, lane_bias: Int, modulus: Int) -> Int // // @extern // fn abi_simd_i64_dot_i32_domain_avx2_mod(left: ptr, right: ptr, cells: Int, lane_bias: Int, modulus: Int) -> Int // // @extern // fn abi_simd_i64_dot_i32_domain_avx512_mod(left: ptr, right: ptr, cells: Int, lane_bias: Int, modulus: Int) -> Int // // @extern // fn abi_simd_i64_dot_i32_domain_affine_accumulate_scalar_mod(left: ptr, right: ptr, cells: Int, passes: Int, bias_mod: Int, phase_mod: Int, modulus: Int) -> Int // // @extern // fn abi_simd_i64_dot_i32_domain_affine_accumulate_avx2_mod(left: ptr, right: ptr, cells: Int, passes: Int, bias_mod: Int, phase_mod: Int, modulus: Int) -> Int // // @extern // fn abi_simd_i64_dot_i32_domain_affine_accumulate_avx512_mod(left: ptr, right: ptr, cells: Int, passes: Int, bias_mod: Int, phase_mod: Int, modulus: Int) -> Int // // @extern // fn abi_simd_i64_affine_pow2_fill_pair_accumulate_mod(left: ptr, right: ptr, cells: Int, left_mul: Int, left_add: Int, left_mask: Int, right_mul: Int, right_add: Int, right_mask: Int, passes: Int, bias_mod: Int, phase_mod: Int, modulus: Int) -> Int // // @extern // fn abi_converge_select_lane_for_key(converge_key: Int, shape_key: Int, eligible_mask: Int, fallback_lane: Int) -> Int // // @extern // fn abi_converge_commit_winner(converge_key: Int, shape_key: Int, winner_lane: Int) -> Int // // @extern // fn abi_converge_record_telemetry(converge_key: Int, lane_index: Int, elapsed_ns: Int, ok: Int, mismatch: Int) -> Int // // @extern // fn abi_converge_telemetry_count() -> Int // // @extern // fn abi_converge_cache_probe_count() -> Int // // @extern // fn abi_converge_cache_hit_count() -> Int // // @extern // fn kain_machine_teleport_count() -> Int // // @extern // fn kain_machine_teleport_last_token() -> Int // // @extern // fn kain_machine_pulse_total_fire_count() -> Int // // pub fn native_runtime_init() -> Int: // return abi_runtime_init() // // pub fn native_runtime_shutdown() -> Int: // return abi_runtime_shutdown() // // pub fn native_runtime_heap_validate() -> Int: // return abi_runtime_heap_validate() // // pub fn native_runtime_attrition_checkpoint(label: String, subject_id: Int) -> Int: // return abi_attrition_checkpoint(label, subject_id) // // pub fn native_runtime_attrition_note_progress(iteration: Int, checksum: Int) -> Int: // return abi_attrition_note_progress(iteration, checksum) // // pub fn native_runtime_attrition_result_set(checksum: Int, run_status: Int, run_failure: String) -> Int: // return abi_attrition_result_set(checksum, run_status, run_failure) // // pub fn native_cpu_feature_mask() -> Int: // return abi_cpu_feature_mask() // // pub fn native_cpu_feature_fingerprint() -> Int: // return abi_cpu_feature_fingerprint() // // pub fn native_cpu_capability_mask(capability_key: String) -> Int: // return abi_cpu_capability_mask_for_key(capability_key) // // pub fn native_cpu_has_capability(capability_key: String) -> Int: // return abi_cpu_has_capability(capability_key) // // pub fn native_simd_i32_domain_dot_scalar_mod(left: ptr, right: ptr, cells: Int, lane_bias: Int, modulus: Int) -> Int: // return abi_simd_i64_dot_i32_domain_scalar_mod(left, right, cells, lane_bias, modulus) // // pub fn native_simd_i32_domain_dot_avx2_mod(left: ptr, right: ptr, cells: Int, lane_bias: Int, modulus: Int) -> Int: // return abi_simd_i64_dot_i32_domain_avx2_mod(left, right, cells, lane_bias, modulus) // // pub fn native_simd_i32_domain_dot_avx512_mod(left: ptr, right: ptr, cells: Int, lane_bias: Int, modulus: Int) -> Int: // return abi_simd_i64_dot_i32_domain_avx512_mod(left, right, cells, lane_bias, modulus) // // pub fn native_simd_i32_domain_affine_accumulate_scalar_mod(left: ptr, right: ptr, cells: Int, passes: Int, bias_mod: Int, phase_mod: Int, modulus: Int) -> Int: // return abi_simd_i64_dot_i32_domain_affine_accumulate_scalar_mod(left, right, cells, passes, bias_mod, phase_mod, modulus) // // pub fn native_simd_i32_domain_affine_accumulate_avx2_mod(left: ptr, right: ptr, cells: Int, passes: Int, bias_mod: Int, phase_mod: Int, modulus: Int) -> Int: // return abi_simd_i64_dot_i32_domain_affine_accumulate_avx2_mod(left, right, cells, passes, bias_mod, phase_mod, modulus) // // pub fn native_simd_i32_domain_affine_accumulate_avx512_mod(left: ptr, right: ptr, cells: Int, passes: Int, bias_mod: Int, phase_mod: Int, modulus: Int) -> Int: // return abi_simd_i64_dot_i32_domain_affine_accumulate_avx512_mod(left, right, cells, passes, bias_mod, phase_mod, modulus) // // pub fn native_simd_i32_domain_affine_pow2_fill_pair_accumulate_mod(left: ptr, right: ptr, cells: Int, left_mul: Int, left_add: Int, left_mask: Int, right_mul: Int, right_add: Int, right_mask: Int, passes: Int, bias_mod: Int, phase_mod: Int, modulus: Int) -> Int: // return abi_simd_i64_affine_pow2_fill_pair_accumulate_mod(left, right, cells, left_mul, left_add, left_mask, right_mul, right_add, right_mask, passes, bias_mod, phase_mod, modulus) // // pub fn native_converge_select_lane(converge_key: Int, shape_key: Int, eligible_mask: Int, fallback_lane: Int) -> Int: // return abi_converge_select_lane_for_key(converge_key, shape_key, eligible_mask, fallback_lane) // // pub fn native_converge_commit_winner(converge_key: Int, shape_key: Int, winner_lane: Int) -> Int: // return abi_converge_commit_winner(converge_key, shape_key, winner_lane) // // pub fn native_converge_record_telemetry(converge_key: Int, lane_index: Int, elapsed_ns: Int, ok: Int, mismatch: Int) -> Int: // return abi_converge_record_telemetry(converge_key, lane_index, elapsed_ns, ok, mismatch) // // pub fn native_converge_telemetry_count() -> Int: // return abi_converge_telemetry_count() // // pub fn native_converge_cache_probe_count() -> Int: // return abi_converge_cache_probe_count() // // pub fn native_converge_cache_hit_count() -> Int: // return abi_converge_cache_hit_count() // // pub fn native_machine_teleport_count() -> Int: // return kain_machine_teleport_count() // // pub fn native_machine_teleport_last_token() -> Int: // return kain_machine_teleport_last_token() // // pub fn native_machine_pulse_total_fire_count() -> Int: // return kain_machine_pulse_total_fire_count() // // pub fn native_runtime_with_status(status: Int) -> Int: // if status == 0: // return native_runtime_init() // return status // // pub fn native_runtime_cleanup_status(status: Int) -> Int: // let shutdown_status = native_runtime_shutdown() // if status != 0: // return status // return shutdown_status // // # root-domain aliases: generated public std names // pub fn runtime_init() -> Int: // return native_runtime_init() // // pub fn runtime_shutdown() -> Int: // return native_runtime_shutdown() // // pub fn runtime_heap_validate() -> Int: // return native_runtime_heap_validate() // // pub fn runtime_attrition_checkpoint(label: String, subject_id: Int) -> Int: // return native_runtime_attrition_checkpoint(label, subject_id) // // pub fn runtime_attrition_note_progress(iteration: Int, checksum: Int) -> Int: // return native_runtime_attrition_note_progress(iteration, checksum) // // pub fn runtime_attrition_result_set(checksum: Int, run_status: Int, run_failure: String) -> Int: // return native_runtime_attrition_result_set(checksum, run_status, run_failure) // // pub fn runtime_cpu_feature_mask() -> Int: // return native_cpu_feature_mask() // // pub fn runtime_cpu_feature_fingerprint() -> Int: // return native_cpu_feature_fingerprint() // // pub fn runtime_cpu_capability_mask(capability_key: String) -> Int: // return native_cpu_capability_mask(capability_key) // // pub fn runtime_cpu_has_capability(capability_key: String) -> Int: // return native_cpu_has_capability(capability_key) // // pub fn runtime_simd_i32_domain_dot_scalar_mod(left: ptr, right: ptr, cells: Int, lane_bias: Int, modulus: Int) -> Int: // return native_simd_i32_domain_dot_scalar_mod(left, right, cells, lane_bias, modulus) // // pub fn runtime_simd_i32_domain_dot_avx2_mod(left: ptr, right: ptr, cells: Int, lane_bias: Int, modulus: Int) -> Int: // return native_simd_i32_domain_dot_avx2_mod(left, right, cells, lane_bias, modulus) // // pub fn runtime_simd_i32_domain_dot_avx512_mod(left: ptr, right: ptr, cells: Int, lane_bias: Int, modulus: Int) -> Int: // return native_simd_i32_domain_dot_avx512_mod(left, right, cells, lane_bias, modulus) // // pub fn runtime_simd_i32_domain_affine_accumulate_scalar_mod(left: ptr, right: ptr, cells: Int, passes: Int, bias_mod: Int, phase_mod: Int, modulus: Int) -> Int: // return native_simd_i32_domain_affine_accumulate_scalar_mod(left, right, cells, passes, bias_mod, phase_mod, modulus) // // pub fn runtime_simd_i32_domain_affine_accumulate_avx2_mod(left: ptr, right: ptr, cells: Int, passes: Int, bias_mod: Int, phase_mod: Int, modulus: Int) -> Int: // return native_simd_i32_domain_affine_accumulate_avx2_mod(left, right, cells, passes, bias_mod, phase_mod, modulus) // // pub fn runtime_simd_i32_domain_affine_accumulate_avx512_mod(left: ptr, right: ptr, cells: Int, passes: Int, bias_mod: Int, phase_mod: Int, modulus: Int) -> Int: // return native_simd_i32_domain_affine_accumulate_avx512_mod(left, right, cells, passes, bias_mod, phase_mod, modulus) // // pub fn runtime_simd_i32_domain_affine_pow2_fill_pair_accumulate_mod(left: ptr, right: ptr, cells: Int, left_mul: Int, left_add: Int, left_mask: Int, right_mul: Int, right_add: Int, right_mask: Int, passes: Int, bias_mod: Int, phase_mod: Int, modulus: Int) -> Int: // return native_simd_i32_domain_affine_pow2_fill_pair_accumulate_mod(left, right, cells, left_mul, left_add, left_mask, right_mul, right_add, right_mask, passes, bias_mod, phase_mod, modulus) // // pub fn runtime_converge_select_lane(converge_key: Int, shape_key: Int, eligible_mask: Int, fallback_lane: Int) -> Int: // return native_converge_select_lane(converge_key, shape_key, eligible_mask, fallback_lane) // // pub fn runtime_converge_commit_winner(converge_key: Int, shape_key: Int, winner_lane: Int) -> Int: // return native_converge_commit_winner(converge_key, shape_key, winner_lane) // // pub fn runtime_converge_record_telemetry(converge_key: Int, lane_index: Int, elapsed_ns: Int, ok: Int, mismatch: Int) -> Int: // return native_converge_record_telemetry(converge_key, lane_index, elapsed_ns, ok, mismatch) // // pub fn runtime_converge_telemetry_count() -> Int: // return native_converge_telemetry_count() // // pub fn runtime_converge_cache_probe_count() -> Int: // return native_converge_cache_probe_count() // // pub fn runtime_converge_cache_hit_count() -> Int: // return native_converge_cache_hit_count() // // pub fn runtime_machine_teleport_count() -> Int: // return native_machine_teleport_count() // // pub fn runtime_machine_teleport_last_token() -> Int: // return native_machine_teleport_last_token() // // pub fn runtime_machine_pulse_total_fire_count() -> Int: // return native_machine_pulse_total_fire_count() // // pub fn runtime_with_status(status: Int) -> Int: // return native_runtime_with_status(status) // // pub fn runtime_cleanup_status(status: Int) -> Int: // return native_runtime_cleanup_status(status) // # end root-domain aliases //!end-kain-file //!kain-file // path = "semver.kn" // kind = "text" // encoding = "utf8" // bytes = 29428 // sha256 = "sha256:c4ce511ce47638775d880e5422038f60865c7278db641d59d11983f7a2383f29" // trailing_newline = true //!kain-file-content // use std::ascii // // pub const SEMVER_ORDER_LT: Int = -1 // pub const SEMVER_ORDER_EQ: Int = 0 // pub const SEMVER_ORDER_GT: Int = 1 // // pub const SEMVER_OP_EQ: String = "=" // pub const SEMVER_OP_GT: String = ">" // pub const SEMVER_OP_GTE: String = ">=" // pub const SEMVER_OP_LT: String = "<" // pub const SEMVER_OP_LTE: String = "<=" // // pub struct SemVer: // major: Int // minor: Int // patch_value: Int // pre_release: Array // build_metadata: Array // // pub struct SemVerParseResult: // ok: Bool // version: SemVer // error: String // // pub struct SemVerComparator: // relation: String // version: SemVer // // pub struct SemVerRangeClause: // comparators: Array // any_version: Bool // // pub struct SemVerRange: // clauses: Array // // pub struct SemVerRangeParseResult: // ok: Bool // range: SemVerRange // error: String // // struct SemVerIdentifierParseResult: // ok: Bool // identifiers: Array // error: String // // struct SemVerPattern: // ok: Bool // any_version: Bool // complete: Bool // wildcard: Bool // specificity: Int // version: SemVer // error: String // // struct SemVerClauseParseResult: // ok: Bool // clause: SemVerRangeClause // error: String // // struct SemVerTokenExpandResult: // ok: Bool // comparators: Array // any_version: Bool // error: String // // fn semver_empty_strings() -> Array: // let mut items: Array = [] // return items // // fn semver_empty_comparators() -> Array: // let mut items: Array = [] // return items // // fn semver_empty_clauses() -> Array: // let mut items: Array = [] // return items // // fn semver_empty_version() -> SemVer: // return SemVer { // major: 0, // minor: 0, // patch_value: 0, // pre_release: semver_empty_strings(), // build_metadata: semver_empty_strings() // } // // fn semver_empty_range() -> SemVerRange: // return SemVerRange { clauses: semver_empty_clauses() } // // fn semver_parse_error(message: String) -> SemVerParseResult: // return SemVerParseResult { // ok: false, // version: semver_empty_version(), // error: message // } // // fn semver_range_parse_error(message: String) -> SemVerRangeParseResult: // return SemVerRangeParseResult { // ok: false, // range: semver_empty_range(), // error: message // } // // fn semver_clause_error(message: String) -> SemVerClauseParseResult: // return SemVerClauseParseResult { // ok: false, // clause: SemVerRangeClause { // comparators: semver_empty_comparators(), // any_version: false // }, // error: message // } // // fn semver_token_expand_error(message: String) -> SemVerTokenExpandResult: // return SemVerTokenExpandResult { // ok: false, // comparators: semver_empty_comparators(), // any_version: false, // error: message // } // // fn semver_trim(text: String) -> String: // var start = 0 // while start < len(text) and ascii_is_whitespace_byte(byte_at(text, start)): // start = start + 1 // var finish = len(text) // while finish > start and ascii_is_whitespace_byte(byte_at(text, finish - 1)): // finish = finish - 1 // return substring(text, start, finish) // // fn semver_index_of_char(text: String, marker: String, start: Int) -> Int: // var index = start // while index < len(text): // if char_at(text, index) == marker: // return index // index = index + 1 // return -1 // // fn semver_starts_with(text: String, prefix: String) -> Bool: // if len(prefix) > len(text): // return false // var index = 0 // while index < len(prefix): // if char_at(text, index) != char_at(prefix, index): // return false // index = index + 1 // return true // // fn semver_split_string(source: String, separator: String) -> Array: // let mut items: Array = [] // if len(separator) == 0: // push(items, source) // return items // var cursor = 0 // while cursor <= len(source): // let found = find_substring_from(source, separator, cursor) // if found < cursor: // push(items, substring(source, cursor, len(source))) // return items // push(items, substring(source, cursor, found)) // cursor = found + len(separator) // return items // // fn semver_join_strings(items: Array, separator: String) -> String: // var output = "" // var index = 0 // while index < len(items): // if index > 0: // output = output + separator // output = output + items[index] // index = index + 1 // return output // // fn semver_string_array_equal(left: Array, right: Array) -> Bool: // if len(left) != len(right): // return false // var index = 0 // while index < len(left): // if left[index] != right[index]: // return false // index = index + 1 // return true // // fn semver_is_wildcard_token(text: String) -> Bool: // if text == "*": // return true // return ascii_equals_ignore_case(text, "x") // // fn semver_is_operator_only_token(text: String) -> Bool: // if text == SEMVER_OP_GT: // return true // if text == SEMVER_OP_GTE: // return true // if text == SEMVER_OP_LT: // return true // if text == SEMVER_OP_LTE: // return true // if text == SEMVER_OP_EQ: // return true // if text == "^": // return true // return text == "~" // // fn semver_parse_number_strict(text: String) -> Int: // if len(text) == 0: // return -1 // if len(text) > 1 and byte_at(text, 0) == 48: // return -1 // var value = 0 // var index = 0 // while index < len(text): // let digit = ascii_digit_value_byte(byte_at(text, index)) // if digit < 0: // return -1 // value = (value * 10) + digit // index = index + 1 // return value // // fn semver_identifier_is_valid(text: String, forbid_numeric_leading_zero: Bool) -> Bool: // if len(text) == 0: // return false // var numeric = true // var index = 0 // while index < len(text): // let code = byte_at(text, index) // if ascii_is_alnum_byte(code) == false and code != 45: // return false // if ascii_is_digit_byte(code) == false: // numeric = false // index = index + 1 // if numeric and forbid_numeric_leading_zero and len(text) > 1 and byte_at(text, 0) == 48: // return false // return true // // fn semver_parse_identifiers(text: String, forbid_numeric_leading_zero: Bool, lane: String) -> SemVerIdentifierParseResult: // let trimmed = semver_trim(text) // if len(trimmed) == 0: // return SemVerIdentifierParseResult { // ok: false, // identifiers: semver_empty_strings(), // error: lane + " must not be empty" // } // let items = semver_split_string(trimmed, ".") // let mut identifiers: Array = [] // var index = 0 // while index < len(items): // let identifier = items[index] // if semver_identifier_is_valid(identifier, forbid_numeric_leading_zero) == false: // return SemVerIdentifierParseResult { // ok: false, // identifiers: semver_empty_strings(), // error: lane + " identifier `" + identifier + "` is invalid" // } // push(identifiers, identifier) // index = index + 1 // return SemVerIdentifierParseResult { // ok: true, // identifiers: identifiers, // error: "" // } // // fn semver_pattern_error(message: String) -> SemVerPattern: // return SemVerPattern { // ok: false, // any_version: false, // complete: false, // wildcard: false, // specificity: 0, // version: semver_empty_version(), // error: message // } // // fn semver_parse_pattern(text: String) -> SemVerPattern: // let trimmed = semver_trim(text) // if len(trimmed) == 0: // return semver_pattern_error("version pattern must not be empty") // if semver_is_wildcard_token(trimmed): // return SemVerPattern { // ok: true, // any_version: true, // complete: false, // wildcard: true, // specificity: 0, // version: semver_empty_version(), // error: "" // } // // let plus_index = semver_index_of_char(trimmed, "+", 0) // if plus_index >= 0 and semver_index_of_char(trimmed, "+", plus_index + 1) >= 0: // return semver_pattern_error("multiple `+` segments are not allowed") // var core_and_pre = trimmed // let mut build_metadata = semver_empty_strings() // if plus_index >= 0: // let build_result = semver_parse_identifiers( // substring(trimmed, plus_index + 1, len(trimmed)), // false, // "build metadata" // ) // if build_result.ok == false: // return semver_pattern_error(build_result.error) // build_metadata = build_result.identifiers // core_and_pre = substring(trimmed, 0, plus_index) // // let dash_index = semver_index_of_char(core_and_pre, "-", 0) // var core = core_and_pre // let mut pre_release = semver_empty_strings() // if dash_index >= 0: // let pre_result = semver_parse_identifiers( // substring(core_and_pre, dash_index + 1, len(core_and_pre)), // true, // "pre-release" // ) // if pre_result.ok == false: // return semver_pattern_error(pre_result.error) // pre_release = pre_result.identifiers // core = substring(core_and_pre, 0, dash_index) // // let parts = semver_split_string(core, ".") // if len(parts) == 0 or len(parts) > 3: // return semver_pattern_error("semantic versions require one to three core fields in patterns") // // var major = 0 // var minor = 0 // var patch_value = 0 // var specificity = 0 // var wildcard = false // var index = 0 // while index < len(parts): // let part = parts[index] // if len(part) == 0: // return semver_pattern_error("empty version field in pattern") // if semver_is_wildcard_token(part): // wildcard = true // if index == 0 and len(parts) > 1: // return semver_pattern_error("wildcard major may only appear by itself") // else: // if wildcard: // return semver_pattern_error("numeric field cannot appear after a wildcard") // let parsed = semver_parse_number_strict(part) // if parsed < 0: // return semver_pattern_error("invalid numeric version field `" + part + "`") // if index == 0: // major = parsed // else: // if index == 1: // minor = parsed // else: // patch_value = parsed // specificity = index + 1 // index = index + 1 // // if wildcard and (len(pre_release) > 0 or len(build_metadata) > 0): // return semver_pattern_error("wildcard ranges cannot carry pre-release or build metadata") // if len(parts) < 3 and wildcard == false and (len(pre_release) > 0 or len(build_metadata) > 0): // return semver_pattern_error("partial versions cannot carry pre-release or build metadata") // // let stored_pre_release = if wildcard or len(parts) < 3: semver_empty_strings() else: pre_release // let stored_build_metadata = if wildcard or len(parts) < 3: semver_empty_strings() else: build_metadata // let version = SemVer { // major: major, // minor: minor, // patch_value: patch_value, // pre_release: stored_pre_release, // build_metadata: stored_build_metadata // } // // return SemVerPattern { // ok: true, // any_version: false, // complete: wildcard == false and len(parts) == 3, // wildcard: wildcard, // specificity: specificity, // version: version, // error: "" // } // // fn semver_compare_text_lexical(left: String, right: String) -> Int: // var index = 0 // while index < len(left) and index < len(right): // let left_byte = byte_at(left, index) // let right_byte = byte_at(right, index) // if left_byte < right_byte: // return SEMVER_ORDER_LT // if left_byte > right_byte: // return SEMVER_ORDER_GT // index = index + 1 // if len(left) < len(right): // return SEMVER_ORDER_LT // if len(left) > len(right): // return SEMVER_ORDER_GT // return SEMVER_ORDER_EQ // // fn semver_compare_pre_release_identifiers(left: String, right: String) -> Int: // let left_numeric = semver_parse_number_strict(left) // let right_numeric = semver_parse_number_strict(right) // if left_numeric >= 0 and right_numeric < 0: // return SEMVER_ORDER_LT // if left_numeric < 0 and right_numeric >= 0: // return SEMVER_ORDER_GT // if left_numeric >= 0 and right_numeric >= 0: // if left_numeric < right_numeric: // return SEMVER_ORDER_LT // if left_numeric > right_numeric: // return SEMVER_ORDER_GT // return SEMVER_ORDER_EQ // return semver_compare_text_lexical(left, right) // // fn semver_compare_pre_release(left: Array, right: Array) -> Int: // var index = 0 // while index < len(left) and index < len(right): // let order = semver_compare_pre_release_identifiers(left[index], right[index]) // if order != SEMVER_ORDER_EQ: // return order // index = index + 1 // if len(left) < len(right): // return SEMVER_ORDER_LT // if len(left) > len(right): // return SEMVER_ORDER_GT // return SEMVER_ORDER_EQ // // fn semver_pattern_partial_upper(pattern: SemVerPattern) -> SemVer: // if pattern.specificity <= 1: // return semver_new(pattern.version.major + 1, 0, 0) // return semver_new(pattern.version.major, pattern.version.minor + 1, 0) // // fn semver_pattern_caret_upper(pattern: SemVerPattern) -> SemVer: // if pattern.version.major > 0: // return semver_new(pattern.version.major + 1, 0, 0) // if pattern.specificity <= 1: // return semver_new(1, 0, 0) // if pattern.version.minor > 0: // return semver_new(0, pattern.version.minor + 1, 0) // if pattern.specificity == 2: // return semver_new(0, 1, 0) // return semver_new(0, 0, pattern.version.patch_value + 1) // // fn semver_pattern_tilde_upper(pattern: SemVerPattern) -> SemVer: // if pattern.specificity <= 1: // return semver_new(pattern.version.major + 1, 0, 0) // return semver_new(pattern.version.major, pattern.version.minor + 1, 0) // // fn semver_append_comparator(items: Array, relation: String, version: SemVer) -> Array: // push(items, SemVerComparator { relation: relation, version: version }) // return items // // fn semver_expand_plain_pattern(pattern: SemVerPattern) -> Array: // let mut comparators: Array = [] // if pattern.complete and pattern.wildcard == false: // return semver_append_comparator(comparators, SEMVER_OP_EQ, pattern.version) // comparators = semver_append_comparator(comparators, SEMVER_OP_GTE, pattern.version) // comparators = semver_append_comparator(comparators, SEMVER_OP_LT, semver_pattern_partial_upper(pattern)) // return comparators // // fn semver_parse_range_token(token: String) -> SemVerTokenExpandResult: // let trimmed = semver_trim(token) // if len(trimmed) == 0: // return semver_token_expand_error("empty range token") // // var relation = "" // var body = trimmed // if semver_starts_with(trimmed, ">="): // relation = SEMVER_OP_GTE // body = substring(trimmed, 2, len(trimmed)) // else: // if semver_starts_with(trimmed, "<="): // relation = SEMVER_OP_LTE // body = substring(trimmed, 2, len(trimmed)) // else: // if semver_starts_with(trimmed, ">"): // relation = SEMVER_OP_GT // body = substring(trimmed, 1, len(trimmed)) // else: // if semver_starts_with(trimmed, "<"): // relation = SEMVER_OP_LT // body = substring(trimmed, 1, len(trimmed)) // else: // if semver_starts_with(trimmed, "="): // relation = SEMVER_OP_EQ // body = substring(trimmed, 1, len(trimmed)) // else: // if semver_starts_with(trimmed, "^"): // relation = "^" // body = substring(trimmed, 1, len(trimmed)) // else: // if semver_starts_with(trimmed, "~"): // relation = "~" // body = substring(trimmed, 1, len(trimmed)) // // body = semver_trim(body) // if len(body) == 0: // return semver_token_expand_error("range token `" + token + "` is missing a version") // // let pattern = semver_parse_pattern(body) // if pattern.ok == false: // return semver_token_expand_error(pattern.error) // // if pattern.any_version: // if relation == "" or relation == SEMVER_OP_EQ: // return SemVerTokenExpandResult { // ok: true, // comparators: semver_empty_comparators(), // any_version: true, // error: "" // } // return semver_token_expand_error("wildcard ranges cannot use operator `" + relation + "`") // // let mut comparators: Array = [] // if relation == "": // return SemVerTokenExpandResult { // ok: true, // comparators: semver_expand_plain_pattern(pattern), // any_version: false, // error: "" // } // if relation == SEMVER_OP_EQ: // if pattern.complete and pattern.wildcard == false: // comparators = semver_append_comparator(comparators, SEMVER_OP_EQ, pattern.version) // else: // comparators = semver_expand_plain_pattern(pattern) // return SemVerTokenExpandResult { // ok: true, // comparators: comparators, // any_version: false, // error: "" // } // if relation == SEMVER_OP_GT or relation == SEMVER_OP_GTE or relation == SEMVER_OP_LT or relation == SEMVER_OP_LTE: // comparators = semver_append_comparator(comparators, relation, pattern.version) // return SemVerTokenExpandResult { // ok: true, // comparators: comparators, // any_version: false, // error: "" // } // if relation == "^": // comparators = semver_append_comparator(comparators, SEMVER_OP_GTE, pattern.version) // comparators = semver_append_comparator(comparators, SEMVER_OP_LT, semver_pattern_caret_upper(pattern)) // return SemVerTokenExpandResult { // ok: true, // comparators: comparators, // any_version: false, // error: "" // } // if relation == "~": // comparators = semver_append_comparator(comparators, SEMVER_OP_GTE, pattern.version) // comparators = semver_append_comparator(comparators, SEMVER_OP_LT, semver_pattern_tilde_upper(pattern)) // return SemVerTokenExpandResult { // ok: true, // comparators: comparators, // any_version: false, // error: "" // } // return semver_token_expand_error("unsupported range operator `" + relation + "`") // // fn semver_clause_tokens(text: String) -> Array: // let mut tokens: Array = [] // var current = "" // var index = 0 // while index < len(text): // let code = byte_at(text, index) // let ch = char_at(text, index) // if ascii_is_whitespace_byte(code) or ch == ",": // if len(current) > 0: // push(tokens, current) // current = "" // else: // current = current + ch // index = index + 1 // if len(current) > 0: // push(tokens, current) // return tokens // // fn semver_parse_hyphen_clause(left_text: String, right_text: String) -> SemVerClauseParseResult: // let left_pattern = semver_parse_pattern(left_text) // if left_pattern.ok == false or left_pattern.any_version: // return semver_clause_error("invalid left side of hyphen range: " + left_pattern.error) // let right_pattern = semver_parse_pattern(right_text) // if right_pattern.ok == false or right_pattern.any_version: // return semver_clause_error("invalid right side of hyphen range: " + right_pattern.error) // let mut comparators: Array = [] // comparators = semver_append_comparator(comparators, SEMVER_OP_GTE, left_pattern.version) // if right_pattern.complete and right_pattern.wildcard == false: // comparators = semver_append_comparator(comparators, SEMVER_OP_LTE, right_pattern.version) // else: // comparators = semver_append_comparator(comparators, SEMVER_OP_LT, semver_pattern_partial_upper(right_pattern)) // return SemVerClauseParseResult { // ok: true, // clause: SemVerRangeClause { comparators: comparators, any_version: false }, // error: "" // } // // fn semver_parse_clause(text: String) -> SemVerClauseParseResult: // let trimmed = semver_trim(text) // if len(trimmed) == 0: // return semver_clause_error("empty range clause") // // let tokens = semver_clause_tokens(trimmed) // if len(tokens) == 0: // return semver_clause_error("empty range clause") // if len(tokens) == 3: // if tokens[1] == "-": // return semver_parse_hyphen_clause(tokens[0], tokens[2]) // // let mut comparators: Array = [] // var index = 0 // while index < len(tokens): // let current = tokens[index] // if current == "-": // return semver_clause_error("hyphen ranges must use `left - right` as a full clause") // var token = current // if semver_is_operator_only_token(current): // if index + 1 >= len(tokens): // return semver_clause_error("range operator `" + current + "` is missing a version") // token = current + tokens[index + 1] // index = index + 1 // let expanded = semver_parse_range_token(token) // if expanded.ok == false: // return semver_clause_error(expanded.error) // if expanded.any_version: // if len(tokens) != 1: // return semver_clause_error("wildcard range must stand alone in a clause") // return SemVerClauseParseResult { // ok: true, // clause: SemVerRangeClause { // comparators: semver_empty_comparators(), // any_version: true // }, // error: "" // } // var comparator_index = 0 // while comparator_index < len(expanded.comparators): // push(comparators, expanded.comparators[comparator_index]) // comparator_index = comparator_index + 1 // index = index + 1 // return SemVerClauseParseResult { // ok: true, // clause: SemVerRangeClause { // comparators: comparators, // any_version: false // }, // error: "" // } // // pub fn semver_new(major: Int, minor: Int, patch_value: Int) -> SemVer: // return SemVer { // major: major, // minor: minor, // patch_value: patch_value, // pre_release: semver_empty_strings(), // build_metadata: semver_empty_strings() // } // // pub fn semver_with(major: Int, minor: Int, patch_value: Int, pre_release: Array, build_metadata: Array) -> SemVer: // return SemVer { // major: major, // minor: minor, // patch_value: patch_value, // pre_release: pre_release, // build_metadata: build_metadata // } // // pub fn semver_parse(text: String) -> SemVerParseResult: // let pattern = semver_parse_pattern(text) // if pattern.ok == false: // return semver_parse_error(pattern.error) // if pattern.any_version: // return semver_parse_error("a wildcard is not a concrete semantic version") // if pattern.complete == false or pattern.wildcard: // return semver_parse_error("semantic versions require major.minor.patch") // return SemVerParseResult { // ok: true, // version: pattern.version, // error: "" // } // // pub fn semver_try_parse(text: String) -> Option: // let parsed = semver_parse(text) // if parsed.ok: // return Some(parsed.version) // return None // // pub fn semver_format(version: SemVer) -> String: // var output = to_string(version.major) + "." + to_string(version.minor) + "." + to_string(version.patch_value) // if len(version.pre_release) > 0: // output = output + "-" + semver_join_strings(version.pre_release, ".") // if len(version.build_metadata) > 0: // output = output + "+" + semver_join_strings(version.build_metadata, ".") // return output // // pub fn semver_normalize(text: String) -> String: // let parsed = semver_parse(text) // if parsed.ok == false: // return "" // return semver_format(parsed.version) // // pub fn semver_is_prerelease(version: SemVer) -> Bool: // return len(version.pre_release) > 0 // // pub fn semver_compare(left: SemVer, right: SemVer) -> Int: // if left.major < right.major: // return SEMVER_ORDER_LT // if left.major > right.major: // return SEMVER_ORDER_GT // if left.minor < right.minor: // return SEMVER_ORDER_LT // if left.minor > right.minor: // return SEMVER_ORDER_GT // if left.patch_value < right.patch_value: // return SEMVER_ORDER_LT // if left.patch_value > right.patch_value: // return SEMVER_ORDER_GT // if len(left.pre_release) == 0 and len(right.pre_release) == 0: // return SEMVER_ORDER_EQ // if len(left.pre_release) == 0: // return SEMVER_ORDER_GT // if len(right.pre_release) == 0: // return SEMVER_ORDER_LT // return semver_compare_pre_release(left.pre_release, right.pre_release) // // pub fn semver_compare_text(left_text: String, right_text: String) -> Int: // let left = semver_parse(left_text) // let right = semver_parse(right_text) // if left.ok == false and right.ok == false: // return SEMVER_ORDER_EQ // if left.ok == false: // return SEMVER_ORDER_LT // if right.ok == false: // return SEMVER_ORDER_GT // return semver_compare(left.version, right.version) // // pub fn semver_equal(left: SemVer, right: SemVer) -> Bool: // if left.major != right.major or left.minor != right.minor or left.patch_value != right.patch_value: // return false // if semver_string_array_equal(left.pre_release, right.pre_release) == false: // return false // return semver_string_array_equal(left.build_metadata, right.build_metadata) // // pub fn semver_range_parse(text: String) -> SemVerRangeParseResult: // let trimmed = semver_trim(text) // if len(trimmed) == 0: // return semver_range_parse_error("range text must not be empty") // // let clause_texts = semver_split_string(trimmed, "||") // let mut clauses: Array = [] // var index = 0 // while index < len(clause_texts): // let clause_result = semver_parse_clause(clause_texts[index]) // if clause_result.ok == false: // return semver_range_parse_error(clause_result.error) // push(clauses, clause_result.clause) // index = index + 1 // return SemVerRangeParseResult { // ok: true, // range: SemVerRange { clauses: clauses }, // error: "" // } // // fn semver_comparator_matches(comparator: SemVerComparator, version: SemVer) -> Bool: // let order = semver_compare(version, comparator.version) // if comparator.relation == SEMVER_OP_EQ: // return order == SEMVER_ORDER_EQ // if comparator.relation == SEMVER_OP_GT: // return order == SEMVER_ORDER_GT // if comparator.relation == SEMVER_OP_GTE: // return order == SEMVER_ORDER_GT or order == SEMVER_ORDER_EQ // if comparator.relation == SEMVER_OP_LT: // return order == SEMVER_ORDER_LT // if comparator.relation == SEMVER_OP_LTE: // return order == SEMVER_ORDER_LT or order == SEMVER_ORDER_EQ // return false // // fn semver_clause_matches(clause: SemVerRangeClause, version: SemVer) -> Bool: // if clause.any_version: // return true // var index = 0 // while index < len(clause.comparators): // if semver_comparator_matches(clause.comparators[index], version) == false: // return false // index = index + 1 // return true // // pub fn semver_range_matches(range: SemVerRange, version: SemVer) -> Bool: // var index = 0 // while index < len(range.clauses): // if semver_clause_matches(range.clauses[index], version): // return true // index = index + 1 // return false // // pub fn semver_satisfies(version: SemVer, range_text: String) -> Bool: // let parsed = semver_range_parse(range_text) // if parsed.ok == false: // return false // return semver_range_matches(parsed.range, version) // // pub fn semver_satisfies_text(version_text: String, range_text: String) -> Bool: // let version = semver_parse(version_text) // if version.ok == false: // return false // return semver_satisfies(version.version, range_text) //!end-kain-file //!kain-file // path = "simd.kn" // kind = "text" // encoding = "utf8" // bytes = 3173 // sha256 = "sha256:da444a5c0377d249f9d12a2ac93f01eadbf676ee5708bc2979605d8e900fcb94" // trailing_newline = true //!kain-file-content // use std::memory // // pub struct I64x4: // x0: Int // x1: Int // x2: Int // x3: Int // // pub fn i64x4(a: Int, b: Int, c: Int, d: Int) -> I64x4: // return I64x4 { x0: a, x1: b, x2: c, x3: d } // // pub fn i64x4_splat(value: Int) -> I64x4: // return i64x4(value, value, value, value) // // pub fn i64x4_lane(value: I64x4, lane: Int) -> Int: // if lane == 0: // return value.x0 // if lane == 1: // return value.x1 // if lane == 2: // return value.x2 // return value.x3 // // pub fn i64x4_replace(value: I64x4, lane: Int, next: Int) -> I64x4: // if lane == 0: // return i64x4(next, value.x1, value.x2, value.x3) // if lane == 1: // return i64x4(value.x0, next, value.x2, value.x3) // if lane == 2: // return i64x4(value.x0, value.x1, next, value.x3) // return i64x4(value.x0, value.x1, value.x2, next) // // pub fn i64x4_add(left: I64x4, right: I64x4) -> I64x4: // return i64x4(left.x0 + right.x0, left.x1 + right.x1, left.x2 + right.x2, left.x3 + right.x3) // // pub fn i64x4_sub(left: I64x4, right: I64x4) -> I64x4: // return i64x4(left.x0 - right.x0, left.x1 - right.x1, left.x2 - right.x2, left.x3 - right.x3) // // pub fn i64x4_mul(left: I64x4, right: I64x4) -> I64x4: // return i64x4(left.x0 * right.x0, left.x1 * right.x1, left.x2 * right.x2, left.x3 * right.x3) // // pub fn i64x4_and(left: I64x4, right: I64x4) -> I64x4: // return i64x4(left.x0 & right.x0, left.x1 & right.x1, left.x2 & right.x2, left.x3 & right.x3) // // pub fn i64x4_or(left: I64x4, right: I64x4) -> I64x4: // return i64x4(left.x0 | right.x0, left.x1 | right.x1, left.x2 | right.x2, left.x3 | right.x3) // // pub fn i64x4_xor(left: I64x4, right: I64x4) -> I64x4: // return i64x4(left.x0 ^ right.x0, left.x1 ^ right.x1, left.x2 ^ right.x2, left.x3 ^ right.x3) // // fn i64x4_select_lane(mask: Int, bit: Int, hot: Int, cold: Int) -> Int: // if (mask & bit) != 0: // return hot // return cold // // pub fn i64x4_blend(mask: Int, hot: I64x4, cold: I64x4) -> I64x4: // return i64x4( // i64x4_select_lane(mask, 1, hot.x0, cold.x0), // i64x4_select_lane(mask, 2, hot.x1, cold.x1), // i64x4_select_lane(mask, 4, hot.x2, cold.x2), // i64x4_select_lane(mask, 8, hot.x3, cold.x3) // ) // // pub fn i64x4_dot(left: I64x4, right: I64x4) -> Int: // let product = i64x4_mul(left, right) // return product.x0 + product.x1 + product.x2 + product.x3 // // pub fn i64x4_horizontal_sum(value: I64x4) -> Int: // return value.x0 + value.x1 + value.x2 + value.x3 // // pub fn i64x4_gather(base: ptr, indexes: I64x4) -> I64x4 with Unsafe: // return i64x4( // mem_load(ptr_offset(base, indexes.x0, "Int"), "Int"), // mem_load(ptr_offset(base, indexes.x1, "Int"), "Int"), // mem_load(ptr_offset(base, indexes.x2, "Int"), "Int"), // mem_load(ptr_offset(base, indexes.x3, "Int"), "Int") // ) // // pub fn i64x4_scatter(base: ptr, indexes: I64x4, values: I64x4) -> Int with Unsafe: // mem_store(ptr_offset(base, indexes.x0, "Int"), values.x0, "Int") // mem_store(ptr_offset(base, indexes.x1, "Int"), values.x1, "Int") // mem_store(ptr_offset(base, indexes.x2, "Int"), values.x2, "Int") // mem_store(ptr_offset(base, indexes.x3, "Int"), values.x3, "Int") // return i64x4_horizontal_sum(values) //!end-kain-file //!kain-file // path = "stdlib.map.json" // kind = "text" // encoding = "utf8" // bytes = 1299912 // sha256 = "sha256:de7b8e7f760fda12d5ffff03aa7b0dc8ecc38c745eec8470759de545657bab46" // trailing_newline = true //!kain-file-content // {"schema_version":1,"generated_by":"kain-stdlib-map","source_roots":["stdlib/*.kn","crates/core/src/stdlib.rs","runtime/native_core_runtime.toml","runtime/native_runtime.toml"],"summary":{"module_count":67,"symbol_count":4166,"public_symbol_count":3250,"builtin_count":240,"native_service_count":48},"modules":[{"name":"actor","import_path":"std::actor","source_path":"stdlib/actor.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"abi_actor_abi_version","qualified_name":"std::actor::abi_actor_abi_version","kind":"extern_function","visibility":"private","signature":"fn abi_actor_abi_version() -> Int","source_path":"stdlib/actor.kn","line":2,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_actor_invalid_id","qualified_name":"std::actor::abi_actor_invalid_id","kind":"extern_function","visibility":"private","signature":"fn abi_actor_invalid_id() -> Int","source_path":"stdlib/actor.kn","line":5,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_actor_default_mailbox_capacity","qualified_name":"std::actor::abi_actor_default_mailbox_capacity","kind":"extern_function","visibility":"private","signature":"fn abi_actor_default_mailbox_capacity() -> Int","source_path":"stdlib/actor.kn","line":8,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_actor_unbounded_mailbox_capacity","qualified_name":"std::actor::abi_actor_unbounded_mailbox_capacity","kind":"extern_function","visibility":"private","signature":"fn abi_actor_unbounded_mailbox_capacity() -> Int","source_path":"stdlib/actor.kn","line":11,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_actor_default_ask_timeout_ms","qualified_name":"std::actor::abi_actor_default_ask_timeout_ms","kind":"extern_function","visibility":"private","signature":"fn abi_actor_default_ask_timeout_ms() -> Int","source_path":"stdlib/actor.kn","line":14,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_actor_default_shutdown_grace_ms","qualified_name":"std::actor::abi_actor_default_shutdown_grace_ms","kind":"extern_function","visibility":"private","signature":"fn abi_actor_default_shutdown_grace_ms() -> Int","source_path":"stdlib/actor.kn","line":17,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_actor_supervision_max_restarts","qualified_name":"std::actor::abi_actor_supervision_max_restarts","kind":"extern_function","visibility":"private","signature":"fn abi_actor_supervision_max_restarts() -> Int","source_path":"stdlib/actor.kn","line":20,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_actor_supervision_restart_window_millis","qualified_name":"std::actor::abi_actor_supervision_restart_window_millis","kind":"extern_function","visibility":"private","signature":"fn abi_actor_supervision_restart_window_millis() -> Int","source_path":"stdlib/actor.kn","line":23,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_actor_spawn","qualified_name":"std::actor::abi_actor_spawn","kind":"extern_function","visibility":"private","signature":"fn abi_actor_spawn(actor_name: String, init_payload: String) -> Int","source_path":"stdlib/actor.kn","line":26,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_actor_send","qualified_name":"std::actor::abi_actor_send","kind":"extern_function","visibility":"private","signature":"fn abi_actor_send(actor_id: Int, message_name: String, data_payload: String) -> Int","source_path":"stdlib/actor.kn","line":29,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_actor_state_invalid","qualified_name":"std::actor::abi_actor_state_invalid","kind":"extern_function","visibility":"private","signature":"fn abi_actor_state_invalid(actor_id: Int) -> Bool","source_path":"stdlib/actor.kn","line":32,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_actor_get_state","qualified_name":"std::actor::abi_actor_get_state","kind":"extern_function","visibility":"private","signature":"fn abi_actor_get_state(actor_id: Int) -> Int","source_path":"stdlib/actor.kn","line":35,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_actor_shutdown","qualified_name":"std::actor::abi_actor_shutdown","kind":"extern_function","visibility":"private","signature":"fn abi_actor_shutdown(actor_id: Int) -> Int","source_path":"stdlib/actor.kn","line":38,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_actor_kill","qualified_name":"std::actor::abi_actor_kill","kind":"extern_function","visibility":"private","signature":"fn abi_actor_kill(actor_id: Int) -> Int","source_path":"stdlib/actor.kn","line":41,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_actor_registry_lookup","qualified_name":"std::actor::abi_actor_registry_lookup","kind":"extern_function","visibility":"private","signature":"fn abi_actor_registry_lookup(name: String) -> Int","source_path":"stdlib/actor.kn","line":44,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_actor_registry_register","qualified_name":"std::actor::abi_actor_registry_register","kind":"extern_function","visibility":"private","signature":"fn abi_actor_registry_register(name: String, actor_id: Int) -> Int","source_path":"stdlib/actor.kn","line":47,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_actor_registry_unregister","qualified_name":"std::actor::abi_actor_registry_unregister","kind":"extern_function","visibility":"private","signature":"fn abi_actor_registry_unregister(name: String) -> Int","source_path":"stdlib/actor.kn","line":50,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_actor_monitor","qualified_name":"std::actor::abi_actor_monitor","kind":"extern_function","visibility":"private","signature":"fn abi_actor_monitor(monitor_id: Int, monitored_id: Int) -> Int","source_path":"stdlib/actor.kn","line":53,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_actor_demonitor","qualified_name":"std::actor::abi_actor_demonitor","kind":"extern_function","visibility":"private","signature":"fn abi_actor_demonitor(monitor_id: Int, monitored_id: Int) -> Int","source_path":"stdlib/actor.kn","line":56,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_actor_link","qualified_name":"std::actor::abi_actor_link","kind":"extern_function","visibility":"private","signature":"fn abi_actor_link(actor_a: Int, actor_b: Int) -> Int","source_path":"stdlib/actor.kn","line":59,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_actor_unlink","qualified_name":"std::actor::abi_actor_unlink","kind":"extern_function","visibility":"private","signature":"fn abi_actor_unlink(actor_a: Int, actor_b: Int) -> Int","source_path":"stdlib/actor.kn","line":62,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_actor_supervision_observed_child_exit_count","qualified_name":"std::actor::abi_actor_supervision_observed_child_exit_count","kind":"extern_function","visibility":"private","signature":"fn abi_actor_supervision_observed_child_exit_count(actor_id: Int) -> Int","source_path":"stdlib/actor.kn","line":65,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_actor_supervision_restart_attempt_count","qualified_name":"std::actor::abi_actor_supervision_restart_attempt_count","kind":"extern_function","visibility":"private","signature":"fn abi_actor_supervision_restart_attempt_count(actor_id: Int) -> Int","source_path":"stdlib/actor.kn","line":68,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_actor_supervision_escalation_count","qualified_name":"std::actor::abi_actor_supervision_escalation_count","kind":"extern_function","visibility":"private","signature":"fn abi_actor_supervision_escalation_count(actor_id: Int) -> Int","source_path":"stdlib/actor.kn","line":71,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_actor_supervision_limit_hit","qualified_name":"std::actor::abi_actor_supervision_limit_hit","kind":"extern_function","visibility":"private","signature":"fn abi_actor_supervision_limit_hit(actor_id: Int) -> Bool","source_path":"stdlib/actor.kn","line":74,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_actor_scheduler_queue_depth","qualified_name":"std::actor::abi_actor_scheduler_queue_depth","kind":"extern_function","visibility":"private","signature":"fn abi_actor_scheduler_queue_depth() -> Int","source_path":"stdlib/actor.kn","line":77,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_actor_scheduler_max_queue_depth","qualified_name":"std::actor::abi_actor_scheduler_max_queue_depth","kind":"extern_function","visibility":"private","signature":"fn abi_actor_scheduler_max_queue_depth() -> Int","source_path":"stdlib/actor.kn","line":80,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_actor_scheduler_total_enqueued","qualified_name":"std::actor::abi_actor_scheduler_total_enqueued","kind":"extern_function","visibility":"private","signature":"fn abi_actor_scheduler_total_enqueued() -> Int","source_path":"stdlib/actor.kn","line":83,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_actor_scheduler_total_dequeued","qualified_name":"std::actor::abi_actor_scheduler_total_dequeued","kind":"extern_function","visibility":"private","signature":"fn abi_actor_scheduler_total_dequeued() -> Int","source_path":"stdlib/actor.kn","line":86,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_actor_scheduler_worker_count","qualified_name":"std::actor::abi_actor_scheduler_worker_count","kind":"extern_function","visibility":"private","signature":"fn abi_actor_scheduler_worker_count() -> Int","source_path":"stdlib/actor.kn","line":89,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_actor_scheduler_active_workers","qualified_name":"std::actor::abi_actor_scheduler_active_workers","kind":"extern_function","visibility":"private","signature":"fn abi_actor_scheduler_active_workers() -> Int","source_path":"stdlib/actor.kn","line":92,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_actor_scheduler_busy_workers","qualified_name":"std::actor::abi_actor_scheduler_busy_workers","kind":"extern_function","visibility":"private","signature":"fn abi_actor_scheduler_busy_workers() -> Int","source_path":"stdlib/actor.kn","line":95,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_actor_scheduler_overflow_thread_spawns","qualified_name":"std::actor::abi_actor_scheduler_overflow_thread_spawns","kind":"extern_function","visibility":"private","signature":"fn abi_actor_scheduler_overflow_thread_spawns() -> Int","source_path":"stdlib/actor.kn","line":98,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"native_actor_invalid_id","qualified_name":"std::actor::native_actor_invalid_id","kind":"function","visibility":"public","signature":"fn native_actor_invalid_id() -> Int","source_path":"stdlib/actor.kn","line":100,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_actor_abi_version","qualified_name":"std::actor::native_actor_abi_version","kind":"function","visibility":"public","signature":"fn native_actor_abi_version() -> Int","source_path":"stdlib/actor.kn","line":103,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_actor_default_mailbox_capacity","qualified_name":"std::actor::native_actor_default_mailbox_capacity","kind":"function","visibility":"public","signature":"fn native_actor_default_mailbox_capacity() -> Int","source_path":"stdlib/actor.kn","line":106,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_actor_unbounded_mailbox_capacity","qualified_name":"std::actor::native_actor_unbounded_mailbox_capacity","kind":"function","visibility":"public","signature":"fn native_actor_unbounded_mailbox_capacity() -> Int","source_path":"stdlib/actor.kn","line":109,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_actor_default_ask_timeout_ms","qualified_name":"std::actor::native_actor_default_ask_timeout_ms","kind":"function","visibility":"public","signature":"fn native_actor_default_ask_timeout_ms() -> Int","source_path":"stdlib/actor.kn","line":112,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_actor_default_shutdown_grace_ms","qualified_name":"std::actor::native_actor_default_shutdown_grace_ms","kind":"function","visibility":"public","signature":"fn native_actor_default_shutdown_grace_ms() -> Int","source_path":"stdlib/actor.kn","line":115,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_actor_supervision_max_restarts","qualified_name":"std::actor::native_actor_supervision_max_restarts","kind":"function","visibility":"public","signature":"fn native_actor_supervision_max_restarts() -> Int","source_path":"stdlib/actor.kn","line":118,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_actor_supervision_restart_window_millis","qualified_name":"std::actor::native_actor_supervision_restart_window_millis","kind":"function","visibility":"public","signature":"fn native_actor_supervision_restart_window_millis() -> Int","source_path":"stdlib/actor.kn","line":121,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_actor_spawn","qualified_name":"std::actor::native_actor_spawn","kind":"function","visibility":"public","signature":"fn native_actor_spawn(actor_name: String, init_payload: String) -> Int","source_path":"stdlib/actor.kn","line":124,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_actor_send","qualified_name":"std::actor::native_actor_send","kind":"function","visibility":"public","signature":"fn native_actor_send(actor_id: Int, message_name: String, data_payload: String) -> Int","source_path":"stdlib/actor.kn","line":127,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_actor_id_is_valid","qualified_name":"std::actor::native_actor_id_is_valid","kind":"function","visibility":"public","signature":"fn native_actor_id_is_valid(actor_id: Int) -> Bool","source_path":"stdlib/actor.kn","line":130,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_actor_state_invalid","qualified_name":"std::actor::native_actor_state_invalid","kind":"function","visibility":"public","signature":"fn native_actor_state_invalid(actor_id: Int) -> Bool","source_path":"stdlib/actor.kn","line":133,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_actor_get_state","qualified_name":"std::actor::native_actor_get_state","kind":"function","visibility":"public","signature":"fn native_actor_get_state(actor_id: Int) -> Int","source_path":"stdlib/actor.kn","line":136,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_actor_is_running","qualified_name":"std::actor::native_actor_is_running","kind":"function","visibility":"public","signature":"fn native_actor_is_running(actor_id: Int) -> Bool","source_path":"stdlib/actor.kn","line":139,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_actor_is_terminal","qualified_name":"std::actor::native_actor_is_terminal","kind":"function","visibility":"public","signature":"fn native_actor_is_terminal(actor_id: Int) -> Bool","source_path":"stdlib/actor.kn","line":142,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_actor_shutdown","qualified_name":"std::actor::native_actor_shutdown","kind":"function","visibility":"public","signature":"fn native_actor_shutdown(actor_id: Int) -> Int","source_path":"stdlib/actor.kn","line":148,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_actor_kill","qualified_name":"std::actor::native_actor_kill","kind":"function","visibility":"public","signature":"fn native_actor_kill(actor_id: Int) -> Int","source_path":"stdlib/actor.kn","line":151,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_actor_registry_lookup","qualified_name":"std::actor::native_actor_registry_lookup","kind":"function","visibility":"public","signature":"fn native_actor_registry_lookup(name: String) -> Int","source_path":"stdlib/actor.kn","line":154,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_actor_registry_register","qualified_name":"std::actor::native_actor_registry_register","kind":"function","visibility":"public","signature":"fn native_actor_registry_register(name: String, actor_id: Int) -> Int","source_path":"stdlib/actor.kn","line":157,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_actor_registry_unregister","qualified_name":"std::actor::native_actor_registry_unregister","kind":"function","visibility":"public","signature":"fn native_actor_registry_unregister(name: String) -> Int","source_path":"stdlib/actor.kn","line":160,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_actor_registry_has","qualified_name":"std::actor::native_actor_registry_has","kind":"function","visibility":"public","signature":"fn native_actor_registry_has(name: String) -> Bool","source_path":"stdlib/actor.kn","line":163,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_actor_monitor","qualified_name":"std::actor::native_actor_monitor","kind":"function","visibility":"public","signature":"fn native_actor_monitor(monitor_id: Int, monitored_id: Int) -> Int","source_path":"stdlib/actor.kn","line":166,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_actor_demonitor","qualified_name":"std::actor::native_actor_demonitor","kind":"function","visibility":"public","signature":"fn native_actor_demonitor(monitor_id: Int, monitored_id: Int) -> Int","source_path":"stdlib/actor.kn","line":169,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_actor_link","qualified_name":"std::actor::native_actor_link","kind":"function","visibility":"public","signature":"fn native_actor_link(actor_a: Int, actor_b: Int) -> Int","source_path":"stdlib/actor.kn","line":172,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_actor_unlink","qualified_name":"std::actor::native_actor_unlink","kind":"function","visibility":"public","signature":"fn native_actor_unlink(actor_a: Int, actor_b: Int) -> Int","source_path":"stdlib/actor.kn","line":175,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_actor_supervision_observed_child_exit_count","qualified_name":"std::actor::native_actor_supervision_observed_child_exit_count","kind":"function","visibility":"public","signature":"fn native_actor_supervision_observed_child_exit_count(actor_id: Int) -> Int","source_path":"stdlib/actor.kn","line":178,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_actor_supervision_restart_attempt_count","qualified_name":"std::actor::native_actor_supervision_restart_attempt_count","kind":"function","visibility":"public","signature":"fn native_actor_supervision_restart_attempt_count(actor_id: Int) -> Int","source_path":"stdlib/actor.kn","line":181,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_actor_supervision_escalation_count","qualified_name":"std::actor::native_actor_supervision_escalation_count","kind":"function","visibility":"public","signature":"fn native_actor_supervision_escalation_count(actor_id: Int) -> Int","source_path":"stdlib/actor.kn","line":184,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_actor_supervision_limit_hit","qualified_name":"std::actor::native_actor_supervision_limit_hit","kind":"function","visibility":"public","signature":"fn native_actor_supervision_limit_hit(actor_id: Int) -> Bool","source_path":"stdlib/actor.kn","line":187,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_actor_scheduler_queue_depth","qualified_name":"std::actor::native_actor_scheduler_queue_depth","kind":"function","visibility":"public","signature":"fn native_actor_scheduler_queue_depth() -> Int","source_path":"stdlib/actor.kn","line":190,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_actor_scheduler_max_queue_depth","qualified_name":"std::actor::native_actor_scheduler_max_queue_depth","kind":"function","visibility":"public","signature":"fn native_actor_scheduler_max_queue_depth() -> Int","source_path":"stdlib/actor.kn","line":193,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_actor_scheduler_total_enqueued","qualified_name":"std::actor::native_actor_scheduler_total_enqueued","kind":"function","visibility":"public","signature":"fn native_actor_scheduler_total_enqueued() -> Int","source_path":"stdlib/actor.kn","line":196,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_actor_scheduler_total_dequeued","qualified_name":"std::actor::native_actor_scheduler_total_dequeued","kind":"function","visibility":"public","signature":"fn native_actor_scheduler_total_dequeued() -> Int","source_path":"stdlib/actor.kn","line":199,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_actor_scheduler_worker_count","qualified_name":"std::actor::native_actor_scheduler_worker_count","kind":"function","visibility":"public","signature":"fn native_actor_scheduler_worker_count() -> Int","source_path":"stdlib/actor.kn","line":202,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_actor_scheduler_active_workers","qualified_name":"std::actor::native_actor_scheduler_active_workers","kind":"function","visibility":"public","signature":"fn native_actor_scheduler_active_workers() -> Int","source_path":"stdlib/actor.kn","line":205,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_actor_scheduler_busy_workers","qualified_name":"std::actor::native_actor_scheduler_busy_workers","kind":"function","visibility":"public","signature":"fn native_actor_scheduler_busy_workers() -> Int","source_path":"stdlib/actor.kn","line":208,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_actor_scheduler_overflow_thread_spawns","qualified_name":"std::actor::native_actor_scheduler_overflow_thread_spawns","kind":"function","visibility":"public","signature":"fn native_actor_scheduler_overflow_thread_spawns() -> Int","source_path":"stdlib/actor.kn","line":211,"attributes":[],"docs":[],"target_notes":[]},{"name":"actor_invalid_id","qualified_name":"std::actor::actor_invalid_id","kind":"function","visibility":"public","signature":"fn actor_invalid_id() -> Int","source_path":"stdlib/actor.kn","line":215,"attributes":[],"docs":[],"target_notes":[]},{"name":"actor_abi_version","qualified_name":"std::actor::actor_abi_version","kind":"function","visibility":"public","signature":"fn actor_abi_version() -> Int","source_path":"stdlib/actor.kn","line":218,"attributes":[],"docs":[],"target_notes":[]},{"name":"actor_default_mailbox_capacity","qualified_name":"std::actor::actor_default_mailbox_capacity","kind":"function","visibility":"public","signature":"fn actor_default_mailbox_capacity() -> Int","source_path":"stdlib/actor.kn","line":221,"attributes":[],"docs":[],"target_notes":[]},{"name":"actor_unbounded_mailbox_capacity","qualified_name":"std::actor::actor_unbounded_mailbox_capacity","kind":"function","visibility":"public","signature":"fn actor_unbounded_mailbox_capacity() -> Int","source_path":"stdlib/actor.kn","line":224,"attributes":[],"docs":[],"target_notes":[]},{"name":"actor_default_ask_timeout_ms","qualified_name":"std::actor::actor_default_ask_timeout_ms","kind":"function","visibility":"public","signature":"fn actor_default_ask_timeout_ms() -> Int","source_path":"stdlib/actor.kn","line":227,"attributes":[],"docs":[],"target_notes":[]},{"name":"actor_default_shutdown_grace_ms","qualified_name":"std::actor::actor_default_shutdown_grace_ms","kind":"function","visibility":"public","signature":"fn actor_default_shutdown_grace_ms() -> Int","source_path":"stdlib/actor.kn","line":230,"attributes":[],"docs":[],"target_notes":[]},{"name":"actor_supervision_max_restarts","qualified_name":"std::actor::actor_supervision_max_restarts","kind":"function","visibility":"public","signature":"fn actor_supervision_max_restarts() -> Int","source_path":"stdlib/actor.kn","line":233,"attributes":[],"docs":[],"target_notes":[]},{"name":"actor_supervision_restart_window_millis","qualified_name":"std::actor::actor_supervision_restart_window_millis","kind":"function","visibility":"public","signature":"fn actor_supervision_restart_window_millis() -> Int","source_path":"stdlib/actor.kn","line":236,"attributes":[],"docs":[],"target_notes":[]},{"name":"actor_spawn","qualified_name":"std::actor::actor_spawn","kind":"function","visibility":"public","signature":"fn actor_spawn(actor_name: String, init_payload: String) -> Int","source_path":"stdlib/actor.kn","line":239,"attributes":[],"docs":[],"target_notes":[]},{"name":"actor_send","qualified_name":"std::actor::actor_send","kind":"function","visibility":"public","signature":"fn actor_send(actor_id: Int, message_name: String, data_payload: String) -> Int","source_path":"stdlib/actor.kn","line":242,"attributes":[],"docs":[],"target_notes":[]},{"name":"actor_id_is_valid","qualified_name":"std::actor::actor_id_is_valid","kind":"function","visibility":"public","signature":"fn actor_id_is_valid(actor_id: Int) -> Bool","source_path":"stdlib/actor.kn","line":245,"attributes":[],"docs":[],"target_notes":[]},{"name":"actor_state_invalid","qualified_name":"std::actor::actor_state_invalid","kind":"function","visibility":"public","signature":"fn actor_state_invalid(actor_id: Int) -> Bool","source_path":"stdlib/actor.kn","line":248,"attributes":[],"docs":[],"target_notes":[]},{"name":"actor_get_state","qualified_name":"std::actor::actor_get_state","kind":"function","visibility":"public","signature":"fn actor_get_state(actor_id: Int) -> Int","source_path":"stdlib/actor.kn","line":251,"attributes":[],"docs":[],"target_notes":[]},{"name":"actor_is_running","qualified_name":"std::actor::actor_is_running","kind":"function","visibility":"public","signature":"fn actor_is_running(actor_id: Int) -> Bool","source_path":"stdlib/actor.kn","line":254,"attributes":[],"docs":[],"target_notes":[]},{"name":"actor_is_terminal","qualified_name":"std::actor::actor_is_terminal","kind":"function","visibility":"public","signature":"fn actor_is_terminal(actor_id: Int) -> Bool","source_path":"stdlib/actor.kn","line":257,"attributes":[],"docs":[],"target_notes":[]},{"name":"actor_shutdown","qualified_name":"std::actor::actor_shutdown","kind":"function","visibility":"public","signature":"fn actor_shutdown(actor_id: Int) -> Int","source_path":"stdlib/actor.kn","line":260,"attributes":[],"docs":[],"target_notes":[]},{"name":"actor_kill","qualified_name":"std::actor::actor_kill","kind":"function","visibility":"public","signature":"fn actor_kill(actor_id: Int) -> Int","source_path":"stdlib/actor.kn","line":263,"attributes":[],"docs":[],"target_notes":[]},{"name":"actor_registry_lookup","qualified_name":"std::actor::actor_registry_lookup","kind":"function","visibility":"public","signature":"fn actor_registry_lookup(name: String) -> Int","source_path":"stdlib/actor.kn","line":266,"attributes":[],"docs":[],"target_notes":[]},{"name":"actor_registry_register","qualified_name":"std::actor::actor_registry_register","kind":"function","visibility":"public","signature":"fn actor_registry_register(name: String, actor_id: Int) -> Int","source_path":"stdlib/actor.kn","line":269,"attributes":[],"docs":[],"target_notes":[]},{"name":"actor_registry_unregister","qualified_name":"std::actor::actor_registry_unregister","kind":"function","visibility":"public","signature":"fn actor_registry_unregister(name: String) -> Int","source_path":"stdlib/actor.kn","line":272,"attributes":[],"docs":[],"target_notes":[]},{"name":"actor_registry_has","qualified_name":"std::actor::actor_registry_has","kind":"function","visibility":"public","signature":"fn actor_registry_has(name: String) -> Bool","source_path":"stdlib/actor.kn","line":275,"attributes":[],"docs":[],"target_notes":[]},{"name":"actor_monitor","qualified_name":"std::actor::actor_monitor","kind":"function","visibility":"public","signature":"fn actor_monitor(monitor_id: Int, monitored_id: Int) -> Int","source_path":"stdlib/actor.kn","line":278,"attributes":[],"docs":[],"target_notes":[]},{"name":"actor_demonitor","qualified_name":"std::actor::actor_demonitor","kind":"function","visibility":"public","signature":"fn actor_demonitor(monitor_id: Int, monitored_id: Int) -> Int","source_path":"stdlib/actor.kn","line":281,"attributes":[],"docs":[],"target_notes":[]},{"name":"actor_link","qualified_name":"std::actor::actor_link","kind":"function","visibility":"public","signature":"fn actor_link(actor_a: Int, actor_b: Int) -> Int","source_path":"stdlib/actor.kn","line":284,"attributes":[],"docs":[],"target_notes":[]},{"name":"actor_unlink","qualified_name":"std::actor::actor_unlink","kind":"function","visibility":"public","signature":"fn actor_unlink(actor_a: Int, actor_b: Int) -> Int","source_path":"stdlib/actor.kn","line":287,"attributes":[],"docs":[],"target_notes":[]},{"name":"actor_supervision_observed_child_exit_count","qualified_name":"std::actor::actor_supervision_observed_child_exit_count","kind":"function","visibility":"public","signature":"fn actor_supervision_observed_child_exit_count(actor_id: Int) -> Int","source_path":"stdlib/actor.kn","line":290,"attributes":[],"docs":[],"target_notes":[]},{"name":"actor_supervision_restart_attempt_count","qualified_name":"std::actor::actor_supervision_restart_attempt_count","kind":"function","visibility":"public","signature":"fn actor_supervision_restart_attempt_count(actor_id: Int) -> Int","source_path":"stdlib/actor.kn","line":293,"attributes":[],"docs":[],"target_notes":[]},{"name":"actor_supervision_escalation_count","qualified_name":"std::actor::actor_supervision_escalation_count","kind":"function","visibility":"public","signature":"fn actor_supervision_escalation_count(actor_id: Int) -> Int","source_path":"stdlib/actor.kn","line":296,"attributes":[],"docs":[],"target_notes":[]},{"name":"actor_supervision_limit_hit","qualified_name":"std::actor::actor_supervision_limit_hit","kind":"function","visibility":"public","signature":"fn actor_supervision_limit_hit(actor_id: Int) -> Bool","source_path":"stdlib/actor.kn","line":299,"attributes":[],"docs":[],"target_notes":[]},{"name":"actor_scheduler_queue_depth","qualified_name":"std::actor::actor_scheduler_queue_depth","kind":"function","visibility":"public","signature":"fn actor_scheduler_queue_depth() -> Int","source_path":"stdlib/actor.kn","line":302,"attributes":[],"docs":[],"target_notes":[]},{"name":"actor_scheduler_max_queue_depth","qualified_name":"std::actor::actor_scheduler_max_queue_depth","kind":"function","visibility":"public","signature":"fn actor_scheduler_max_queue_depth() -> Int","source_path":"stdlib/actor.kn","line":305,"attributes":[],"docs":[],"target_notes":[]},{"name":"actor_scheduler_total_enqueued","qualified_name":"std::actor::actor_scheduler_total_enqueued","kind":"function","visibility":"public","signature":"fn actor_scheduler_total_enqueued() -> Int","source_path":"stdlib/actor.kn","line":308,"attributes":[],"docs":[],"target_notes":[]},{"name":"actor_scheduler_total_dequeued","qualified_name":"std::actor::actor_scheduler_total_dequeued","kind":"function","visibility":"public","signature":"fn actor_scheduler_total_dequeued() -> Int","source_path":"stdlib/actor.kn","line":311,"attributes":[],"docs":[],"target_notes":[]},{"name":"actor_scheduler_worker_count","qualified_name":"std::actor::actor_scheduler_worker_count","kind":"function","visibility":"public","signature":"fn actor_scheduler_worker_count() -> Int","source_path":"stdlib/actor.kn","line":314,"attributes":[],"docs":[],"target_notes":[]},{"name":"actor_scheduler_active_workers","qualified_name":"std::actor::actor_scheduler_active_workers","kind":"function","visibility":"public","signature":"fn actor_scheduler_active_workers() -> Int","source_path":"stdlib/actor.kn","line":317,"attributes":[],"docs":[],"target_notes":[]},{"name":"actor_scheduler_busy_workers","qualified_name":"std::actor::actor_scheduler_busy_workers","kind":"function","visibility":"public","signature":"fn actor_scheduler_busy_workers() -> Int","source_path":"stdlib/actor.kn","line":320,"attributes":[],"docs":[],"target_notes":[]},{"name":"actor_scheduler_overflow_thread_spawns","qualified_name":"std::actor::actor_scheduler_overflow_thread_spawns","kind":"function","visibility":"public","signature":"fn actor_scheduler_overflow_thread_spawns() -> Int","source_path":"stdlib/actor.kn","line":323,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"alloc","import_path":"std::alloc","source_path":"stdlib/alloc.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"BumpAllocator","qualified_name":"std::alloc::BumpAllocator","kind":"struct","visibility":"public","signature":"struct BumpAllocator","source_path":"stdlib/alloc.kn","line":3,"attributes":[],"docs":[],"target_notes":[]},{"name":"BumpAllocation","qualified_name":"std::alloc::BumpAllocation","kind":"struct","visibility":"public","signature":"struct BumpAllocation","source_path":"stdlib/alloc.kn","line":8,"attributes":[],"docs":[],"target_notes":[]},{"name":"ArenaAllocator","qualified_name":"std::alloc::ArenaAllocator","kind":"struct","visibility":"public","signature":"struct ArenaAllocator","source_path":"stdlib/alloc.kn","line":15,"attributes":[],"docs":[],"target_notes":[]},{"name":"ArenaAllocation","qualified_name":"std::alloc::ArenaAllocation","kind":"struct","visibility":"public","signature":"struct ArenaAllocation","source_path":"stdlib/alloc.kn","line":21,"attributes":[],"docs":[],"target_notes":[]},{"name":"PoolAllocator","qualified_name":"std::alloc::PoolAllocator","kind":"struct","visibility":"public","signature":"struct PoolAllocator","source_path":"stdlib/alloc.kn","line":28,"attributes":[],"docs":[],"target_notes":[]},{"name":"PoolAllocation","qualified_name":"std::alloc::PoolAllocation","kind":"struct","visibility":"public","signature":"struct PoolAllocation","source_path":"stdlib/alloc.kn","line":35,"attributes":[],"docs":[],"target_notes":[]},{"name":"bump_allocator_create","qualified_name":"std::alloc::bump_allocator_create","kind":"function","visibility":"public","signature":"fn bump_allocator_create(cells: Int) -> BumpAllocator","source_path":"stdlib/alloc.kn","line":41,"attributes":[],"docs":[],"target_notes":[]},{"name":"bump_allocator_remaining","qualified_name":"std::alloc::bump_allocator_remaining","kind":"function","visibility":"public","signature":"fn bump_allocator_remaining(allocator: BumpAllocator) -> Int","source_path":"stdlib/alloc.kn","line":45,"attributes":[],"docs":[],"target_notes":[]},{"name":"bump_allocator_reset","qualified_name":"std::alloc::bump_allocator_reset","kind":"function","visibility":"public","signature":"fn bump_allocator_reset(allocator: BumpAllocator) -> BumpAllocator","source_path":"stdlib/alloc.kn","line":48,"attributes":[],"docs":[],"target_notes":[]},{"name":"bump_alloc_cells","qualified_name":"std::alloc::bump_alloc_cells","kind":"function","visibility":"public","signature":"fn bump_alloc_cells(allocator: BumpAllocator, cells: Int) -> BumpAllocation","source_path":"stdlib/alloc.kn","line":51,"attributes":[],"docs":[],"target_notes":[]},{"name":"bump_allocator_destroy","qualified_name":"std::alloc::bump_allocator_destroy","kind":"function","visibility":"public","signature":"fn bump_allocator_destroy(allocator: BumpAllocator) -> Int","source_path":"stdlib/alloc.kn","line":61,"attributes":[],"docs":[],"target_notes":[]},{"name":"arena_allocator_create","qualified_name":"std::alloc::arena_allocator_create","kind":"function","visibility":"public","signature":"fn arena_allocator_create(cells: Int) -> ArenaAllocator","source_path":"stdlib/alloc.kn","line":65,"attributes":[],"docs":[],"target_notes":[]},{"name":"arena_allocator_remaining","qualified_name":"std::alloc::arena_allocator_remaining","kind":"function","visibility":"public","signature":"fn arena_allocator_remaining(arena: ArenaAllocator) -> Int","source_path":"stdlib/alloc.kn","line":69,"attributes":[],"docs":[],"target_notes":[]},{"name":"arena_allocator_reset","qualified_name":"std::alloc::arena_allocator_reset","kind":"function","visibility":"public","signature":"fn arena_allocator_reset(arena: ArenaAllocator) -> ArenaAllocator","source_path":"stdlib/alloc.kn","line":72,"attributes":[],"docs":[],"target_notes":[]},{"name":"arena_alloc_cells","qualified_name":"std::alloc::arena_alloc_cells","kind":"function","visibility":"public","signature":"fn arena_alloc_cells(arena: ArenaAllocator, cells: Int) -> ArenaAllocation","source_path":"stdlib/alloc.kn","line":75,"attributes":[],"docs":[],"target_notes":[]},{"name":"arena_allocator_destroy","qualified_name":"std::alloc::arena_allocator_destroy","kind":"function","visibility":"public","signature":"fn arena_allocator_destroy(arena: ArenaAllocator) -> Int","source_path":"stdlib/alloc.kn","line":87,"attributes":[],"docs":[],"target_notes":[]},{"name":"pool_allocator_create","qualified_name":"std::alloc::pool_allocator_create","kind":"function","visibility":"public","signature":"fn pool_allocator_create(block_count: Int, block_cells: Int) -> PoolAllocator","source_path":"stdlib/alloc.kn","line":91,"attributes":[],"docs":[],"target_notes":[]},{"name":"pool_allocator_available","qualified_name":"std::alloc::pool_allocator_available","kind":"function","visibility":"public","signature":"fn pool_allocator_available(pool: PoolAllocator) -> Int","source_path":"stdlib/alloc.kn","line":102,"attributes":[],"docs":[],"target_notes":[]},{"name":"pool_alloc_block","qualified_name":"std::alloc::pool_alloc_block","kind":"function","visibility":"public","signature":"fn pool_alloc_block(pool: PoolAllocator) -> PoolAllocation","source_path":"stdlib/alloc.kn","line":105,"attributes":[],"docs":[],"target_notes":[]},{"name":"pool_free_block","qualified_name":"std::alloc::pool_free_block","kind":"function","visibility":"public","signature":"fn pool_free_block(pool: PoolAllocator, block_index: Int) -> PoolAllocator","source_path":"stdlib/alloc.kn","line":113,"attributes":[],"docs":[],"target_notes":[]},{"name":"pool_allocator_destroy","qualified_name":"std::alloc::pool_allocator_destroy","kind":"function","visibility":"public","signature":"fn pool_allocator_destroy(pool: PoolAllocator) -> Int","source_path":"stdlib/alloc.kn","line":123,"attributes":[],"docs":[],"target_notes":[]},{"name":"arena_create","qualified_name":"std::alloc::arena_create","kind":"function","visibility":"public","signature":"fn arena_create(cells: Int) -> ArenaAllocator","source_path":"stdlib/alloc.kn","line":128,"attributes":[],"docs":[],"target_notes":[]},{"name":"arena_alloc","qualified_name":"std::alloc::arena_alloc","kind":"function","visibility":"public","signature":"fn arena_alloc(arena: ArenaAllocator, cells: Int) -> ArenaAllocation","source_path":"stdlib/alloc.kn","line":131,"attributes":[],"docs":[],"target_notes":[]},{"name":"bump_create","qualified_name":"std::alloc::bump_create","kind":"function","visibility":"public","signature":"fn bump_create(cells: Int) -> BumpAllocator","source_path":"stdlib/alloc.kn","line":134,"attributes":[],"docs":[],"target_notes":[]},{"name":"bump_alloc","qualified_name":"std::alloc::bump_alloc","kind":"function","visibility":"public","signature":"fn bump_alloc(allocator: BumpAllocator, cells: Int) -> BumpAllocation","source_path":"stdlib/alloc.kn","line":137,"attributes":[],"docs":[],"target_notes":[]},{"name":"pool_create","qualified_name":"std::alloc::pool_create","kind":"function","visibility":"public","signature":"fn pool_create(block_count: Int, block_cells: Int) -> PoolAllocator","source_path":"stdlib/alloc.kn","line":140,"attributes":[],"docs":[],"target_notes":[]},{"name":"pool_alloc","qualified_name":"std::alloc::pool_alloc","kind":"function","visibility":"public","signature":"fn pool_alloc(pool: PoolAllocator) -> PoolAllocation","source_path":"stdlib/alloc.kn","line":143,"attributes":[],"docs":[],"target_notes":[]},{"name":"AllocSpan","qualified_name":"std::alloc::AllocSpan","kind":"struct","visibility":"public","signature":"struct AllocSpan","source_path":"stdlib/alloc.kn","line":149,"attributes":[],"docs":[],"target_notes":[]},{"name":"AllocResult","qualified_name":"std::alloc::AllocResult","kind":"struct","visibility":"public","signature":"struct AllocResult","source_path":"stdlib/alloc.kn","line":153,"attributes":[],"docs":[],"target_notes":[]},{"name":"AllocatorVTable","qualified_name":"std::alloc::AllocatorVTable","kind":"struct","visibility":"public","signature":"struct AllocatorVTable","source_path":"stdlib/alloc.kn","line":157,"attributes":[],"docs":[],"target_notes":[]},{"name":"Allocator","qualified_name":"std::alloc::Allocator","kind":"struct","visibility":"public","signature":"struct Allocator","source_path":"stdlib/alloc.kn","line":162,"attributes":[],"docs":[],"target_notes":[]},{"name":"alloc_grow_buffer","qualified_name":"std::alloc::alloc_grow_buffer","kind":"function","visibility":"public","signature":"fn alloc_grow_buffer(buffer: ptr, current_cap: Int, needed_cap: Int) -> ptr","source_path":"stdlib/alloc.kn","line":168,"attributes":[],"docs":[],"target_notes":[]},{"name":"alloc_span_slice","qualified_name":"std::alloc::alloc_span_slice","kind":"function","visibility":"public","signature":"fn alloc_span_slice(span: AllocSpan, start: Int, length: Int) -> AllocSpan","source_path":"stdlib/alloc.kn","line":184,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"ascii","import_path":"std::ascii","source_path":"stdlib/ascii.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"ASCII_NUL","qualified_name":"std::ascii::ASCII_NUL","kind":"const","visibility":"public","signature":"const ASCII_NUL: Int","source_path":"stdlib/ascii.kn","line":1,"attributes":[],"docs":[],"target_notes":[]},{"name":"ASCII_HT","qualified_name":"std::ascii::ASCII_HT","kind":"const","visibility":"public","signature":"const ASCII_HT: Int","source_path":"stdlib/ascii.kn","line":2,"attributes":[],"docs":[],"target_notes":[]},{"name":"ASCII_LF","qualified_name":"std::ascii::ASCII_LF","kind":"const","visibility":"public","signature":"const ASCII_LF: Int","source_path":"stdlib/ascii.kn","line":3,"attributes":[],"docs":[],"target_notes":[]},{"name":"ASCII_VT","qualified_name":"std::ascii::ASCII_VT","kind":"const","visibility":"public","signature":"const ASCII_VT: Int","source_path":"stdlib/ascii.kn","line":4,"attributes":[],"docs":[],"target_notes":[]},{"name":"ASCII_FF","qualified_name":"std::ascii::ASCII_FF","kind":"const","visibility":"public","signature":"const ASCII_FF: Int","source_path":"stdlib/ascii.kn","line":5,"attributes":[],"docs":[],"target_notes":[]},{"name":"ASCII_CR","qualified_name":"std::ascii::ASCII_CR","kind":"const","visibility":"public","signature":"const ASCII_CR: Int","source_path":"stdlib/ascii.kn","line":6,"attributes":[],"docs":[],"target_notes":[]},{"name":"ASCII_SPACE","qualified_name":"std::ascii::ASCII_SPACE","kind":"const","visibility":"public","signature":"const ASCII_SPACE: Int","source_path":"stdlib/ascii.kn","line":7,"attributes":[],"docs":[],"target_notes":[]},{"name":"ASCII_DEL","qualified_name":"std::ascii::ASCII_DEL","kind":"const","visibility":"public","signature":"const ASCII_DEL: Int","source_path":"stdlib/ascii.kn","line":8,"attributes":[],"docs":[],"target_notes":[]},{"name":"ASCII_DIGITS","qualified_name":"std::ascii::ASCII_DIGITS","kind":"const","visibility":"public","signature":"const ASCII_DIGITS: String","source_path":"stdlib/ascii.kn","line":10,"attributes":[],"docs":[],"target_notes":[]},{"name":"ASCII_LOWERCASE","qualified_name":"std::ascii::ASCII_LOWERCASE","kind":"const","visibility":"public","signature":"const ASCII_LOWERCASE: String","source_path":"stdlib/ascii.kn","line":11,"attributes":[],"docs":[],"target_notes":[]},{"name":"ASCII_UPPERCASE","qualified_name":"std::ascii::ASCII_UPPERCASE","kind":"const","visibility":"public","signature":"const ASCII_UPPERCASE: String","source_path":"stdlib/ascii.kn","line":12,"attributes":[],"docs":[],"target_notes":[]},{"name":"ASCII_HEX_LOWERCASE","qualified_name":"std::ascii::ASCII_HEX_LOWERCASE","kind":"const","visibility":"public","signature":"const ASCII_HEX_LOWERCASE: String","source_path":"stdlib/ascii.kn","line":13,"attributes":[],"docs":[],"target_notes":[]},{"name":"ASCII_HEX_UPPERCASE","qualified_name":"std::ascii::ASCII_HEX_UPPERCASE","kind":"const","visibility":"public","signature":"const ASCII_HEX_UPPERCASE: String","source_path":"stdlib/ascii.kn","line":14,"attributes":[],"docs":[],"target_notes":[]},{"name":"ascii_byte_of","qualified_name":"std::ascii::ascii_byte_of","kind":"function","visibility":"private","signature":"fn ascii_byte_of(value: String) -> Int","source_path":"stdlib/ascii.kn","line":16,"attributes":[],"docs":[],"target_notes":[]},{"name":"ascii_is_byte","qualified_name":"std::ascii::ascii_is_byte","kind":"function","visibility":"public","signature":"fn ascii_is_byte(value: Int) -> Bool","source_path":"stdlib/ascii.kn","line":24,"attributes":[],"docs":[],"target_notes":[]},{"name":"ascii_is_control_byte","qualified_name":"std::ascii::ascii_is_control_byte","kind":"function","visibility":"public","signature":"fn ascii_is_control_byte(value: Int) -> Bool","source_path":"stdlib/ascii.kn","line":27,"attributes":[],"docs":[],"target_notes":[]},{"name":"ascii_is_whitespace_byte","qualified_name":"std::ascii::ascii_is_whitespace_byte","kind":"function","visibility":"public","signature":"fn ascii_is_whitespace_byte(value: Int) -> Bool","source_path":"stdlib/ascii.kn","line":32,"attributes":[],"docs":[],"target_notes":[]},{"name":"ascii_is_printable_byte","qualified_name":"std::ascii::ascii_is_printable_byte","kind":"function","visibility":"public","signature":"fn ascii_is_printable_byte(value: Int) -> Bool","source_path":"stdlib/ascii.kn","line":37,"attributes":[],"docs":[],"target_notes":[]},{"name":"ascii_is_graphical_byte","qualified_name":"std::ascii::ascii_is_graphical_byte","kind":"function","visibility":"public","signature":"fn ascii_is_graphical_byte(value: Int) -> Bool","source_path":"stdlib/ascii.kn","line":40,"attributes":[],"docs":[],"target_notes":[]},{"name":"ascii_is_upper_byte","qualified_name":"std::ascii::ascii_is_upper_byte","kind":"function","visibility":"public","signature":"fn ascii_is_upper_byte(value: Int) -> Bool","source_path":"stdlib/ascii.kn","line":43,"attributes":[],"docs":[],"target_notes":[]},{"name":"ascii_is_lower_byte","qualified_name":"std::ascii::ascii_is_lower_byte","kind":"function","visibility":"public","signature":"fn ascii_is_lower_byte(value: Int) -> Bool","source_path":"stdlib/ascii.kn","line":46,"attributes":[],"docs":[],"target_notes":[]},{"name":"ascii_is_alpha_byte","qualified_name":"std::ascii::ascii_is_alpha_byte","kind":"function","visibility":"public","signature":"fn ascii_is_alpha_byte(value: Int) -> Bool","source_path":"stdlib/ascii.kn","line":49,"attributes":[],"docs":[],"target_notes":[]},{"name":"ascii_is_digit_byte","qualified_name":"std::ascii::ascii_is_digit_byte","kind":"function","visibility":"public","signature":"fn ascii_is_digit_byte(value: Int) -> Bool","source_path":"stdlib/ascii.kn","line":52,"attributes":[],"docs":[],"target_notes":[]},{"name":"ascii_is_alnum_byte","qualified_name":"std::ascii::ascii_is_alnum_byte","kind":"function","visibility":"public","signature":"fn ascii_is_alnum_byte(value: Int) -> Bool","source_path":"stdlib/ascii.kn","line":55,"attributes":[],"docs":[],"target_notes":[]},{"name":"ascii_is_hex_byte","qualified_name":"std::ascii::ascii_is_hex_byte","kind":"function","visibility":"public","signature":"fn ascii_is_hex_byte(value: Int) -> Bool","source_path":"stdlib/ascii.kn","line":58,"attributes":[],"docs":[],"target_notes":[]},{"name":"ascii_is_punctuation_byte","qualified_name":"std::ascii::ascii_is_punctuation_byte","kind":"function","visibility":"public","signature":"fn ascii_is_punctuation_byte(value: Int) -> Bool","source_path":"stdlib/ascii.kn","line":65,"attributes":[],"docs":[],"target_notes":[]},{"name":"ascii_to_upper_byte","qualified_name":"std::ascii::ascii_to_upper_byte","kind":"function","visibility":"public","signature":"fn ascii_to_upper_byte(value: Int) -> Int","source_path":"stdlib/ascii.kn","line":68,"attributes":[],"docs":[],"target_notes":[]},{"name":"ascii_to_lower_byte","qualified_name":"std::ascii::ascii_to_lower_byte","kind":"function","visibility":"public","signature":"fn ascii_to_lower_byte(value: Int) -> Int","source_path":"stdlib/ascii.kn","line":73,"attributes":[],"docs":[],"target_notes":[]},{"name":"ascii_digit_value_byte","qualified_name":"std::ascii::ascii_digit_value_byte","kind":"function","visibility":"public","signature":"fn ascii_digit_value_byte(value: Int) -> Int","source_path":"stdlib/ascii.kn","line":78,"attributes":[],"docs":[],"target_notes":[]},{"name":"ascii_hex_value_byte","qualified_name":"std::ascii::ascii_hex_value_byte","kind":"function","visibility":"public","signature":"fn ascii_hex_value_byte(value: Int) -> Int","source_path":"stdlib/ascii.kn","line":83,"attributes":[],"docs":[],"target_notes":[]},{"name":"ascii_digit_char","qualified_name":"std::ascii::ascii_digit_char","kind":"function","visibility":"public","signature":"fn ascii_digit_char(value: Int) -> String","source_path":"stdlib/ascii.kn","line":92,"attributes":[],"docs":[],"target_notes":[]},{"name":"ascii_hex_char_lower","qualified_name":"std::ascii::ascii_hex_char_lower","kind":"function","visibility":"public","signature":"fn ascii_hex_char_lower(value: Int) -> String","source_path":"stdlib/ascii.kn","line":97,"attributes":[],"docs":[],"target_notes":[]},{"name":"ascii_hex_char_upper","qualified_name":"std::ascii::ascii_hex_char_upper","kind":"function","visibility":"public","signature":"fn ascii_hex_char_upper(value: Int) -> String","source_path":"stdlib/ascii.kn","line":104,"attributes":[],"docs":[],"target_notes":[]},{"name":"ascii_char_code","qualified_name":"std::ascii::ascii_char_code","kind":"function","visibility":"public","signature":"fn ascii_char_code(value: String) -> Int","source_path":"stdlib/ascii.kn","line":111,"attributes":[],"docs":[],"target_notes":[]},{"name":"ascii_is_char","qualified_name":"std::ascii::ascii_is_char","kind":"function","visibility":"public","signature":"fn ascii_is_char(value: String) -> Bool","source_path":"stdlib/ascii.kn","line":114,"attributes":[],"docs":[],"target_notes":[]},{"name":"ascii_is_control","qualified_name":"std::ascii::ascii_is_control","kind":"function","visibility":"public","signature":"fn ascii_is_control(value: String) -> Bool","source_path":"stdlib/ascii.kn","line":117,"attributes":[],"docs":[],"target_notes":[]},{"name":"ascii_is_whitespace","qualified_name":"std::ascii::ascii_is_whitespace","kind":"function","visibility":"public","signature":"fn ascii_is_whitespace(value: String) -> Bool","source_path":"stdlib/ascii.kn","line":120,"attributes":[],"docs":[],"target_notes":[]},{"name":"ascii_is_printable","qualified_name":"std::ascii::ascii_is_printable","kind":"function","visibility":"public","signature":"fn ascii_is_printable(value: String) -> Bool","source_path":"stdlib/ascii.kn","line":123,"attributes":[],"docs":[],"target_notes":[]},{"name":"ascii_is_graphical","qualified_name":"std::ascii::ascii_is_graphical","kind":"function","visibility":"public","signature":"fn ascii_is_graphical(value: String) -> Bool","source_path":"stdlib/ascii.kn","line":126,"attributes":[],"docs":[],"target_notes":[]},{"name":"ascii_is_punctuation","qualified_name":"std::ascii::ascii_is_punctuation","kind":"function","visibility":"public","signature":"fn ascii_is_punctuation(value: String) -> Bool","source_path":"stdlib/ascii.kn","line":129,"attributes":[],"docs":[],"target_notes":[]},{"name":"ascii_is_upper","qualified_name":"std::ascii::ascii_is_upper","kind":"function","visibility":"public","signature":"fn ascii_is_upper(value: String) -> Bool","source_path":"stdlib/ascii.kn","line":132,"attributes":[],"docs":[],"target_notes":[]},{"name":"ascii_is_lower","qualified_name":"std::ascii::ascii_is_lower","kind":"function","visibility":"public","signature":"fn ascii_is_lower(value: String) -> Bool","source_path":"stdlib/ascii.kn","line":135,"attributes":[],"docs":[],"target_notes":[]},{"name":"ascii_is_alpha","qualified_name":"std::ascii::ascii_is_alpha","kind":"function","visibility":"public","signature":"fn ascii_is_alpha(value: String) -> Bool","source_path":"stdlib/ascii.kn","line":138,"attributes":[],"docs":[],"target_notes":[]},{"name":"ascii_is_alnum","qualified_name":"std::ascii::ascii_is_alnum","kind":"function","visibility":"public","signature":"fn ascii_is_alnum(value: String) -> Bool","source_path":"stdlib/ascii.kn","line":141,"attributes":[],"docs":[],"target_notes":[]},{"name":"ascii_is_digit","qualified_name":"std::ascii::ascii_is_digit","kind":"function","visibility":"public","signature":"fn ascii_is_digit(value: String) -> Bool","source_path":"stdlib/ascii.kn","line":144,"attributes":[],"docs":[],"target_notes":[]},{"name":"ascii_is_hex","qualified_name":"std::ascii::ascii_is_hex","kind":"function","visibility":"public","signature":"fn ascii_is_hex(value: String) -> Bool","source_path":"stdlib/ascii.kn","line":147,"attributes":[],"docs":[],"target_notes":[]},{"name":"ascii_digit_value","qualified_name":"std::ascii::ascii_digit_value","kind":"function","visibility":"public","signature":"fn ascii_digit_value(value: String) -> Int","source_path":"stdlib/ascii.kn","line":150,"attributes":[],"docs":[],"target_notes":[]},{"name":"ascii_hex_value","qualified_name":"std::ascii::ascii_hex_value","kind":"function","visibility":"public","signature":"fn ascii_hex_value(value: String) -> Int","source_path":"stdlib/ascii.kn","line":153,"attributes":[],"docs":[],"target_notes":[]},{"name":"ascii_to_upper","qualified_name":"std::ascii::ascii_to_upper","kind":"function","visibility":"public","signature":"fn ascii_to_upper(value: String) -> String","source_path":"stdlib/ascii.kn","line":156,"attributes":[],"docs":[],"target_notes":[]},{"name":"ascii_to_lower","qualified_name":"std::ascii::ascii_to_lower","kind":"function","visibility":"public","signature":"fn ascii_to_lower(value: String) -> String","source_path":"stdlib/ascii.kn","line":162,"attributes":[],"docs":[],"target_notes":[]},{"name":"ascii_is_text","qualified_name":"std::ascii::ascii_is_text","kind":"function","visibility":"public","signature":"fn ascii_is_text(value: String) -> Bool","source_path":"stdlib/ascii.kn","line":168,"attributes":[],"docs":[],"target_notes":[]},{"name":"ascii_uppercase","qualified_name":"std::ascii::ascii_uppercase","kind":"function","visibility":"public","signature":"fn ascii_uppercase(value: String) -> String","source_path":"stdlib/ascii.kn","line":176,"attributes":[],"docs":[],"target_notes":[]},{"name":"ascii_lowercase","qualified_name":"std::ascii::ascii_lowercase","kind":"function","visibility":"public","signature":"fn ascii_lowercase(value: String) -> String","source_path":"stdlib/ascii.kn","line":186,"attributes":[],"docs":[],"target_notes":[]},{"name":"ascii_equals_ignore_case","qualified_name":"std::ascii::ascii_equals_ignore_case","kind":"function","visibility":"public","signature":"fn ascii_equals_ignore_case(left: String, right: String) -> Bool","source_path":"stdlib/ascii.kn","line":196,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"atomic","import_path":"std::atomic","source_path":"stdlib/atomic.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"abi_atomic_wait_i64","qualified_name":"std::atomic::abi_atomic_wait_i64","kind":"extern_function","visibility":"private","signature":"fn abi_atomic_wait_i64(address: ptr, expected: Int, timeout_ms: Int) -> Int","source_path":"stdlib/atomic.kn","line":4,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_atomic_notify_one_i64","qualified_name":"std::atomic::abi_atomic_notify_one_i64","kind":"extern_function","visibility":"private","signature":"fn abi_atomic_notify_one_i64(address: ptr) -> Int","source_path":"stdlib/atomic.kn","line":7,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_atomic_notify_all_i64","qualified_name":"std::atomic::abi_atomic_notify_all_i64","kind":"extern_function","visibility":"private","signature":"fn abi_atomic_notify_all_i64(address: ptr) -> Int","source_path":"stdlib/atomic.kn","line":10,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"Ordering","qualified_name":"std::atomic::Ordering","kind":"enum","visibility":"public","signature":"enum Ordering","source_path":"stdlib/atomic.kn","line":14,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_raw_load","qualified_name":"std::atomic::atomic_raw_load","kind":"function","visibility":"public","signature":"fn atomic_raw_load(address: ptr, order: Ordering) -> Int","source_path":"stdlib/atomic.kn","line":21,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_raw_store","qualified_name":"std::atomic::atomic_raw_store","kind":"function","visibility":"public","signature":"fn atomic_raw_store(address: ptr, value: Int, order: Ordering) -> Int","source_path":"stdlib/atomic.kn","line":28,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_raw_exchange","qualified_name":"std::atomic::atomic_raw_exchange","kind":"function","visibility":"public","signature":"fn atomic_raw_exchange(address: ptr, value: Int, order: Ordering) -> Int","source_path":"stdlib/atomic.kn","line":38,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_raw_fetch_add","qualified_name":"std::atomic::atomic_raw_fetch_add","kind":"function","visibility":"public","signature":"fn atomic_raw_fetch_add(address: ptr, delta: Int) -> Int","source_path":"stdlib/atomic.kn","line":46,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_raw_fetch_sub","qualified_name":"std::atomic::atomic_raw_fetch_sub","kind":"function","visibility":"public","signature":"fn atomic_raw_fetch_sub(address: ptr, delta: Int) -> Int","source_path":"stdlib/atomic.kn","line":49,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_failure_order","qualified_name":"std::atomic::atomic_failure_order","kind":"function","visibility":"private","signature":"fn atomic_failure_order(success_order: Ordering, failure_order: Ordering) -> Ordering","source_path":"stdlib/atomic.kn","line":52,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_raw_compare_exchange","qualified_name":"std::atomic::atomic_raw_compare_exchange","kind":"function","visibility":"public","signature":"fn atomic_raw_compare_exchange(address: ptr, expected: Int, desired: Int, success_order: Ordering, failure_order: Ordering) -> Bool","source_path":"stdlib/atomic.kn","line":73,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_raw_fetch_and","qualified_name":"std::atomic::atomic_raw_fetch_and","kind":"function","visibility":"public","signature":"fn atomic_raw_fetch_and(address: ptr, mask: Int) -> Int","source_path":"stdlib/atomic.kn","line":93,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_raw_fetch_or","qualified_name":"std::atomic::atomic_raw_fetch_or","kind":"function","visibility":"public","signature":"fn atomic_raw_fetch_or(address: ptr, bits: Int) -> Int","source_path":"stdlib/atomic.kn","line":96,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_raw_fetch_xor","qualified_name":"std::atomic::atomic_raw_fetch_xor","kind":"function","visibility":"public","signature":"fn atomic_raw_fetch_xor(address: ptr, bits: Int) -> Int","source_path":"stdlib/atomic.kn","line":99,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_wait","qualified_name":"std::atomic::atomic_wait","kind":"function","visibility":"public","signature":"fn atomic_wait(address: ptr, expected: Int, timeout_ms: Int) -> Int","source_path":"stdlib/atomic.kn","line":102,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_notify_one","qualified_name":"std::atomic::atomic_notify_one","kind":"function","visibility":"public","signature":"fn atomic_notify_one(address: ptr) -> Int","source_path":"stdlib/atomic.kn","line":105,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_notify_all","qualified_name":"std::atomic::atomic_notify_all","kind":"function","visibility":"public","signature":"fn atomic_notify_all(address: ptr) -> Int","source_path":"stdlib/atomic.kn","line":108,"attributes":[],"docs":[],"target_notes":[]},{"name":"AtomicInt","qualified_name":"std::atomic::AtomicInt","kind":"struct","visibility":"public","signature":"struct AtomicInt","source_path":"stdlib/atomic.kn","line":113,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_int_new","qualified_name":"std::atomic::atomic_int_new","kind":"function","visibility":"public","signature":"fn atomic_int_new(initial_value: Int) -> AtomicInt","source_path":"stdlib/atomic.kn","line":116,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_int_destroy","qualified_name":"std::atomic::atomic_int_destroy","kind":"function","visibility":"public","signature":"fn atomic_int_destroy(a: AtomicInt) -> Int","source_path":"stdlib/atomic.kn","line":121,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_int_load","qualified_name":"std::atomic::atomic_int_load","kind":"function","visibility":"public","signature":"fn atomic_int_load(self: AtomicInt, order: Ordering) -> Int","source_path":"stdlib/atomic.kn","line":125,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_int_store","qualified_name":"std::atomic::atomic_int_store","kind":"function","visibility":"public","signature":"fn atomic_int_store(self: AtomicInt, value: Int, order: Ordering) -> Int","source_path":"stdlib/atomic.kn","line":128,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_int_add","qualified_name":"std::atomic::atomic_int_add","kind":"function","visibility":"public","signature":"fn atomic_int_add(self: AtomicInt, delta: Int) -> Int","source_path":"stdlib/atomic.kn","line":131,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_int_sub","qualified_name":"std::atomic::atomic_int_sub","kind":"function","visibility":"public","signature":"fn atomic_int_sub(self: AtomicInt, delta: Int) -> Int","source_path":"stdlib/atomic.kn","line":134,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_int_exchange","qualified_name":"std::atomic::atomic_int_exchange","kind":"function","visibility":"public","signature":"fn atomic_int_exchange(self: AtomicInt, desired: Int) -> Int","source_path":"stdlib/atomic.kn","line":137,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_int_compare_exchange","qualified_name":"std::atomic::atomic_int_compare_exchange","kind":"function","visibility":"public","signature":"fn atomic_int_compare_exchange(self: AtomicInt, expected: Int, desired: Int) -> Bool","source_path":"stdlib/atomic.kn","line":140,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_int_compare_exchange_ordered","qualified_name":"std::atomic::atomic_int_compare_exchange_ordered","kind":"function","visibility":"public","signature":"fn atomic_int_compare_exchange_ordered(self: AtomicInt, expected: Int, desired: Int, success_order: Ordering, failure_order: Ordering) -> Bool","source_path":"stdlib/atomic.kn","line":143,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_int_fetch_and","qualified_name":"std::atomic::atomic_int_fetch_and","kind":"function","visibility":"public","signature":"fn atomic_int_fetch_and(self: AtomicInt, mask: Int) -> Int","source_path":"stdlib/atomic.kn","line":146,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_int_fetch_or","qualified_name":"std::atomic::atomic_int_fetch_or","kind":"function","visibility":"public","signature":"fn atomic_int_fetch_or(self: AtomicInt, bits: Int) -> Int","source_path":"stdlib/atomic.kn","line":149,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_int_fetch_xor","qualified_name":"std::atomic::atomic_int_fetch_xor","kind":"function","visibility":"public","signature":"fn atomic_int_fetch_xor(self: AtomicInt, bits: Int) -> Int","source_path":"stdlib/atomic.kn","line":152,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_int_wait","qualified_name":"std::atomic::atomic_int_wait","kind":"function","visibility":"public","signature":"fn atomic_int_wait(self: AtomicInt, expected: Int, timeout_ms: Int) -> Int","source_path":"stdlib/atomic.kn","line":155,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_int_notify_one","qualified_name":"std::atomic::atomic_int_notify_one","kind":"function","visibility":"public","signature":"fn atomic_int_notify_one(self: AtomicInt) -> Int","source_path":"stdlib/atomic.kn","line":158,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_int_notify_all","qualified_name":"std::atomic::atomic_int_notify_all","kind":"function","visibility":"public","signature":"fn atomic_int_notify_all(self: AtomicInt) -> Int","source_path":"stdlib/atomic.kn","line":161,"attributes":[],"docs":[],"target_notes":[]},{"name":"AtomicBool","qualified_name":"std::atomic::AtomicBool","kind":"struct","visibility":"public","signature":"struct AtomicBool","source_path":"stdlib/atomic.kn","line":167,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_bool_new","qualified_name":"std::atomic::atomic_bool_new","kind":"function","visibility":"public","signature":"fn atomic_bool_new(initial_value: Bool) -> AtomicBool","source_path":"stdlib/atomic.kn","line":170,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_bool_destroy","qualified_name":"std::atomic::atomic_bool_destroy","kind":"function","visibility":"public","signature":"fn atomic_bool_destroy(a: AtomicBool) -> Int","source_path":"stdlib/atomic.kn","line":178,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_bool_load","qualified_name":"std::atomic::atomic_bool_load","kind":"function","visibility":"public","signature":"fn atomic_bool_load(self: AtomicBool, order: Ordering) -> Bool","source_path":"stdlib/atomic.kn","line":182,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_bool_store","qualified_name":"std::atomic::atomic_bool_store","kind":"function","visibility":"public","signature":"fn atomic_bool_store(self: AtomicBool, value: Bool, order: Ordering) -> Bool","source_path":"stdlib/atomic.kn","line":185,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_bool_exchange","qualified_name":"std::atomic::atomic_bool_exchange","kind":"function","visibility":"public","signature":"fn atomic_bool_exchange(self: AtomicBool, desired: Bool) -> Bool","source_path":"stdlib/atomic.kn","line":193,"attributes":[],"docs":[],"target_notes":[]},{"name":"AtomicPtr","qualified_name":"std::atomic::AtomicPtr","kind":"struct","visibility":"public","signature":"struct AtomicPtr","source_path":"stdlib/atomic.kn","line":203,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_ptr_new","qualified_name":"std::atomic::atomic_ptr_new","kind":"function","visibility":"public","signature":"fn atomic_ptr_new(initial_ptr: ptr) -> AtomicPtr","source_path":"stdlib/atomic.kn","line":206,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_ptr_destroy","qualified_name":"std::atomic::atomic_ptr_destroy","kind":"function","visibility":"public","signature":"fn atomic_ptr_destroy(a: AtomicPtr) -> Int","source_path":"stdlib/atomic.kn","line":211,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_ptr_load","qualified_name":"std::atomic::atomic_ptr_load","kind":"function","visibility":"public","signature":"fn atomic_ptr_load(self: AtomicPtr, order: Ordering) -> ptr","source_path":"stdlib/atomic.kn","line":215,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_ptr_store","qualified_name":"std::atomic::atomic_ptr_store","kind":"function","visibility":"public","signature":"fn atomic_ptr_store(self: AtomicPtr, value: ptr, order: Ordering) -> ptr","source_path":"stdlib/atomic.kn","line":218,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_ptr_exchange","qualified_name":"std::atomic::atomic_ptr_exchange","kind":"function","visibility":"public","signature":"fn atomic_ptr_exchange(self: AtomicPtr, desired: ptr) -> ptr","source_path":"stdlib/atomic.kn","line":223,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_ptr_compare_exchange","qualified_name":"std::atomic::atomic_ptr_compare_exchange","kind":"function","visibility":"public","signature":"fn atomic_ptr_compare_exchange(self: AtomicPtr, expected: ptr, desired: ptr) -> Bool","source_path":"stdlib/atomic.kn","line":227,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_ptr_wait","qualified_name":"std::atomic::atomic_ptr_wait","kind":"function","visibility":"public","signature":"fn atomic_ptr_wait(self: AtomicPtr, expected: ptr, timeout_ms: Int) -> Int","source_path":"stdlib/atomic.kn","line":230,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_ptr_notify_all","qualified_name":"std::atomic::atomic_ptr_notify_all","kind":"function","visibility":"public","signature":"fn atomic_ptr_notify_all(self: AtomicPtr) -> Int","source_path":"stdlib/atomic.kn","line":233,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"attrition","import_path":"std::attrition","source_path":"stdlib/attrition.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"attrition_task","qualified_name":"std::attrition::attrition_task","kind":"function","visibility":"public","signature":"fn attrition_task(id: String) -> BuildTaskSpec","source_path":"stdlib/attrition.kn","line":3,"attributes":[],"docs":[],"target_notes":[]},{"name":"attrition_case","qualified_name":"std::attrition::attrition_case","kind":"function","visibility":"public","signature":"fn attrition_case(id: String) -> BuildTaskSpec","source_path":"stdlib/attrition.kn","line":6,"attributes":[],"docs":[],"target_notes":[]},{"name":"attrition_case_named","qualified_name":"std::attrition::attrition_case_named","kind":"function","visibility":"public","signature":"fn attrition_case_named(id: String, case_name: String) -> BuildTaskSpec","source_path":"stdlib/attrition.kn","line":9,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"base64","import_path":"std::base64","source_path":"stdlib/base64.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"BASE64_STANDARD_ALPHABET","qualified_name":"std::base64::BASE64_STANDARD_ALPHABET","kind":"const","visibility":"public","signature":"const BASE64_STANDARD_ALPHABET: String","source_path":"stdlib/base64.kn","line":3,"attributes":[],"docs":[],"target_notes":[]},{"name":"BASE64_URLSAFE_ALPHABET","qualified_name":"std::base64::BASE64_URLSAFE_ALPHABET","kind":"const","visibility":"public","signature":"const BASE64_URLSAFE_ALPHABET: String","source_path":"stdlib/base64.kn","line":4,"attributes":[],"docs":[],"target_notes":[]},{"name":"base64_alphabet_char","qualified_name":"std::base64::base64_alphabet_char","kind":"function","visibility":"private","signature":"fn base64_alphabet_char(alphabet: String, index: Int) -> String","source_path":"stdlib/base64.kn","line":6,"attributes":[],"docs":[],"target_notes":[]},{"name":"base64_value_from_code","qualified_name":"std::base64::base64_value_from_code","kind":"function","visibility":"private","signature":"fn base64_value_from_code(code: Int) -> Int","source_path":"stdlib/base64.kn","line":11,"attributes":[],"docs":[],"target_notes":[]},{"name":"base64_encode_with_alphabet","qualified_name":"std::base64::base64_encode_with_alphabet","kind":"function","visibility":"private","signature":"fn base64_encode_with_alphabet(text: String, alphabet: String, padded: Bool) -> String","source_path":"stdlib/base64.kn","line":24,"attributes":[],"docs":[],"target_notes":[]},{"name":"base64_normalize_input","qualified_name":"std::base64::base64_normalize_input","kind":"function","visibility":"private","signature":"fn base64_normalize_input(text: String) -> String","source_path":"stdlib/base64.kn","line":48,"attributes":[],"docs":[],"target_notes":[]},{"name":"base64_decode_normalized","qualified_name":"std::base64::base64_decode_normalized","kind":"function","visibility":"private","signature":"fn base64_decode_normalized(text: String) -> String","source_path":"stdlib/base64.kn","line":60,"attributes":[],"docs":[],"target_notes":[]},{"name":"base64_encode","qualified_name":"std::base64::base64_encode","kind":"function","visibility":"public","signature":"fn base64_encode(text: String) -> String","source_path":"stdlib/base64.kn","line":97,"attributes":[],"docs":[],"target_notes":[]},{"name":"base64_encode_nopad","qualified_name":"std::base64::base64_encode_nopad","kind":"function","visibility":"public","signature":"fn base64_encode_nopad(text: String) -> String","source_path":"stdlib/base64.kn","line":100,"attributes":[],"docs":[],"target_notes":[]},{"name":"base64_encode_url","qualified_name":"std::base64::base64_encode_url","kind":"function","visibility":"public","signature":"fn base64_encode_url(text: String) -> String","source_path":"stdlib/base64.kn","line":103,"attributes":[],"docs":[],"target_notes":[]},{"name":"base64_encode_url_padded","qualified_name":"std::base64::base64_encode_url_padded","kind":"function","visibility":"public","signature":"fn base64_encode_url_padded(text: String) -> String","source_path":"stdlib/base64.kn","line":106,"attributes":[],"docs":[],"target_notes":[]},{"name":"base64_decode","qualified_name":"std::base64::base64_decode","kind":"function","visibility":"public","signature":"fn base64_decode(text: String) -> String","source_path":"stdlib/base64.kn","line":109,"attributes":[],"docs":[],"target_notes":[]},{"name":"base64_decode_url","qualified_name":"std::base64::base64_decode_url","kind":"function","visibility":"public","signature":"fn base64_decode_url(text: String) -> String","source_path":"stdlib/base64.kn","line":112,"attributes":[],"docs":[],"target_notes":[]},{"name":"base16_encode","qualified_name":"std::base64::base16_encode","kind":"function","visibility":"public","signature":"fn base16_encode(text: String) -> String","source_path":"stdlib/base64.kn","line":115,"attributes":[],"docs":[],"target_notes":[]},{"name":"base16_encode_upper","qualified_name":"std::base64::base16_encode_upper","kind":"function","visibility":"public","signature":"fn base16_encode_upper(text: String) -> String","source_path":"stdlib/base64.kn","line":125,"attributes":[],"docs":[],"target_notes":[]},{"name":"base16_decode","qualified_name":"std::base64::base16_decode","kind":"function","visibility":"public","signature":"fn base16_decode(text: String) -> String","source_path":"stdlib/base64.kn","line":135,"attributes":[],"docs":[],"target_notes":[]},{"name":"hex_encode","qualified_name":"std::base64::hex_encode","kind":"function","visibility":"public","signature":"fn hex_encode(text: String) -> String","source_path":"stdlib/base64.kn","line":149,"attributes":[],"docs":[],"target_notes":[]},{"name":"hex_encode_upper","qualified_name":"std::base64::hex_encode_upper","kind":"function","visibility":"public","signature":"fn hex_encode_upper(text: String) -> String","source_path":"stdlib/base64.kn","line":152,"attributes":[],"docs":[],"target_notes":[]},{"name":"hex_decode","qualified_name":"std::base64::hex_decode","kind":"function","visibility":"public","signature":"fn hex_decode(text: String) -> String","source_path":"stdlib/base64.kn","line":155,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"bench","import_path":"std::bench","source_path":"stdlib/bench.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"bench_task","qualified_name":"std::bench::bench_task","kind":"function","visibility":"public","signature":"fn bench_task(id: String) -> BuildTaskSpec","source_path":"stdlib/bench.kn","line":3,"attributes":[],"docs":[],"target_notes":[]},{"name":"bench_case","qualified_name":"std::bench::bench_case","kind":"function","visibility":"public","signature":"fn bench_case(id: String) -> BuildTaskSpec","source_path":"stdlib/bench.kn","line":6,"attributes":[],"docs":[],"target_notes":[]},{"name":"benchmark_task","qualified_name":"std::bench::benchmark_task","kind":"function","visibility":"public","signature":"fn benchmark_task(id: String) -> BuildTaskSpec","source_path":"stdlib/bench.kn","line":9,"attributes":[],"docs":[],"target_notes":[]},{"name":"bench_case_named","qualified_name":"std::bench::bench_case_named","kind":"function","visibility":"public","signature":"fn bench_case_named(id: String, case_name: String) -> BuildTaskSpec","source_path":"stdlib/bench.kn","line":12,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"bits","import_path":"std::bits","source_path":"stdlib/bits.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"U8_MASK","qualified_name":"std::bits::U8_MASK","kind":"const","visibility":"private","signature":"const U8_MASK: Int","source_path":"stdlib/bits.kn","line":3,"attributes":[],"docs":[],"target_notes":[]},{"name":"U16_MASK","qualified_name":"std::bits::U16_MASK","kind":"const","visibility":"private","signature":"const U16_MASK: Int","source_path":"stdlib/bits.kn","line":4,"attributes":[],"docs":[],"target_notes":[]},{"name":"U32_MASK","qualified_name":"std::bits::U32_MASK","kind":"const","visibility":"private","signature":"const U32_MASK: Int","source_path":"stdlib/bits.kn","line":5,"attributes":[],"docs":[],"target_notes":[]},{"name":"I8_MIN","qualified_name":"std::bits::I8_MIN","kind":"const","visibility":"private","signature":"const I8_MIN: Int","source_path":"stdlib/bits.kn","line":6,"attributes":[],"docs":[],"target_notes":[]},{"name":"I8_MAX","qualified_name":"std::bits::I8_MAX","kind":"const","visibility":"private","signature":"const I8_MAX: Int","source_path":"stdlib/bits.kn","line":7,"attributes":[],"docs":[],"target_notes":[]},{"name":"I16_MIN","qualified_name":"std::bits::I16_MIN","kind":"const","visibility":"private","signature":"const I16_MIN: Int","source_path":"stdlib/bits.kn","line":8,"attributes":[],"docs":[],"target_notes":[]},{"name":"I16_MAX","qualified_name":"std::bits::I16_MAX","kind":"const","visibility":"private","signature":"const I16_MAX: Int","source_path":"stdlib/bits.kn","line":9,"attributes":[],"docs":[],"target_notes":[]},{"name":"I32_MIN","qualified_name":"std::bits::I32_MIN","kind":"const","visibility":"private","signature":"const I32_MIN: Int","source_path":"stdlib/bits.kn","line":10,"attributes":[],"docs":[],"target_notes":[]},{"name":"I32_MAX","qualified_name":"std::bits::I32_MAX","kind":"const","visibility":"private","signature":"const I32_MAX: Int","source_path":"stdlib/bits.kn","line":11,"attributes":[],"docs":[],"target_notes":[]},{"name":"u8","qualified_name":"std::bits::u8","kind":"function","visibility":"public","signature":"fn u8(value: Int) -> Int","source_path":"stdlib/bits.kn","line":13,"attributes":[],"docs":[],"target_notes":[]},{"name":"u16","qualified_name":"std::bits::u16","kind":"function","visibility":"public","signature":"fn u16(value: Int) -> Int","source_path":"stdlib/bits.kn","line":16,"attributes":[],"docs":[],"target_notes":[]},{"name":"u32","qualified_name":"std::bits::u32","kind":"function","visibility":"public","signature":"fn u32(value: Int) -> Int","source_path":"stdlib/bits.kn","line":19,"attributes":[],"docs":[],"target_notes":[]},{"name":"i8","qualified_name":"std::bits::i8","kind":"function","visibility":"public","signature":"fn i8(value: Int) -> Int","source_path":"stdlib/bits.kn","line":22,"attributes":[],"docs":[],"target_notes":[]},{"name":"i16","qualified_name":"std::bits::i16","kind":"function","visibility":"public","signature":"fn i16(value: Int) -> Int","source_path":"stdlib/bits.kn","line":28,"attributes":[],"docs":[],"target_notes":[]},{"name":"i32","qualified_name":"std::bits::i32","kind":"function","visibility":"public","signature":"fn i32(value: Int) -> Int","source_path":"stdlib/bits.kn","line":34,"attributes":[],"docs":[],"target_notes":[]},{"name":"wrapping_add_u32","qualified_name":"std::bits::wrapping_add_u32","kind":"function","visibility":"public","signature":"fn wrapping_add_u32(left: Int, right: Int) -> Int","source_path":"stdlib/bits.kn","line":40,"attributes":[],"docs":[],"target_notes":[]},{"name":"wrapping_sub_u32","qualified_name":"std::bits::wrapping_sub_u32","kind":"function","visibility":"public","signature":"fn wrapping_sub_u32(left: Int, right: Int) -> Int","source_path":"stdlib/bits.kn","line":43,"attributes":[],"docs":[],"target_notes":[]},{"name":"wrapping_mul_u32","qualified_name":"std::bits::wrapping_mul_u32","kind":"function","visibility":"public","signature":"fn wrapping_mul_u32(left: Int, right: Int) -> Int","source_path":"stdlib/bits.kn","line":46,"attributes":[],"docs":[],"target_notes":[]},{"name":"overflowing_add_u32","qualified_name":"std::bits::overflowing_add_u32","kind":"function","visibility":"public","signature":"fn overflowing_add_u32(left: Int, right: Int) -> Bool","source_path":"stdlib/bits.kn","line":49,"attributes":[],"docs":[],"target_notes":[]},{"name":"overflowing_mul_u32","qualified_name":"std::bits::overflowing_mul_u32","kind":"function","visibility":"public","signature":"fn overflowing_mul_u32(left: Int, right: Int) -> Bool","source_path":"stdlib/bits.kn","line":52,"attributes":[],"docs":[],"target_notes":[]},{"name":"rotl32","qualified_name":"std::bits::rotl32","kind":"function","visibility":"public","signature":"fn rotl32(value: Int, bits: Int) -> Int","source_path":"stdlib/bits.kn","line":59,"attributes":[],"docs":[],"target_notes":[]},{"name":"rotr32","qualified_name":"std::bits::rotr32","kind":"function","visibility":"public","signature":"fn rotr32(value: Int, bits: Int) -> Int","source_path":"stdlib/bits.kn","line":66,"attributes":[],"docs":[],"target_notes":[]},{"name":"popcount32","qualified_name":"std::bits::popcount32","kind":"function","visibility":"public","signature":"fn popcount32(value: Int) -> Int","source_path":"stdlib/bits.kn","line":73,"attributes":[],"docs":[],"target_notes":[]},{"name":"clz32","qualified_name":"std::bits::clz32","kind":"function","visibility":"public","signature":"fn clz32(value: Int) -> Int","source_path":"stdlib/bits.kn","line":81,"attributes":[],"docs":[],"target_notes":[]},{"name":"ctz32","qualified_name":"std::bits::ctz32","kind":"function","visibility":"public","signature":"fn ctz32(value: Int) -> Int","source_path":"stdlib/bits.kn","line":92,"attributes":[],"docs":[],"target_notes":[]},{"name":"bswap32","qualified_name":"std::bits::bswap32","kind":"function","visibility":"public","signature":"fn bswap32(value: Int) -> Int","source_path":"stdlib/bits.kn","line":101,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"build","import_path":"std::build","source_path":"stdlib/build.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"BUILD_KIND_CHECK","qualified_name":"std::build::BUILD_KIND_CHECK","kind":"const","visibility":"public","signature":"const BUILD_KIND_CHECK: String","source_path":"stdlib/build.kn","line":1,"attributes":[],"docs":[],"target_notes":[]},{"name":"BUILD_KIND_NATIVE_EXECUTABLE","qualified_name":"std::build::BUILD_KIND_NATIVE_EXECUTABLE","kind":"const","visibility":"public","signature":"const BUILD_KIND_NATIVE_EXECUTABLE: String","source_path":"stdlib/build.kn","line":2,"attributes":[],"docs":[],"target_notes":[]},{"name":"BUILD_KIND_TEST","qualified_name":"std::build::BUILD_KIND_TEST","kind":"const","visibility":"public","signature":"const BUILD_KIND_TEST: String","source_path":"stdlib/build.kn","line":3,"attributes":[],"docs":[],"target_notes":[]},{"name":"BUILD_KIND_PROOF","qualified_name":"std::build::BUILD_KIND_PROOF","kind":"const","visibility":"public","signature":"const BUILD_KIND_PROOF: String","source_path":"stdlib/build.kn","line":4,"attributes":[],"docs":[],"target_notes":[]},{"name":"BUILD_KIND_BENCHMARK","qualified_name":"std::build::BUILD_KIND_BENCHMARK","kind":"const","visibility":"public","signature":"const BUILD_KIND_BENCHMARK: String","source_path":"stdlib/build.kn","line":5,"attributes":[],"docs":[],"target_notes":[]},{"name":"BUILD_KIND_ATTRITION","qualified_name":"std::build::BUILD_KIND_ATTRITION","kind":"const","visibility":"public","signature":"const BUILD_KIND_ATTRITION: String","source_path":"stdlib/build.kn","line":6,"attributes":[],"docs":[],"target_notes":[]},{"name":"BUILD_KIND_CERTIFY","qualified_name":"std::build::BUILD_KIND_CERTIFY","kind":"const","visibility":"public","signature":"const BUILD_KIND_CERTIFY: String","source_path":"stdlib/build.kn","line":7,"attributes":[],"docs":[],"target_notes":[]},{"name":"BUILD_KIND_EXEC","qualified_name":"std::build::BUILD_KIND_EXEC","kind":"const","visibility":"public","signature":"const BUILD_KIND_EXEC: String","source_path":"stdlib/build.kn","line":8,"attributes":[],"docs":[],"target_notes":[]},{"name":"BUILD_KIND_AMALGAMATE","qualified_name":"std::build::BUILD_KIND_AMALGAMATE","kind":"const","visibility":"public","signature":"const BUILD_KIND_AMALGAMATE: String","source_path":"stdlib/build.kn","line":9,"attributes":[],"docs":[],"target_notes":[]},{"name":"BuildContext","qualified_name":"std::build::BuildContext","kind":"struct","visibility":"public","signature":"struct BuildContext","source_path":"stdlib/build.kn","line":11,"attributes":[],"docs":[],"target_notes":[]},{"name":"PackageSpec","qualified_name":"std::build::PackageSpec","kind":"struct","visibility":"public","signature":"struct PackageSpec","source_path":"stdlib/build.kn","line":19,"attributes":[],"docs":[],"target_notes":[]},{"name":"BladeSpec","qualified_name":"std::build::BladeSpec","kind":"struct","visibility":"public","signature":"struct BladeSpec","source_path":"stdlib/build.kn","line":24,"attributes":[],"docs":[],"target_notes":[]},{"name":"BuildDefaultsSpec","qualified_name":"std::build::BuildDefaultsSpec","kind":"struct","visibility":"public","signature":"struct BuildDefaultsSpec","source_path":"stdlib/build.kn","line":33,"attributes":[],"docs":[],"target_notes":[]},{"name":"WorkspaceDefaultsSpec","qualified_name":"std::build::WorkspaceDefaultsSpec","kind":"struct","visibility":"public","signature":"struct WorkspaceDefaultsSpec","source_path":"stdlib/build.kn","line":40,"attributes":[],"docs":[],"target_notes":[]},{"name":"RunDefaultsSpec","qualified_name":"std::build::RunDefaultsSpec","kind":"struct","visibility":"public","signature":"struct RunDefaultsSpec","source_path":"stdlib/build.kn","line":49,"attributes":[],"docs":[],"target_notes":[]},{"name":"PlatformPackageSpec","qualified_name":"std::build::PlatformPackageSpec","kind":"struct","visibility":"public","signature":"struct PlatformPackageSpec","source_path":"stdlib/build.kn","line":55,"attributes":[],"docs":[],"target_notes":[]},{"name":"ProjectSpec","qualified_name":"std::build::ProjectSpec","kind":"struct","visibility":"public","signature":"struct ProjectSpec","source_path":"stdlib/build.kn","line":59,"attributes":[],"docs":[],"target_notes":[]},{"name":"SourceSetSpec","qualified_name":"std::build::SourceSetSpec","kind":"struct","visibility":"public","signature":"struct SourceSetSpec","source_path":"stdlib/build.kn","line":75,"attributes":[],"docs":[],"target_notes":[]},{"name":"BuildTaskSpec","qualified_name":"std::build::BuildTaskSpec","kind":"struct","visibility":"public","signature":"struct BuildTaskSpec","source_path":"stdlib/build.kn","line":83,"attributes":[],"docs":[],"target_notes":[]},{"name":"BuildGraphSpec","qualified_name":"std::build::BuildGraphSpec","kind":"struct","visibility":"public","signature":"struct BuildGraphSpec","source_path":"stdlib/build.kn","line":108,"attributes":[],"docs":[],"target_notes":[]},{"name":"BuildGraph","qualified_name":"std::build::BuildGraph","kind":"type_alias","visibility":"public","signature":"type BuildGraph = BuildGraphSpec","source_path":"stdlib/build.kn","line":114,"attributes":[],"docs":[],"target_notes":[]},{"name":"BuildTask","qualified_name":"std::build::BuildTask","kind":"type_alias","visibility":"public","signature":"type BuildTask = BuildTaskSpec","source_path":"stdlib/build.kn","line":115,"attributes":[],"docs":[],"target_notes":[]},{"name":"build_graph","qualified_name":"std::build::build_graph","kind":"function","visibility":"public","signature":"fn build_graph() -> BuildGraphSpec","source_path":"stdlib/build.kn","line":117,"attributes":[],"docs":[],"target_notes":[]},{"name":"package","qualified_name":"std::build::package","kind":"function","visibility":"public","signature":"fn package(name: String) -> PackageSpec","source_path":"stdlib/build.kn","line":125,"attributes":[],"docs":[],"target_notes":[]},{"name":"blade","qualified_name":"std::build::blade","kind":"function","visibility":"public","signature":"fn blade(name: String) -> BladeSpec","source_path":"stdlib/build.kn","line":128,"attributes":[],"docs":[],"target_notes":[]},{"name":"build_defaults","qualified_name":"std::build::build_defaults","kind":"function","visibility":"public","signature":"fn build_defaults() -> BuildDefaultsSpec","source_path":"stdlib/build.kn","line":139,"attributes":[],"docs":[],"target_notes":[]},{"name":"workspace_defaults","qualified_name":"std::build::workspace_defaults","kind":"function","visibility":"public","signature":"fn workspace_defaults() -> WorkspaceDefaultsSpec","source_path":"stdlib/build.kn","line":148,"attributes":[],"docs":[],"target_notes":[]},{"name":"run_defaults","qualified_name":"std::build::run_defaults","kind":"function","visibility":"public","signature":"fn run_defaults() -> RunDefaultsSpec","source_path":"stdlib/build.kn","line":159,"attributes":[],"docs":[],"target_notes":[]},{"name":"platform_package","qualified_name":"std::build::platform_package","kind":"function","visibility":"public","signature":"fn platform_package(name: String) -> PlatformPackageSpec","source_path":"stdlib/build.kn","line":162,"attributes":[],"docs":[],"target_notes":[]},{"name":"build_platform_package","qualified_name":"std::build::build_platform_package","kind":"function","visibility":"public","signature":"fn build_platform_package(name: String) -> PlatformPackageSpec","source_path":"stdlib/build.kn","line":165,"attributes":[],"docs":[],"target_notes":[]},{"name":"platform_requirement","qualified_name":"std::build::platform_requirement","kind":"function","visibility":"public","signature":"fn platform_requirement(name: String) -> PlatformPackageSpec","source_path":"stdlib/build.kn","line":168,"attributes":[],"docs":[],"target_notes":[]},{"name":"requires_platform_package","qualified_name":"std::build::requires_platform_package","kind":"function","visibility":"public","signature":"fn requires_platform_package(name: String) -> PlatformPackageSpec","source_path":"stdlib/build.kn","line":171,"attributes":[],"docs":[],"target_notes":[]},{"name":"project","qualified_name":"std::build::project","kind":"function","visibility":"public","signature":"fn project(name: String) -> ProjectSpec","source_path":"stdlib/build.kn","line":174,"attributes":[],"docs":[],"target_notes":[]},{"name":"source_set","qualified_name":"std::build::source_set","kind":"function","visibility":"public","signature":"fn source_set(name: String) -> SourceSetSpec","source_path":"stdlib/build.kn","line":192,"attributes":[],"docs":[],"target_notes":[]},{"name":"build_task_of_kind","qualified_name":"std::build::build_task_of_kind","kind":"function","visibility":"public","signature":"fn build_task_of_kind(id: String, kind: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":202,"attributes":[],"docs":[],"target_notes":[]},{"name":"build_task","qualified_name":"std::build::build_task","kind":"function","visibility":"public","signature":"fn build_task(id: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":229,"attributes":[],"docs":[],"target_notes":[]},{"name":"build_check","qualified_name":"std::build::build_check","kind":"function","visibility":"public","signature":"fn build_check(id: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":232,"attributes":[],"docs":[],"target_notes":[]},{"name":"check_task","qualified_name":"std::build::check_task","kind":"function","visibility":"public","signature":"fn check_task(id: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":235,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_executable","qualified_name":"std::build::native_executable","kind":"function","visibility":"public","signature":"fn native_executable(id: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":238,"attributes":[],"docs":[],"target_notes":[]},{"name":"root_executable","qualified_name":"std::build::root_executable","kind":"function","visibility":"public","signature":"fn root_executable(id: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":241,"attributes":[],"docs":[],"target_notes":[]},{"name":"build_native_executable","qualified_name":"std::build::build_native_executable","kind":"function","visibility":"public","signature":"fn build_native_executable(id: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":244,"attributes":[],"docs":[],"target_notes":[]},{"name":"exec_task","qualified_name":"std::build::exec_task","kind":"function","visibility":"public","signature":"fn exec_task(id: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":247,"attributes":[],"docs":[],"target_notes":[]},{"name":"command_task","qualified_name":"std::build::command_task","kind":"function","visibility":"public","signature":"fn command_task(id: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":250,"attributes":[],"docs":[],"target_notes":[]},{"name":"amalgamate_capsule","qualified_name":"std::build::amalgamate_capsule","kind":"function","visibility":"public","signature":"fn amalgamate_capsule(id: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":253,"attributes":[],"docs":[],"target_notes":[]},{"name":"source_tests","qualified_name":"std::build::source_tests","kind":"function","visibility":"public","signature":"fn source_tests(id: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":256,"attributes":[],"docs":[],"target_notes":[]},{"name":"gpu_suite","qualified_name":"std::build::gpu_suite","kind":"function","visibility":"public","signature":"fn gpu_suite(id: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":259,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_artifacts","qualified_name":"std::build::cuda_artifacts","kind":"function","visibility":"public","signature":"fn cuda_artifacts(id: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":262,"attributes":[],"docs":[],"target_notes":[]},{"name":"kain_runner","qualified_name":"std::build::kain_runner","kind":"function","visibility":"public","signature":"fn kain_runner(id: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":265,"attributes":[],"docs":[],"target_notes":[]},{"name":"album_mode","qualified_name":"std::build::album_mode","kind":"function","visibility":"public","signature":"fn album_mode(id: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":268,"attributes":[],"docs":[],"target_notes":[]},{"name":"capsule_set","qualified_name":"std::build::capsule_set","kind":"function","visibility":"public","signature":"fn capsule_set(id: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":271,"attributes":[],"docs":[],"target_notes":[]},{"name":"certify","qualified_name":"std::build::certify","kind":"function","visibility":"public","signature":"fn certify(subject: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":274,"attributes":[],"docs":[],"target_notes":[]},{"name":"version","qualified_name":"std::build::PackageSpec.version","kind":"impl_method","visibility":"private","signature":"fn version(_self: Self_, value: String) -> PackageSpec","source_path":"stdlib/build.kn","line":278,"attributes":[],"docs":[],"target_notes":[]},{"name":"description","qualified_name":"std::build::PackageSpec.description","kind":"impl_method","visibility":"private","signature":"fn description(_self: Self_, value: String) -> PackageSpec","source_path":"stdlib/build.kn","line":283,"attributes":[],"docs":[],"target_notes":[]},{"name":"kind","qualified_name":"std::build::BladeSpec.kind","kind":"impl_method","visibility":"private","signature":"fn kind(_self: Self_, value: String) -> BladeSpec","source_path":"stdlib/build.kn","line":289,"attributes":[],"docs":[],"target_notes":[]},{"name":"entry","qualified_name":"std::build::BladeSpec.entry","kind":"impl_method","visibility":"private","signature":"fn entry(_self: Self_, path: String) -> BladeSpec","source_path":"stdlib/build.kn","line":294,"attributes":[],"docs":[],"target_notes":[]},{"name":"source_root","qualified_name":"std::build::BladeSpec.source_root","kind":"impl_method","visibility":"private","signature":"fn source_root(_self: Self_, path: String) -> BladeSpec","source_path":"stdlib/build.kn","line":299,"attributes":[],"docs":[],"target_notes":[]},{"name":"module_root","qualified_name":"std::build::BladeSpec.module_root","kind":"impl_method","visibility":"private","signature":"fn module_root(_self: Self_, path: String) -> BladeSpec","source_path":"stdlib/build.kn","line":304,"attributes":[],"docs":[],"target_notes":[]},{"name":"build_target","qualified_name":"std::build::BladeSpec.build_target","kind":"impl_method","visibility":"private","signature":"fn build_target(_self: Self_, target: String) -> BladeSpec","source_path":"stdlib/build.kn","line":309,"attributes":[],"docs":[],"target_notes":[]},{"name":"dependency","qualified_name":"std::build::BladeSpec.dependency","kind":"impl_method","visibility":"private","signature":"fn dependency(_self: Self_, name: String) -> BladeSpec","source_path":"stdlib/build.kn","line":314,"attributes":[],"docs":[],"target_notes":[]},{"name":"entry","qualified_name":"std::build::BuildDefaultsSpec.entry","kind":"impl_method","visibility":"private","signature":"fn entry(_self: Self_, path: String) -> BuildDefaultsSpec","source_path":"stdlib/build.kn","line":320,"attributes":[],"docs":[],"target_notes":[]},{"name":"artifact_root","qualified_name":"std::build::BuildDefaultsSpec.artifact_root","kind":"impl_method","visibility":"private","signature":"fn artifact_root(_self: Self_, path: String) -> BuildDefaultsSpec","source_path":"stdlib/build.kn","line":325,"attributes":[],"docs":[],"target_notes":[]},{"name":"cache_root","qualified_name":"std::build::BuildDefaultsSpec.cache_root","kind":"impl_method","visibility":"private","signature":"fn cache_root(_self: Self_, path: String) -> BuildDefaultsSpec","source_path":"stdlib/build.kn","line":330,"attributes":[],"docs":[],"target_notes":[]},{"name":"profile","qualified_name":"std::build::BuildDefaultsSpec.profile","kind":"impl_method","visibility":"private","signature":"fn profile(_self: Self_, value: String) -> BuildDefaultsSpec","source_path":"stdlib/build.kn","line":335,"attributes":[],"docs":[],"target_notes":[]},{"name":"target","qualified_name":"std::build::BuildDefaultsSpec.target","kind":"impl_method","visibility":"private","signature":"fn target(_self: Self_, value: String) -> BuildDefaultsSpec","source_path":"stdlib/build.kn","line":340,"attributes":[],"docs":[],"target_notes":[]},{"name":"blade_pattern","qualified_name":"std::build::WorkspaceDefaultsSpec.blade_pattern","kind":"impl_method","visibility":"private","signature":"fn blade_pattern(_self: Self_, path: String) -> WorkspaceDefaultsSpec","source_path":"stdlib/build.kn","line":346,"attributes":[],"docs":[],"target_notes":[]},{"name":"blades","qualified_name":"std::build::WorkspaceDefaultsSpec.blades","kind":"impl_method","visibility":"private","signature":"fn blades(_self: Self_, path: String) -> WorkspaceDefaultsSpec","source_path":"stdlib/build.kn","line":351,"attributes":[],"docs":[],"target_notes":[]},{"name":"blade_root","qualified_name":"std::build::WorkspaceDefaultsSpec.blade_root","kind":"impl_method","visibility":"private","signature":"fn blade_root(_self: Self_, path: String) -> WorkspaceDefaultsSpec","source_path":"stdlib/build.kn","line":354,"attributes":[],"docs":[],"target_notes":[]},{"name":"blade_roots","qualified_name":"std::build::WorkspaceDefaultsSpec.blade_roots","kind":"impl_method","visibility":"private","signature":"fn blade_roots(_self: Self_, path: String) -> WorkspaceDefaultsSpec","source_path":"stdlib/build.kn","line":359,"attributes":[],"docs":[],"target_notes":[]},{"name":"member","qualified_name":"std::build::WorkspaceDefaultsSpec.member","kind":"impl_method","visibility":"private","signature":"fn member(_self: Self_, path: String) -> WorkspaceDefaultsSpec","source_path":"stdlib/build.kn","line":362,"attributes":[],"docs":[],"target_notes":[]},{"name":"members","qualified_name":"std::build::WorkspaceDefaultsSpec.members","kind":"impl_method","visibility":"private","signature":"fn members(_self: Self_, path: String) -> WorkspaceDefaultsSpec","source_path":"stdlib/build.kn","line":367,"attributes":[],"docs":[],"target_notes":[]},{"name":"search_root","qualified_name":"std::build::WorkspaceDefaultsSpec.search_root","kind":"impl_method","visibility":"private","signature":"fn search_root(_self: Self_, path: String) -> WorkspaceDefaultsSpec","source_path":"stdlib/build.kn","line":370,"attributes":[],"docs":[],"target_notes":[]},{"name":"search_roots","qualified_name":"std::build::WorkspaceDefaultsSpec.search_roots","kind":"impl_method","visibility":"private","signature":"fn search_roots(_self: Self_, path: String) -> WorkspaceDefaultsSpec","source_path":"stdlib/build.kn","line":375,"attributes":[],"docs":[],"target_notes":[]},{"name":"stdlib_root","qualified_name":"std::build::WorkspaceDefaultsSpec.stdlib_root","kind":"impl_method","visibility":"private","signature":"fn stdlib_root(_self: Self_, path: String) -> WorkspaceDefaultsSpec","source_path":"stdlib/build.kn","line":378,"attributes":[],"docs":[],"target_notes":[]},{"name":"manifest_root","qualified_name":"std::build::WorkspaceDefaultsSpec.manifest_root","kind":"impl_method","visibility":"private","signature":"fn manifest_root(_self: Self_, path: String) -> WorkspaceDefaultsSpec","source_path":"stdlib/build.kn","line":383,"attributes":[],"docs":[],"target_notes":[]},{"name":"generated_root","qualified_name":"std::build::WorkspaceDefaultsSpec.generated_root","kind":"impl_method","visibility":"private","signature":"fn generated_root(_self: Self_, path: String) -> WorkspaceDefaultsSpec","source_path":"stdlib/build.kn","line":388,"attributes":[],"docs":[],"target_notes":[]},{"name":"entry","qualified_name":"std::build::RunDefaultsSpec.entry","kind":"impl_method","visibility":"private","signature":"fn entry(_self: Self_, path: String) -> RunDefaultsSpec","source_path":"stdlib/build.kn","line":394,"attributes":[],"docs":[],"target_notes":[]},{"name":"target","qualified_name":"std::build::RunDefaultsSpec.target","kind":"impl_method","visibility":"private","signature":"fn target(_self: Self_, value: String) -> RunDefaultsSpec","source_path":"stdlib/build.kn","line":399,"attributes":[],"docs":[],"target_notes":[]},{"name":"arg","qualified_name":"std::build::RunDefaultsSpec.arg","kind":"impl_method","visibility":"private","signature":"fn arg(_self: Self_, value: String) -> RunDefaultsSpec","source_path":"stdlib/build.kn","line":404,"attributes":[],"docs":[],"target_notes":[]},{"name":"watch","qualified_name":"std::build::RunDefaultsSpec.watch","kind":"impl_method","visibility":"private","signature":"fn watch(_self: Self_, path: String) -> RunDefaultsSpec","source_path":"stdlib/build.kn","line":409,"attributes":[],"docs":[],"target_notes":[]},{"name":"provider","qualified_name":"std::build::PlatformPackageSpec.provider","kind":"impl_method","visibility":"private","signature":"fn provider(_self: Self_, value: String) -> PlatformPackageSpec","source_path":"stdlib/build.kn","line":415,"attributes":[],"docs":[],"target_notes":[]},{"name":"kind","qualified_name":"std::build::ProjectSpec.kind","kind":"impl_method","visibility":"private","signature":"fn kind(_self: Self_, value: String) -> ProjectSpec","source_path":"stdlib/build.kn","line":421,"attributes":[],"docs":[],"target_notes":[]},{"name":"version","qualified_name":"std::build::ProjectSpec.version","kind":"impl_method","visibility":"private","signature":"fn version(_self: Self_, value: String) -> ProjectSpec","source_path":"stdlib/build.kn","line":426,"attributes":[],"docs":[],"target_notes":[]},{"name":"description","qualified_name":"std::build::ProjectSpec.description","kind":"impl_method","visibility":"private","signature":"fn description(_self: Self_, value: String) -> ProjectSpec","source_path":"stdlib/build.kn","line":431,"attributes":[],"docs":[],"target_notes":[]},{"name":"entry","qualified_name":"std::build::ProjectSpec.entry","kind":"impl_method","visibility":"private","signature":"fn entry(_self: Self_, path: String) -> ProjectSpec","source_path":"stdlib/build.kn","line":436,"attributes":[],"docs":[],"target_notes":[]},{"name":"source_root","qualified_name":"std::build::ProjectSpec.source_root","kind":"impl_method","visibility":"private","signature":"fn source_root(_self: Self_, path: String) -> ProjectSpec","source_path":"stdlib/build.kn","line":441,"attributes":[],"docs":[],"target_notes":[]},{"name":"source_roots","qualified_name":"std::build::ProjectSpec.source_roots","kind":"impl_method","visibility":"private","signature":"fn source_roots(_self: Self_, path: String) -> ProjectSpec","source_path":"stdlib/build.kn","line":446,"attributes":[],"docs":[],"target_notes":[]},{"name":"module_root","qualified_name":"std::build::ProjectSpec.module_root","kind":"impl_method","visibility":"private","signature":"fn module_root(_self: Self_, path: String) -> ProjectSpec","source_path":"stdlib/build.kn","line":449,"attributes":[],"docs":[],"target_notes":[]},{"name":"module_roots","qualified_name":"std::build::ProjectSpec.module_roots","kind":"impl_method","visibility":"private","signature":"fn module_roots(_self: Self_, path: String) -> ProjectSpec","source_path":"stdlib/build.kn","line":454,"attributes":[],"docs":[],"target_notes":[]},{"name":"generated_root","qualified_name":"std::build::ProjectSpec.generated_root","kind":"impl_method","visibility":"private","signature":"fn generated_root(_self: Self_, path: String) -> ProjectSpec","source_path":"stdlib/build.kn","line":457,"attributes":[],"docs":[],"target_notes":[]},{"name":"target","qualified_name":"std::build::ProjectSpec.target","kind":"impl_method","visibility":"private","signature":"fn target(_self: Self_, value: String) -> ProjectSpec","source_path":"stdlib/build.kn","line":462,"attributes":[],"docs":[],"target_notes":[]},{"name":"targets","qualified_name":"std::build::ProjectSpec.targets","kind":"impl_method","visibility":"private","signature":"fn targets(_self: Self_, value: String) -> ProjectSpec","source_path":"stdlib/build.kn","line":467,"attributes":[],"docs":[],"target_notes":[]},{"name":"artifact_root","qualified_name":"std::build::ProjectSpec.artifact_root","kind":"impl_method","visibility":"private","signature":"fn artifact_root(_self: Self_, path: String) -> ProjectSpec","source_path":"stdlib/build.kn","line":470,"attributes":[],"docs":[],"target_notes":[]},{"name":"cache_root","qualified_name":"std::build::ProjectSpec.cache_root","kind":"impl_method","visibility":"private","signature":"fn cache_root(_self: Self_, path: String) -> ProjectSpec","source_path":"stdlib/build.kn","line":475,"attributes":[],"docs":[],"target_notes":[]},{"name":"profile","qualified_name":"std::build::ProjectSpec.profile","kind":"impl_method","visibility":"private","signature":"fn profile(_self: Self_, value: String) -> ProjectSpec","source_path":"stdlib/build.kn","line":480,"attributes":[],"docs":[],"target_notes":[]},{"name":"run_arg","qualified_name":"std::build::ProjectSpec.run_arg","kind":"impl_method","visibility":"private","signature":"fn run_arg(_self: Self_, value: String) -> ProjectSpec","source_path":"stdlib/build.kn","line":485,"attributes":[],"docs":[],"target_notes":[]},{"name":"watch","qualified_name":"std::build::ProjectSpec.watch","kind":"impl_method","visibility":"private","signature":"fn watch(_self: Self_, path: String) -> ProjectSpec","source_path":"stdlib/build.kn","line":490,"attributes":[],"docs":[],"target_notes":[]},{"name":"root","qualified_name":"std::build::SourceSetSpec.root","kind":"impl_method","visibility":"private","signature":"fn root(_self: Self_, path: String) -> SourceSetSpec","source_path":"stdlib/build.kn","line":496,"attributes":[],"docs":[],"target_notes":[]},{"name":"file","qualified_name":"std::build::SourceSetSpec.file","kind":"impl_method","visibility":"private","signature":"fn file(_self: Self_, path: String) -> SourceSetSpec","source_path":"stdlib/build.kn","line":501,"attributes":[],"docs":[],"target_notes":[]},{"name":"files","qualified_name":"std::build::SourceSetSpec.files","kind":"impl_method","visibility":"private","signature":"fn files(_self: Self_, path: String) -> SourceSetSpec","source_path":"stdlib/build.kn","line":506,"attributes":[],"docs":[],"target_notes":[]},{"name":"dir","qualified_name":"std::build::SourceSetSpec.dir","kind":"impl_method","visibility":"private","signature":"fn dir(_self: Self_, path: String) -> SourceSetSpec","source_path":"stdlib/build.kn","line":509,"attributes":[],"docs":[],"target_notes":[]},{"name":"glob","qualified_name":"std::build::SourceSetSpec.glob","kind":"impl_method","visibility":"private","signature":"fn glob(_self: Self_, pattern: String) -> SourceSetSpec","source_path":"stdlib/build.kn","line":514,"attributes":[],"docs":[],"target_notes":[]},{"name":"exclude","qualified_name":"std::build::SourceSetSpec.exclude","kind":"impl_method","visibility":"private","signature":"fn exclude(_self: Self_, pattern: String) -> SourceSetSpec","source_path":"stdlib/build.kn","line":519,"attributes":[],"docs":[],"target_notes":[]},{"name":"kind","qualified_name":"std::build::BuildTaskSpec.kind","kind":"impl_method","visibility":"private","signature":"fn kind(_self: Self_, value: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":525,"attributes":[],"docs":[],"target_notes":[]},{"name":"blade","qualified_name":"std::build::BuildTaskSpec.blade","kind":"impl_method","visibility":"private","signature":"fn blade(_self: Self_, value: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":530,"attributes":[],"docs":[],"target_notes":[]},{"name":"entry","qualified_name":"std::build::BuildTaskSpec.entry","kind":"impl_method","visibility":"private","signature":"fn entry(_self: Self_, path: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":535,"attributes":[],"docs":[],"target_notes":[]},{"name":"manifest","qualified_name":"std::build::BuildTaskSpec.manifest","kind":"impl_method","visibility":"private","signature":"fn manifest(_self: Self_, path: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":540,"attributes":[],"docs":[],"target_notes":[]},{"name":"source","qualified_name":"std::build::BuildTaskSpec.source","kind":"impl_method","visibility":"private","signature":"fn source(_self: Self_, path: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":545,"attributes":[],"docs":[],"target_notes":[]},{"name":"path","qualified_name":"std::build::BuildTaskSpec.path","kind":"impl_method","visibility":"private","signature":"fn path(_self: Self_, path: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":548,"attributes":[],"docs":[],"target_notes":[]},{"name":"project","qualified_name":"std::build::BuildTaskSpec.project","kind":"impl_method","visibility":"private","signature":"fn project(_self: Self_, value: ProjectSpec) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":551,"attributes":[],"docs":[],"target_notes":[]},{"name":"command","qualified_name":"std::build::BuildTaskSpec.command","kind":"impl_method","visibility":"private","signature":"fn command(_self: Self_, value: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":557,"attributes":[],"docs":[],"target_notes":[]},{"name":"arg","qualified_name":"std::build::BuildTaskSpec.arg","kind":"impl_method","visibility":"private","signature":"fn arg(_self: Self_, value: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":562,"attributes":[],"docs":[],"target_notes":[]},{"name":"args","qualified_name":"std::build::BuildTaskSpec.args","kind":"impl_method","visibility":"private","signature":"fn args(_self: Self_, value: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":567,"attributes":[],"docs":[],"target_notes":[]},{"name":"cwd","qualified_name":"std::build::BuildTaskSpec.cwd","kind":"impl_method","visibility":"private","signature":"fn cwd(_self: Self_, path: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":570,"attributes":[],"docs":[],"target_notes":[]},{"name":"target","qualified_name":"std::build::BuildTaskSpec.target","kind":"impl_method","visibility":"private","signature":"fn target(_self: Self_, value: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":575,"attributes":[],"docs":[],"target_notes":[]},{"name":"profile","qualified_name":"std::build::BuildTaskSpec.profile","kind":"impl_method","visibility":"private","signature":"fn profile(_self: Self_, value: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":580,"attributes":[],"docs":[],"target_notes":[]},{"name":"input","qualified_name":"std::build::BuildTaskSpec.input","kind":"impl_method","visibility":"private","signature":"fn input(_self: Self_, path: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":585,"attributes":[],"docs":[],"target_notes":[]},{"name":"inputs","qualified_name":"std::build::BuildTaskSpec.inputs","kind":"impl_method","visibility":"private","signature":"fn inputs(_self: Self_, path: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":590,"attributes":[],"docs":[],"target_notes":[]},{"name":"output","qualified_name":"std::build::BuildTaskSpec.output","kind":"impl_method","visibility":"private","signature":"fn output(_self: Self_, path: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":593,"attributes":[],"docs":[],"target_notes":[]},{"name":"outputs","qualified_name":"std::build::BuildTaskSpec.outputs","kind":"impl_method","visibility":"private","signature":"fn outputs(_self: Self_, path: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":598,"attributes":[],"docs":[],"target_notes":[]},{"name":"root_output","qualified_name":"std::build::BuildTaskSpec.root_output","kind":"impl_method","visibility":"private","signature":"fn root_output(_self: Self_, path: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":601,"attributes":[],"docs":[],"target_notes":[]},{"name":"blade_output","qualified_name":"std::build::BuildTaskSpec.blade_output","kind":"impl_method","visibility":"private","signature":"fn blade_output(_self: Self_, path: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":604,"attributes":[],"docs":[],"target_notes":[]},{"name":"artifact","qualified_name":"std::build::BuildTaskSpec.artifact","kind":"impl_method","visibility":"private","signature":"fn artifact(_self: Self_, path: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":607,"attributes":[],"docs":[],"target_notes":[]},{"name":"produces","qualified_name":"std::build::BuildTaskSpec.produces","kind":"impl_method","visibility":"private","signature":"fn produces(_self: Self_, path: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":610,"attributes":[],"docs":[],"target_notes":[]},{"name":"depends_on","qualified_name":"std::build::BuildTaskSpec.depends_on","kind":"impl_method","visibility":"private","signature":"fn depends_on(_self: Self_, task_id: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":613,"attributes":[],"docs":[],"target_notes":[]},{"name":"requires","qualified_name":"std::build::BuildTaskSpec.requires","kind":"impl_method","visibility":"private","signature":"fn requires(_self: Self_, task_id: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":618,"attributes":[],"docs":[],"target_notes":[]},{"name":"requires_task","qualified_name":"std::build::BuildTaskSpec.requires_task","kind":"impl_method","visibility":"private","signature":"fn requires_task(_self: Self_, task_id: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":621,"attributes":[],"docs":[],"target_notes":[]},{"name":"after","qualified_name":"std::build::BuildTaskSpec.after","kind":"impl_method","visibility":"private","signature":"fn after(_self: Self_, task_id: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":624,"attributes":[],"docs":[],"target_notes":[]},{"name":"requires_capability","qualified_name":"std::build::BuildTaskSpec.requires_capability","kind":"impl_method","visibility":"private","signature":"fn requires_capability(_self: Self_, capability: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":627,"attributes":[],"docs":[],"target_notes":[]},{"name":"when_capability","qualified_name":"std::build::BuildTaskSpec.when_capability","kind":"impl_method","visibility":"private","signature":"fn when_capability(_self: Self_, capability: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":632,"attributes":[],"docs":[],"target_notes":[]},{"name":"capability","qualified_name":"std::build::BuildTaskSpec.capability","kind":"impl_method","visibility":"private","signature":"fn capability(_self: Self_, capability: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":635,"attributes":[],"docs":[],"target_notes":[]},{"name":"axis","qualified_name":"std::build::BuildTaskSpec.axis","kind":"impl_method","visibility":"private","signature":"fn axis(_self: Self_, key: String, value: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":638,"attributes":[],"docs":[],"target_notes":[]},{"name":"matrix_axis","qualified_name":"std::build::BuildTaskSpec.matrix_axis","kind":"impl_method","visibility":"private","signature":"fn matrix_axis(_self: Self_, value: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":643,"attributes":[],"docs":[],"target_notes":[]},{"name":"matrix_value","qualified_name":"std::build::BuildTaskSpec.matrix_value","kind":"impl_method","visibility":"private","signature":"fn matrix_value(_self: Self_, value: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":648,"attributes":[],"docs":[],"target_notes":[]},{"name":"telemetry","qualified_name":"std::build::BuildTaskSpec.telemetry","kind":"impl_method","visibility":"private","signature":"fn telemetry(_self: Self_, channel: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":651,"attributes":[],"docs":[],"target_notes":[]},{"name":"telemetry_channel","qualified_name":"std::build::BuildTaskSpec.telemetry_channel","kind":"impl_method","visibility":"private","signature":"fn telemetry_channel(_self: Self_, channel: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":656,"attributes":[],"docs":[],"target_notes":[]},{"name":"certifies","qualified_name":"std::build::BuildTaskSpec.certifies","kind":"impl_method","visibility":"private","signature":"fn certifies(_self: Self_, subject: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":659,"attributes":[],"docs":[],"target_notes":[]},{"name":"env","qualified_name":"std::build::BuildTaskSpec.env","kind":"impl_method","visibility":"private","signature":"fn env(_self: Self_, key: String, value: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":664,"attributes":[],"docs":[],"target_notes":[]},{"name":"option","qualified_name":"std::build::BuildTaskSpec.option","kind":"impl_method","visibility":"private","signature":"fn option(_self: Self_, key: String, value: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":669,"attributes":[],"docs":[],"target_notes":[]},{"name":"name","qualified_name":"std::build::BuildTaskSpec.name","kind":"impl_method","visibility":"private","signature":"fn name(_self: Self_, value: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":674,"attributes":[],"docs":[],"target_notes":[]},{"name":"version","qualified_name":"std::build::BuildTaskSpec.version","kind":"impl_method","visibility":"private","signature":"fn version(_self: Self_, value: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":677,"attributes":[],"docs":[],"target_notes":[]},{"name":"author","qualified_name":"std::build::BuildTaskSpec.author","kind":"impl_method","visibility":"private","signature":"fn author(_self: Self_, value: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":680,"attributes":[],"docs":[],"target_notes":[]},{"name":"note","qualified_name":"std::build::BuildTaskSpec.note","kind":"impl_method","visibility":"private","signature":"fn note(_self: Self_, value: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":685,"attributes":[],"docs":[],"target_notes":[]},{"name":"tag","qualified_name":"std::build::BuildTaskSpec.tag","kind":"impl_method","visibility":"private","signature":"fn tag(_self: Self_, value: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":690,"attributes":[],"docs":[],"target_notes":[]},{"name":"meta","qualified_name":"std::build::BuildTaskSpec.meta","kind":"impl_method","visibility":"private","signature":"fn meta(_self: Self_, key: String, value: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":695,"attributes":[],"docs":[],"target_notes":[]},{"name":"storage","qualified_name":"std::build::BuildTaskSpec.storage","kind":"impl_method","visibility":"private","signature":"fn storage(_self: Self_, value: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":700,"attributes":[],"docs":[],"target_notes":[]},{"name":"contents","qualified_name":"std::build::BuildTaskSpec.contents","kind":"impl_method","visibility":"private","signature":"fn contents(_self: Self_, value: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":703,"attributes":[],"docs":[],"target_notes":[]},{"name":"capsule_set","qualified_name":"std::build::BuildTaskSpec.capsule_set","kind":"impl_method","visibility":"private","signature":"fn capsule_set(_self: Self_, value: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":706,"attributes":[],"docs":[],"target_notes":[]},{"name":"archive","qualified_name":"std::build::BuildTaskSpec.archive","kind":"impl_method","visibility":"private","signature":"fn archive(_self: Self_, enabled: Bool) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":709,"attributes":[],"docs":[],"target_notes":[]},{"name":"editable","qualified_name":"std::build::BuildTaskSpec.editable","kind":"impl_method","visibility":"private","signature":"fn editable(_self: Self_) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":714,"attributes":[],"docs":[],"target_notes":[]},{"name":"header","qualified_name":"std::build::BuildTaskSpec.header","kind":"impl_method","visibility":"private","signature":"fn header(_self: Self_, value: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":717,"attributes":[],"docs":[],"target_notes":[]},{"name":"compression","qualified_name":"std::build::BuildTaskSpec.compression","kind":"impl_method","visibility":"private","signature":"fn compression(_self: Self_, value: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":720,"attributes":[],"docs":[],"target_notes":[]},{"name":"preview_symbols","qualified_name":"std::build::BuildTaskSpec.preview_symbols","kind":"impl_method","visibility":"private","signature":"fn preview_symbols(_self: Self_, value: Int) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":723,"attributes":[],"docs":[],"target_notes":[]},{"name":"api_index","qualified_name":"std::build::BuildTaskSpec.api_index","kind":"impl_method","visibility":"private","signature":"fn api_index(_self: Self_, value: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":726,"attributes":[],"docs":[],"target_notes":[]},{"name":"module_index","qualified_name":"std::build::BuildTaskSpec.module_index","kind":"impl_method","visibility":"private","signature":"fn module_index(_self: Self_, value: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":729,"attributes":[],"docs":[],"target_notes":[]},{"name":"timeout_ms","qualified_name":"std::build::BuildTaskSpec.timeout_ms","kind":"impl_method","visibility":"private","signature":"fn timeout_ms(_self: Self_, value: Int) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":732,"attributes":[],"docs":[],"target_notes":[]},{"name":"stdout","qualified_name":"std::build::BuildTaskSpec.stdout","kind":"impl_method","visibility":"private","signature":"fn stdout(_self: Self_, path: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":735,"attributes":[],"docs":[],"target_notes":[]},{"name":"stderr","qualified_name":"std::build::BuildTaskSpec.stderr","kind":"impl_method","visibility":"private","signature":"fn stderr(_self: Self_, path: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":738,"attributes":[],"docs":[],"target_notes":[]},{"name":"artifact_root","qualified_name":"std::build::BuildTaskSpec.artifact_root","kind":"impl_method","visibility":"private","signature":"fn artifact_root(_self: Self_, path: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":741,"attributes":[],"docs":[],"target_notes":[]},{"name":"output_dir","qualified_name":"std::build::BuildTaskSpec.output_dir","kind":"impl_method","visibility":"private","signature":"fn output_dir(_self: Self_, path: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":744,"attributes":[],"docs":[],"target_notes":[]},{"name":"stem","qualified_name":"std::build::BuildTaskSpec.stem","kind":"impl_method","visibility":"private","signature":"fn stem(_self: Self_, value: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":747,"attributes":[],"docs":[],"target_notes":[]},{"name":"fragment_source","qualified_name":"std::build::BuildTaskSpec.fragment_source","kind":"impl_method","visibility":"private","signature":"fn fragment_source(_self: Self_, path: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":750,"attributes":[],"docs":[],"target_notes":[]},{"name":"compute_source","qualified_name":"std::build::BuildTaskSpec.compute_source","kind":"impl_method","visibility":"private","signature":"fn compute_source(_self: Self_, path: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":753,"attributes":[],"docs":[],"target_notes":[]},{"name":"runner","qualified_name":"std::build::BuildTaskSpec.runner","kind":"impl_method","visibility":"private","signature":"fn runner(_self: Self_, path: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":756,"attributes":[],"docs":[],"target_notes":[]},{"name":"executable","qualified_name":"std::build::BuildTaskSpec.executable","kind":"impl_method","visibility":"private","signature":"fn executable(_self: Self_, path: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":759,"attributes":[],"docs":[],"target_notes":[]},{"name":"always_run","qualified_name":"std::build::BuildTaskSpec.always_run","kind":"impl_method","visibility":"private","signature":"fn always_run(_self: Self_) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":762,"attributes":[],"docs":[],"target_notes":[]},{"name":"proof_mode","qualified_name":"std::build::BuildTaskSpec.proof_mode","kind":"impl_method","visibility":"private","signature":"fn proof_mode(_self: Self_, value: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":765,"attributes":[],"docs":[],"target_notes":[]},{"name":"mode","qualified_name":"std::build::BuildTaskSpec.mode","kind":"impl_method","visibility":"private","signature":"fn mode(_self: Self_, value: String) -> BuildTaskSpec","source_path":"stdlib/build.kn","line":768,"attributes":[],"docs":[],"target_notes":[]},{"name":"project","qualified_name":"std::build::BuildGraphSpec.project","kind":"impl_method","visibility":"private","signature":"fn project(_self: Self_, value: ProjectSpec) -> BuildGraphSpec","source_path":"stdlib/build.kn","line":772,"attributes":[],"docs":[],"target_notes":[]},{"name":"package","qualified_name":"std::build::BuildGraphSpec.package","kind":"impl_method","visibility":"private","signature":"fn package(_self: Self_, value: PackageSpec) -> BuildGraphSpec","source_path":"stdlib/build.kn","line":790,"attributes":[],"docs":[],"target_notes":[]},{"name":"blade","qualified_name":"std::build::BuildGraphSpec.blade","kind":"impl_method","visibility":"private","signature":"fn blade(_self: Self_, value: BladeSpec) -> BuildGraphSpec","source_path":"stdlib/build.kn","line":795,"attributes":[],"docs":[],"target_notes":[]},{"name":"task","qualified_name":"std::build::BuildGraphSpec.task","kind":"impl_method","visibility":"private","signature":"fn task(_self: Self_, value: BuildTaskSpec) -> BuildGraphSpec","source_path":"stdlib/build.kn","line":800,"attributes":[],"docs":[],"target_notes":[]},{"name":"tasks","qualified_name":"std::build::BuildGraphSpec.tasks","kind":"impl_method","visibility":"private","signature":"fn tasks(_self: Self_, value: BuildTaskSpec) -> BuildGraphSpec","source_path":"stdlib/build.kn","line":805,"attributes":[],"docs":[],"target_notes":[]},{"name":"sources","qualified_name":"std::build::BuildGraphSpec.sources","kind":"impl_method","visibility":"private","signature":"fn sources(_self: Self_, value: SourceSetSpec) -> BuildGraphSpec","source_path":"stdlib/build.kn","line":808,"attributes":[],"docs":[],"target_notes":[]},{"name":"require","qualified_name":"std::build::BuildGraphSpec.require","kind":"impl_method","visibility":"private","signature":"fn require(_self: Self_, value: PlatformPackageSpec) -> BuildGraphSpec","source_path":"stdlib/build.kn","line":811,"attributes":[],"docs":[],"target_notes":[]},{"name":"defaults","qualified_name":"std::build::BuildGraphSpec.defaults","kind":"impl_method","visibility":"private","signature":"fn defaults(_self: Self_, value: BuildDefaultsSpec) -> BuildGraphSpec","source_path":"stdlib/build.kn","line":816,"attributes":[],"docs":[],"target_notes":[]},{"name":"workspace","qualified_name":"std::build::BuildGraphSpec.workspace","kind":"impl_method","visibility":"private","signature":"fn workspace(_self: Self_, value: WorkspaceDefaultsSpec) -> BuildGraphSpec","source_path":"stdlib/build.kn","line":819,"attributes":[],"docs":[],"target_notes":[]},{"name":"run","qualified_name":"std::build::BuildGraphSpec.run","kind":"impl_method","visibility":"private","signature":"fn run(_self: Self_, value: RunDefaultsSpec) -> BuildGraphSpec","source_path":"stdlib/build.kn","line":822,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"bytes","import_path":"std::bytes","source_path":"stdlib/bytes.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"ByteSlice","qualified_name":"std::bytes::ByteSlice","kind":"struct","visibility":"public","signature":"struct ByteSlice","source_path":"stdlib/bytes.kn","line":5,"attributes":[],"docs":[],"target_notes":[]},{"name":"BytesBuilder","qualified_name":"std::bytes::BytesBuilder","kind":"struct","visibility":"public","signature":"struct BytesBuilder","source_path":"stdlib/bytes.kn","line":10,"attributes":[],"docs":[],"target_notes":[]},{"name":"BytesDecodeResult","qualified_name":"std::bytes::BytesDecodeResult","kind":"struct","visibility":"public","signature":"struct BytesDecodeResult","source_path":"stdlib/bytes.kn","line":13,"attributes":[],"docs":[],"target_notes":[]},{"name":"bytes_decode_error","qualified_name":"std::bytes::bytes_decode_error","kind":"function","visibility":"private","signature":"fn bytes_decode_error(message: String) -> BytesDecodeResult","source_path":"stdlib/bytes.kn","line":18,"attributes":[],"docs":[],"target_notes":[]},{"name":"bytes_hex_text_is_valid","qualified_name":"std::bytes::bytes_hex_text_is_valid","kind":"function","visibility":"private","signature":"fn bytes_hex_text_is_valid(text: String) -> Bool","source_path":"stdlib/bytes.kn","line":25,"attributes":[],"docs":[],"target_notes":[]},{"name":"bytes_slice","qualified_name":"std::bytes::bytes_slice","kind":"function","visibility":"public","signature":"fn bytes_slice(source: String, start: Int, length: Int) -> ByteSlice","source_path":"stdlib/bytes.kn","line":35,"attributes":[],"docs":[],"target_notes":[]},{"name":"bytes_from","qualified_name":"std::bytes::bytes_from","kind":"function","visibility":"public","signature":"fn bytes_from(source: String) -> ByteSlice","source_path":"stdlib/bytes.kn","line":45,"attributes":[],"docs":[],"target_notes":[]},{"name":"bytes_len","qualified_name":"std::bytes::bytes_len","kind":"function","visibility":"public","signature":"fn bytes_len(view: ByteSlice) -> Int","source_path":"stdlib/bytes.kn","line":48,"attributes":[],"docs":[],"target_notes":[]},{"name":"bytes_is_empty","qualified_name":"std::bytes::bytes_is_empty","kind":"function","visibility":"public","signature":"fn bytes_is_empty(view: ByteSlice) -> Bool","source_path":"stdlib/bytes.kn","line":51,"attributes":[],"docs":[],"target_notes":[]},{"name":"bytes_byte_at","qualified_name":"std::bytes::bytes_byte_at","kind":"function","visibility":"public","signature":"fn bytes_byte_at(view: ByteSlice, index: Int) -> Int","source_path":"stdlib/bytes.kn","line":54,"attributes":[],"docs":[],"target_notes":[]},{"name":"bytes_char_at","qualified_name":"std::bytes::bytes_char_at","kind":"function","visibility":"public","signature":"fn bytes_char_at(view: ByteSlice, index: Int) -> String","source_path":"stdlib/bytes.kn","line":61,"attributes":[],"docs":[],"target_notes":[]},{"name":"bytes_find_from","qualified_name":"std::bytes::bytes_find_from","kind":"function","visibility":"public","signature":"fn bytes_find_from(view: ByteSlice, needle: String, start: Int) -> Int","source_path":"stdlib/bytes.kn","line":68,"attributes":[],"docs":[],"target_notes":[]},{"name":"bytes_find","qualified_name":"std::bytes::bytes_find","kind":"function","visibility":"public","signature":"fn bytes_find(view: ByteSlice, needle: String) -> Int","source_path":"stdlib/bytes.kn","line":81,"attributes":[],"docs":[],"target_notes":[]},{"name":"bytes_contains","qualified_name":"std::bytes::bytes_contains","kind":"function","visibility":"public","signature":"fn bytes_contains(view: ByteSlice, needle: String) -> Bool","source_path":"stdlib/bytes.kn","line":84,"attributes":[],"docs":[],"target_notes":[]},{"name":"bytes_starts_with","qualified_name":"std::bytes::bytes_starts_with","kind":"function","visibility":"public","signature":"fn bytes_starts_with(view: ByteSlice, prefix: String) -> Bool","source_path":"stdlib/bytes.kn","line":87,"attributes":[],"docs":[],"target_notes":[]},{"name":"bytes_ends_with","qualified_name":"std::bytes::bytes_ends_with","kind":"function","visibility":"public","signature":"fn bytes_ends_with(view: ByteSlice, suffix: String) -> Bool","source_path":"stdlib/bytes.kn","line":92,"attributes":[],"docs":[],"target_notes":[]},{"name":"bytes_count","qualified_name":"std::bytes::bytes_count","kind":"function","visibility":"public","signature":"fn bytes_count(view: ByteSlice, needle: String) -> Int","source_path":"stdlib/bytes.kn","line":98,"attributes":[],"docs":[],"target_notes":[]},{"name":"bytes_subslice","qualified_name":"std::bytes::bytes_subslice","kind":"function","visibility":"public","signature":"fn bytes_subslice(view: ByteSlice, start: Int, length: Int) -> ByteSlice","source_path":"stdlib/bytes.kn","line":112,"attributes":[],"docs":[],"target_notes":[]},{"name":"bytes_materialize","qualified_name":"std::bytes::bytes_materialize","kind":"function","visibility":"public","signature":"fn bytes_materialize(view: ByteSlice) -> String","source_path":"stdlib/bytes.kn","line":117,"attributes":[],"docs":[],"target_notes":[]},{"name":"bytes_equals_string","qualified_name":"std::bytes::bytes_equals_string","kind":"function","visibility":"public","signature":"fn bytes_equals_string(view: ByteSlice, other: String) -> Bool","source_path":"stdlib/bytes.kn","line":120,"attributes":[],"docs":[],"target_notes":[]},{"name":"bytes_equals","qualified_name":"std::bytes::bytes_equals","kind":"function","visibility":"public","signature":"fn bytes_equals(left: ByteSlice, right: ByteSlice) -> Bool","source_path":"stdlib/bytes.kn","line":130,"attributes":[],"docs":[],"target_notes":[]},{"name":"bytes_array","qualified_name":"std::bytes::bytes_array","kind":"function","visibility":"public","signature":"fn bytes_array(view: ByteSlice) -> Array","source_path":"stdlib/bytes.kn","line":140,"attributes":[],"docs":[],"target_notes":[]},{"name":"bytes_from_array","qualified_name":"std::bytes::bytes_from_array","kind":"function","visibility":"public","signature":"fn bytes_from_array(values: Array) -> String","source_path":"stdlib/bytes.kn","line":148,"attributes":[],"docs":[],"target_notes":[]},{"name":"bytes_hex","qualified_name":"std::bytes::bytes_hex","kind":"function","visibility":"public","signature":"fn bytes_hex(value: String) -> String","source_path":"stdlib/bytes.kn","line":156,"attributes":[],"docs":[],"target_notes":[]},{"name":"bytes_hex_upper","qualified_name":"std::bytes::bytes_hex_upper","kind":"function","visibility":"public","signature":"fn bytes_hex_upper(value: String) -> String","source_path":"stdlib/bytes.kn","line":159,"attributes":[],"docs":[],"target_notes":[]},{"name":"bytes_from_hex","qualified_name":"std::bytes::bytes_from_hex","kind":"function","visibility":"public","signature":"fn bytes_from_hex(text: String) -> BytesDecodeResult","source_path":"stdlib/bytes.kn","line":162,"attributes":[],"docs":[],"target_notes":[]},{"name":"bytes_builder_new","qualified_name":"std::bytes::bytes_builder_new","kind":"function","visibility":"public","signature":"fn bytes_builder_new() -> BytesBuilder","source_path":"stdlib/bytes.kn","line":171,"attributes":[],"docs":[],"target_notes":[]},{"name":"bytes_builder_len","qualified_name":"std::bytes::bytes_builder_len","kind":"function","visibility":"public","signature":"fn bytes_builder_len(builder: BytesBuilder) -> Int","source_path":"stdlib/bytes.kn","line":174,"attributes":[],"docs":[],"target_notes":[]},{"name":"bytes_builder_push_byte","qualified_name":"std::bytes::bytes_builder_push_byte","kind":"function","visibility":"public","signature":"fn bytes_builder_push_byte(builder: BytesBuilder, value: Int) -> BytesBuilder","source_path":"stdlib/bytes.kn","line":177,"attributes":[],"docs":[],"target_notes":[]},{"name":"bytes_builder_push_string","qualified_name":"std::bytes::bytes_builder_push_string","kind":"function","visibility":"public","signature":"fn bytes_builder_push_string(builder: BytesBuilder, value: String) -> BytesBuilder","source_path":"stdlib/bytes.kn","line":180,"attributes":[],"docs":[],"target_notes":[]},{"name":"bytes_builder_push_slice","qualified_name":"std::bytes::bytes_builder_push_slice","kind":"function","visibility":"public","signature":"fn bytes_builder_push_slice(builder: BytesBuilder, view: ByteSlice) -> BytesBuilder","source_path":"stdlib/bytes.kn","line":183,"attributes":[],"docs":[],"target_notes":[]},{"name":"bytes_builder_push_array","qualified_name":"std::bytes::bytes_builder_push_array","kind":"function","visibility":"public","signature":"fn bytes_builder_push_array(builder: BytesBuilder, values: Array) -> BytesBuilder","source_path":"stdlib/bytes.kn","line":186,"attributes":[],"docs":[],"target_notes":[]},{"name":"bytes_builder_clear","qualified_name":"std::bytes::bytes_builder_clear","kind":"function","visibility":"public","signature":"fn bytes_builder_clear(builder: BytesBuilder) -> BytesBuilder","source_path":"stdlib/bytes.kn","line":189,"attributes":[],"docs":[],"target_notes":[]},{"name":"bytes_builder_build","qualified_name":"std::bytes::bytes_builder_build","kind":"function","visibility":"public","signature":"fn bytes_builder_build(builder: BytesBuilder) -> String","source_path":"stdlib/bytes.kn","line":192,"attributes":[],"docs":[],"target_notes":[]},{"name":"bytes_builder_view","qualified_name":"std::bytes::bytes_builder_view","kind":"function","visibility":"public","signature":"fn bytes_builder_view(builder: BytesBuilder) -> ByteSlice","source_path":"stdlib/bytes.kn","line":195,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"certify","import_path":"std::certify","source_path":"stdlib/certify.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"certify_task","qualified_name":"std::certify::certify_task","kind":"function","visibility":"public","signature":"fn certify_task(id: String) -> BuildTaskSpec","source_path":"stdlib/certify.kn","line":3,"attributes":[],"docs":[],"target_notes":[]},{"name":"certify_gate","qualified_name":"std::certify::certify_gate","kind":"function","visibility":"public","signature":"fn certify_gate(id: String) -> BuildTaskSpec","source_path":"stdlib/certify.kn","line":6,"attributes":[],"docs":[],"target_notes":[]},{"name":"release_gate","qualified_name":"std::certify::release_gate","kind":"function","visibility":"public","signature":"fn release_gate(id: String) -> BuildTaskSpec","source_path":"stdlib/certify.kn","line":9,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"collections","import_path":"std::collections","source_path":"stdlib/collections.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"abi_map_release","qualified_name":"std::collections::abi_map_release","kind":"extern_function","visibility":"private","signature":"fn abi_map_release(handle: Int) -> Int","source_path":"stdlib/collections.kn","line":4,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"native_int_min","qualified_name":"std::collections::native_int_min","kind":"function","visibility":"public","signature":"fn native_int_min(left: Int, right: Int) -> Int","source_path":"stdlib/collections.kn","line":6,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_int_max","qualified_name":"std::collections::native_int_max","kind":"function","visibility":"public","signature":"fn native_int_max(left: Int, right: Int) -> Int","source_path":"stdlib/collections.kn","line":11,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_int_clamp","qualified_name":"std::collections::native_int_clamp","kind":"function","visibility":"public","signature":"fn native_int_clamp(value: Int, low: Int, high: Int) -> Int","source_path":"stdlib/collections.kn","line":16,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_int_between","qualified_name":"std::collections::native_int_between","kind":"function","visibility":"public","signature":"fn native_int_between(value: Int, low: Int, high: Int) -> Bool","source_path":"stdlib/collections.kn","line":23,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_int_saturating_sub","qualified_name":"std::collections::native_int_saturating_sub","kind":"function","visibility":"public","signature":"fn native_int_saturating_sub(left: Int, right: Int) -> Int","source_path":"stdlib/collections.kn","line":28,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_int_sign","qualified_name":"std::collections::native_int_sign","kind":"function","visibility":"public","signature":"fn native_int_sign(value: Int) -> Int","source_path":"stdlib/collections.kn","line":33,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_bool_all","qualified_name":"std::collections::native_bool_all","kind":"function","visibility":"public","signature":"fn native_bool_all(left: Bool, right: Bool) -> Bool","source_path":"stdlib/collections.kn","line":40,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_bool_any","qualified_name":"std::collections::native_bool_any","kind":"function","visibility":"public","signature":"fn native_bool_any(left: Bool, right: Bool) -> Bool","source_path":"stdlib/collections.kn","line":45,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_bool_to_int","qualified_name":"std::collections::native_bool_to_int","kind":"function","visibility":"public","signature":"fn native_bool_to_int(value: Bool) -> Int","source_path":"stdlib/collections.kn","line":50,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_int_to_bool","qualified_name":"std::collections::native_int_to_bool","kind":"function","visibility":"public","signature":"fn native_int_to_bool(value: Int) -> Bool","source_path":"stdlib/collections.kn","line":55,"attributes":[],"docs":[],"target_notes":[]},{"name":"int_min","qualified_name":"std::collections::int_min","kind":"function","visibility":"public","signature":"fn int_min(left: Int, right: Int) -> Int","source_path":"stdlib/collections.kn","line":59,"attributes":[],"docs":[],"target_notes":[]},{"name":"int_max","qualified_name":"std::collections::int_max","kind":"function","visibility":"public","signature":"fn int_max(left: Int, right: Int) -> Int","source_path":"stdlib/collections.kn","line":64,"attributes":[],"docs":[],"target_notes":[]},{"name":"int_clamp","qualified_name":"std::collections::int_clamp","kind":"function","visibility":"public","signature":"fn int_clamp(value: Int, low: Int, high: Int) -> Int","source_path":"stdlib/collections.kn","line":69,"attributes":[],"docs":[],"target_notes":[]},{"name":"int_between","qualified_name":"std::collections::int_between","kind":"function","visibility":"public","signature":"fn int_between(value: Int, low: Int, high: Int) -> Bool","source_path":"stdlib/collections.kn","line":76,"attributes":[],"docs":[],"target_notes":[]},{"name":"int_saturating_sub","qualified_name":"std::collections::int_saturating_sub","kind":"function","visibility":"public","signature":"fn int_saturating_sub(left: Int, right: Int) -> Int","source_path":"stdlib/collections.kn","line":81,"attributes":[],"docs":[],"target_notes":[]},{"name":"int_sign","qualified_name":"std::collections::int_sign","kind":"function","visibility":"public","signature":"fn int_sign(value: Int) -> Int","source_path":"stdlib/collections.kn","line":86,"attributes":[],"docs":[],"target_notes":[]},{"name":"bool_all","qualified_name":"std::collections::bool_all","kind":"function","visibility":"public","signature":"fn bool_all(left: Bool, right: Bool) -> Bool","source_path":"stdlib/collections.kn","line":93,"attributes":[],"docs":[],"target_notes":[]},{"name":"bool_any","qualified_name":"std::collections::bool_any","kind":"function","visibility":"public","signature":"fn bool_any(left: Bool, right: Bool) -> Bool","source_path":"stdlib/collections.kn","line":98,"attributes":[],"docs":[],"target_notes":[]},{"name":"bool_to_int","qualified_name":"std::collections::bool_to_int","kind":"function","visibility":"public","signature":"fn bool_to_int(value: Bool) -> Int","source_path":"stdlib/collections.kn","line":103,"attributes":[],"docs":[],"target_notes":[]},{"name":"int_to_bool","qualified_name":"std::collections::int_to_bool","kind":"function","visibility":"public","signature":"fn int_to_bool(value: Int) -> Bool","source_path":"stdlib/collections.kn","line":108,"attributes":[],"docs":[],"target_notes":[]},{"name":"StringIntMap","qualified_name":"std::collections::StringIntMap","kind":"struct","visibility":"public","signature":"struct StringIntMap","source_path":"stdlib/collections.kn","line":112,"attributes":[],"docs":[],"target_notes":[]},{"name":"IntQueue","qualified_name":"std::collections::IntQueue","kind":"struct","visibility":"public","signature":"struct IntQueue","source_path":"stdlib/collections.kn","line":115,"attributes":[],"docs":[],"target_notes":[]},{"name":"IntDeque","qualified_name":"std::collections::IntDeque","kind":"struct","visibility":"public","signature":"struct IntDeque","source_path":"stdlib/collections.kn","line":122,"attributes":[],"docs":[],"target_notes":[]},{"name":"IntPriorityQueue","qualified_name":"std::collections::IntPriorityQueue","kind":"struct","visibility":"public","signature":"struct IntPriorityQueue","source_path":"stdlib/collections.kn","line":129,"attributes":[],"docs":[],"target_notes":[]},{"name":"PriorityEntry","qualified_name":"std::collections::PriorityEntry","kind":"struct","visibility":"public","signature":"struct PriorityEntry","source_path":"stdlib/collections.kn","line":134,"attributes":[],"docs":[],"target_notes":[]},{"name":"SLOT_MAP_KEY_INDEX_BASE","qualified_name":"std::collections::SLOT_MAP_KEY_INDEX_BASE","kind":"const","visibility":"private","signature":"const SLOT_MAP_KEY_INDEX_BASE: Int","source_path":"stdlib/collections.kn","line":138,"attributes":[],"docs":[],"target_notes":[]},{"name":"SLOT_MAP_INITIAL_GENERATION","qualified_name":"std::collections::SLOT_MAP_INITIAL_GENERATION","kind":"const","visibility":"private","signature":"const SLOT_MAP_INITIAL_GENERATION: Int","source_path":"stdlib/collections.kn","line":139,"attributes":[],"docs":[],"target_notes":[]},{"name":"SLOT_MAP_EMPTY","qualified_name":"std::collections::SLOT_MAP_EMPTY","kind":"const","visibility":"private","signature":"const SLOT_MAP_EMPTY: Int","source_path":"stdlib/collections.kn","line":140,"attributes":[],"docs":[],"target_notes":[]},{"name":"SLOT_MAP_OCCUPIED","qualified_name":"std::collections::SLOT_MAP_OCCUPIED","kind":"const","visibility":"private","signature":"const SLOT_MAP_OCCUPIED: Int","source_path":"stdlib/collections.kn","line":141,"attributes":[],"docs":[],"target_notes":[]},{"name":"SLOT_MAP_INVALID_INDEX","qualified_name":"std::collections::SLOT_MAP_INVALID_INDEX","kind":"const","visibility":"private","signature":"const SLOT_MAP_INVALID_INDEX: Int","source_path":"stdlib/collections.kn","line":142,"attributes":[],"docs":[],"target_notes":[]},{"name":"SlotMapKey","qualified_name":"std::collections::SlotMapKey","kind":"struct","visibility":"public","signature":"struct SlotMapKey","source_path":"stdlib/collections.kn","line":144,"attributes":[],"docs":[],"target_notes":[]},{"name":"SlotMap","qualified_name":"std::collections::SlotMap","kind":"struct","visibility":"public","signature":"struct SlotMap","source_path":"stdlib/collections.kn","line":147,"attributes":[],"docs":[],"target_notes":[]},{"name":"SlotMapInsert","qualified_name":"std::collections::SlotMapInsert","kind":"struct","visibility":"public","signature":"struct SlotMapInsert","source_path":"stdlib/collections.kn","line":156,"attributes":[],"docs":[],"target_notes":[]},{"name":"SlotMapRemove","qualified_name":"std::collections::SlotMapRemove","kind":"struct","visibility":"public","signature":"struct SlotMapRemove","source_path":"stdlib/collections.kn","line":161,"attributes":[],"docs":[],"target_notes":[]},{"name":"string_int_map_new","qualified_name":"std::collections::string_int_map_new","kind":"function","visibility":"public","signature":"fn string_int_map_new() -> StringIntMap","source_path":"stdlib/collections.kn","line":166,"attributes":[],"docs":[],"target_notes":[]},{"name":"string_int_map_set","qualified_name":"std::collections::string_int_map_set","kind":"function","visibility":"public","signature":"fn string_int_map_set(map: StringIntMap, key: String, value: Int) -> StringIntMap","source_path":"stdlib/collections.kn","line":169,"attributes":[],"docs":[],"target_notes":[]},{"name":"string_int_map_get","qualified_name":"std::collections::string_int_map_get","kind":"function","visibility":"public","signature":"fn string_int_map_get(map: StringIntMap, key: String) -> Int","source_path":"stdlib/collections.kn","line":173,"attributes":[],"docs":[],"target_notes":[]},{"name":"string_int_map_get_or","qualified_name":"std::collections::string_int_map_get_or","kind":"function","visibility":"public","signature":"fn string_int_map_get_or(map: StringIntMap, key: String, fallback: Int) -> Int","source_path":"stdlib/collections.kn","line":176,"attributes":[],"docs":[],"target_notes":[]},{"name":"string_int_map_destroy","qualified_name":"std::collections::string_int_map_destroy","kind":"function","visibility":"public","signature":"fn string_int_map_destroy(map: StringIntMap) -> Int","source_path":"stdlib/collections.kn","line":182,"attributes":[],"docs":[],"target_notes":[]},{"name":"typed_map_new","qualified_name":"std::collections::typed_map_new","kind":"function","visibility":"public","signature":"fn typed_map_new() -> StringIntMap","source_path":"stdlib/collections.kn","line":185,"attributes":[],"docs":[],"target_notes":[]},{"name":"typed_map_set","qualified_name":"std::collections::typed_map_set","kind":"function","visibility":"public","signature":"fn typed_map_set(map: StringIntMap, key: String, value: Int) -> StringIntMap","source_path":"stdlib/collections.kn","line":188,"attributes":[],"docs":[],"target_notes":[]},{"name":"typed_map_get","qualified_name":"std::collections::typed_map_get","kind":"function","visibility":"public","signature":"fn typed_map_get(map: StringIntMap, key: String) -> Int","source_path":"stdlib/collections.kn","line":191,"attributes":[],"docs":[],"target_notes":[]},{"name":"typed_map_destroy","qualified_name":"std::collections::typed_map_destroy","kind":"function","visibility":"public","signature":"fn typed_map_destroy(map: StringIntMap) -> Int","source_path":"stdlib/collections.kn","line":194,"attributes":[],"docs":[],"target_notes":[]},{"name":"queue_create","qualified_name":"std::collections::queue_create","kind":"function","visibility":"public","signature":"fn queue_create(capacity: Int) -> IntQueue","source_path":"stdlib/collections.kn","line":197,"attributes":[],"docs":[],"target_notes":[]},{"name":"queue_len","qualified_name":"std::collections::queue_len","kind":"function","visibility":"public","signature":"fn queue_len(queue: IntQueue) -> Int","source_path":"stdlib/collections.kn","line":201,"attributes":[],"docs":[],"target_notes":[]},{"name":"queue_capacity","qualified_name":"std::collections::queue_capacity","kind":"function","visibility":"public","signature":"fn queue_capacity(queue: IntQueue) -> Int","source_path":"stdlib/collections.kn","line":204,"attributes":[],"docs":[],"target_notes":[]},{"name":"queue_is_empty","qualified_name":"std::collections::queue_is_empty","kind":"function","visibility":"public","signature":"fn queue_is_empty(queue: IntQueue) -> Bool","source_path":"stdlib/collections.kn","line":207,"attributes":[],"docs":[],"target_notes":[]},{"name":"queue_is_full","qualified_name":"std::collections::queue_is_full","kind":"function","visibility":"public","signature":"fn queue_is_full(queue: IntQueue) -> Bool","source_path":"stdlib/collections.kn","line":210,"attributes":[],"docs":[],"target_notes":[]},{"name":"queue_push","qualified_name":"std::collections::queue_push","kind":"function","visibility":"public","signature":"fn queue_push(queue: IntQueue, value: Int) -> IntQueue","source_path":"stdlib/collections.kn","line":213,"attributes":[],"docs":[],"target_notes":[]},{"name":"queue_peek","qualified_name":"std::collections::queue_peek","kind":"function","visibility":"public","signature":"fn queue_peek(queue: IntQueue) -> Int","source_path":"stdlib/collections.kn","line":225,"attributes":[],"docs":[],"target_notes":[]},{"name":"queue_pop","qualified_name":"std::collections::queue_pop","kind":"function","visibility":"public","signature":"fn queue_pop(queue: IntQueue) -> IntQueue","source_path":"stdlib/collections.kn","line":230,"attributes":[],"docs":[],"target_notes":[]},{"name":"queue_destroy","qualified_name":"std::collections::queue_destroy","kind":"function","visibility":"public","signature":"fn queue_destroy(queue: IntQueue) -> Int","source_path":"stdlib/collections.kn","line":241,"attributes":[],"docs":[],"target_notes":[]},{"name":"deque_create","qualified_name":"std::collections::deque_create","kind":"function","visibility":"public","signature":"fn deque_create(capacity: Int) -> IntDeque","source_path":"stdlib/collections.kn","line":245,"attributes":[],"docs":[],"target_notes":[]},{"name":"deque_len","qualified_name":"std::collections::deque_len","kind":"function","visibility":"public","signature":"fn deque_len(deque: IntDeque) -> Int","source_path":"stdlib/collections.kn","line":249,"attributes":[],"docs":[],"target_notes":[]},{"name":"deque_is_empty","qualified_name":"std::collections::deque_is_empty","kind":"function","visibility":"public","signature":"fn deque_is_empty(deque: IntDeque) -> Bool","source_path":"stdlib/collections.kn","line":252,"attributes":[],"docs":[],"target_notes":[]},{"name":"deque_is_full","qualified_name":"std::collections::deque_is_full","kind":"function","visibility":"public","signature":"fn deque_is_full(deque: IntDeque) -> Bool","source_path":"stdlib/collections.kn","line":255,"attributes":[],"docs":[],"target_notes":[]},{"name":"deque_push_back","qualified_name":"std::collections::deque_push_back","kind":"function","visibility":"public","signature":"fn deque_push_back(deque: IntDeque, value: Int) -> IntDeque","source_path":"stdlib/collections.kn","line":258,"attributes":[],"docs":[],"target_notes":[]},{"name":"deque_push_front","qualified_name":"std::collections::deque_push_front","kind":"function","visibility":"public","signature":"fn deque_push_front(deque: IntDeque, value: Int) -> IntDeque","source_path":"stdlib/collections.kn","line":270,"attributes":[],"docs":[],"target_notes":[]},{"name":"deque_peek_front","qualified_name":"std::collections::deque_peek_front","kind":"function","visibility":"public","signature":"fn deque_peek_front(deque: IntDeque) -> Int","source_path":"stdlib/collections.kn","line":283,"attributes":[],"docs":[],"target_notes":[]},{"name":"deque_peek_back","qualified_name":"std::collections::deque_peek_back","kind":"function","visibility":"public","signature":"fn deque_peek_back(deque: IntDeque) -> Int","source_path":"stdlib/collections.kn","line":288,"attributes":[],"docs":[],"target_notes":[]},{"name":"deque_pop_front","qualified_name":"std::collections::deque_pop_front","kind":"function","visibility":"public","signature":"fn deque_pop_front(deque: IntDeque) -> IntDeque","source_path":"stdlib/collections.kn","line":294,"attributes":[],"docs":[],"target_notes":[]},{"name":"deque_pop_back","qualified_name":"std::collections::deque_pop_back","kind":"function","visibility":"public","signature":"fn deque_pop_back(deque: IntDeque) -> IntDeque","source_path":"stdlib/collections.kn","line":305,"attributes":[],"docs":[],"target_notes":[]},{"name":"deque_destroy","qualified_name":"std::collections::deque_destroy","kind":"function","visibility":"public","signature":"fn deque_destroy(deque: IntDeque) -> Int","source_path":"stdlib/collections.kn","line":316,"attributes":[],"docs":[],"target_notes":[]},{"name":"priority_entry_pack","qualified_name":"std::collections::priority_entry_pack","kind":"function","visibility":"public","signature":"fn priority_entry_pack(value: Int, priority: Int) -> Int","source_path":"stdlib/collections.kn","line":320,"attributes":[],"docs":[],"target_notes":[]},{"name":"priority_entry_value","qualified_name":"std::collections::priority_entry_value","kind":"function","visibility":"public","signature":"fn priority_entry_value(entry: Int) -> Int","source_path":"stdlib/collections.kn","line":323,"attributes":[],"docs":[],"target_notes":[]},{"name":"priority_entry_priority","qualified_name":"std::collections::priority_entry_priority","kind":"function","visibility":"public","signature":"fn priority_entry_priority(entry: Int) -> Int","source_path":"stdlib/collections.kn","line":326,"attributes":[],"docs":[],"target_notes":[]},{"name":"priority_queue_create","qualified_name":"std::collections::priority_queue_create","kind":"function","visibility":"public","signature":"fn priority_queue_create(capacity: Int) -> IntPriorityQueue","source_path":"stdlib/collections.kn","line":329,"attributes":[],"docs":[],"target_notes":[]},{"name":"priority_queue_len","qualified_name":"std::collections::priority_queue_len","kind":"function","visibility":"public","signature":"fn priority_queue_len(queue: IntPriorityQueue) -> Int","source_path":"stdlib/collections.kn","line":333,"attributes":[],"docs":[],"target_notes":[]},{"name":"priority_queue_is_empty","qualified_name":"std::collections::priority_queue_is_empty","kind":"function","visibility":"public","signature":"fn priority_queue_is_empty(queue: IntPriorityQueue) -> Bool","source_path":"stdlib/collections.kn","line":336,"attributes":[],"docs":[],"target_notes":[]},{"name":"priority_queue_is_full","qualified_name":"std::collections::priority_queue_is_full","kind":"function","visibility":"public","signature":"fn priority_queue_is_full(queue: IntPriorityQueue) -> Bool","source_path":"stdlib/collections.kn","line":339,"attributes":[],"docs":[],"target_notes":[]},{"name":"priority_queue_swap","qualified_name":"std::collections::priority_queue_swap","kind":"function","visibility":"public","signature":"fn priority_queue_swap(queue: IntPriorityQueue, left: Int, right: Int) -> IntPriorityQueue","source_path":"stdlib/collections.kn","line":342,"attributes":[],"docs":[],"target_notes":[]},{"name":"priority_queue_push","qualified_name":"std::collections::priority_queue_push","kind":"function","visibility":"public","signature":"fn priority_queue_push(queue: IntPriorityQueue, value: Int, priority: Int) -> IntPriorityQueue","source_path":"stdlib/collections.kn","line":349,"attributes":[],"docs":[],"target_notes":[]},{"name":"priority_queue_peek_entry","qualified_name":"std::collections::priority_queue_peek_entry","kind":"function","visibility":"public","signature":"fn priority_queue_peek_entry(queue: IntPriorityQueue) -> PriorityEntry","source_path":"stdlib/collections.kn","line":366,"attributes":[],"docs":[],"target_notes":[]},{"name":"priority_queue_peek_value","qualified_name":"std::collections::priority_queue_peek_value","kind":"function","visibility":"public","signature":"fn priority_queue_peek_value(queue: IntPriorityQueue) -> Int","source_path":"stdlib/collections.kn","line":372,"attributes":[],"docs":[],"target_notes":[]},{"name":"priority_queue_peek_priority","qualified_name":"std::collections::priority_queue_peek_priority","kind":"function","visibility":"public","signature":"fn priority_queue_peek_priority(queue: IntPriorityQueue) -> Int","source_path":"stdlib/collections.kn","line":375,"attributes":[],"docs":[],"target_notes":[]},{"name":"priority_queue_pop","qualified_name":"std::collections::priority_queue_pop","kind":"function","visibility":"public","signature":"fn priority_queue_pop(queue: IntPriorityQueue) -> IntPriorityQueue","source_path":"stdlib/collections.kn","line":378,"attributes":[],"docs":[],"target_notes":[]},{"name":"priority_queue_destroy","qualified_name":"std::collections::priority_queue_destroy","kind":"function","visibility":"public","signature":"fn priority_queue_destroy(queue: IntPriorityQueue) -> Int","source_path":"stdlib/collections.kn","line":408,"attributes":[],"docs":[],"target_notes":[]},{"name":"slot_map_key","qualified_name":"std::collections::slot_map_key","kind":"function","visibility":"public","signature":"fn slot_map_key(index: Int, generation: Int) -> SlotMapKey","source_path":"stdlib/collections.kn","line":412,"attributes":[],"docs":[],"target_notes":[]},{"name":"slot_map_invalid_key","qualified_name":"std::collections::slot_map_invalid_key","kind":"function","visibility":"public","signature":"fn slot_map_invalid_key() -> SlotMapKey","source_path":"stdlib/collections.kn","line":421,"attributes":[],"docs":[],"target_notes":[]},{"name":"slot_map_key_index","qualified_name":"std::collections::slot_map_key_index","kind":"function","visibility":"public","signature":"fn slot_map_key_index(key: SlotMapKey) -> Int","source_path":"stdlib/collections.kn","line":424,"attributes":[],"docs":[],"target_notes":[]},{"name":"slot_map_key_generation","qualified_name":"std::collections::slot_map_key_generation","kind":"function","visibility":"public","signature":"fn slot_map_key_generation(key: SlotMapKey) -> Int","source_path":"stdlib/collections.kn","line":429,"attributes":[],"docs":[],"target_notes":[]},{"name":"slot_map_key_is_valid","qualified_name":"std::collections::slot_map_key_is_valid","kind":"function","visibility":"public","signature":"fn slot_map_key_is_valid(key: SlotMapKey) -> Bool","source_path":"stdlib/collections.kn","line":434,"attributes":[],"docs":[],"target_notes":[]},{"name":"slot_map_create","qualified_name":"std::collections::slot_map_create","kind":"function","visibility":"public","signature":"fn slot_map_create(capacity: Int) -> SlotMap","source_path":"stdlib/collections.kn","line":437,"attributes":[],"docs":[],"target_notes":[]},{"name":"slot_map_len","qualified_name":"std::collections::slot_map_len","kind":"function","visibility":"public","signature":"fn slot_map_len(map: SlotMap) -> Int","source_path":"stdlib/collections.kn","line":454,"attributes":[],"docs":[],"target_notes":[]},{"name":"slot_map_capacity","qualified_name":"std::collections::slot_map_capacity","kind":"function","visibility":"public","signature":"fn slot_map_capacity(map: SlotMap) -> Int","source_path":"stdlib/collections.kn","line":457,"attributes":[],"docs":[],"target_notes":[]},{"name":"slot_map_is_full","qualified_name":"std::collections::slot_map_is_full","kind":"function","visibility":"public","signature":"fn slot_map_is_full(map: SlotMap) -> Bool","source_path":"stdlib/collections.kn","line":460,"attributes":[],"docs":[],"target_notes":[]},{"name":"slot_map_contains","qualified_name":"std::collections::slot_map_contains","kind":"function","visibility":"public","signature":"fn slot_map_contains(map: SlotMap, key: SlotMapKey) -> Bool","source_path":"stdlib/collections.kn","line":463,"attributes":[],"docs":[],"target_notes":[]},{"name":"slot_map_get_or","qualified_name":"std::collections::slot_map_get_or","kind":"function","visibility":"public","signature":"fn slot_map_get_or(map: SlotMap, key: SlotMapKey, fallback: Int) -> Int","source_path":"stdlib/collections.kn","line":473,"attributes":[],"docs":[],"target_notes":[]},{"name":"slot_map_insert","qualified_name":"std::collections::slot_map_insert","kind":"function","visibility":"public","signature":"fn slot_map_insert(map: SlotMap, value: Int) -> SlotMapInsert","source_path":"stdlib/collections.kn","line":478,"attributes":[],"docs":[],"target_notes":[]},{"name":"slot_map_set","qualified_name":"std::collections::slot_map_set","kind":"function","visibility":"public","signature":"fn slot_map_set(map: SlotMap, key: SlotMapKey, value: Int) -> SlotMap","source_path":"stdlib/collections.kn","line":490,"attributes":[],"docs":[],"target_notes":[]},{"name":"slot_map_remove","qualified_name":"std::collections::slot_map_remove","kind":"function","visibility":"public","signature":"fn slot_map_remove(map: SlotMap, key: SlotMapKey) -> SlotMapRemove","source_path":"stdlib/collections.kn","line":495,"attributes":[],"docs":[],"target_notes":[]},{"name":"slot_map_destroy","qualified_name":"std::collections::slot_map_destroy","kind":"function","visibility":"public","signature":"fn slot_map_destroy(map: SlotMap) -> Int","source_path":"stdlib/collections.kn","line":507,"attributes":[],"docs":[],"target_notes":[]},{"name":"IntrusiveHashNode","qualified_name":"std::collections::IntrusiveHashNode","kind":"struct","visibility":"public","signature":"struct IntrusiveHashNode","source_path":"stdlib/collections.kn","line":516,"attributes":[],"docs":[],"target_notes":[]},{"name":"IntrusiveHashMap","qualified_name":"std::collections::IntrusiveHashMap","kind":"struct","visibility":"public","signature":"struct IntrusiveHashMap","source_path":"stdlib/collections.kn","line":522,"attributes":[],"docs":[],"target_notes":[]},{"name":"intrusive_hash_map_create","qualified_name":"std::collections::intrusive_hash_map_create","kind":"function","visibility":"public","signature":"fn intrusive_hash_map_create(bucket_count: Int) -> IntrusiveHashMap","source_path":"stdlib/collections.kn","line":527,"attributes":[],"docs":[],"target_notes":[]},{"name":"intrusive_hash_map_destroy","qualified_name":"std::collections::intrusive_hash_map_destroy","kind":"function","visibility":"public","signature":"fn intrusive_hash_map_destroy(map: IntrusiveHashMap) -> Int","source_path":"stdlib/collections.kn","line":534,"attributes":[],"docs":[],"target_notes":[]},{"name":"intrusive_hash_map_insert","qualified_name":"std::collections::intrusive_hash_map_insert","kind":"function","visibility":"public","signature":"fn intrusive_hash_map_insert(map: IntrusiveHashMap, node_offset: Int, item_ptr: ptr, key_hash: Int, key: Int) -> IntrusiveHashMap","source_path":"stdlib/collections.kn","line":538,"attributes":[],"docs":[],"target_notes":[]},{"name":"intrusive_hash_map_find","qualified_name":"std::collections::intrusive_hash_map_find","kind":"function","visibility":"public","signature":"fn intrusive_hash_map_find(map: IntrusiveHashMap, node_offset: Int, key_hash: Int, key: Int) -> ptr","source_path":"stdlib/collections.kn","line":566,"attributes":[],"docs":[],"target_notes":[]},{"name":"intrusive_hash_map_remove","qualified_name":"std::collections::intrusive_hash_map_remove","kind":"function","visibility":"public","signature":"fn intrusive_hash_map_remove(map: IntrusiveHashMap, node_offset: Int, item_ptr: ptr) -> IntrusiveHashMap","source_path":"stdlib/collections.kn","line":588,"attributes":[],"docs":[],"target_notes":[]},{"name":"ArrayList","qualified_name":"std::collections::ArrayList","kind":"struct","visibility":"public","signature":"struct ArrayList","source_path":"stdlib/collections.kn","line":620,"attributes":[],"docs":[],"target_notes":[]},{"name":"array_list_create","qualified_name":"std::collections::array_list_create","kind":"function","visibility":"public","signature":"fn array_list_create(capacity: Int) -> ArrayList","source_path":"stdlib/collections.kn","line":625,"attributes":[],"docs":[],"target_notes":[]},{"name":"array_list_len","qualified_name":"std::collections::array_list_len","kind":"function","visibility":"public","signature":"fn array_list_len(list: ArrayList) -> Int","source_path":"stdlib/collections.kn","line":630,"attributes":[],"docs":[],"target_notes":[]},{"name":"array_list_capacity","qualified_name":"std::collections::array_list_capacity","kind":"function","visibility":"public","signature":"fn array_list_capacity(list: ArrayList) -> Int","source_path":"stdlib/collections.kn","line":633,"attributes":[],"docs":[],"target_notes":[]},{"name":"array_list_get","qualified_name":"std::collections::array_list_get","kind":"function","visibility":"public","signature":"fn array_list_get(list: ArrayList, index: Int) -> Int","source_path":"stdlib/collections.kn","line":636,"attributes":[],"docs":[],"target_notes":[]},{"name":"array_list_set","qualified_name":"std::collections::array_list_set","kind":"function","visibility":"public","signature":"fn array_list_set(list: ArrayList, index: Int, value: Int) -> ArrayList","source_path":"stdlib/collections.kn","line":641,"attributes":[],"docs":[],"target_notes":[]},{"name":"array_list_append","qualified_name":"std::collections::array_list_append","kind":"function","visibility":"public","signature":"fn array_list_append(list: ptr, value: Int) -> Int","source_path":"stdlib/collections.kn","line":646,"attributes":[],"docs":[],"target_notes":[]},{"name":"array_list_pop","qualified_name":"std::collections::array_list_pop","kind":"function","visibility":"public","signature":"fn array_list_pop(list: ptr) -> Int","source_path":"stdlib/collections.kn","line":671,"attributes":[],"docs":[],"target_notes":[]},{"name":"array_list_destroy","qualified_name":"std::collections::array_list_destroy","kind":"function","visibility":"public","signature":"fn array_list_destroy(list: ArrayList) -> Int","source_path":"stdlib/collections.kn","line":681,"attributes":[],"docs":[],"target_notes":[]},{"name":"HashMap","qualified_name":"std::collections::HashMap","kind":"struct","visibility":"public","signature":"struct HashMap","source_path":"stdlib/collections.kn","line":688,"attributes":[],"docs":[],"target_notes":[]},{"name":"hash_map_create","qualified_name":"std::collections::hash_map_create","kind":"function","visibility":"public","signature":"fn hash_map_create(capacity: Int) -> HashMap","source_path":"stdlib/collections.kn","line":695,"attributes":[],"docs":[],"target_notes":[]},{"name":"hash_map_len","qualified_name":"std::collections::hash_map_len","kind":"function","visibility":"public","signature":"fn hash_map_len(map: HashMap) -> Int","source_path":"stdlib/collections.kn","line":702,"attributes":[],"docs":[],"target_notes":[]},{"name":"hash_map_capacity","qualified_name":"std::collections::hash_map_capacity","kind":"function","visibility":"public","signature":"fn hash_map_capacity(map: HashMap) -> Int","source_path":"stdlib/collections.kn","line":705,"attributes":[],"docs":[],"target_notes":[]},{"name":"hash_map_get_or","qualified_name":"std::collections::hash_map_get_or","kind":"function","visibility":"public","signature":"fn hash_map_get_or(map: HashMap, key: Int, fallback: Int) -> Int","source_path":"stdlib/collections.kn","line":708,"attributes":[],"docs":[],"target_notes":[]},{"name":"hash_map_put","qualified_name":"std::collections::hash_map_put","kind":"function","visibility":"public","signature":"fn hash_map_put(map: ptr, key: Int, value: Int) -> Int","source_path":"stdlib/collections.kn","line":724,"attributes":[],"docs":[],"target_notes":[]},{"name":"hash_map_destroy","qualified_name":"std::collections::hash_map_destroy","kind":"function","visibility":"public","signature":"fn hash_map_destroy(map: HashMap) -> Int","source_path":"stdlib/collections.kn","line":792,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"compress","import_path":"std::compress","source_path":"stdlib/compress.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"RleCompressionWriter","qualified_name":"std::compress::RleCompressionWriter","kind":"struct","visibility":"public","signature":"struct RleCompressionWriter","source_path":"stdlib/compress.kn","line":6,"attributes":[],"docs":[],"target_notes":[]},{"name":"rle_writer_new","qualified_name":"std::compress::rle_writer_new","kind":"function","visibility":"public","signature":"fn rle_writer_new(dest: ptr) -> RleCompressionWriter","source_path":"stdlib/compress.kn","line":11,"attributes":[],"docs":[],"target_notes":[]},{"name":"rle_writer_destroy","qualified_name":"std::compress::rle_writer_destroy","kind":"function","visibility":"public","signature":"fn rle_writer_destroy(w: RleCompressionWriter) -> Int","source_path":"stdlib/compress.kn","line":22,"attributes":[],"docs":[],"target_notes":[]},{"name":"rle_writer_write_char","qualified_name":"std::compress::rle_writer_write_char","kind":"function","visibility":"public","signature":"fn rle_writer_write_char(w: ptr, c: Int, flush_target: ptr) -> Int","source_path":"stdlib/compress.kn","line":29,"attributes":[],"docs":[],"target_notes":[]},{"name":"rle_writer_flush","qualified_name":"std::compress::rle_writer_flush","kind":"function","visibility":"public","signature":"fn rle_writer_flush(w: ptr, flush_target: ptr) -> Int","source_path":"stdlib/compress.kn","line":57,"attributes":[],"docs":[],"target_notes":[]},{"name":"RleCompressionReader","qualified_name":"std::compress::RleCompressionReader","kind":"struct","visibility":"public","signature":"struct RleCompressionReader","source_path":"stdlib/compress.kn","line":78,"attributes":[],"docs":[],"target_notes":[]},{"name":"rle_reader_new","qualified_name":"std::compress::rle_reader_new","kind":"function","visibility":"public","signature":"fn rle_reader_new(src: ptr) -> RleCompressionReader","source_path":"stdlib/compress.kn","line":83,"attributes":[],"docs":[],"target_notes":[]},{"name":"rle_reader_destroy","qualified_name":"std::compress::rle_reader_destroy","kind":"function","visibility":"public","signature":"fn rle_reader_destroy(r: RleCompressionReader) -> Int","source_path":"stdlib/compress.kn","line":94,"attributes":[],"docs":[],"target_notes":[]},{"name":"rle_reader_read_char","qualified_name":"std::compress::rle_reader_read_char","kind":"function","visibility":"public","signature":"fn rle_reader_read_char(r: ptr) -> Int","source_path":"stdlib/compress.kn","line":100,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"crypto","import_path":"std::crypto","source_path":"stdlib/crypto.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"abi_crypto_random_bytes_hex","qualified_name":"std::crypto::abi_crypto_random_bytes_hex","kind":"extern_function","visibility":"private","signature":"fn abi_crypto_random_bytes_hex(length: Int) -> String","source_path":"stdlib/crypto.kn","line":2,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_crypto_sha256_text","qualified_name":"std::crypto::abi_crypto_sha256_text","kind":"extern_function","visibility":"private","signature":"fn abi_crypto_sha256_text(text: String, text_len: Int) -> String","source_path":"stdlib/crypto.kn","line":5,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_crypto_hmac_sha256_text","qualified_name":"std::crypto::abi_crypto_hmac_sha256_text","kind":"extern_function","visibility":"private","signature":"fn abi_crypto_hmac_sha256_text(key: String, key_len: Int, message: String, message_len: Int) -> String","source_path":"stdlib/crypto.kn","line":8,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_crypto_blake3_text","qualified_name":"std::crypto::abi_crypto_blake3_text","kind":"extern_function","visibility":"private","signature":"fn abi_crypto_blake3_text(text: String, text_len: Int) -> String","source_path":"stdlib/crypto.kn","line":11,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"crypto_random_bytes_hex","qualified_name":"std::crypto::crypto_random_bytes_hex","kind":"function","visibility":"public","signature":"fn crypto_random_bytes_hex(length: Int) -> String","source_path":"stdlib/crypto.kn","line":13,"attributes":[],"docs":[],"target_notes":[]},{"name":"crypto_sha256","qualified_name":"std::crypto::crypto_sha256","kind":"function","visibility":"public","signature":"fn crypto_sha256(text: String) -> String","source_path":"stdlib/crypto.kn","line":16,"attributes":[],"docs":[],"target_notes":[]},{"name":"crypto_hmac_sha256","qualified_name":"std::crypto::crypto_hmac_sha256","kind":"function","visibility":"public","signature":"fn crypto_hmac_sha256(key: String, message: String) -> String","source_path":"stdlib/crypto.kn","line":19,"attributes":[],"docs":[],"target_notes":[]},{"name":"crypto_blake3","qualified_name":"std::crypto::crypto_blake3","kind":"function","visibility":"public","signature":"fn crypto_blake3(text: String) -> String","source_path":"stdlib/crypto.kn","line":22,"attributes":[],"docs":[],"target_notes":[]},{"name":"random_bytes","qualified_name":"std::crypto::random_bytes","kind":"function","visibility":"public","signature":"fn random_bytes(length: Int) -> String","source_path":"stdlib/crypto.kn","line":25,"attributes":[],"docs":[],"target_notes":[]},{"name":"random_bytes_hex","qualified_name":"std::crypto::random_bytes_hex","kind":"function","visibility":"public","signature":"fn random_bytes_hex(length: Int) -> String","source_path":"stdlib/crypto.kn","line":28,"attributes":[],"docs":[],"target_notes":[]},{"name":"sha256","qualified_name":"std::crypto::sha256","kind":"function","visibility":"public","signature":"fn sha256(text: String) -> String","source_path":"stdlib/crypto.kn","line":31,"attributes":[],"docs":[],"target_notes":[]},{"name":"hmac_sha256","qualified_name":"std::crypto::hmac_sha256","kind":"function","visibility":"public","signature":"fn hmac_sha256(key: String, message: String) -> String","source_path":"stdlib/crypto.kn","line":34,"attributes":[],"docs":[],"target_notes":[]},{"name":"blake3","qualified_name":"std::crypto::blake3","kind":"function","visibility":"public","signature":"fn blake3(text: String) -> String","source_path":"stdlib/crypto.kn","line":37,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"cuda","import_path":"std::cuda","source_path":"stdlib/cuda.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"CUDA_SHADER_BUNDLE_ENV","qualified_name":"std::cuda::CUDA_SHADER_BUNDLE_ENV","kind":"const","visibility":"public","signature":"const CUDA_SHADER_BUNDLE_ENV: String","source_path":"stdlib/cuda.kn","line":5,"attributes":[],"docs":[],"target_notes":[]},{"name":"CUDA_COMPUTE_RESIDENCY_ENV","qualified_name":"std::cuda::CUDA_COMPUTE_RESIDENCY_ENV","kind":"const","visibility":"public","signature":"const CUDA_COMPUTE_RESIDENCY_ENV: String","source_path":"stdlib/cuda.kn","line":6,"attributes":[],"docs":[],"target_notes":[]},{"name":"CUDA_RUNTIME_LIBRARY_ENV","qualified_name":"std::cuda::CUDA_RUNTIME_LIBRARY_ENV","kind":"const","visibility":"public","signature":"const CUDA_RUNTIME_LIBRARY_ENV: String","source_path":"stdlib/cuda.kn","line":7,"attributes":[],"docs":[],"target_notes":[]},{"name":"CUDA_DEVICE_ENV","qualified_name":"std::cuda::CUDA_DEVICE_ENV","kind":"const","visibility":"public","signature":"const CUDA_DEVICE_ENV: String","source_path":"stdlib/cuda.kn","line":8,"attributes":[],"docs":[],"target_notes":[]},{"name":"CUDA_DEVICE_ORDINAL_ENV","qualified_name":"std::cuda::CUDA_DEVICE_ORDINAL_ENV","kind":"const","visibility":"public","signature":"const CUDA_DEVICE_ORDINAL_ENV: String","source_path":"stdlib/cuda.kn","line":9,"attributes":[],"docs":[],"target_notes":[]},{"name":"CUDA_SHADER_BUNDLE_FILE_NAME","qualified_name":"std::cuda::CUDA_SHADER_BUNDLE_FILE_NAME","kind":"const","visibility":"public","signature":"const CUDA_SHADER_BUNDLE_FILE_NAME: String","source_path":"stdlib/cuda.kn","line":10,"attributes":[],"docs":[],"target_notes":[]},{"name":"CUDA_COMPUTE_RESIDENCY_FILE_NAME","qualified_name":"std::cuda::CUDA_COMPUTE_RESIDENCY_FILE_NAME","kind":"const","visibility":"public","signature":"const CUDA_COMPUTE_RESIDENCY_FILE_NAME: String","source_path":"stdlib/cuda.kn","line":11,"attributes":[],"docs":[],"target_notes":[]},{"name":"CudaPaths","qualified_name":"std::cuda::CudaPaths","kind":"struct","visibility":"public","signature":"struct CudaPaths","source_path":"stdlib/cuda.kn","line":13,"attributes":[],"docs":[],"target_notes":[]},{"name":"CudaRuntimeState","qualified_name":"std::cuda::CudaRuntimeState","kind":"struct","visibility":"public","signature":"struct CudaRuntimeState","source_path":"stdlib/cuda.kn","line":18,"attributes":[],"docs":[],"target_notes":[]},{"name":"CudaDispatchStats","qualified_name":"std::cuda::CudaDispatchStats","kind":"struct","visibility":"public","signature":"struct CudaDispatchStats","source_path":"stdlib/cuda.kn","line":27,"attributes":[],"docs":[],"target_notes":[]},{"name":"CudaBindingLocator","qualified_name":"std::cuda::CudaBindingLocator","kind":"struct","visibility":"public","signature":"struct CudaBindingLocator","source_path":"stdlib/cuda.kn","line":41,"attributes":[],"docs":[],"target_notes":[]},{"name":"CudaTextRange","qualified_name":"std::cuda::CudaTextRange","kind":"struct","visibility":"private","signature":"struct CudaTextRange","source_path":"stdlib/cuda.kn","line":52,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_lane_id","qualified_name":"std::cuda::cuda_lane_id","kind":"extern_function","visibility":"public","signature":"fn cuda_lane_id() -> UInt","source_path":"stdlib/cuda.kn","line":64,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"cuda_warp_id","qualified_name":"std::cuda::cuda_warp_id","kind":"extern_function","visibility":"public","signature":"fn cuda_warp_id() -> UInt","source_path":"stdlib/cuda.kn","line":67,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"cuda_active_mask","qualified_name":"std::cuda::cuda_active_mask","kind":"extern_function","visibility":"public","signature":"fn cuda_active_mask() -> UInt","source_path":"stdlib/cuda.kn","line":70,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"cuda_block_sync","qualified_name":"std::cuda::cuda_block_sync","kind":"extern_function","visibility":"public","signature":"fn cuda_block_sync() -> Void","source_path":"stdlib/cuda.kn","line":73,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"cuda_barrier_sync","qualified_name":"std::cuda::cuda_barrier_sync","kind":"extern_function","visibility":"public","signature":"fn cuda_barrier_sync() -> Void","source_path":"stdlib/cuda.kn","line":76,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"cuda_warp_sync","qualified_name":"std::cuda::cuda_warp_sync","kind":"extern_function","visibility":"public","signature":"fn cuda_warp_sync(mask: UInt) -> Void","source_path":"stdlib/cuda.kn","line":79,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"cuda_ballot","qualified_name":"std::cuda::cuda_ballot","kind":"extern_function","visibility":"public","signature":"fn cuda_ballot(predicate: Bool) -> UInt","source_path":"stdlib/cuda.kn","line":82,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"cuda_warp_any","qualified_name":"std::cuda::cuda_warp_any","kind":"extern_function","visibility":"public","signature":"fn cuda_warp_any(predicate: Bool) -> Bool","source_path":"stdlib/cuda.kn","line":85,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"cuda_warp_all","qualified_name":"std::cuda::cuda_warp_all","kind":"extern_function","visibility":"public","signature":"fn cuda_warp_all(predicate: Bool) -> Bool","source_path":"stdlib/cuda.kn","line":88,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"cuda_shfl_xor_u32","qualified_name":"std::cuda::cuda_shfl_xor_u32","kind":"extern_function","visibility":"public","signature":"fn cuda_shfl_xor_u32(value: UInt, lane_mask: UInt) -> UInt","source_path":"stdlib/cuda.kn","line":91,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"cuda_shfl_xor_f32","qualified_name":"std::cuda::cuda_shfl_xor_f32","kind":"extern_function","visibility":"public","signature":"fn cuda_shfl_xor_f32(value: Float, lane_mask: UInt) -> Float","source_path":"stdlib/cuda.kn","line":94,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"cuda_warp_reduce_sum_u32","qualified_name":"std::cuda::cuda_warp_reduce_sum_u32","kind":"extern_function","visibility":"public","signature":"fn cuda_warp_reduce_sum_u32(value: UInt) -> UInt","source_path":"stdlib/cuda.kn","line":97,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"cuda_warp_reduce_sum_f32","qualified_name":"std::cuda::cuda_warp_reduce_sum_f32","kind":"extern_function","visibility":"public","signature":"fn cuda_warp_reduce_sum_f32(value: Float) -> Float","source_path":"stdlib/cuda.kn","line":100,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"cuda_cp_async_commit_group","qualified_name":"std::cuda::cuda_cp_async_commit_group","kind":"extern_function","visibility":"public","signature":"fn cuda_cp_async_commit_group() -> Void","source_path":"stdlib/cuda.kn","line":103,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"cuda_cp_async_wait_group_0","qualified_name":"std::cuda::cuda_cp_async_wait_group_0","kind":"extern_function","visibility":"public","signature":"fn cuda_cp_async_wait_group_0() -> Void","source_path":"stdlib/cuda.kn","line":106,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"cuda_require_tensor_cores","qualified_name":"std::cuda::cuda_require_tensor_cores","kind":"extern_function","visibility":"public","signature":"fn cuda_require_tensor_cores() -> Void","source_path":"stdlib/cuda.kn","line":109,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"cuda_require_wgmma","qualified_name":"std::cuda::cuda_require_wgmma","kind":"extern_function","visibility":"public","signature":"fn cuda_require_wgmma() -> Void","source_path":"stdlib/cuda.kn","line":112,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_cuda_driver_available","qualified_name":"std::cuda::abi_cuda_driver_available","kind":"extern_function","visibility":"public","signature":"fn abi_cuda_driver_available() -> Bool","source_path":"stdlib/cuda.kn","line":115,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_cuda_runtime_library_available","qualified_name":"std::cuda::abi_cuda_runtime_library_available","kind":"extern_function","visibility":"public","signature":"fn abi_cuda_runtime_library_available() -> Bool","source_path":"stdlib/cuda.kn","line":118,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_cuda_runtime_ready","qualified_name":"std::cuda::abi_cuda_runtime_ready","kind":"extern_function","visibility":"public","signature":"fn abi_cuda_runtime_ready() -> Bool","source_path":"stdlib/cuda.kn","line":121,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_cuda_runtime_library_path","qualified_name":"std::cuda::abi_cuda_runtime_library_path","kind":"extern_function","visibility":"public","signature":"fn abi_cuda_runtime_library_path() -> String","source_path":"stdlib/cuda.kn","line":124,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_cuda_shader_bundle_path","qualified_name":"std::cuda::abi_cuda_shader_bundle_path","kind":"extern_function","visibility":"public","signature":"fn abi_cuda_shader_bundle_path() -> String","source_path":"stdlib/cuda.kn","line":127,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_cuda_compute_residency_path","qualified_name":"std::cuda::abi_cuda_compute_residency_path","kind":"extern_function","visibility":"public","signature":"fn abi_cuda_compute_residency_path() -> String","source_path":"stdlib/cuda.kn","line":130,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_cuda_dispatch_primary_compute","qualified_name":"std::cuda::abi_cuda_dispatch_primary_compute","kind":"extern_function","visibility":"public","signature":"fn abi_cuda_dispatch_primary_compute(compute_key: String) -> Int","source_path":"stdlib/cuda.kn","line":133,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_cuda_dispatch","qualified_name":"std::cuda::abi_cuda_dispatch","kind":"extern_function","visibility":"public","signature":"fn abi_cuda_dispatch(shader_bundle_path: String, compute_residency_path: String, compute_key: String) -> Int","source_path":"stdlib/cuda.kn","line":136,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_cuda_last_status","qualified_name":"std::cuda::abi_cuda_last_status","kind":"extern_function","visibility":"public","signature":"fn abi_cuda_last_status() -> Int","source_path":"stdlib/cuda.kn","line":139,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_cuda_last_error_kind","qualified_name":"std::cuda::abi_cuda_last_error_kind","kind":"extern_function","visibility":"public","signature":"fn abi_cuda_last_error_kind() -> String","source_path":"stdlib/cuda.kn","line":142,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_cuda_last_error_message","qualified_name":"std::cuda::abi_cuda_last_error_message","kind":"extern_function","visibility":"public","signature":"fn abi_cuda_last_error_message() -> String","source_path":"stdlib/cuda.kn","line":145,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_cuda_last_dispatch_invocations","qualified_name":"std::cuda::abi_cuda_last_dispatch_invocations","kind":"extern_function","visibility":"public","signature":"fn abi_cuda_last_dispatch_invocations() -> Int","source_path":"stdlib/cuda.kn","line":148,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_cuda_last_tensor_binding_count","qualified_name":"std::cuda::abi_cuda_last_tensor_binding_count","kind":"extern_function","visibility":"public","signature":"fn abi_cuda_last_tensor_binding_count() -> Int","source_path":"stdlib/cuda.kn","line":151,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_cuda_last_stream_binding_count","qualified_name":"std::cuda::abi_cuda_last_stream_binding_count","kind":"extern_function","visibility":"public","signature":"fn abi_cuda_last_stream_binding_count() -> Int","source_path":"stdlib/cuda.kn","line":154,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_cuda_last_neural_node_count","qualified_name":"std::cuda::abi_cuda_last_neural_node_count","kind":"extern_function","visibility":"public","signature":"fn abi_cuda_last_neural_node_count() -> Int","source_path":"stdlib/cuda.kn","line":157,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_cuda_last_output_binding_count","qualified_name":"std::cuda::abi_cuda_last_output_binding_count","kind":"extern_function","visibility":"public","signature":"fn abi_cuda_last_output_binding_count() -> Int","source_path":"stdlib/cuda.kn","line":160,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_cuda_last_total_output_bytes","qualified_name":"std::cuda::abi_cuda_last_total_output_bytes","kind":"extern_function","visibility":"public","signature":"fn abi_cuda_last_total_output_bytes() -> Int","source_path":"stdlib/cuda.kn","line":163,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"cuda_empty_binding_locator","qualified_name":"std::cuda::cuda_empty_binding_locator","kind":"function","visibility":"private","signature":"fn cuda_empty_binding_locator(compute_key: String, binding_key: String) -> CudaBindingLocator","source_path":"stdlib/cuda.kn","line":165,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_manifest_text","qualified_name":"std::cuda::cuda_manifest_text","kind":"function","visibility":"private","signature":"fn cuda_manifest_text(path: String) -> String","source_path":"stdlib/cuda.kn","line":178,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_manifest_from_text","qualified_name":"std::cuda::cuda_manifest_from_text","kind":"function","visibility":"private","signature":"fn cuda_manifest_from_text(text: String) -> JsonObject","source_path":"stdlib/cuda.kn","line":189,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_compute_entries","qualified_name":"std::cuda::cuda_compute_entries","kind":"function","visibility":"private","signature":"fn cuda_compute_entries(manifest: JsonObject) -> JsonArray","source_path":"stdlib/cuda.kn","line":197,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_compute_entry_from_manifest","qualified_name":"std::cuda::cuda_compute_entry_from_manifest","kind":"function","visibility":"private","signature":"fn cuda_compute_entry_from_manifest(manifest: JsonObject, compute_key: String) -> JsonObject","source_path":"stdlib/cuda.kn","line":203,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_binding_locator_from_manifest_path","qualified_name":"std::cuda::cuda_binding_locator_from_manifest_path","kind":"function","visibility":"private","signature":"fn cuda_binding_locator_from_manifest_path(manifest_path: String, manifest: JsonObject, compute_key: String, binding_key: String) -> CudaBindingLocator","source_path":"stdlib/cuda.kn","line":214,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_empty_range","qualified_name":"std::cuda::cuda_empty_range","kind":"function","visibility":"private","signature":"fn cuda_empty_range() -> CudaTextRange","source_path":"stdlib/cuda.kn","line":253,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_range","qualified_name":"std::cuda::cuda_range","kind":"function","visibility":"private","signature":"fn cuda_range(start: Int, end: Int) -> CudaTextRange","source_path":"stdlib/cuda.kn","line":260,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_is_ws","qualified_name":"std::cuda::cuda_is_ws","kind":"function","visibility":"private","signature":"fn cuda_is_ws(ch: String) -> Bool","source_path":"stdlib/cuda.kn","line":267,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_skip_ws","qualified_name":"std::cuda::cuda_skip_ws","kind":"function","visibility":"private","signature":"fn cuda_skip_ws(text: String, start: Int) -> Int","source_path":"stdlib/cuda.kn","line":270,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_json_string_end","qualified_name":"std::cuda::cuda_json_string_end","kind":"function","visibility":"private","signature":"fn cuda_json_string_end(text: String, start: Int) -> Int","source_path":"stdlib/cuda.kn","line":276,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_json_string_literal","qualified_name":"std::cuda::cuda_json_string_literal","kind":"function","visibility":"private","signature":"fn cuda_json_string_literal(text: String, start: Int) -> String","source_path":"stdlib/cuda.kn","line":292,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_match_delimited","qualified_name":"std::cuda::cuda_match_delimited","kind":"function","visibility":"private","signature":"fn cuda_match_delimited(text: String, start: Int, open_ch: String, close_ch: String) -> Int","source_path":"stdlib/cuda.kn","line":298,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_json_scalar_end","qualified_name":"std::cuda::cuda_json_scalar_end","kind":"function","visibility":"private","signature":"fn cuda_json_scalar_end(text: String, start: Int, limit: Int) -> Int","source_path":"stdlib/cuda.kn","line":328,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_root_object_range","qualified_name":"std::cuda::cuda_root_object_range","kind":"function","visibility":"private","signature":"fn cuda_root_object_range(text: String) -> CudaTextRange","source_path":"stdlib/cuda.kn","line":337,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_object_field_value_start","qualified_name":"std::cuda::cuda_object_field_value_start","kind":"function","visibility":"private","signature":"fn cuda_object_field_value_start(text: String, object_start: Int, object_end: Int, key: String) -> Int","source_path":"stdlib/cuda.kn","line":346,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_object_field_range","qualified_name":"std::cuda::cuda_object_field_range","kind":"function","visibility":"private","signature":"fn cuda_object_field_range(text: String, object_start: Int, object_end: Int, key: String) -> CudaTextRange","source_path":"stdlib/cuda.kn","line":376,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_field_string_in_object","qualified_name":"std::cuda::cuda_field_string_in_object","kind":"function","visibility":"private","signature":"fn cuda_field_string_in_object(text: String, object_start: Int, object_end: Int, key: String) -> String","source_path":"stdlib/cuda.kn","line":401,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_field_int_in_object","qualified_name":"std::cuda::cuda_field_int_in_object","kind":"function","visibility":"private","signature":"fn cuda_field_int_in_object(text: String, object_start: Int, object_end: Int, key: String) -> Int","source_path":"stdlib/cuda.kn","line":407,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_field_array_in_object","qualified_name":"std::cuda::cuda_field_array_in_object","kind":"function","visibility":"private","signature":"fn cuda_field_array_in_object(text: String, object_start: Int, object_end: Int, key: String) -> CudaTextRange","source_path":"stdlib/cuda.kn","line":416,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_next_object_in_array","qualified_name":"std::cuda::cuda_next_object_in_array","kind":"function","visibility":"private","signature":"fn cuda_next_object_in_array(text: String, array_range: CudaTextRange, cursor: Int) -> CudaTextRange","source_path":"stdlib/cuda.kn","line":422,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_compute_shaders_range_from_text","qualified_name":"std::cuda::cuda_compute_shaders_range_from_text","kind":"function","visibility":"private","signature":"fn cuda_compute_shaders_range_from_text(text: String) -> CudaTextRange","source_path":"stdlib/cuda.kn","line":440,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_compute_entry_range_from_text","qualified_name":"std::cuda::cuda_compute_entry_range_from_text","kind":"function","visibility":"private","signature":"fn cuda_compute_entry_range_from_text(text: String, compute_key: String) -> CudaTextRange","source_path":"stdlib/cuda.kn","line":446,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_binding_range_from_text","qualified_name":"std::cuda::cuda_binding_range_from_text","kind":"function","visibility":"private","signature":"fn cuda_binding_range_from_text(text: String, compute_key: String, binding_key: String) -> CudaTextRange","source_path":"stdlib/cuda.kn","line":460,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_zero_bytes","qualified_name":"std::cuda::cuda_zero_bytes","kind":"function","visibility":"private","signature":"fn cuda_zero_bytes(count: Int) -> Array","source_path":"stdlib/cuda.kn","line":477,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_hex_from_bytes","qualified_name":"std::cuda::cuda_hex_from_bytes","kind":"function","visibility":"private","signature":"fn cuda_hex_from_bytes(bytes: Array) -> String","source_path":"stdlib/cuda.kn","line":486,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_zero_hex","qualified_name":"std::cuda::cuda_zero_hex","kind":"function","visibility":"private","signature":"fn cuda_zero_hex(byte_count: Int) -> String","source_path":"stdlib/cuda.kn","line":498,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_dispatch_stats","qualified_name":"std::cuda::cuda_dispatch_stats","kind":"function","visibility":"private","signature":"fn cuda_dispatch_stats(compute_key: String) -> CudaDispatchStats","source_path":"stdlib/cuda.kn","line":507,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_paths","qualified_name":"std::cuda::cuda_paths","kind":"function","visibility":"public","signature":"fn cuda_paths() -> CudaPaths","source_path":"stdlib/cuda.kn","line":523,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_runtime_state","qualified_name":"std::cuda::cuda_runtime_state","kind":"function","visibility":"public","signature":"fn cuda_runtime_state() -> CudaRuntimeState","source_path":"stdlib/cuda.kn","line":530,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_driver_available","qualified_name":"std::cuda::cuda_driver_available","kind":"function","visibility":"public","signature":"fn cuda_driver_available() -> Bool","source_path":"stdlib/cuda.kn","line":541,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_runtime_library_available","qualified_name":"std::cuda::cuda_runtime_library_available","kind":"function","visibility":"public","signature":"fn cuda_runtime_library_available() -> Bool","source_path":"stdlib/cuda.kn","line":544,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_runtime_ready","qualified_name":"std::cuda::cuda_runtime_ready","kind":"function","visibility":"public","signature":"fn cuda_runtime_ready() -> Bool","source_path":"stdlib/cuda.kn","line":547,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_runtime_library_path","qualified_name":"std::cuda::cuda_runtime_library_path","kind":"function","visibility":"public","signature":"fn cuda_runtime_library_path() -> String","source_path":"stdlib/cuda.kn","line":550,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_shader_bundle_path","qualified_name":"std::cuda::cuda_shader_bundle_path","kind":"function","visibility":"public","signature":"fn cuda_shader_bundle_path() -> String","source_path":"stdlib/cuda.kn","line":553,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_compute_residency_path","qualified_name":"std::cuda::cuda_compute_residency_path","kind":"function","visibility":"public","signature":"fn cuda_compute_residency_path() -> String","source_path":"stdlib/cuda.kn","line":556,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_last_status","qualified_name":"std::cuda::cuda_last_status","kind":"function","visibility":"public","signature":"fn cuda_last_status() -> Int","source_path":"stdlib/cuda.kn","line":559,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_last_error_kind","qualified_name":"std::cuda::cuda_last_error_kind","kind":"function","visibility":"public","signature":"fn cuda_last_error_kind() -> String","source_path":"stdlib/cuda.kn","line":562,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_last_error_message","qualified_name":"std::cuda::cuda_last_error_message","kind":"function","visibility":"public","signature":"fn cuda_last_error_message() -> String","source_path":"stdlib/cuda.kn","line":565,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_compute_manifest_from_path","qualified_name":"std::cuda::cuda_compute_manifest_from_path","kind":"function","visibility":"public","signature":"fn cuda_compute_manifest_from_path(path: String) -> JsonObject","source_path":"stdlib/cuda.kn","line":568,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_compute_manifest","qualified_name":"std::cuda::cuda_compute_manifest","kind":"function","visibility":"public","signature":"fn cuda_compute_manifest() -> JsonObject","source_path":"stdlib/cuda.kn","line":571,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_manifest_debug_from_path","qualified_name":"std::cuda::cuda_manifest_debug_from_path","kind":"function","visibility":"public","signature":"fn cuda_manifest_debug_from_path(path: String) -> String","source_path":"stdlib/cuda.kn","line":574,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_manifest_debug","qualified_name":"std::cuda::cuda_manifest_debug","kind":"function","visibility":"public","signature":"fn cuda_manifest_debug() -> String","source_path":"stdlib/cuda.kn","line":604,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_compute_keys_from_path","qualified_name":"std::cuda::cuda_compute_keys_from_path","kind":"function","visibility":"public","signature":"fn cuda_compute_keys_from_path(path: String) -> Array","source_path":"stdlib/cuda.kn","line":607,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_compute_keys","qualified_name":"std::cuda::cuda_compute_keys","kind":"function","visibility":"public","signature":"fn cuda_compute_keys() -> Array","source_path":"stdlib/cuda.kn","line":622,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_has_compute_key_from_path","qualified_name":"std::cuda::cuda_has_compute_key_from_path","kind":"function","visibility":"public","signature":"fn cuda_has_compute_key_from_path(path: String, compute_key: String) -> Bool","source_path":"stdlib/cuda.kn","line":625,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_has_compute_key","qualified_name":"std::cuda::cuda_has_compute_key","kind":"function","visibility":"public","signature":"fn cuda_has_compute_key(compute_key: String) -> Bool","source_path":"stdlib/cuda.kn","line":631,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_first_compute_key_from_path","qualified_name":"std::cuda::cuda_first_compute_key_from_path","kind":"function","visibility":"public","signature":"fn cuda_first_compute_key_from_path(path: String) -> String","source_path":"stdlib/cuda.kn","line":634,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_first_compute_key","qualified_name":"std::cuda::cuda_first_compute_key","kind":"function","visibility":"public","signature":"fn cuda_first_compute_key() -> String","source_path":"stdlib/cuda.kn","line":640,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_binding_keys_from_path","qualified_name":"std::cuda::cuda_binding_keys_from_path","kind":"function","visibility":"public","signature":"fn cuda_binding_keys_from_path(path: String, compute_key: String) -> Array","source_path":"stdlib/cuda.kn","line":643,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_binding_keys","qualified_name":"std::cuda::cuda_binding_keys","kind":"function","visibility":"public","signature":"fn cuda_binding_keys(compute_key: String) -> Array","source_path":"stdlib/cuda.kn","line":663,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_output_binding_keys_from_path","qualified_name":"std::cuda::cuda_output_binding_keys_from_path","kind":"function","visibility":"public","signature":"fn cuda_output_binding_keys_from_path(path: String, compute_key: String) -> Array","source_path":"stdlib/cuda.kn","line":666,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_output_binding_keys","qualified_name":"std::cuda::cuda_output_binding_keys","kind":"function","visibility":"public","signature":"fn cuda_output_binding_keys(compute_key: String) -> Array","source_path":"stdlib/cuda.kn","line":687,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_binding_locator_from_path","qualified_name":"std::cuda::cuda_binding_locator_from_path","kind":"function","visibility":"public","signature":"fn cuda_binding_locator_from_path(path: String, compute_key: String, binding_key: String) -> CudaBindingLocator","source_path":"stdlib/cuda.kn","line":690,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_binding_locator","qualified_name":"std::cuda::cuda_binding_locator","kind":"function","visibility":"public","signature":"fn cuda_binding_locator(compute_key: String, binding_key: String) -> CudaBindingLocator","source_path":"stdlib/cuda.kn","line":694,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_binding_payload_path_from_path","qualified_name":"std::cuda::cuda_binding_payload_path_from_path","kind":"function","visibility":"public","signature":"fn cuda_binding_payload_path_from_path(path: String, compute_key: String, binding_key: String) -> String","source_path":"stdlib/cuda.kn","line":698,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_binding_payload_path","qualified_name":"std::cuda::cuda_binding_payload_path","kind":"function","visibility":"public","signature":"fn cuda_binding_payload_path(compute_key: String, binding_key: String) -> String","source_path":"stdlib/cuda.kn","line":704,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_binding_payload_bytes_from_path","qualified_name":"std::cuda::cuda_binding_payload_bytes_from_path","kind":"function","visibility":"public","signature":"fn cuda_binding_payload_bytes_from_path(path: String, compute_key: String, binding_key: String) -> Array","source_path":"stdlib/cuda.kn","line":707,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_binding_payload_bytes","qualified_name":"std::cuda::cuda_binding_payload_bytes","kind":"function","visibility":"public","signature":"fn cuda_binding_payload_bytes(compute_key: String, binding_key: String) -> Array","source_path":"stdlib/cuda.kn","line":716,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_write_binding_payload_bytes_from_path","qualified_name":"std::cuda::cuda_write_binding_payload_bytes_from_path","kind":"function","visibility":"public","signature":"fn cuda_write_binding_payload_bytes_from_path(path: String, compute_key: String, binding_key: String, bytes: Array) -> Bool","source_path":"stdlib/cuda.kn","line":719,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_write_binding_payload_bytes","qualified_name":"std::cuda::cuda_write_binding_payload_bytes","kind":"function","visibility":"public","signature":"fn cuda_write_binding_payload_bytes(compute_key: String, binding_key: String, bytes: Array) -> Bool","source_path":"stdlib/cuda.kn","line":726,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_zero_binding_payload_from_path","qualified_name":"std::cuda::cuda_zero_binding_payload_from_path","kind":"function","visibility":"public","signature":"fn cuda_zero_binding_payload_from_path(path: String, compute_key: String, binding_key: String) -> Bool","source_path":"stdlib/cuda.kn","line":729,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_zero_binding_payload","qualified_name":"std::cuda::cuda_zero_binding_payload","kind":"function","visibility":"public","signature":"fn cuda_zero_binding_payload(compute_key: String, binding_key: String) -> Bool","source_path":"stdlib/cuda.kn","line":736,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_zero_output_payloads_from_path","qualified_name":"std::cuda::cuda_zero_output_payloads_from_path","kind":"function","visibility":"public","signature":"fn cuda_zero_output_payloads_from_path(path: String, compute_key: String) -> Int","source_path":"stdlib/cuda.kn","line":739,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_zero_output_payloads","qualified_name":"std::cuda::cuda_zero_output_payloads","kind":"function","visibility":"public","signature":"fn cuda_zero_output_payloads(compute_key: String) -> Int","source_path":"stdlib/cuda.kn","line":763,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_copy_binding_payload_from_path","qualified_name":"std::cuda::cuda_copy_binding_payload_from_path","kind":"function","visibility":"public","signature":"fn cuda_copy_binding_payload_from_path(path: String, from_compute_key: String, from_binding_key: String, to_compute_key: String, to_binding_key: String) -> Bool","source_path":"stdlib/cuda.kn","line":766,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_copy_binding_payload","qualified_name":"std::cuda::cuda_copy_binding_payload","kind":"function","visibility":"public","signature":"fn cuda_copy_binding_payload(from_compute_key: String, from_binding_key: String, to_compute_key: String, to_binding_key: String) -> Bool","source_path":"stdlib/cuda.kn","line":774,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_pack_u32_le","qualified_name":"std::cuda::cuda_pack_u32_le","kind":"function","visibility":"public","signature":"fn cuda_pack_u32_le(value: Int) -> Array","source_path":"stdlib/cuda.kn","line":783,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_pack_i32_le","qualified_name":"std::cuda::cuda_pack_i32_le","kind":"function","visibility":"public","signature":"fn cuda_pack_i32_le(value: Int) -> Array","source_path":"stdlib/cuda.kn","line":792,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_pack_u32_array_le","qualified_name":"std::cuda::cuda_pack_u32_array_le","kind":"function","visibility":"public","signature":"fn cuda_pack_u32_array_le(values: Array) -> Array","source_path":"stdlib/cuda.kn","line":795,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_pack_i32_array_le","qualified_name":"std::cuda::cuda_pack_i32_array_le","kind":"function","visibility":"public","signature":"fn cuda_pack_i32_array_le(values: Array) -> Array","source_path":"stdlib/cuda.kn","line":807,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_unpack_u32_le","qualified_name":"std::cuda::cuda_unpack_u32_le","kind":"function","visibility":"public","signature":"fn cuda_unpack_u32_le(bytes: Array, offset: Int) -> Int","source_path":"stdlib/cuda.kn","line":810,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_unpack_u32_array_le","qualified_name":"std::cuda::cuda_unpack_u32_array_le","kind":"function","visibility":"public","signature":"fn cuda_unpack_u32_array_le(bytes: Array) -> Array","source_path":"stdlib/cuda.kn","line":819,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_unpack_i32_array_le","qualified_name":"std::cuda::cuda_unpack_i32_array_le","kind":"function","visibility":"public","signature":"fn cuda_unpack_i32_array_le(bytes: Array) -> Array","source_path":"stdlib/cuda.kn","line":827,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_dispatch_primary_compute","qualified_name":"std::cuda::cuda_dispatch_primary_compute","kind":"function","visibility":"public","signature":"fn cuda_dispatch_primary_compute(compute_key: String) -> CudaDispatchStats","source_path":"stdlib/cuda.kn","line":830,"attributes":[],"docs":[],"target_notes":[]},{"name":"cuda_dispatch","qualified_name":"std::cuda::cuda_dispatch","kind":"function","visibility":"public","signature":"fn cuda_dispatch(shader_bundle_path: String, compute_residency_path: String, compute_key: String) -> CudaDispatchStats","source_path":"stdlib/cuda.kn","line":834,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"diagnostics","import_path":"std::diagnostics","source_path":"stdlib/diagnostics.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"native_status_ok","qualified_name":"std::diagnostics::native_status_ok","kind":"function","visibility":"public","signature":"fn native_status_ok(status: Int) -> Bool","source_path":"stdlib/diagnostics.kn","line":3,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_status_failed","qualified_name":"std::diagnostics::native_status_failed","kind":"function","visibility":"public","signature":"fn native_status_failed(status: Int) -> Bool","source_path":"stdlib/diagnostics.kn","line":6,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_status_error","qualified_name":"std::diagnostics::native_status_error","kind":"function","visibility":"public","signature":"fn native_status_error(status: Int) -> Bool","source_path":"stdlib/diagnostics.kn","line":9,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_status_warning","qualified_name":"std::diagnostics::native_status_warning","kind":"function","visibility":"public","signature":"fn native_status_warning(status: Int) -> Bool","source_path":"stdlib/diagnostics.kn","line":12,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_status_or","qualified_name":"std::diagnostics::native_status_or","kind":"function","visibility":"public","signature":"fn native_status_or(status: Int, fallback: Int) -> Int","source_path":"stdlib/diagnostics.kn","line":15,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_bool_to_status","qualified_name":"std::diagnostics::native_bool_to_status","kind":"function","visibility":"public","signature":"fn native_bool_to_status(value: Bool) -> Int","source_path":"stdlib/diagnostics.kn","line":20,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_status_to_bool","qualified_name":"std::diagnostics::native_status_to_bool","kind":"function","visibility":"public","signature":"fn native_status_to_bool(status: Int) -> Bool","source_path":"stdlib/diagnostics.kn","line":25,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_first_error","qualified_name":"std::diagnostics::native_first_error","kind":"function","visibility":"public","signature":"fn native_first_error(left: Int, right: Int) -> Int","source_path":"stdlib/diagnostics.kn","line":28,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_count_failure","qualified_name":"std::diagnostics::native_count_failure","kind":"function","visibility":"public","signature":"fn native_count_failure(status: Int, count: Int) -> Int","source_path":"stdlib/diagnostics.kn","line":33,"attributes":[],"docs":[],"target_notes":[]},{"name":"status_ok","qualified_name":"std::diagnostics::status_ok","kind":"function","visibility":"public","signature":"fn status_ok(status: Int) -> Bool","source_path":"stdlib/diagnostics.kn","line":39,"attributes":[],"docs":[],"target_notes":[]},{"name":"status_failed","qualified_name":"std::diagnostics::status_failed","kind":"function","visibility":"public","signature":"fn status_failed(status: Int) -> Bool","source_path":"stdlib/diagnostics.kn","line":42,"attributes":[],"docs":[],"target_notes":[]},{"name":"status_error","qualified_name":"std::diagnostics::status_error","kind":"function","visibility":"public","signature":"fn status_error(status: Int) -> Bool","source_path":"stdlib/diagnostics.kn","line":45,"attributes":[],"docs":[],"target_notes":[]},{"name":"status_warning","qualified_name":"std::diagnostics::status_warning","kind":"function","visibility":"public","signature":"fn status_warning(status: Int) -> Bool","source_path":"stdlib/diagnostics.kn","line":48,"attributes":[],"docs":[],"target_notes":[]},{"name":"status_or","qualified_name":"std::diagnostics::status_or","kind":"function","visibility":"public","signature":"fn status_or(status: Int, fallback: Int) -> Int","source_path":"stdlib/diagnostics.kn","line":51,"attributes":[],"docs":[],"target_notes":[]},{"name":"bool_to_status","qualified_name":"std::diagnostics::bool_to_status","kind":"function","visibility":"public","signature":"fn bool_to_status(value: Bool) -> Int","source_path":"stdlib/diagnostics.kn","line":56,"attributes":[],"docs":[],"target_notes":[]},{"name":"status_to_bool","qualified_name":"std::diagnostics::status_to_bool","kind":"function","visibility":"public","signature":"fn status_to_bool(status: Int) -> Bool","source_path":"stdlib/diagnostics.kn","line":61,"attributes":[],"docs":[],"target_notes":[]},{"name":"first_error","qualified_name":"std::diagnostics::first_error","kind":"function","visibility":"public","signature":"fn first_error(left: Int, right: Int) -> Int","source_path":"stdlib/diagnostics.kn","line":64,"attributes":[],"docs":[],"target_notes":[]},{"name":"count_failure","qualified_name":"std::diagnostics::count_failure","kind":"function","visibility":"public","signature":"fn count_failure(status: Int, count: Int) -> Int","source_path":"stdlib/diagnostics.kn","line":69,"attributes":[],"docs":[],"target_notes":[]},{"name":"LogLevel","qualified_name":"std::diagnostics::LogLevel","kind":"enum","visibility":"public","signature":"enum LogLevel","source_path":"stdlib/diagnostics.kn","line":75,"attributes":[],"docs":[],"target_notes":[]},{"name":"LogEntry","qualified_name":"std::diagnostics::LogEntry","kind":"struct","visibility":"public","signature":"struct LogEntry","source_path":"stdlib/diagnostics.kn","line":81,"attributes":[],"docs":[],"target_notes":[]},{"name":"log_info","qualified_name":"std::diagnostics::log_info","kind":"function","visibility":"public","signature":"fn log_info(subsystem: String, message: String) -> Unit","source_path":"stdlib/diagnostics.kn","line":87,"attributes":[],"docs":[],"target_notes":[]},{"name":"log_warning","qualified_name":"std::diagnostics::log_warning","kind":"function","visibility":"public","signature":"fn log_warning(subsystem: String, message: String) -> Unit","source_path":"stdlib/diagnostics.kn","line":90,"attributes":[],"docs":[],"target_notes":[]},{"name":"log_error","qualified_name":"std::diagnostics::log_error","kind":"function","visibility":"public","signature":"fn log_error(subsystem: String, message: String, code: Int) -> Unit","source_path":"stdlib/diagnostics.kn","line":93,"attributes":[],"docs":[],"target_notes":[]},{"name":"progress_emit","qualified_name":"std::diagnostics::progress_emit","kind":"function","visibility":"public","signature":"fn progress_emit(task_name: String, percentage: Int) -> Unit","source_path":"stdlib/diagnostics.kn","line":96,"attributes":[],"docs":[],"target_notes":[]},{"name":"debug_dump_memory","qualified_name":"std::diagnostics::debug_dump_memory","kind":"function","visibility":"public","signature":"fn debug_dump_memory(label: String, address: ptr, count: Int) -> Unit","source_path":"stdlib/diagnostics.kn","line":104,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"elf","import_path":"std::elf","source_path":"stdlib/elf.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"ELF_MAGIC","qualified_name":"std::elf::ELF_MAGIC","kind":"const","visibility":"public","signature":"const ELF_MAGIC: Int","source_path":"stdlib/elf.kn","line":4,"attributes":[],"docs":[],"target_notes":[]},{"name":"ELF_CLASS_64","qualified_name":"std::elf::ELF_CLASS_64","kind":"const","visibility":"public","signature":"const ELF_CLASS_64: Int","source_path":"stdlib/elf.kn","line":5,"attributes":[],"docs":[],"target_notes":[]},{"name":"ELF_DATA_LSB","qualified_name":"std::elf::ELF_DATA_LSB","kind":"const","visibility":"public","signature":"const ELF_DATA_LSB: Int","source_path":"stdlib/elf.kn","line":6,"attributes":[],"docs":[],"target_notes":[]},{"name":"ELF_TYPE_EXEC","qualified_name":"std::elf::ELF_TYPE_EXEC","kind":"const","visibility":"public","signature":"const ELF_TYPE_EXEC: Int","source_path":"stdlib/elf.kn","line":7,"attributes":[],"docs":[],"target_notes":[]},{"name":"ELF_TYPE_DYN","qualified_name":"std::elf::ELF_TYPE_DYN","kind":"const","visibility":"public","signature":"const ELF_TYPE_DYN: Int","source_path":"stdlib/elf.kn","line":8,"attributes":[],"docs":[],"target_notes":[]},{"name":"ELF_MACHINE_X86_64","qualified_name":"std::elf::ELF_MACHINE_X86_64","kind":"const","visibility":"public","signature":"const ELF_MACHINE_X86_64: Int","source_path":"stdlib/elf.kn","line":9,"attributes":[],"docs":[],"target_notes":[]},{"name":"ELF_MACHINE_AARCH64","qualified_name":"std::elf::ELF_MACHINE_AARCH64","kind":"const","visibility":"public","signature":"const ELF_MACHINE_AARCH64: Int","source_path":"stdlib/elf.kn","line":10,"attributes":[],"docs":[],"target_notes":[]},{"name":"ElfHeader","qualified_name":"std::elf::ElfHeader","kind":"struct","visibility":"public","signature":"struct ElfHeader","source_path":"stdlib/elf.kn","line":12,"attributes":[],"docs":[],"target_notes":[]},{"name":"ElfProgramHeader","qualified_name":"std::elf::ElfProgramHeader","kind":"struct","visibility":"public","signature":"struct ElfProgramHeader","source_path":"stdlib/elf.kn","line":30,"attributes":[],"docs":[],"target_notes":[]},{"name":"ElfSectionHeader","qualified_name":"std::elf::ElfSectionHeader","kind":"struct","visibility":"public","signature":"struct ElfSectionHeader","source_path":"stdlib/elf.kn","line":40,"attributes":[],"docs":[],"target_notes":[]},{"name":"elf_read_header","qualified_name":"std::elf::elf_read_header","kind":"function","visibility":"public","signature":"fn elf_read_header(buffer: ptr) -> ElfHeader","source_path":"stdlib/elf.kn","line":54,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"fmt","import_path":"std::fmt","source_path":"stdlib/fmt.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"FMT_ALIGN_LEFT","qualified_name":"std::fmt::FMT_ALIGN_LEFT","kind":"const","visibility":"public","signature":"const FMT_ALIGN_LEFT: String","source_path":"stdlib/fmt.kn","line":5,"attributes":[],"docs":[],"target_notes":[]},{"name":"FMT_ALIGN_RIGHT","qualified_name":"std::fmt::FMT_ALIGN_RIGHT","kind":"const","visibility":"public","signature":"const FMT_ALIGN_RIGHT: String","source_path":"stdlib/fmt.kn","line":6,"attributes":[],"docs":[],"target_notes":[]},{"name":"FMT_ALIGN_CENTER","qualified_name":"std::fmt::FMT_ALIGN_CENTER","kind":"const","visibility":"public","signature":"const FMT_ALIGN_CENTER: String","source_path":"stdlib/fmt.kn","line":7,"attributes":[],"docs":[],"target_notes":[]},{"name":"FMT_BOOL_STYLE_WORD","qualified_name":"std::fmt::FMT_BOOL_STYLE_WORD","kind":"const","visibility":"public","signature":"const FMT_BOOL_STYLE_WORD: String","source_path":"stdlib/fmt.kn","line":9,"attributes":[],"docs":[],"target_notes":[]},{"name":"FMT_BOOL_STYLE_JSON","qualified_name":"std::fmt::FMT_BOOL_STYLE_JSON","kind":"const","visibility":"public","signature":"const FMT_BOOL_STYLE_JSON: String","source_path":"stdlib/fmt.kn","line":10,"attributes":[],"docs":[],"target_notes":[]},{"name":"FMT_BOOL_STYLE_NUMERIC","qualified_name":"std::fmt::FMT_BOOL_STYLE_NUMERIC","kind":"const","visibility":"public","signature":"const FMT_BOOL_STYLE_NUMERIC: String","source_path":"stdlib/fmt.kn","line":11,"attributes":[],"docs":[],"target_notes":[]},{"name":"FMT_BASE_DECIMAL","qualified_name":"std::fmt::FMT_BASE_DECIMAL","kind":"const","visibility":"public","signature":"const FMT_BASE_DECIMAL: Int","source_path":"stdlib/fmt.kn","line":13,"attributes":[],"docs":[],"target_notes":[]},{"name":"FMT_BASE_HEX","qualified_name":"std::fmt::FMT_BASE_HEX","kind":"const","visibility":"public","signature":"const FMT_BASE_HEX: Int","source_path":"stdlib/fmt.kn","line":14,"attributes":[],"docs":[],"target_notes":[]},{"name":"FMT_BASE_BINARY","qualified_name":"std::fmt::FMT_BASE_BINARY","kind":"const","visibility":"public","signature":"const FMT_BASE_BINARY: Int","source_path":"stdlib/fmt.kn","line":15,"attributes":[],"docs":[],"target_notes":[]},{"name":"FmtWriter","qualified_name":"std::fmt::FmtWriter","kind":"struct","visibility":"public","signature":"struct FmtWriter","source_path":"stdlib/fmt.kn","line":17,"attributes":[],"docs":[],"target_notes":[]},{"name":"FmtSpec","qualified_name":"std::fmt::FmtSpec","kind":"struct","visibility":"public","signature":"struct FmtSpec","source_path":"stdlib/fmt.kn","line":20,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_pad_token","qualified_name":"std::fmt::fmt_pad_token","kind":"function","visibility":"private","signature":"fn fmt_pad_token(pad: String) -> String","source_path":"stdlib/fmt.kn","line":30,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_supported_align","qualified_name":"std::fmt::fmt_supported_align","kind":"function","visibility":"private","signature":"fn fmt_supported_align(align: String) -> String","source_path":"stdlib/fmt.kn","line":35,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_supported_base","qualified_name":"std::fmt::fmt_supported_base","kind":"function","visibility":"private","signature":"fn fmt_supported_base(base: Int) -> Int","source_path":"stdlib/fmt.kn","line":42,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_supported_bool_style","qualified_name":"std::fmt::fmt_supported_bool_style","kind":"function","visibility":"private","signature":"fn fmt_supported_bool_style(style: String) -> String","source_path":"stdlib/fmt.kn","line":49,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_apply_uppercase","qualified_name":"std::fmt::fmt_apply_uppercase","kind":"function","visibility":"private","signature":"fn fmt_apply_uppercase(value: String, uppercase: Bool) -> String","source_path":"stdlib/fmt.kn","line":56,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_apply_prefix","qualified_name":"std::fmt::fmt_apply_prefix","kind":"function","visibility":"private","signature":"fn fmt_apply_prefix(value: String, prefix: String) -> String","source_path":"stdlib/fmt.kn","line":61,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_apply_plus","qualified_name":"std::fmt::fmt_apply_plus","kind":"function","visibility":"private","signature":"fn fmt_apply_plus(value: String, plus_for_positive: Bool) -> String","source_path":"stdlib/fmt.kn","line":71,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_apply_width","qualified_name":"std::fmt::fmt_apply_width","kind":"function","visibility":"private","signature":"fn fmt_apply_width(value: String, spec: FmtSpec) -> String","source_path":"stdlib/fmt.kn","line":81,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_render_number_body","qualified_name":"std::fmt::fmt_render_number_body","kind":"function","visibility":"private","signature":"fn fmt_render_number_body(value: Int, spec: FmtSpec) -> String","source_path":"stdlib/fmt.kn","line":91,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_render_float_body","qualified_name":"std::fmt::fmt_render_float_body","kind":"function","visibility":"private","signature":"fn fmt_render_float_body(value: Float, spec: FmtSpec) -> String","source_path":"stdlib/fmt.kn","line":99,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_render_bool_body","qualified_name":"std::fmt::fmt_render_bool_body","kind":"function","visibility":"private","signature":"fn fmt_render_bool_body(value: Bool, spec: FmtSpec) -> String","source_path":"stdlib/fmt.kn","line":102,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_string","qualified_name":"std::fmt::fmt_string","kind":"function","visibility":"public","signature":"fn fmt_string(value: String) -> String","source_path":"stdlib/fmt.kn","line":113,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_writer_new","qualified_name":"std::fmt::fmt_writer_new","kind":"function","visibility":"public","signature":"fn fmt_writer_new() -> FmtWriter","source_path":"stdlib/fmt.kn","line":116,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_spec_default","qualified_name":"std::fmt::fmt_spec_default","kind":"function","visibility":"public","signature":"fn fmt_spec_default() -> FmtSpec","source_path":"stdlib/fmt.kn","line":119,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_spec_width","qualified_name":"std::fmt::fmt_spec_width","kind":"function","visibility":"public","signature":"fn fmt_spec_width(spec: FmtSpec, width: Int) -> FmtSpec","source_path":"stdlib/fmt.kn","line":131,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_spec_pad","qualified_name":"std::fmt::fmt_spec_pad","kind":"function","visibility":"public","signature":"fn fmt_spec_pad(spec: FmtSpec, pad: String) -> FmtSpec","source_path":"stdlib/fmt.kn","line":143,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_spec_align","qualified_name":"std::fmt::fmt_spec_align","kind":"function","visibility":"public","signature":"fn fmt_spec_align(spec: FmtSpec, align: String) -> FmtSpec","source_path":"stdlib/fmt.kn","line":155,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_spec_prefix","qualified_name":"std::fmt::fmt_spec_prefix","kind":"function","visibility":"public","signature":"fn fmt_spec_prefix(spec: FmtSpec, prefix: String) -> FmtSpec","source_path":"stdlib/fmt.kn","line":167,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_spec_plus","qualified_name":"std::fmt::fmt_spec_plus","kind":"function","visibility":"public","signature":"fn fmt_spec_plus(spec: FmtSpec, enabled: Bool) -> FmtSpec","source_path":"stdlib/fmt.kn","line":179,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_spec_uppercase","qualified_name":"std::fmt::fmt_spec_uppercase","kind":"function","visibility":"public","signature":"fn fmt_spec_uppercase(spec: FmtSpec, enabled: Bool) -> FmtSpec","source_path":"stdlib/fmt.kn","line":191,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_spec_base","qualified_name":"std::fmt::fmt_spec_base","kind":"function","visibility":"public","signature":"fn fmt_spec_base(spec: FmtSpec, base: Int) -> FmtSpec","source_path":"stdlib/fmt.kn","line":203,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_spec_bool_style","qualified_name":"std::fmt::fmt_spec_bool_style","kind":"function","visibility":"public","signature":"fn fmt_spec_bool_style(spec: FmtSpec, style: String) -> FmtSpec","source_path":"stdlib/fmt.kn","line":215,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_writer_len","qualified_name":"std::fmt::fmt_writer_len","kind":"function","visibility":"public","signature":"fn fmt_writer_len(writer: FmtWriter) -> Int","source_path":"stdlib/fmt.kn","line":227,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_writer_push_string","qualified_name":"std::fmt::fmt_writer_push_string","kind":"function","visibility":"public","signature":"fn fmt_writer_push_string(writer: FmtWriter, value: String) -> FmtWriter","source_path":"stdlib/fmt.kn","line":230,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_writer_push_string_spec","qualified_name":"std::fmt::fmt_writer_push_string_spec","kind":"function","visibility":"public","signature":"fn fmt_writer_push_string_spec(writer: FmtWriter, value: String, spec: FmtSpec) -> FmtWriter","source_path":"stdlib/fmt.kn","line":235,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_writer_push_any","qualified_name":"std::fmt::fmt_writer_push_any","kind":"function","visibility":"public","signature":"fn fmt_writer_push_any(writer: FmtWriter, value: Any) -> FmtWriter","source_path":"stdlib/fmt.kn","line":238,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_writer_push_int","qualified_name":"std::fmt::fmt_writer_push_int","kind":"function","visibility":"public","signature":"fn fmt_writer_push_int(writer: FmtWriter, value: Int) -> FmtWriter","source_path":"stdlib/fmt.kn","line":241,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_writer_push_int_spec","qualified_name":"std::fmt::fmt_writer_push_int_spec","kind":"function","visibility":"public","signature":"fn fmt_writer_push_int_spec(writer: FmtWriter, value: Int, spec: FmtSpec) -> FmtWriter","source_path":"stdlib/fmt.kn","line":244,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_writer_push_float","qualified_name":"std::fmt::fmt_writer_push_float","kind":"function","visibility":"public","signature":"fn fmt_writer_push_float(writer: FmtWriter, value: Float) -> FmtWriter","source_path":"stdlib/fmt.kn","line":247,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_writer_push_float_spec","qualified_name":"std::fmt::fmt_writer_push_float_spec","kind":"function","visibility":"public","signature":"fn fmt_writer_push_float_spec(writer: FmtWriter, value: Float, spec: FmtSpec) -> FmtWriter","source_path":"stdlib/fmt.kn","line":250,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_writer_push_bool_word","qualified_name":"std::fmt::fmt_writer_push_bool_word","kind":"function","visibility":"public","signature":"fn fmt_writer_push_bool_word(writer: FmtWriter, value: Bool) -> FmtWriter","source_path":"stdlib/fmt.kn","line":253,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_writer_push_bool_spec","qualified_name":"std::fmt::fmt_writer_push_bool_spec","kind":"function","visibility":"public","signature":"fn fmt_writer_push_bool_spec(writer: FmtWriter, value: Bool, spec: FmtSpec) -> FmtWriter","source_path":"stdlib/fmt.kn","line":256,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_writer_push_hex_int","qualified_name":"std::fmt::fmt_writer_push_hex_int","kind":"function","visibility":"public","signature":"fn fmt_writer_push_hex_int(writer: FmtWriter, value: Int) -> FmtWriter","source_path":"stdlib/fmt.kn","line":259,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_writer_push_binary_int","qualified_name":"std::fmt::fmt_writer_push_binary_int","kind":"function","visibility":"public","signature":"fn fmt_writer_push_binary_int(writer: FmtWriter, value: Int) -> FmtWriter","source_path":"stdlib/fmt.kn","line":262,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_writer_push_json_string","qualified_name":"std::fmt::fmt_writer_push_json_string","kind":"function","visibility":"public","signature":"fn fmt_writer_push_json_string(writer: FmtWriter, value: String) -> FmtWriter","source_path":"stdlib/fmt.kn","line":265,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_writer_push_key_value","qualified_name":"std::fmt::fmt_writer_push_key_value","kind":"function","visibility":"public","signature":"fn fmt_writer_push_key_value(writer: FmtWriter, key: String, value: String) -> FmtWriter","source_path":"stdlib/fmt.kn","line":268,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_writer_push_line","qualified_name":"std::fmt::fmt_writer_push_line","kind":"function","visibility":"public","signature":"fn fmt_writer_push_line(writer: FmtWriter, value: String) -> FmtWriter","source_path":"stdlib/fmt.kn","line":271,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_writer_push_prefixed_lines","qualified_name":"std::fmt::fmt_writer_push_prefixed_lines","kind":"function","visibility":"public","signature":"fn fmt_writer_push_prefixed_lines(writer: FmtWriter, prefix: String, lines: Array) -> FmtWriter","source_path":"stdlib/fmt.kn","line":275,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_writer_build","qualified_name":"std::fmt::fmt_writer_build","kind":"function","visibility":"public","signature":"fn fmt_writer_build(writer: FmtWriter) -> String","source_path":"stdlib/fmt.kn","line":285,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_string_builder_push_string","qualified_name":"std::fmt::fmt_string_builder_push_string","kind":"function","visibility":"public","signature":"fn fmt_string_builder_push_string(builder: ptr, value: String) -> Int","source_path":"stdlib/fmt.kn","line":288,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_string_builder_push_string_spec","qualified_name":"std::fmt::fmt_string_builder_push_string_spec","kind":"function","visibility":"public","signature":"fn fmt_string_builder_push_string_spec(builder: ptr, value: String, spec: FmtSpec) -> Int","source_path":"stdlib/fmt.kn","line":291,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_string_builder_push_any","qualified_name":"std::fmt::fmt_string_builder_push_any","kind":"function","visibility":"public","signature":"fn fmt_string_builder_push_any(builder: ptr, value: Any) -> Int","source_path":"stdlib/fmt.kn","line":294,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_string_builder_push_int","qualified_name":"std::fmt::fmt_string_builder_push_int","kind":"function","visibility":"public","signature":"fn fmt_string_builder_push_int(builder: ptr, value: Int) -> Int","source_path":"stdlib/fmt.kn","line":297,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_string_builder_push_int_spec","qualified_name":"std::fmt::fmt_string_builder_push_int_spec","kind":"function","visibility":"public","signature":"fn fmt_string_builder_push_int_spec(builder: ptr, value: Int, spec: FmtSpec) -> Int","source_path":"stdlib/fmt.kn","line":300,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_string_builder_push_float","qualified_name":"std::fmt::fmt_string_builder_push_float","kind":"function","visibility":"public","signature":"fn fmt_string_builder_push_float(builder: ptr, value: Float) -> Int","source_path":"stdlib/fmt.kn","line":303,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_string_builder_push_float_spec","qualified_name":"std::fmt::fmt_string_builder_push_float_spec","kind":"function","visibility":"public","signature":"fn fmt_string_builder_push_float_spec(builder: ptr, value: Float, spec: FmtSpec) -> Int","source_path":"stdlib/fmt.kn","line":306,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_string_builder_push_bool_spec","qualified_name":"std::fmt::fmt_string_builder_push_bool_spec","kind":"function","visibility":"public","signature":"fn fmt_string_builder_push_bool_spec(builder: ptr, value: Bool, spec: FmtSpec) -> Int","source_path":"stdlib/fmt.kn","line":309,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_string_builder_push_json_string","qualified_name":"std::fmt::fmt_string_builder_push_json_string","kind":"function","visibility":"public","signature":"fn fmt_string_builder_push_json_string(builder: ptr, value: String) -> Int","source_path":"stdlib/fmt.kn","line":312,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_string_builder_push_key_value","qualified_name":"std::fmt::fmt_string_builder_push_key_value","kind":"function","visibility":"public","signature":"fn fmt_string_builder_push_key_value(builder: ptr, key: String, value: String) -> Int","source_path":"stdlib/fmt.kn","line":315,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_string_builder_push_line","qualified_name":"std::fmt::fmt_string_builder_push_line","kind":"function","visibility":"public","signature":"fn fmt_string_builder_push_line(builder: ptr, value: String) -> Int","source_path":"stdlib/fmt.kn","line":318,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_any","qualified_name":"std::fmt::fmt_any","kind":"function","visibility":"public","signature":"fn fmt_any(value: Any) -> String","source_path":"stdlib/fmt.kn","line":323,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_string_spec","qualified_name":"std::fmt::fmt_string_spec","kind":"function","visibility":"public","signature":"fn fmt_string_spec(value: String, spec: FmtSpec) -> String","source_path":"stdlib/fmt.kn","line":326,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_int","qualified_name":"std::fmt::fmt_int","kind":"function","visibility":"public","signature":"fn fmt_int(value: Int) -> String","source_path":"stdlib/fmt.kn","line":330,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_int_spec","qualified_name":"std::fmt::fmt_int_spec","kind":"function","visibility":"public","signature":"fn fmt_int_spec(value: Int, spec: FmtSpec) -> String","source_path":"stdlib/fmt.kn","line":333,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_float","qualified_name":"std::fmt::fmt_float","kind":"function","visibility":"public","signature":"fn fmt_float(value: Float) -> String","source_path":"stdlib/fmt.kn","line":339,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_float_spec","qualified_name":"std::fmt::fmt_float_spec","kind":"function","visibility":"public","signature":"fn fmt_float_spec(value: Float, spec: FmtSpec) -> String","source_path":"stdlib/fmt.kn","line":342,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_bool_word","qualified_name":"std::fmt::fmt_bool_word","kind":"function","visibility":"public","signature":"fn fmt_bool_word(value: Bool) -> String","source_path":"stdlib/fmt.kn","line":348,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_bool_spec","qualified_name":"std::fmt::fmt_bool_spec","kind":"function","visibility":"public","signature":"fn fmt_bool_spec(value: Bool, spec: FmtSpec) -> String","source_path":"stdlib/fmt.kn","line":353,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_bool_json","qualified_name":"std::fmt::fmt_bool_json","kind":"function","visibility":"public","signature":"fn fmt_bool_json(value: Bool) -> String","source_path":"stdlib/fmt.kn","line":358,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_join_strings","qualified_name":"std::fmt::fmt_join_strings","kind":"function","visibility":"public","signature":"fn fmt_join_strings(items: Array, separator: String) -> String","source_path":"stdlib/fmt.kn","line":361,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_non_empty","qualified_name":"std::fmt::fmt_non_empty","kind":"function","visibility":"public","signature":"fn fmt_non_empty(value: String, fallback: String) -> String","source_path":"stdlib/fmt.kn","line":371,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_key_value","qualified_name":"std::fmt::fmt_key_value","kind":"function","visibility":"public","signature":"fn fmt_key_value(key: String, value: String) -> String","source_path":"stdlib/fmt.kn","line":377,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_bracketed","qualified_name":"std::fmt::fmt_bracketed","kind":"function","visibility":"public","signature":"fn fmt_bracketed(label: String, value: String) -> String","source_path":"stdlib/fmt.kn","line":380,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_repeat","qualified_name":"std::fmt::fmt_repeat","kind":"function","visibility":"public","signature":"fn fmt_repeat(token: String, count: Int) -> String","source_path":"stdlib/fmt.kn","line":383,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_pad_left","qualified_name":"std::fmt::fmt_pad_left","kind":"function","visibility":"public","signature":"fn fmt_pad_left(value: String, width: Int, pad: String) -> String","source_path":"stdlib/fmt.kn","line":393,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_pad_right","qualified_name":"std::fmt::fmt_pad_right","kind":"function","visibility":"public","signature":"fn fmt_pad_right(value: String, width: Int, pad: String) -> String","source_path":"stdlib/fmt.kn","line":399,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_pad_center","qualified_name":"std::fmt::fmt_pad_center","kind":"function","visibility":"public","signature":"fn fmt_pad_center(value: String, width: Int, pad: String) -> String","source_path":"stdlib/fmt.kn","line":405,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_status_line","qualified_name":"std::fmt::fmt_status_line","kind":"function","visibility":"public","signature":"fn fmt_status_line(label: String, success: Bool) -> String","source_path":"stdlib/fmt.kn","line":414,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_prefixed_lines","qualified_name":"std::fmt::fmt_prefixed_lines","kind":"function","visibility":"public","signature":"fn fmt_prefixed_lines(prefix: String, lines: Array) -> String","source_path":"stdlib/fmt.kn","line":417,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_hex_u32","qualified_name":"std::fmt::fmt_hex_u32","kind":"function","visibility":"public","signature":"fn fmt_hex_u32(value: Int) -> String","source_path":"stdlib/fmt.kn","line":427,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_hex_int","qualified_name":"std::fmt::fmt_hex_int","kind":"function","visibility":"public","signature":"fn fmt_hex_int(value: Int) -> String","source_path":"stdlib/fmt.kn","line":440,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_binary_u32","qualified_name":"std::fmt::fmt_binary_u32","kind":"function","visibility":"public","signature":"fn fmt_binary_u32(value: Int) -> String","source_path":"stdlib/fmt.kn","line":445,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_binary_int","qualified_name":"std::fmt::fmt_binary_int","kind":"function","visibility":"public","signature":"fn fmt_binary_int(value: Int) -> String","source_path":"stdlib/fmt.kn","line":458,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_json_escape","qualified_name":"std::fmt::fmt_json_escape","kind":"function","visibility":"public","signature":"fn fmt_json_escape(value: String) -> String","source_path":"stdlib/fmt.kn","line":463,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_json_string","qualified_name":"std::fmt::fmt_json_string","kind":"function","visibility":"public","signature":"fn fmt_json_string(value: String) -> String","source_path":"stdlib/fmt.kn","line":499,"attributes":[],"docs":[],"target_notes":[]},{"name":"fmt_debug_string_array","qualified_name":"std::fmt::fmt_debug_string_array","kind":"function","visibility":"public","signature":"fn fmt_debug_string_array(items: Array) -> String","source_path":"stdlib/fmt.kn","line":502,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"fs","import_path":"std::fs","source_path":"stdlib/fs.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"FsError","qualified_name":"std::fs::FsError","kind":"struct","visibility":"public","signature":"struct FsError","source_path":"stdlib/fs.kn","line":5,"attributes":[],"docs":[],"target_notes":[]},{"name":"FsOpResult","qualified_name":"std::fs::FsOpResult","kind":"struct","visibility":"public","signature":"struct FsOpResult","source_path":"stdlib/fs.kn","line":13,"attributes":[],"docs":[],"target_notes":[]},{"name":"FsTextResult","qualified_name":"std::fs::FsTextResult","kind":"struct","visibility":"public","signature":"struct FsTextResult","source_path":"stdlib/fs.kn","line":18,"attributes":[],"docs":[],"target_notes":[]},{"name":"FsBytesResult","qualified_name":"std::fs::FsBytesResult","kind":"struct","visibility":"public","signature":"struct FsBytesResult","source_path":"stdlib/fs.kn","line":24,"attributes":[],"docs":[],"target_notes":[]},{"name":"FsMetadata","qualified_name":"std::fs::FsMetadata","kind":"struct","visibility":"public","signature":"struct FsMetadata","source_path":"stdlib/fs.kn","line":30,"attributes":[],"docs":[],"target_notes":[]},{"name":"FsMetadataResult","qualified_name":"std::fs::FsMetadataResult","kind":"struct","visibility":"public","signature":"struct FsMetadataResult","source_path":"stdlib/fs.kn","line":38,"attributes":[],"docs":[],"target_notes":[]},{"name":"FsDirEntry","qualified_name":"std::fs::FsDirEntry","kind":"struct","visibility":"public","signature":"struct FsDirEntry","source_path":"stdlib/fs.kn","line":44,"attributes":[],"docs":[],"target_notes":[]},{"name":"FsChunk","qualified_name":"std::fs::FsChunk","kind":"struct","visibility":"public","signature":"struct FsChunk","source_path":"stdlib/fs.kn","line":50,"attributes":[],"docs":[],"target_notes":[]},{"name":"FsWatchEvent","qualified_name":"std::fs::FsWatchEvent","kind":"struct","visibility":"public","signature":"struct FsWatchEvent","source_path":"stdlib/fs.kn","line":56,"attributes":[],"docs":[],"target_notes":[]},{"name":"FsJournalEntry","qualified_name":"std::fs::FsJournalEntry","kind":"struct","visibility":"public","signature":"struct FsJournalEntry","source_path":"stdlib/fs.kn","line":62,"attributes":[],"docs":[],"target_notes":[]},{"name":"abi_fs_read_text","qualified_name":"std::fs::abi_fs_read_text","kind":"extern_function","visibility":"public","signature":"fn abi_fs_read_text(path: String) -> String","source_path":"stdlib/fs.kn","line":70,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_fs_read_text_range","qualified_name":"std::fs::abi_fs_read_text_range","kind":"extern_function","visibility":"public","signature":"fn abi_fs_read_text_range(path: String, offset: Int, length: Int) -> String","source_path":"stdlib/fs.kn","line":73,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_fs_write_text","qualified_name":"std::fs::abi_fs_write_text","kind":"extern_function","visibility":"public","signature":"fn abi_fs_write_text(path: String, content: String) -> Int","source_path":"stdlib/fs.kn","line":76,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_fs_write_text_len","qualified_name":"std::fs::abi_fs_write_text_len","kind":"extern_function","visibility":"public","signature":"fn abi_fs_write_text_len(path: String, content: String, content_len: Int) -> Int","source_path":"stdlib/fs.kn","line":79,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_fs_append_text","qualified_name":"std::fs::abi_fs_append_text","kind":"extern_function","visibility":"public","signature":"fn abi_fs_append_text(path: String, content: String) -> Int","source_path":"stdlib/fs.kn","line":82,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_fs_append_text_len","qualified_name":"std::fs::abi_fs_append_text_len","kind":"extern_function","visibility":"public","signature":"fn abi_fs_append_text_len(path: String, content: String, content_len: Int) -> Int","source_path":"stdlib/fs.kn","line":85,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_fs_atomic_write_text","qualified_name":"std::fs::abi_fs_atomic_write_text","kind":"extern_function","visibility":"public","signature":"fn abi_fs_atomic_write_text(path: String, content: String) -> Int","source_path":"stdlib/fs.kn","line":88,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_fs_atomic_write_text_len","qualified_name":"std::fs::abi_fs_atomic_write_text_len","kind":"extern_function","visibility":"public","signature":"fn abi_fs_atomic_write_text_len(path: String, content: String, content_len: Int) -> Int","source_path":"stdlib/fs.kn","line":91,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_fs_read_bytes_hex","qualified_name":"std::fs::abi_fs_read_bytes_hex","kind":"extern_function","visibility":"public","signature":"fn abi_fs_read_bytes_hex(path: String) -> String","source_path":"stdlib/fs.kn","line":94,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_fs_read_byte_range_hex","qualified_name":"std::fs::abi_fs_read_byte_range_hex","kind":"extern_function","visibility":"public","signature":"fn abi_fs_read_byte_range_hex(path: String, offset: Int, length: Int) -> String","source_path":"stdlib/fs.kn","line":97,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_fs_write_bytes_hex","qualified_name":"std::fs::abi_fs_write_bytes_hex","kind":"extern_function","visibility":"public","signature":"fn abi_fs_write_bytes_hex(path: String, hex: String) -> Int","source_path":"stdlib/fs.kn","line":100,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_fs_write_bytes_hex_at","qualified_name":"std::fs::abi_fs_write_bytes_hex_at","kind":"extern_function","visibility":"public","signature":"fn abi_fs_write_bytes_hex_at(path: String, offset: Int, hex: String) -> Int","source_path":"stdlib/fs.kn","line":103,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_fs_append_bytes_hex","qualified_name":"std::fs::abi_fs_append_bytes_hex","kind":"extern_function","visibility":"public","signature":"fn abi_fs_append_bytes_hex(path: String, hex: String) -> Int","source_path":"stdlib/fs.kn","line":106,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_fs_atomic_write_bytes_hex","qualified_name":"std::fs::abi_fs_atomic_write_bytes_hex","kind":"extern_function","visibility":"public","signature":"fn abi_fs_atomic_write_bytes_hex(path: String, hex: String) -> Int","source_path":"stdlib/fs.kn","line":109,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_fs_exists","qualified_name":"std::fs::abi_fs_exists","kind":"extern_function","visibility":"public","signature":"fn abi_fs_exists(path: String) -> Bool","source_path":"stdlib/fs.kn","line":112,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_fs_is_file","qualified_name":"std::fs::abi_fs_is_file","kind":"extern_function","visibility":"public","signature":"fn abi_fs_is_file(path: String) -> Bool","source_path":"stdlib/fs.kn","line":115,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_fs_is_dir","qualified_name":"std::fs::abi_fs_is_dir","kind":"extern_function","visibility":"public","signature":"fn abi_fs_is_dir(path: String) -> Bool","source_path":"stdlib/fs.kn","line":118,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_fs_metadata_text","qualified_name":"std::fs::abi_fs_metadata_text","kind":"extern_function","visibility":"public","signature":"fn abi_fs_metadata_text(path: String) -> String","source_path":"stdlib/fs.kn","line":121,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_fs_read_dir_paths_text","qualified_name":"std::fs::abi_fs_read_dir_paths_text","kind":"extern_function","visibility":"public","signature":"fn abi_fs_read_dir_paths_text(path: String) -> String","source_path":"stdlib/fs.kn","line":124,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_fs_walk_paths_text","qualified_name":"std::fs::abi_fs_walk_paths_text","kind":"extern_function","visibility":"public","signature":"fn abi_fs_walk_paths_text(path: String) -> String","source_path":"stdlib/fs.kn","line":127,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_fs_create_dir_all","qualified_name":"std::fs::abi_fs_create_dir_all","kind":"extern_function","visibility":"public","signature":"fn abi_fs_create_dir_all(path: String) -> Int","source_path":"stdlib/fs.kn","line":130,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_fs_copy_file","qualified_name":"std::fs::abi_fs_copy_file","kind":"extern_function","visibility":"public","signature":"fn abi_fs_copy_file(src: String, dest: String) -> Int","source_path":"stdlib/fs.kn","line":133,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_fs_copy_file_streaming","qualified_name":"std::fs::abi_fs_copy_file_streaming","kind":"extern_function","visibility":"public","signature":"fn abi_fs_copy_file_streaming(src: String, dest: String, chunk_size: Int) -> Int","source_path":"stdlib/fs.kn","line":136,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_fs_move_path","qualified_name":"std::fs::abi_fs_move_path","kind":"extern_function","visibility":"public","signature":"fn abi_fs_move_path(src: String, dest: String) -> Int","source_path":"stdlib/fs.kn","line":139,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_fs_remove_file","qualified_name":"std::fs::abi_fs_remove_file","kind":"extern_function","visibility":"public","signature":"fn abi_fs_remove_file(path: String) -> Int","source_path":"stdlib/fs.kn","line":142,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_fs_remove_dir_all","qualified_name":"std::fs::abi_fs_remove_dir_all","kind":"extern_function","visibility":"public","signature":"fn abi_fs_remove_dir_all(path: String) -> Int","source_path":"stdlib/fs.kn","line":145,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_fs_temp_file","qualified_name":"std::fs::abi_fs_temp_file","kind":"extern_function","visibility":"public","signature":"fn abi_fs_temp_file(prefix: String) -> String","source_path":"stdlib/fs.kn","line":148,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_fs_temp_dir","qualified_name":"std::fs::abi_fs_temp_dir","kind":"extern_function","visibility":"public","signature":"fn abi_fs_temp_dir(prefix: String) -> String","source_path":"stdlib/fs.kn","line":151,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_fs_hash_file","qualified_name":"std::fs::abi_fs_hash_file","kind":"extern_function","visibility":"public","signature":"fn abi_fs_hash_file(path: String) -> String","source_path":"stdlib/fs.kn","line":154,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_fs_path_join","qualified_name":"std::fs::abi_fs_path_join","kind":"extern_function","visibility":"public","signature":"fn abi_fs_path_join(base: String, child: String) -> String","source_path":"stdlib/fs.kn","line":157,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_fs_path_parent","qualified_name":"std::fs::abi_fs_path_parent","kind":"extern_function","visibility":"public","signature":"fn abi_fs_path_parent(path: String) -> String","source_path":"stdlib/fs.kn","line":160,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_fs_path_file_name","qualified_name":"std::fs::abi_fs_path_file_name","kind":"extern_function","visibility":"public","signature":"fn abi_fs_path_file_name(path: String) -> String","source_path":"stdlib/fs.kn","line":163,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_fs_path_extension","qualified_name":"std::fs::abi_fs_path_extension","kind":"extern_function","visibility":"public","signature":"fn abi_fs_path_extension(path: String) -> String","source_path":"stdlib/fs.kn","line":166,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_fs_path_stem","qualified_name":"std::fs::abi_fs_path_stem","kind":"extern_function","visibility":"public","signature":"fn abi_fs_path_stem(path: String) -> String","source_path":"stdlib/fs.kn","line":169,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_fs_last_status","qualified_name":"std::fs::abi_fs_last_status","kind":"extern_function","visibility":"public","signature":"fn abi_fs_last_status() -> Int","source_path":"stdlib/fs.kn","line":172,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_fs_last_error_kind","qualified_name":"std::fs::abi_fs_last_error_kind","kind":"extern_function","visibility":"public","signature":"fn abi_fs_last_error_kind() -> String","source_path":"stdlib/fs.kn","line":175,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_fs_last_error_message","qualified_name":"std::fs::abi_fs_last_error_message","kind":"extern_function","visibility":"public","signature":"fn abi_fs_last_error_message() -> String","source_path":"stdlib/fs.kn","line":178,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_fs_open","qualified_name":"std::fs::abi_fs_open","kind":"extern_function","visibility":"public","signature":"fn abi_fs_open(path: String, mode: String) -> ptr","source_path":"stdlib/fs.kn","line":181,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_fs_close","qualified_name":"std::fs::abi_fs_close","kind":"extern_function","visibility":"public","signature":"fn abi_fs_close(handle: ptr) -> Int","source_path":"stdlib/fs.kn","line":184,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_fs_read","qualified_name":"std::fs::abi_fs_read","kind":"extern_function","visibility":"public","signature":"fn abi_fs_read(handle: ptr, buffer: ptr, byte_count: Int) -> Int","source_path":"stdlib/fs.kn","line":187,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_fs_write","qualified_name":"std::fs::abi_fs_write","kind":"extern_function","visibility":"public","signature":"fn abi_fs_write(handle: ptr, buffer: ptr, byte_count: Int) -> Int","source_path":"stdlib/fs.kn","line":190,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_fs_seek","qualified_name":"std::fs::abi_fs_seek","kind":"extern_function","visibility":"public","signature":"fn abi_fs_seek(handle: ptr, offset: Int, origin: Int) -> Int","source_path":"stdlib/fs.kn","line":193,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_fs_tell","qualified_name":"std::fs::abi_fs_tell","kind":"extern_function","visibility":"public","signature":"fn abi_fs_tell(handle: ptr) -> Int","source_path":"stdlib/fs.kn","line":196,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_fs_flush","qualified_name":"std::fs::abi_fs_flush","kind":"extern_function","visibility":"public","signature":"fn abi_fs_flush(handle: ptr) -> Int","source_path":"stdlib/fs.kn","line":199,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"fs_buffered_reader","qualified_name":"std::fs::fs_buffered_reader","kind":"function","visibility":"public","signature":"fn fs_buffered_reader(path: String, capacity: Int) -> BufferedReader","source_path":"stdlib/fs.kn","line":201,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_buffered_reader_range","qualified_name":"std::fs::fs_buffered_reader_range","kind":"function","visibility":"public","signature":"fn fs_buffered_reader_range(path: String, offset: Int, length: Int, capacity: Int) -> BufferedReader","source_path":"stdlib/fs.kn","line":204,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_write_buffered_text","qualified_name":"std::fs::fs_write_buffered_text","kind":"function","visibility":"public","signature":"fn fs_write_buffered_text(path: String, writer: BufferedWriter) -> Int","source_path":"stdlib/fs.kn","line":207,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_append_buffered_text","qualified_name":"std::fs::fs_append_buffered_text","kind":"function","visibility":"public","signature":"fn fs_append_buffered_text(path: String, writer: BufferedWriter) -> Int","source_path":"stdlib/fs.kn","line":211,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_atomic_write_buffered_text","qualified_name":"std::fs::fs_atomic_write_buffered_text","kind":"function","visibility":"public","signature":"fn fs_atomic_write_buffered_text(path: String, writer: BufferedWriter) -> Int","source_path":"stdlib/fs.kn","line":215,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_parse_int_or_zero","qualified_name":"std::fs::fs_parse_int_or_zero","kind":"function","visibility":"public","signature":"fn fs_parse_int_or_zero(value: String) -> Int","source_path":"stdlib/fs.kn","line":220,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_hex_to_bytes","qualified_name":"std::fs::fs_hex_to_bytes","kind":"function","visibility":"public","signature":"fn fs_hex_to_bytes(hex: String) -> Array","source_path":"stdlib/fs.kn","line":225,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_bytes_to_hex","qualified_name":"std::fs::fs_bytes_to_hex","kind":"function","visibility":"public","signature":"fn fs_bytes_to_hex(bytes: Array) -> String","source_path":"stdlib/fs.kn","line":239,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_hex_digit_value","qualified_name":"std::fs::fs_hex_digit_value","kind":"function","visibility":"private","signature":"fn fs_hex_digit_value(ch: String) -> Int","source_path":"stdlib/fs.kn","line":249,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_hex_digit_char","qualified_name":"std::fs::fs_hex_digit_char","kind":"function","visibility":"private","signature":"fn fs_hex_digit_char(value: Int) -> String","source_path":"stdlib/fs.kn","line":259,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_nonempty_lines","qualified_name":"std::fs::fs_nonempty_lines","kind":"function","visibility":"public","signature":"fn fs_nonempty_lines(text: String) -> Array","source_path":"stdlib/fs.kn","line":265,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_metadata_line_value","qualified_name":"std::fs::fs_metadata_line_value","kind":"function","visibility":"public","signature":"fn fs_metadata_line_value(metadata_text: String, key: String) -> String","source_path":"stdlib/fs.kn","line":275,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_parse_metadata_text","qualified_name":"std::fs::fs_parse_metadata_text","kind":"function","visibility":"public","signature":"fn fs_parse_metadata_text(metadata_text: String) -> FsMetadata","source_path":"stdlib/fs.kn","line":286,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_dir_entry_for_path","qualified_name":"std::fs::fs_dir_entry_for_path","kind":"function","visibility":"public","signature":"fn fs_dir_entry_for_path(path: String) -> FsDirEntry","source_path":"stdlib/fs.kn","line":302,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_fs_last_status","qualified_name":"std::fs::native_fs_last_status","kind":"function","visibility":"public","signature":"fn native_fs_last_status() -> Int","source_path":"stdlib/fs.kn","line":311,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_fs_last_error_kind","qualified_name":"std::fs::native_fs_last_error_kind","kind":"function","visibility":"public","signature":"fn native_fs_last_error_kind() -> String","source_path":"stdlib/fs.kn","line":314,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_fs_last_error_message","qualified_name":"std::fs::native_fs_last_error_message","kind":"function","visibility":"public","signature":"fn native_fs_last_error_message() -> String","source_path":"stdlib/fs.kn","line":317,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_error_empty","qualified_name":"std::fs::fs_error_empty","kind":"function","visibility":"private","signature":"fn fs_error_empty() -> FsError","source_path":"stdlib/fs.kn","line":320,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_metadata_empty","qualified_name":"std::fs::fs_metadata_empty","kind":"function","visibility":"private","signature":"fn fs_metadata_empty() -> FsMetadata","source_path":"stdlib/fs.kn","line":330,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_error_from_status","qualified_name":"std::fs::fs_error_from_status","kind":"function","visibility":"private","signature":"fn fs_error_from_status(operation: String, path: String, other_path: String, status: Int) -> FsError","source_path":"stdlib/fs.kn","line":340,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_op_result","qualified_name":"std::fs::fs_op_result","kind":"function","visibility":"private","signature":"fn fs_op_result(operation: String, path: String, other_path: String, status: Int) -> FsOpResult","source_path":"stdlib/fs.kn","line":352,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_try_read_text","qualified_name":"std::fs::fs_try_read_text","kind":"function","visibility":"public","signature":"fn fs_try_read_text(path: String) -> FsTextResult","source_path":"stdlib/fs.kn","line":359,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_try_read_text_range","qualified_name":"std::fs::fs_try_read_text_range","kind":"function","visibility":"public","signature":"fn fs_try_read_text_range(path: String, offset: Int, length: Int) -> FsTextResult","source_path":"stdlib/fs.kn","line":369,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_try_write_text","qualified_name":"std::fs::fs_try_write_text","kind":"function","visibility":"public","signature":"fn fs_try_write_text(path: String, content: String) -> FsOpResult","source_path":"stdlib/fs.kn","line":379,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_try_append_text","qualified_name":"std::fs::fs_try_append_text","kind":"function","visibility":"public","signature":"fn fs_try_append_text(path: String, content: String) -> FsOpResult","source_path":"stdlib/fs.kn","line":382,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_try_atomic_write_text","qualified_name":"std::fs::fs_try_atomic_write_text","kind":"function","visibility":"public","signature":"fn fs_try_atomic_write_text(path: String, content: String) -> FsOpResult","source_path":"stdlib/fs.kn","line":385,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_try_read_bytes_hex","qualified_name":"std::fs::fs_try_read_bytes_hex","kind":"function","visibility":"public","signature":"fn fs_try_read_bytes_hex(path: String) -> FsTextResult","source_path":"stdlib/fs.kn","line":388,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_try_read_byte_range_hex","qualified_name":"std::fs::fs_try_read_byte_range_hex","kind":"function","visibility":"public","signature":"fn fs_try_read_byte_range_hex(path: String, offset: Int, length: Int) -> FsTextResult","source_path":"stdlib/fs.kn","line":398,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_try_read_bytes","qualified_name":"std::fs::fs_try_read_bytes","kind":"function","visibility":"public","signature":"fn fs_try_read_bytes(path: String) -> FsBytesResult","source_path":"stdlib/fs.kn","line":408,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_try_read_bytes_range","qualified_name":"std::fs::fs_try_read_bytes_range","kind":"function","visibility":"public","signature":"fn fs_try_read_bytes_range(path: String, offset: Int, length: Int) -> FsBytesResult","source_path":"stdlib/fs.kn","line":417,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_try_write_bytes_hex","qualified_name":"std::fs::fs_try_write_bytes_hex","kind":"function","visibility":"public","signature":"fn fs_try_write_bytes_hex(path: String, hex: String) -> FsOpResult","source_path":"stdlib/fs.kn","line":426,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_try_write_bytes_hex_at","qualified_name":"std::fs::fs_try_write_bytes_hex_at","kind":"function","visibility":"public","signature":"fn fs_try_write_bytes_hex_at(path: String, offset: Int, hex: String) -> FsOpResult","source_path":"stdlib/fs.kn","line":429,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_try_append_bytes_hex","qualified_name":"std::fs::fs_try_append_bytes_hex","kind":"function","visibility":"public","signature":"fn fs_try_append_bytes_hex(path: String, hex: String) -> FsOpResult","source_path":"stdlib/fs.kn","line":432,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_try_write_text_at","qualified_name":"std::fs::fs_try_write_text_at","kind":"function","visibility":"public","signature":"fn fs_try_write_text_at(path: String, offset: Int, content: String) -> FsOpResult","source_path":"stdlib/fs.kn","line":435,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_try_write_bytes","qualified_name":"std::fs::fs_try_write_bytes","kind":"function","visibility":"public","signature":"fn fs_try_write_bytes(path: String, bytes: Array) -> FsOpResult","source_path":"stdlib/fs.kn","line":438,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_try_write_bytes_at","qualified_name":"std::fs::fs_try_write_bytes_at","kind":"function","visibility":"public","signature":"fn fs_try_write_bytes_at(path: String, offset: Int, bytes: Array) -> FsOpResult","source_path":"stdlib/fs.kn","line":441,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_try_append_bytes","qualified_name":"std::fs::fs_try_append_bytes","kind":"function","visibility":"public","signature":"fn fs_try_append_bytes(path: String, bytes: Array) -> FsOpResult","source_path":"stdlib/fs.kn","line":444,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_try_atomic_write_bytes","qualified_name":"std::fs::fs_try_atomic_write_bytes","kind":"function","visibility":"public","signature":"fn fs_try_atomic_write_bytes(path: String, bytes: Array) -> FsOpResult","source_path":"stdlib/fs.kn","line":447,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_try_metadata_text","qualified_name":"std::fs::fs_try_metadata_text","kind":"function","visibility":"public","signature":"fn fs_try_metadata_text(path: String) -> FsTextResult","source_path":"stdlib/fs.kn","line":450,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_try_metadata","qualified_name":"std::fs::fs_try_metadata","kind":"function","visibility":"public","signature":"fn fs_try_metadata(path: String) -> FsMetadataResult","source_path":"stdlib/fs.kn","line":460,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_try_read_dir_paths_text","qualified_name":"std::fs::fs_try_read_dir_paths_text","kind":"function","visibility":"public","signature":"fn fs_try_read_dir_paths_text(path: String) -> FsTextResult","source_path":"stdlib/fs.kn","line":469,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_try_walk_paths_text","qualified_name":"std::fs::fs_try_walk_paths_text","kind":"function","visibility":"public","signature":"fn fs_try_walk_paths_text(path: String) -> FsTextResult","source_path":"stdlib/fs.kn","line":479,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_read_text","qualified_name":"std::fs::fs_read_text","kind":"function","visibility":"public","signature":"fn fs_read_text(path: String) -> String","source_path":"stdlib/fs.kn","line":489,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_read_text_range","qualified_name":"std::fs::fs_read_text_range","kind":"function","visibility":"public","signature":"fn fs_read_text_range(path: String, offset: Int, length: Int) -> String","source_path":"stdlib/fs.kn","line":496,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_write_text","qualified_name":"std::fs::fs_write_text","kind":"function","visibility":"public","signature":"fn fs_write_text(path: String, content: String) -> Unit","source_path":"stdlib/fs.kn","line":501,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_append_text","qualified_name":"std::fs::fs_append_text","kind":"function","visibility":"public","signature":"fn fs_append_text(path: String, content: String) -> Unit","source_path":"stdlib/fs.kn","line":504,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_atomic_write_text","qualified_name":"std::fs::fs_atomic_write_text","kind":"function","visibility":"public","signature":"fn fs_atomic_write_text(path: String, content: String) -> Unit","source_path":"stdlib/fs.kn","line":507,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_read_bytes","qualified_name":"std::fs::fs_read_bytes","kind":"function","visibility":"public","signature":"fn fs_read_bytes(path: String) -> Array","source_path":"stdlib/fs.kn","line":510,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_read_bytes_range","qualified_name":"std::fs::fs_read_bytes_range","kind":"function","visibility":"public","signature":"fn fs_read_bytes_range(path: String, offset: Int, length: Int) -> Array","source_path":"stdlib/fs.kn","line":513,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_read_bytes_hex","qualified_name":"std::fs::fs_read_bytes_hex","kind":"function","visibility":"public","signature":"fn fs_read_bytes_hex(path: String) -> String","source_path":"stdlib/fs.kn","line":516,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_read_byte_range_hex","qualified_name":"std::fs::fs_read_byte_range_hex","kind":"function","visibility":"public","signature":"fn fs_read_byte_range_hex(path: String, offset: Int, length: Int) -> String","source_path":"stdlib/fs.kn","line":519,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_write_bytes_hex","qualified_name":"std::fs::fs_write_bytes_hex","kind":"function","visibility":"public","signature":"fn fs_write_bytes_hex(path: String, hex: String) -> Unit","source_path":"stdlib/fs.kn","line":522,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_write_bytes_hex_at","qualified_name":"std::fs::fs_write_bytes_hex_at","kind":"function","visibility":"public","signature":"fn fs_write_bytes_hex_at(path: String, offset: Int, hex: String) -> Unit","source_path":"stdlib/fs.kn","line":525,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_append_bytes_hex","qualified_name":"std::fs::fs_append_bytes_hex","kind":"function","visibility":"public","signature":"fn fs_append_bytes_hex(path: String, hex: String) -> Unit","source_path":"stdlib/fs.kn","line":528,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_write_text_at","qualified_name":"std::fs::fs_write_text_at","kind":"function","visibility":"public","signature":"fn fs_write_text_at(path: String, offset: Int, content: String) -> Unit","source_path":"stdlib/fs.kn","line":531,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_write_bytes","qualified_name":"std::fs::fs_write_bytes","kind":"function","visibility":"public","signature":"fn fs_write_bytes(path: String, bytes: Array) -> Unit","source_path":"stdlib/fs.kn","line":534,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_write_bytes_at","qualified_name":"std::fs::fs_write_bytes_at","kind":"function","visibility":"public","signature":"fn fs_write_bytes_at(path: String, offset: Int, bytes: Array) -> Unit","source_path":"stdlib/fs.kn","line":537,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_append_bytes","qualified_name":"std::fs::fs_append_bytes","kind":"function","visibility":"public","signature":"fn fs_append_bytes(path: String, bytes: Array) -> Unit","source_path":"stdlib/fs.kn","line":540,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_atomic_write_bytes","qualified_name":"std::fs::fs_atomic_write_bytes","kind":"function","visibility":"public","signature":"fn fs_atomic_write_bytes(path: String, bytes: Array) -> Unit","source_path":"stdlib/fs.kn","line":543,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_exists","qualified_name":"std::fs::fs_exists","kind":"function","visibility":"public","signature":"fn fs_exists(path: String) -> Bool","source_path":"stdlib/fs.kn","line":546,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_is_file","qualified_name":"std::fs::fs_is_file","kind":"function","visibility":"public","signature":"fn fs_is_file(path: String) -> Bool","source_path":"stdlib/fs.kn","line":549,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_is_dir","qualified_name":"std::fs::fs_is_dir","kind":"function","visibility":"public","signature":"fn fs_is_dir(path: String) -> Bool","source_path":"stdlib/fs.kn","line":552,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_metadata_text","qualified_name":"std::fs::fs_metadata_text","kind":"function","visibility":"public","signature":"fn fs_metadata_text(path: String) -> String","source_path":"stdlib/fs.kn","line":555,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_metadata","qualified_name":"std::fs::fs_metadata","kind":"function","visibility":"public","signature":"fn fs_metadata(path: String) -> FsMetadata","source_path":"stdlib/fs.kn","line":558,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_read_dir_paths_text","qualified_name":"std::fs::fs_read_dir_paths_text","kind":"function","visibility":"public","signature":"fn fs_read_dir_paths_text(path: String) -> String","source_path":"stdlib/fs.kn","line":561,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_read_dir_paths","qualified_name":"std::fs::fs_read_dir_paths","kind":"function","visibility":"public","signature":"fn fs_read_dir_paths(path: String) -> Array","source_path":"stdlib/fs.kn","line":564,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_read_dir","qualified_name":"std::fs::fs_read_dir","kind":"function","visibility":"public","signature":"fn fs_read_dir(path: String) -> Array","source_path":"stdlib/fs.kn","line":567,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_walk_paths_text","qualified_name":"std::fs::fs_walk_paths_text","kind":"function","visibility":"public","signature":"fn fs_walk_paths_text(path: String) -> String","source_path":"stdlib/fs.kn","line":578,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_walk","qualified_name":"std::fs::fs_walk","kind":"function","visibility":"public","signature":"fn fs_walk(path: String) -> Array","source_path":"stdlib/fs.kn","line":581,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_try_create_dir_all","qualified_name":"std::fs::fs_try_create_dir_all","kind":"function","visibility":"public","signature":"fn fs_try_create_dir_all(path: String) -> FsOpResult","source_path":"stdlib/fs.kn","line":592,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_create_dir_all","qualified_name":"std::fs::fs_create_dir_all","kind":"function","visibility":"public","signature":"fn fs_create_dir_all(path: String) -> Unit","source_path":"stdlib/fs.kn","line":595,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_try_copy_file","qualified_name":"std::fs::fs_try_copy_file","kind":"function","visibility":"public","signature":"fn fs_try_copy_file(src: String, dest: String) -> FsOpResult","source_path":"stdlib/fs.kn","line":598,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_copy_file","qualified_name":"std::fs::fs_copy_file","kind":"function","visibility":"public","signature":"fn fs_copy_file(src: String, dest: String) -> Unit","source_path":"stdlib/fs.kn","line":601,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_copy_file_streaming","qualified_name":"std::fs::fs_copy_file_streaming","kind":"function","visibility":"public","signature":"fn fs_copy_file_streaming(src: String, dest: String, chunk_size: Int) -> Int","source_path":"stdlib/fs.kn","line":604,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_stream_chunks","qualified_name":"std::fs::fs_stream_chunks","kind":"function","visibility":"public","signature":"fn fs_stream_chunks(path: String, chunk_size: Int) -> Array","source_path":"stdlib/fs.kn","line":607,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_try_move_path","qualified_name":"std::fs::fs_try_move_path","kind":"function","visibility":"public","signature":"fn fs_try_move_path(src: String, dest: String) -> FsOpResult","source_path":"stdlib/fs.kn","line":634,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_move_path","qualified_name":"std::fs::fs_move_path","kind":"function","visibility":"public","signature":"fn fs_move_path(src: String, dest: String) -> Unit","source_path":"stdlib/fs.kn","line":637,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_try_remove_file","qualified_name":"std::fs::fs_try_remove_file","kind":"function","visibility":"public","signature":"fn fs_try_remove_file(path: String) -> FsOpResult","source_path":"stdlib/fs.kn","line":640,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_remove_file","qualified_name":"std::fs::fs_remove_file","kind":"function","visibility":"public","signature":"fn fs_remove_file(path: String) -> Unit","source_path":"stdlib/fs.kn","line":643,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_try_remove_dir_all","qualified_name":"std::fs::fs_try_remove_dir_all","kind":"function","visibility":"public","signature":"fn fs_try_remove_dir_all(path: String) -> FsOpResult","source_path":"stdlib/fs.kn","line":646,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_remove_dir_all","qualified_name":"std::fs::fs_remove_dir_all","kind":"function","visibility":"public","signature":"fn fs_remove_dir_all(path: String) -> Unit","source_path":"stdlib/fs.kn","line":649,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_temp_file","qualified_name":"std::fs::fs_temp_file","kind":"function","visibility":"public","signature":"fn fs_temp_file(prefix: String) -> String","source_path":"stdlib/fs.kn","line":652,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_temp_dir","qualified_name":"std::fs::fs_temp_dir","kind":"function","visibility":"public","signature":"fn fs_temp_dir(prefix: String) -> String","source_path":"stdlib/fs.kn","line":655,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_hash_file","qualified_name":"std::fs::fs_hash_file","kind":"function","visibility":"public","signature":"fn fs_hash_file(path: String) -> String","source_path":"stdlib/fs.kn","line":658,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_path_join","qualified_name":"std::fs::fs_path_join","kind":"function","visibility":"public","signature":"fn fs_path_join(base: String, child: String) -> String","source_path":"stdlib/fs.kn","line":661,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_path_parent","qualified_name":"std::fs::fs_path_parent","kind":"function","visibility":"public","signature":"fn fs_path_parent(path: String) -> String","source_path":"stdlib/fs.kn","line":664,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_path_file_name","qualified_name":"std::fs::fs_path_file_name","kind":"function","visibility":"public","signature":"fn fs_path_file_name(path: String) -> String","source_path":"stdlib/fs.kn","line":667,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_path_extension","qualified_name":"std::fs::fs_path_extension","kind":"function","visibility":"public","signature":"fn fs_path_extension(path: String) -> String","source_path":"stdlib/fs.kn","line":670,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_path_stem","qualified_name":"std::fs::fs_path_stem","kind":"function","visibility":"public","signature":"fn fs_path_stem(path: String) -> String","source_path":"stdlib/fs.kn","line":673,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_last_status","qualified_name":"std::fs::fs_last_status","kind":"function","visibility":"public","signature":"fn fs_last_status() -> Int","source_path":"stdlib/fs.kn","line":677,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_last_error_kind","qualified_name":"std::fs::fs_last_error_kind","kind":"function","visibility":"public","signature":"fn fs_last_error_kind() -> String","source_path":"stdlib/fs.kn","line":680,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_last_error_message","qualified_name":"std::fs::fs_last_error_message","kind":"function","visibility":"public","signature":"fn fs_last_error_message() -> String","source_path":"stdlib/fs.kn","line":683,"attributes":[],"docs":[],"target_notes":[]},{"name":"File","qualified_name":"std::fs::File","kind":"struct","visibility":"public","signature":"struct File","source_path":"stdlib/fs.kn","line":687,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_open","qualified_name":"std::fs::fs_open","kind":"function","visibility":"public","signature":"fn fs_open(path: String, mode: String) -> File","source_path":"stdlib/fs.kn","line":690,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_close","qualified_name":"std::fs::fs_close","kind":"function","visibility":"public","signature":"fn fs_close(file: File) -> Int","source_path":"stdlib/fs.kn","line":694,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_read","qualified_name":"std::fs::fs_read","kind":"function","visibility":"public","signature":"fn fs_read(file: File, buffer: ptr, byte_count: Int) -> Int","source_path":"stdlib/fs.kn","line":699,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_write","qualified_name":"std::fs::fs_write","kind":"function","visibility":"public","signature":"fn fs_write(file: File, buffer: ptr, byte_count: Int) -> Int","source_path":"stdlib/fs.kn","line":704,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_seek","qualified_name":"std::fs::fs_seek","kind":"function","visibility":"public","signature":"fn fs_seek(file: File, offset: Int, origin: Int) -> Int","source_path":"stdlib/fs.kn","line":709,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_tell","qualified_name":"std::fs::fs_tell","kind":"function","visibility":"public","signature":"fn fs_tell(file: File) -> Int","source_path":"stdlib/fs.kn","line":714,"attributes":[],"docs":[],"target_notes":[]},{"name":"fs_flush","qualified_name":"std::fs::fs_flush","kind":"function","visibility":"public","signature":"fn fs_flush(file: File) -> Int","source_path":"stdlib/fs.kn","line":719,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"gen_server","import_path":"std::gen_server","source_path":"stdlib/gen_server.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"GenServerCallOutcome","qualified_name":"std::gen_server::GenServerCallOutcome","kind":"struct","visibility":"private","signature":"struct GenServerCallOutcome","source_path":"stdlib/gen_server.kn","line":7,"attributes":[],"docs":[],"target_notes":[]},{"name":"GenServer","qualified_name":"std::gen_server::GenServer","kind":"actor","visibility":"public","signature":"actor GenServer","source_path":"stdlib/gen_server.kn","line":11,"attributes":[],"docs":[],"target_notes":["actor runtime semantics"]},{"name":"gen_server_call_result","qualified_name":"std::gen_server::gen_server_call_result","kind":"function","visibility":"public","signature":"fn gen_server_call_result(reply: R, state: S) -> GenServerCallOutcome","source_path":"stdlib/gen_server.kn","line":31,"attributes":[],"docs":[],"target_notes":[]},{"name":"gen_server_start","qualified_name":"std::gen_server::gen_server_start","kind":"function","visibility":"public","signature":"fn gen_server_start(state: S, handle_call: fn(M, S) -> GenServerCallOutcome, handle_cast: fn(M, S) -> S, handle_info: fn(M, S) -> S) -> GenServer","source_path":"stdlib/gen_server.kn","line":34,"attributes":[],"docs":[],"target_notes":[]},{"name":"gen_server_start_link","qualified_name":"std::gen_server::gen_server_start_link","kind":"function","visibility":"public","signature":"fn gen_server_start_link(state: S, handle_call: fn(M, S) -> GenServerCallOutcome, handle_cast: fn(M, S) -> S, handle_info: fn(M, S) -> S) -> GenServer","source_path":"stdlib/gen_server.kn","line":42,"attributes":[],"docs":[],"target_notes":[]},{"name":"gen_server_call","qualified_name":"std::gen_server::gen_server_call","kind":"function","visibility":"public","signature":"fn gen_server_call(server: GenServer, request: M) -> R","source_path":"stdlib/gen_server.kn","line":45,"attributes":[],"docs":[],"target_notes":[]},{"name":"gen_server_cast","qualified_name":"std::gen_server::gen_server_cast","kind":"function","visibility":"public","signature":"fn gen_server_cast(server: GenServer, request: M) -> Unit","source_path":"stdlib/gen_server.kn","line":49,"attributes":[],"docs":[],"target_notes":[]},{"name":"gen_server_info","qualified_name":"std::gen_server::gen_server_info","kind":"function","visibility":"public","signature":"fn gen_server_info(server: GenServer, message: M) -> Unit","source_path":"stdlib/gen_server.kn","line":52,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"gpu","import_path":"std::gpu","source_path":"stdlib/gpu.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"GPU_STAGE_VERTEX","qualified_name":"std::gpu::GPU_STAGE_VERTEX","kind":"const","visibility":"public","signature":"const GPU_STAGE_VERTEX: Int","source_path":"stdlib/gpu.kn","line":7,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_STAGE_FRAGMENT","qualified_name":"std::gpu::GPU_STAGE_FRAGMENT","kind":"const","visibility":"public","signature":"const GPU_STAGE_FRAGMENT: Int","source_path":"stdlib/gpu.kn","line":8,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_STAGE_COMPUTE","qualified_name":"std::gpu::GPU_STAGE_COMPUTE","kind":"const","visibility":"public","signature":"const GPU_STAGE_COMPUTE: Int","source_path":"stdlib/gpu.kn","line":9,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_STAGE_TASK","qualified_name":"std::gpu::GPU_STAGE_TASK","kind":"const","visibility":"public","signature":"const GPU_STAGE_TASK: Int","source_path":"stdlib/gpu.kn","line":10,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_STAGE_MESH","qualified_name":"std::gpu::GPU_STAGE_MESH","kind":"const","visibility":"public","signature":"const GPU_STAGE_MESH: Int","source_path":"stdlib/gpu.kn","line":11,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_STAGE_RAYGEN","qualified_name":"std::gpu::GPU_STAGE_RAYGEN","kind":"const","visibility":"public","signature":"const GPU_STAGE_RAYGEN: Int","source_path":"stdlib/gpu.kn","line":12,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_STAGE_ANY_HIT","qualified_name":"std::gpu::GPU_STAGE_ANY_HIT","kind":"const","visibility":"public","signature":"const GPU_STAGE_ANY_HIT: Int","source_path":"stdlib/gpu.kn","line":13,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_STAGE_CLOSEST_HIT","qualified_name":"std::gpu::GPU_STAGE_CLOSEST_HIT","kind":"const","visibility":"public","signature":"const GPU_STAGE_CLOSEST_HIT: Int","source_path":"stdlib/gpu.kn","line":14,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_STAGE_MISS","qualified_name":"std::gpu::GPU_STAGE_MISS","kind":"const","visibility":"public","signature":"const GPU_STAGE_MISS: Int","source_path":"stdlib/gpu.kn","line":15,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_STAGE_INTERSECTION","qualified_name":"std::gpu::GPU_STAGE_INTERSECTION","kind":"const","visibility":"public","signature":"const GPU_STAGE_INTERSECTION: Int","source_path":"stdlib/gpu.kn","line":16,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_STAGE_CALLABLE","qualified_name":"std::gpu::GPU_STAGE_CALLABLE","kind":"const","visibility":"public","signature":"const GPU_STAGE_CALLABLE: Int","source_path":"stdlib/gpu.kn","line":17,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_STAGE_COPY","qualified_name":"std::gpu::GPU_STAGE_COPY","kind":"const","visibility":"public","signature":"const GPU_STAGE_COPY: Int","source_path":"stdlib/gpu.kn","line":18,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_STAGE_RESOLVE","qualified_name":"std::gpu::GPU_STAGE_RESOLVE","kind":"const","visibility":"public","signature":"const GPU_STAGE_RESOLVE: Int","source_path":"stdlib/gpu.kn","line":19,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_STAGE_ALL_GRAPHICS","qualified_name":"std::gpu::GPU_STAGE_ALL_GRAPHICS","kind":"const","visibility":"public","signature":"const GPU_STAGE_ALL_GRAPHICS: Int","source_path":"stdlib/gpu.kn","line":20,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_STAGE_ALL_RAYTRACING","qualified_name":"std::gpu::GPU_STAGE_ALL_RAYTRACING","kind":"const","visibility":"public","signature":"const GPU_STAGE_ALL_RAYTRACING: Int","source_path":"stdlib/gpu.kn","line":21,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_STAGE_ALL","qualified_name":"std::gpu::GPU_STAGE_ALL","kind":"const","visibility":"public","signature":"const GPU_STAGE_ALL: Int","source_path":"stdlib/gpu.kn","line":22,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_QUEUE_GRAPHICS","qualified_name":"std::gpu::GPU_QUEUE_GRAPHICS","kind":"const","visibility":"public","signature":"const GPU_QUEUE_GRAPHICS: Int","source_path":"stdlib/gpu.kn","line":24,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_QUEUE_COMPUTE","qualified_name":"std::gpu::GPU_QUEUE_COMPUTE","kind":"const","visibility":"public","signature":"const GPU_QUEUE_COMPUTE: Int","source_path":"stdlib/gpu.kn","line":25,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_QUEUE_TRANSFER","qualified_name":"std::gpu::GPU_QUEUE_TRANSFER","kind":"const","visibility":"public","signature":"const GPU_QUEUE_TRANSFER: Int","source_path":"stdlib/gpu.kn","line":26,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_QUEUE_PRESENT","qualified_name":"std::gpu::GPU_QUEUE_PRESENT","kind":"const","visibility":"public","signature":"const GPU_QUEUE_PRESENT: Int","source_path":"stdlib/gpu.kn","line":27,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_QUEUE_HOST","qualified_name":"std::gpu::GPU_QUEUE_HOST","kind":"const","visibility":"public","signature":"const GPU_QUEUE_HOST: Int","source_path":"stdlib/gpu.kn","line":28,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_QUEUE_ASYNC","qualified_name":"std::gpu::GPU_QUEUE_ASYNC","kind":"const","visibility":"public","signature":"const GPU_QUEUE_ASYNC: Int","source_path":"stdlib/gpu.kn","line":29,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_ACCESS_READ","qualified_name":"std::gpu::GPU_ACCESS_READ","kind":"const","visibility":"public","signature":"const GPU_ACCESS_READ: Int","source_path":"stdlib/gpu.kn","line":31,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_ACCESS_WRITE","qualified_name":"std::gpu::GPU_ACCESS_WRITE","kind":"const","visibility":"public","signature":"const GPU_ACCESS_WRITE: Int","source_path":"stdlib/gpu.kn","line":32,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_ACCESS_ATOMIC","qualified_name":"std::gpu::GPU_ACCESS_ATOMIC","kind":"const","visibility":"public","signature":"const GPU_ACCESS_ATOMIC: Int","source_path":"stdlib/gpu.kn","line":33,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_ACCESS_PERSISTENT_MAP","qualified_name":"std::gpu::GPU_ACCESS_PERSISTENT_MAP","kind":"const","visibility":"public","signature":"const GPU_ACCESS_PERSISTENT_MAP: Int","source_path":"stdlib/gpu.kn","line":34,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_ACCESS_READ_WRITE","qualified_name":"std::gpu::GPU_ACCESS_READ_WRITE","kind":"const","visibility":"public","signature":"const GPU_ACCESS_READ_WRITE: Int","source_path":"stdlib/gpu.kn","line":35,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_RESIDENCY_HOST_VISIBLE","qualified_name":"std::gpu::GPU_RESIDENCY_HOST_VISIBLE","kind":"const","visibility":"public","signature":"const GPU_RESIDENCY_HOST_VISIBLE: Int","source_path":"stdlib/gpu.kn","line":37,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_RESIDENCY_HOST_COHERENT","qualified_name":"std::gpu::GPU_RESIDENCY_HOST_COHERENT","kind":"const","visibility":"public","signature":"const GPU_RESIDENCY_HOST_COHERENT: Int","source_path":"stdlib/gpu.kn","line":38,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_RESIDENCY_DEVICE_LOCAL","qualified_name":"std::gpu::GPU_RESIDENCY_DEVICE_LOCAL","kind":"const","visibility":"public","signature":"const GPU_RESIDENCY_DEVICE_LOCAL: Int","source_path":"stdlib/gpu.kn","line":39,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_RESIDENCY_SHARED","qualified_name":"std::gpu::GPU_RESIDENCY_SHARED","kind":"const","visibility":"public","signature":"const GPU_RESIDENCY_SHARED: Int","source_path":"stdlib/gpu.kn","line":40,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_RESIDENCY_IMPORTED","qualified_name":"std::gpu::GPU_RESIDENCY_IMPORTED","kind":"const","visibility":"public","signature":"const GPU_RESIDENCY_IMPORTED: Int","source_path":"stdlib/gpu.kn","line":41,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_RESIDENCY_READBACK","qualified_name":"std::gpu::GPU_RESIDENCY_READBACK","kind":"const","visibility":"public","signature":"const GPU_RESIDENCY_READBACK: Int","source_path":"stdlib/gpu.kn","line":42,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_RESIDENCY_UPLOAD","qualified_name":"std::gpu::GPU_RESIDENCY_UPLOAD","kind":"const","visibility":"public","signature":"const GPU_RESIDENCY_UPLOAD: Int","source_path":"stdlib/gpu.kn","line":43,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_RESIDENCY_PERSISTENT","qualified_name":"std::gpu::GPU_RESIDENCY_PERSISTENT","kind":"const","visibility":"public","signature":"const GPU_RESIDENCY_PERSISTENT: Int","source_path":"stdlib/gpu.kn","line":44,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_RESIDENCY_ZERO_COPY","qualified_name":"std::gpu::GPU_RESIDENCY_ZERO_COPY","kind":"const","visibility":"public","signature":"const GPU_RESIDENCY_ZERO_COPY: Int","source_path":"stdlib/gpu.kn","line":45,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_RESIDENCY_LAZILY_ALLOCATED","qualified_name":"std::gpu::GPU_RESIDENCY_LAZILY_ALLOCATED","kind":"const","visibility":"public","signature":"const GPU_RESIDENCY_LAZILY_ALLOCATED: Int","source_path":"stdlib/gpu.kn","line":46,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_RESIDENCY_SPARSE","qualified_name":"std::gpu::GPU_RESIDENCY_SPARSE","kind":"const","visibility":"public","signature":"const GPU_RESIDENCY_SPARSE: Int","source_path":"stdlib/gpu.kn","line":47,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_BUFFER_USAGE_TRANSFER_SRC","qualified_name":"std::gpu::GPU_BUFFER_USAGE_TRANSFER_SRC","kind":"const","visibility":"public","signature":"const GPU_BUFFER_USAGE_TRANSFER_SRC: Int","source_path":"stdlib/gpu.kn","line":49,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_BUFFER_USAGE_TRANSFER_DST","qualified_name":"std::gpu::GPU_BUFFER_USAGE_TRANSFER_DST","kind":"const","visibility":"public","signature":"const GPU_BUFFER_USAGE_TRANSFER_DST: Int","source_path":"stdlib/gpu.kn","line":50,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_BUFFER_USAGE_STORAGE","qualified_name":"std::gpu::GPU_BUFFER_USAGE_STORAGE","kind":"const","visibility":"public","signature":"const GPU_BUFFER_USAGE_STORAGE: Int","source_path":"stdlib/gpu.kn","line":51,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_BUFFER_USAGE_UNIFORM","qualified_name":"std::gpu::GPU_BUFFER_USAGE_UNIFORM","kind":"const","visibility":"public","signature":"const GPU_BUFFER_USAGE_UNIFORM: Int","source_path":"stdlib/gpu.kn","line":52,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_BUFFER_USAGE_VERTEX","qualified_name":"std::gpu::GPU_BUFFER_USAGE_VERTEX","kind":"const","visibility":"public","signature":"const GPU_BUFFER_USAGE_VERTEX: Int","source_path":"stdlib/gpu.kn","line":53,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_BUFFER_USAGE_INDEX","qualified_name":"std::gpu::GPU_BUFFER_USAGE_INDEX","kind":"const","visibility":"public","signature":"const GPU_BUFFER_USAGE_INDEX: Int","source_path":"stdlib/gpu.kn","line":54,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_BUFFER_USAGE_INDIRECT","qualified_name":"std::gpu::GPU_BUFFER_USAGE_INDIRECT","kind":"const","visibility":"public","signature":"const GPU_BUFFER_USAGE_INDIRECT: Int","source_path":"stdlib/gpu.kn","line":55,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_BUFFER_USAGE_ACCELERATION_STRUCTURE","qualified_name":"std::gpu::GPU_BUFFER_USAGE_ACCELERATION_STRUCTURE","kind":"const","visibility":"public","signature":"const GPU_BUFFER_USAGE_ACCELERATION_STRUCTURE: Int","source_path":"stdlib/gpu.kn","line":56,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_BUFFER_USAGE_SHADER_BINDING_TABLE","qualified_name":"std::gpu::GPU_BUFFER_USAGE_SHADER_BINDING_TABLE","kind":"const","visibility":"public","signature":"const GPU_BUFFER_USAGE_SHADER_BINDING_TABLE: Int","source_path":"stdlib/gpu.kn","line":57,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_IMAGE_USAGE_TRANSFER_SRC","qualified_name":"std::gpu::GPU_IMAGE_USAGE_TRANSFER_SRC","kind":"const","visibility":"public","signature":"const GPU_IMAGE_USAGE_TRANSFER_SRC: Int","source_path":"stdlib/gpu.kn","line":59,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_IMAGE_USAGE_TRANSFER_DST","qualified_name":"std::gpu::GPU_IMAGE_USAGE_TRANSFER_DST","kind":"const","visibility":"public","signature":"const GPU_IMAGE_USAGE_TRANSFER_DST: Int","source_path":"stdlib/gpu.kn","line":60,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_IMAGE_USAGE_SAMPLED","qualified_name":"std::gpu::GPU_IMAGE_USAGE_SAMPLED","kind":"const","visibility":"public","signature":"const GPU_IMAGE_USAGE_SAMPLED: Int","source_path":"stdlib/gpu.kn","line":61,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_IMAGE_USAGE_STORAGE","qualified_name":"std::gpu::GPU_IMAGE_USAGE_STORAGE","kind":"const","visibility":"public","signature":"const GPU_IMAGE_USAGE_STORAGE: Int","source_path":"stdlib/gpu.kn","line":62,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_IMAGE_USAGE_COLOR_ATTACHMENT","qualified_name":"std::gpu::GPU_IMAGE_USAGE_COLOR_ATTACHMENT","kind":"const","visibility":"public","signature":"const GPU_IMAGE_USAGE_COLOR_ATTACHMENT: Int","source_path":"stdlib/gpu.kn","line":63,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT","qualified_name":"std::gpu::GPU_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT","kind":"const","visibility":"public","signature":"const GPU_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT: Int","source_path":"stdlib/gpu.kn","line":64,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_IMAGE_USAGE_INPUT_ATTACHMENT","qualified_name":"std::gpu::GPU_IMAGE_USAGE_INPUT_ATTACHMENT","kind":"const","visibility":"public","signature":"const GPU_IMAGE_USAGE_INPUT_ATTACHMENT: Int","source_path":"stdlib/gpu.kn","line":65,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_IMAGE_USAGE_PRESENT","qualified_name":"std::gpu::GPU_IMAGE_USAGE_PRESENT","kind":"const","visibility":"public","signature":"const GPU_IMAGE_USAGE_PRESENT: Int","source_path":"stdlib/gpu.kn","line":66,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_IMAGE_USAGE_TRANSIENT","qualified_name":"std::gpu::GPU_IMAGE_USAGE_TRANSIENT","kind":"const","visibility":"public","signature":"const GPU_IMAGE_USAGE_TRANSIENT: Int","source_path":"stdlib/gpu.kn","line":67,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_DESCRIPTOR_RAW_BUFFER","qualified_name":"std::gpu::GPU_DESCRIPTOR_RAW_BUFFER","kind":"const","visibility":"public","signature":"const GPU_DESCRIPTOR_RAW_BUFFER: String","source_path":"stdlib/gpu.kn","line":69,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_DESCRIPTOR_RAW_IMAGE","qualified_name":"std::gpu::GPU_DESCRIPTOR_RAW_IMAGE","kind":"const","visibility":"public","signature":"const GPU_DESCRIPTOR_RAW_IMAGE: String","source_path":"stdlib/gpu.kn","line":70,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_DESCRIPTOR_STORAGE_BUFFER","qualified_name":"std::gpu::GPU_DESCRIPTOR_STORAGE_BUFFER","kind":"const","visibility":"public","signature":"const GPU_DESCRIPTOR_STORAGE_BUFFER: String","source_path":"stdlib/gpu.kn","line":71,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_DESCRIPTOR_UNIFORM_BUFFER","qualified_name":"std::gpu::GPU_DESCRIPTOR_UNIFORM_BUFFER","kind":"const","visibility":"public","signature":"const GPU_DESCRIPTOR_UNIFORM_BUFFER: String","source_path":"stdlib/gpu.kn","line":72,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_DESCRIPTOR_SAMPLED_IMAGE","qualified_name":"std::gpu::GPU_DESCRIPTOR_SAMPLED_IMAGE","kind":"const","visibility":"public","signature":"const GPU_DESCRIPTOR_SAMPLED_IMAGE: String","source_path":"stdlib/gpu.kn","line":73,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_DESCRIPTOR_STORAGE_IMAGE","qualified_name":"std::gpu::GPU_DESCRIPTOR_STORAGE_IMAGE","kind":"const","visibility":"public","signature":"const GPU_DESCRIPTOR_STORAGE_IMAGE: String","source_path":"stdlib/gpu.kn","line":74,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_DESCRIPTOR_ACCELERATION_STRUCTURE","qualified_name":"std::gpu::GPU_DESCRIPTOR_ACCELERATION_STRUCTURE","kind":"const","visibility":"public","signature":"const GPU_DESCRIPTOR_ACCELERATION_STRUCTURE: String","source_path":"stdlib/gpu.kn","line":75,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_LAYOUT_TIGHT","qualified_name":"std::gpu::GPU_LAYOUT_TIGHT","kind":"const","visibility":"public","signature":"const GPU_LAYOUT_TIGHT: String","source_path":"stdlib/gpu.kn","line":77,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_LAYOUT_PACKED","qualified_name":"std::gpu::GPU_LAYOUT_PACKED","kind":"const","visibility":"public","signature":"const GPU_LAYOUT_PACKED: String","source_path":"stdlib/gpu.kn","line":78,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_LAYOUT_STD140","qualified_name":"std::gpu::GPU_LAYOUT_STD140","kind":"const","visibility":"public","signature":"const GPU_LAYOUT_STD140: String","source_path":"stdlib/gpu.kn","line":79,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_LAYOUT_STD430","qualified_name":"std::gpu::GPU_LAYOUT_STD430","kind":"const","visibility":"public","signature":"const GPU_LAYOUT_STD430: String","source_path":"stdlib/gpu.kn","line":80,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_LAYOUT_CBUFFER","qualified_name":"std::gpu::GPU_LAYOUT_CBUFFER","kind":"const","visibility":"public","signature":"const GPU_LAYOUT_CBUFFER: String","source_path":"stdlib/gpu.kn","line":81,"attributes":[],"docs":[],"target_notes":[]},{"name":"GPU_LAYOUT_RASTER_HWC","qualified_name":"std::gpu::GPU_LAYOUT_RASTER_HWC","kind":"const","visibility":"public","signature":"const GPU_LAYOUT_RASTER_HWC: String","source_path":"stdlib/gpu.kn","line":82,"attributes":[],"docs":[],"target_notes":[]},{"name":"GpuBackendState","qualified_name":"std::gpu::GpuBackendState","kind":"struct","visibility":"public","signature":"struct GpuBackendState","source_path":"stdlib/gpu.kn","line":84,"attributes":[],"docs":[],"target_notes":[]},{"name":"GpuMemoryPolicy","qualified_name":"std::gpu::GpuMemoryPolicy","kind":"struct","visibility":"public","signature":"struct GpuMemoryPolicy","source_path":"stdlib/gpu.kn","line":90,"attributes":[],"docs":[],"target_notes":[]},{"name":"GpuResourcePolicy","qualified_name":"std::gpu::GpuResourcePolicy","kind":"struct","visibility":"public","signature":"struct GpuResourcePolicy","source_path":"stdlib/gpu.kn","line":97,"attributes":[],"docs":[],"target_notes":[]},{"name":"GpuBindingPlan","qualified_name":"std::gpu::GpuBindingPlan","kind":"struct","visibility":"public","signature":"struct GpuBindingPlan","source_path":"stdlib/gpu.kn","line":102,"attributes":[],"docs":[],"target_notes":[]},{"name":"GpuBuffer","qualified_name":"std::gpu::GpuBuffer","kind":"struct","visibility":"public","signature":"struct GpuBuffer","source_path":"stdlib/gpu.kn","line":109,"attributes":[],"docs":[],"target_notes":[]},{"name":"GpuImage","qualified_name":"std::gpu::GpuImage","kind":"struct","visibility":"public","signature":"struct GpuImage","source_path":"stdlib/gpu.kn","line":118,"attributes":[],"docs":[],"target_notes":[]},{"name":"GpuBufferDescriptorInfo","qualified_name":"std::gpu::GpuBufferDescriptorInfo","kind":"struct","visibility":"public","signature":"struct GpuBufferDescriptorInfo","source_path":"stdlib/gpu.kn","line":127,"attributes":[],"docs":[],"target_notes":[]},{"name":"gpu_has_flags","qualified_name":"std::gpu::gpu_has_flags","kind":"function","visibility":"public","signature":"fn gpu_has_flags(value: Int, flags: Int) -> Bool","source_path":"stdlib/gpu.kn","line":166,"attributes":[],"docs":[],"target_notes":[]},{"name":"gpu_align_up_bytes","qualified_name":"std::gpu::gpu_align_up_bytes","kind":"function","visibility":"public","signature":"fn gpu_align_up_bytes(value: Int, alignment_bytes: Int) -> Int","source_path":"stdlib/gpu.kn","line":169,"attributes":[],"docs":[],"target_notes":[]},{"name":"gpu_layout","qualified_name":"std::gpu::gpu_layout","kind":"function","visibility":"public","signature":"fn gpu_layout(size_bytes: Int, alignment_bytes: Int) -> GpuLayoutInfo","source_path":"stdlib/gpu.kn","line":172,"attributes":[],"docs":[],"target_notes":[]},{"name":"gpu_std140_vec3","qualified_name":"std::gpu::gpu_std140_vec3","kind":"function","visibility":"public","signature":"fn gpu_std140_vec3(value: Vec3) -> Std140","source_path":"stdlib/gpu.kn","line":175,"attributes":[],"docs":[],"target_notes":[]},{"name":"gpu_std140_vec4","qualified_name":"std::gpu::gpu_std140_vec4","kind":"function","visibility":"public","signature":"fn gpu_std140_vec4(value: Vec4) -> Std140","source_path":"stdlib/gpu.kn","line":178,"attributes":[],"docs":[],"target_notes":[]},{"name":"gpu_std140_mat3","qualified_name":"std::gpu::gpu_std140_mat3","kind":"function","visibility":"public","signature":"fn gpu_std140_mat3(value: Mat3) -> Std140","source_path":"stdlib/gpu.kn","line":181,"attributes":[],"docs":[],"target_notes":[]},{"name":"gpu_std140_mat4","qualified_name":"std::gpu::gpu_std140_mat4","kind":"function","visibility":"public","signature":"fn gpu_std140_mat4(value: Mat4) -> Std140","source_path":"stdlib/gpu.kn","line":184,"attributes":[],"docs":[],"target_notes":[]},{"name":"gpu_std430_vec3a","qualified_name":"std::gpu::gpu_std430_vec3a","kind":"function","visibility":"public","signature":"fn gpu_std430_vec3a(value: Vec3A) -> Std430","source_path":"stdlib/gpu.kn","line":187,"attributes":[],"docs":[],"target_notes":[]},{"name":"gpu_std430_vec4","qualified_name":"std::gpu::gpu_std430_vec4","kind":"function","visibility":"public","signature":"fn gpu_std430_vec4(value: Vec4) -> Std430","source_path":"stdlib/gpu.kn","line":190,"attributes":[],"docs":[],"target_notes":[]},{"name":"gpu_cbuffer_mat4","qualified_name":"std::gpu::gpu_cbuffer_mat4","kind":"function","visibility":"public","signature":"fn gpu_cbuffer_mat4(value: Mat4) -> CBuffer","source_path":"stdlib/gpu.kn","line":193,"attributes":[],"docs":[],"target_notes":[]},{"name":"gpu_std140_mat4_alignment_bytes","qualified_name":"std::gpu::gpu_std140_mat4_alignment_bytes","kind":"function","visibility":"public","signature":"fn gpu_std140_mat4_alignment_bytes(value: Std140) -> Int","source_path":"stdlib/gpu.kn","line":196,"attributes":[],"docs":[],"target_notes":[]},{"name":"gpu_std140_mat4_stride_bytes","qualified_name":"std::gpu::gpu_std140_mat4_stride_bytes","kind":"function","visibility":"public","signature":"fn gpu_std140_mat4_stride_bytes(value: Std140) -> Int","source_path":"stdlib/gpu.kn","line":199,"attributes":[],"docs":[],"target_notes":[]},{"name":"gpu_memory_policy","qualified_name":"std::gpu::gpu_memory_policy","kind":"function","visibility":"public","signature":"fn gpu_memory_policy(residency_flags: Int, access_flags: Int, queue_flags: Int, layout_kind: String, descriptor_kind: String) -> GpuMemoryPolicy","source_path":"stdlib/gpu.kn","line":202,"attributes":[],"docs":[],"target_notes":[]},{"name":"gpu_shared_memory_policy","qualified_name":"std::gpu::gpu_shared_memory_policy","kind":"function","visibility":"public","signature":"fn gpu_shared_memory_policy(access_flags: Int, queue_flags: Int, layout_kind: String, descriptor_kind: String) -> GpuMemoryPolicy","source_path":"stdlib/gpu.kn","line":211,"attributes":[],"docs":[],"target_notes":[]},{"name":"gpu_device_local_memory_policy","qualified_name":"std::gpu::gpu_device_local_memory_policy","kind":"function","visibility":"public","signature":"fn gpu_device_local_memory_policy(access_flags: Int, queue_flags: Int, layout_kind: String, descriptor_kind: String) -> GpuMemoryPolicy","source_path":"stdlib/gpu.kn","line":220,"attributes":[],"docs":[],"target_notes":[]},{"name":"gpu_upload_memory_policy","qualified_name":"std::gpu::gpu_upload_memory_policy","kind":"function","visibility":"public","signature":"fn gpu_upload_memory_policy(access_flags: Int, queue_flags: Int, layout_kind: String, descriptor_kind: String) -> GpuMemoryPolicy","source_path":"stdlib/gpu.kn","line":229,"attributes":[],"docs":[],"target_notes":[]},{"name":"gpu_readback_memory_policy","qualified_name":"std::gpu::gpu_readback_memory_policy","kind":"function","visibility":"public","signature":"fn gpu_readback_memory_policy(access_flags: Int, queue_flags: Int, layout_kind: String, descriptor_kind: String) -> GpuMemoryPolicy","source_path":"stdlib/gpu.kn","line":238,"attributes":[],"docs":[],"target_notes":[]},{"name":"gpu_resource_policy","qualified_name":"std::gpu::gpu_resource_policy","kind":"function","visibility":"public","signature":"fn gpu_resource_policy(memory: GpuMemoryPolicy, usage_flags: Int, debug_name: String) -> GpuResourcePolicy","source_path":"stdlib/gpu.kn","line":247,"attributes":[],"docs":[],"target_notes":[]},{"name":"gpu_binding_plan","qualified_name":"std::gpu::gpu_binding_plan","kind":"function","visibility":"public","signature":"fn gpu_binding_plan(binding: Int, descriptor_kind: String, stage_flags: Int, access_flags: Int, queue_flags: Int) -> GpuBindingPlan","source_path":"stdlib/gpu.kn","line":254,"attributes":[],"docs":[],"target_notes":[]},{"name":"gpu_storage_buffer_binding","qualified_name":"std::gpu::gpu_storage_buffer_binding","kind":"function","visibility":"public","signature":"fn gpu_storage_buffer_binding(binding: Int, stage_flags: Int, access_flags: Int, queue_flags: Int) -> GpuBindingPlan","source_path":"stdlib/gpu.kn","line":263,"attributes":[],"docs":[],"target_notes":[]},{"name":"gpu_uniform_buffer_binding","qualified_name":"std::gpu::gpu_uniform_buffer_binding","kind":"function","visibility":"public","signature":"fn gpu_uniform_buffer_binding(binding: Int, stage_flags: Int, queue_flags: Int) -> GpuBindingPlan","source_path":"stdlib/gpu.kn","line":266,"attributes":[],"docs":[],"target_notes":[]},{"name":"gpu_sampled_image_binding","qualified_name":"std::gpu::gpu_sampled_image_binding","kind":"function","visibility":"public","signature":"fn gpu_sampled_image_binding(binding: Int, stage_flags: Int, queue_flags: Int) -> GpuBindingPlan","source_path":"stdlib/gpu.kn","line":269,"attributes":[],"docs":[],"target_notes":[]},{"name":"gpu_storage_image_binding","qualified_name":"std::gpu::gpu_storage_image_binding","kind":"function","visibility":"public","signature":"fn gpu_storage_image_binding(binding: Int, stage_flags: Int, access_flags: Int, queue_flags: Int) -> GpuBindingPlan","source_path":"stdlib/gpu.kn","line":272,"attributes":[],"docs":[],"target_notes":[]},{"name":"gpu_descriptor_requires_read_only","qualified_name":"std::gpu::gpu_descriptor_requires_read_only","kind":"function","visibility":"public","signature":"fn gpu_descriptor_requires_read_only(descriptor_kind: String) -> Bool","source_path":"stdlib/gpu.kn","line":275,"attributes":[],"docs":[],"target_notes":[]},{"name":"gpu_policy_valid","qualified_name":"std::gpu::gpu_policy_valid","kind":"function","visibility":"public","signature":"fn gpu_policy_valid(policy: GpuResourcePolicy) -> Bool","source_path":"stdlib/gpu.kn","line":278,"attributes":[],"docs":[],"target_notes":[]},{"name":"gpu_binding_plan_valid","qualified_name":"std::gpu::gpu_binding_plan_valid","kind":"function","visibility":"public","signature":"fn gpu_binding_plan_valid(plan: GpuBindingPlan) -> Bool","source_path":"stdlib/gpu.kn","line":283,"attributes":[],"docs":[],"target_notes":[]},{"name":"gpu_backend_state","qualified_name":"std::gpu::gpu_backend_state","kind":"function","visibility":"public","signature":"fn gpu_backend_state(backend_id: String) -> GpuBackendState","source_path":"stdlib/gpu.kn","line":288,"attributes":[],"docs":[],"target_notes":[]},{"name":"gpu_backend_preferred","qualified_name":"std::gpu::gpu_backend_preferred","kind":"function","visibility":"public","signature":"fn gpu_backend_preferred() -> GpuBackendState","source_path":"stdlib/gpu.kn","line":296,"attributes":[],"docs":[],"target_notes":[]},{"name":"gpu_element_size_bytes","qualified_name":"std::gpu::gpu_element_size_bytes","kind":"function","visibility":"public","signature":"fn gpu_element_size_bytes(element_type: String) -> Int","source_path":"stdlib/gpu.kn","line":317,"attributes":[],"docs":[],"target_notes":[]},{"name":"gpu_element_count","qualified_name":"std::gpu::gpu_element_count","kind":"function","visibility":"public","signature":"fn gpu_element_count(shape: Array) -> Int","source_path":"stdlib/gpu.kn","line":335,"attributes":[],"docs":[],"target_notes":[]},{"name":"gpu_required_byte_length","qualified_name":"std::gpu::gpu_required_byte_length","kind":"function","visibility":"public","signature":"fn gpu_required_byte_length(element_type: String, shape: Array) -> Int","source_path":"stdlib/gpu.kn","line":345,"attributes":[],"docs":[],"target_notes":[]},{"name":"gpu_raster_byte_length","qualified_name":"std::gpu::gpu_raster_byte_length","kind":"function","visibility":"public","signature":"fn gpu_raster_byte_length(width: Int, height: Int, channels: Int) -> Int","source_path":"stdlib/gpu.kn","line":348,"attributes":[],"docs":[],"target_notes":[]},{"name":"gpu_zero_bytes","qualified_name":"std::gpu::gpu_zero_bytes","kind":"function","visibility":"public","signature":"fn gpu_zero_bytes(byte_length: Int) -> Array","source_path":"stdlib/gpu.kn","line":353,"attributes":[],"docs":[],"target_notes":[]},{"name":"gpu_import_shared_buffer","qualified_name":"std::gpu::gpu_import_shared_buffer","kind":"function","visibility":"public","signature":"fn gpu_import_shared_buffer(handle: Any, policy: GpuResourcePolicy) -> GpuBuffer","source_path":"stdlib/gpu.kn","line":361,"attributes":[],"docs":[],"target_notes":[]},{"name":"gpu_shared_buffer_from_bytes","qualified_name":"std::gpu::gpu_shared_buffer_from_bytes","kind":"function","visibility":"public","signature":"fn gpu_shared_buffer_from_bytes(bytes: Any, element_type: String, shape: Any, format: String, mime_type: String, policy: GpuResourcePolicy) -> GpuBuffer","source_path":"stdlib/gpu.kn","line":373,"attributes":[],"docs":[],"target_notes":[]},{"name":"gpu_shared_buffer_zeroed","qualified_name":"std::gpu::gpu_shared_buffer_zeroed","kind":"function","visibility":"public","signature":"fn gpu_shared_buffer_zeroed(element_type: String, shape: Array, format: String, mime_type: String, policy: GpuResourcePolicy) -> GpuBuffer","source_path":"stdlib/gpu.kn","line":377,"attributes":[],"docs":[],"target_notes":[]},{"name":"gpu_shared_buffer_bytes","qualified_name":"std::gpu::gpu_shared_buffer_bytes","kind":"function","visibility":"public","signature":"fn gpu_shared_buffer_bytes(buffer: GpuBuffer) -> Any","source_path":"stdlib/gpu.kn","line":387,"attributes":[],"docs":[],"target_notes":[]},{"name":"gpu_shared_buffer_replace_bytes","qualified_name":"std::gpu::gpu_shared_buffer_replace_bytes","kind":"function","visibility":"public","signature":"fn gpu_shared_buffer_replace_bytes(buffer: GpuBuffer, bytes: Any) -> GpuBuffer","source_path":"stdlib/gpu.kn","line":390,"attributes":[],"docs":[],"target_notes":[]},{"name":"gpu_import_shared_image","qualified_name":"std::gpu::gpu_import_shared_image","kind":"function","visibility":"public","signature":"fn gpu_import_shared_image(handle: Any, policy: GpuResourcePolicy) -> GpuImage","source_path":"stdlib/gpu.kn","line":394,"attributes":[],"docs":[],"target_notes":[]},{"name":"gpu_shared_image_from_bytes","qualified_name":"std::gpu::gpu_shared_image_from_bytes","kind":"function","visibility":"public","signature":"fn gpu_shared_image_from_bytes(bytes: Any, width: Int, height: Int, channels: Int, layout: String, pixel_format: String, mime_type: String, policy: GpuResourcePolicy) -> GpuImage","source_path":"stdlib/gpu.kn","line":406,"attributes":[],"docs":[],"target_notes":[]},{"name":"gpu_shared_image_zeroed","qualified_name":"std::gpu::gpu_shared_image_zeroed","kind":"function","visibility":"public","signature":"fn gpu_shared_image_zeroed(width: Int, height: Int, channels: Int, layout: String, pixel_format: String, mime_type: String, policy: GpuResourcePolicy) -> GpuImage","source_path":"stdlib/gpu.kn","line":410,"attributes":[],"docs":[],"target_notes":[]},{"name":"gpu_shared_image_bytes","qualified_name":"std::gpu::gpu_shared_image_bytes","kind":"function","visibility":"public","signature":"fn gpu_shared_image_bytes(image: GpuImage) -> Any","source_path":"stdlib/gpu.kn","line":422,"attributes":[],"docs":[],"target_notes":[]},{"name":"gpu_shared_image_replace_bytes","qualified_name":"std::gpu::gpu_shared_image_replace_bytes","kind":"function","visibility":"public","signature":"fn gpu_shared_image_replace_bytes(image: GpuImage, bytes: Any) -> GpuImage","source_path":"stdlib/gpu.kn","line":425,"attributes":[],"docs":[],"target_notes":[]},{"name":"gpu_buffer_descriptor","qualified_name":"std::gpu::gpu_buffer_descriptor","kind":"function","visibility":"public","signature":"fn gpu_buffer_descriptor(buffer: GpuBuffer) -> Any","source_path":"stdlib/gpu.kn","line":429,"attributes":[],"docs":[],"target_notes":[]},{"name":"gpu_buffer_descriptor_info","qualified_name":"std::gpu::gpu_buffer_descriptor_info","kind":"function","visibility":"public","signature":"fn gpu_buffer_descriptor_info(buffer: GpuBuffer) -> GpuBufferDescriptorInfo","source_path":"stdlib/gpu.kn","line":470,"attributes":[],"docs":[],"target_notes":[]},{"name":"gpu_image_descriptor","qualified_name":"std::gpu::gpu_image_descriptor","kind":"function","visibility":"public","signature":"fn gpu_image_descriptor(image: GpuImage) -> Any","source_path":"stdlib/gpu.kn","line":512,"attributes":[],"docs":[],"target_notes":[]},{"name":"gpu_binding_descriptor","qualified_name":"std::gpu::gpu_binding_descriptor","kind":"function","visibility":"public","signature":"fn gpu_binding_descriptor(binding: GpuBindingPlan) -> Any","source_path":"stdlib/gpu.kn","line":536,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"graphics","import_path":"std::graphics","source_path":"stdlib/graphics.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"abi_graphics_reset","qualified_name":"std::graphics::abi_graphics_reset","kind":"extern_function","visibility":"private","signature":"fn abi_graphics_reset() -> Int","source_path":"stdlib/graphics.kn","line":2,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_graphics_session_create","qualified_name":"std::graphics::abi_graphics_session_create","kind":"extern_function","visibility":"private","signature":"fn abi_graphics_session_create(app_name: String, width: Int, height: Int) -> Int","source_path":"stdlib/graphics.kn","line":5,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_graphics_session_destroy","qualified_name":"std::graphics::abi_graphics_session_destroy","kind":"extern_function","visibility":"private","signature":"fn abi_graphics_session_destroy(session_id: Int) -> Int","source_path":"stdlib/graphics.kn","line":8,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_graphics_session_count","qualified_name":"std::graphics::abi_graphics_session_count","kind":"extern_function","visibility":"private","signature":"fn abi_graphics_session_count() -> Int","source_path":"stdlib/graphics.kn","line":11,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_graphics_backend_supported","qualified_name":"std::graphics::abi_graphics_backend_supported","kind":"extern_function","visibility":"private","signature":"fn abi_graphics_backend_supported(backend_id: String) -> Int","source_path":"stdlib/graphics.kn","line":14,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_graphics_backend_available","qualified_name":"std::graphics::abi_graphics_backend_available","kind":"extern_function","visibility":"private","signature":"fn abi_graphics_backend_available(backend_id: String) -> Int","source_path":"stdlib/graphics.kn","line":17,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_graphics_backend_status","qualified_name":"std::graphics::abi_graphics_backend_status","kind":"extern_function","visibility":"private","signature":"fn abi_graphics_backend_status(backend_id: String) -> String","source_path":"stdlib/graphics.kn","line":20,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_graphics_backend_select","qualified_name":"std::graphics::abi_graphics_backend_select","kind":"extern_function","visibility":"private","signature":"fn abi_graphics_backend_select(session_id: Int, backend_id: String) -> Int","source_path":"stdlib/graphics.kn","line":23,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_graphics_active_backend","qualified_name":"std::graphics::abi_graphics_active_backend","kind":"extern_function","visibility":"private","signature":"fn abi_graphics_active_backend(session_id: Int) -> String","source_path":"stdlib/graphics.kn","line":26,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_graphics_begin_frame","qualified_name":"std::graphics::abi_graphics_begin_frame","kind":"extern_function","visibility":"private","signature":"fn abi_graphics_begin_frame(session_id: Int, delta_ms: Float) -> Int","source_path":"stdlib/graphics.kn","line":29,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_graphics_end_frame","qualified_name":"std::graphics::abi_graphics_end_frame","kind":"extern_function","visibility":"private","signature":"fn abi_graphics_end_frame(session_id: Int) -> Int","source_path":"stdlib/graphics.kn","line":32,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_graphics_present","qualified_name":"std::graphics::abi_graphics_present","kind":"extern_function","visibility":"private","signature":"fn abi_graphics_present(session_id: Int) -> Int","source_path":"stdlib/graphics.kn","line":35,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_graphics_frame_index","qualified_name":"std::graphics::abi_graphics_frame_index","kind":"extern_function","visibility":"private","signature":"fn abi_graphics_frame_index(session_id: Int) -> Int","source_path":"stdlib/graphics.kn","line":38,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_graphics_last_presented_frame","qualified_name":"std::graphics::abi_graphics_last_presented_frame","kind":"extern_function","visibility":"private","signature":"fn abi_graphics_last_presented_frame(session_id: Int) -> Int","source_path":"stdlib/graphics.kn","line":41,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_graphics_buffer_create","qualified_name":"std::graphics::abi_graphics_buffer_create","kind":"extern_function","visibility":"private","signature":"fn abi_graphics_buffer_create(session_id: Int, kind: String, label: String, byte_length: Int, element_stride: Int) -> Int","source_path":"stdlib/graphics.kn","line":44,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_graphics_buffer_create_from_hex","qualified_name":"std::graphics::abi_graphics_buffer_create_from_hex","kind":"extern_function","visibility":"private","signature":"fn abi_graphics_buffer_create_from_hex(session_id: Int, kind: String, label: String, bytes_hex: String, element_stride: Int) -> Int","source_path":"stdlib/graphics.kn","line":47,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_graphics_buffer_byte_length","qualified_name":"std::graphics::abi_graphics_buffer_byte_length","kind":"extern_function","visibility":"private","signature":"fn abi_graphics_buffer_byte_length(session_id: Int, buffer_id: Int) -> Int","source_path":"stdlib/graphics.kn","line":50,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_graphics_buffer_byte_at","qualified_name":"std::graphics::abi_graphics_buffer_byte_at","kind":"extern_function","visibility":"private","signature":"fn abi_graphics_buffer_byte_at(session_id: Int, buffer_id: Int, byte_offset: Int) -> Int","source_path":"stdlib/graphics.kn","line":53,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_graphics_buffer_kind","qualified_name":"std::graphics::abi_graphics_buffer_kind","kind":"extern_function","visibility":"private","signature":"fn abi_graphics_buffer_kind(session_id: Int, buffer_id: Int) -> String","source_path":"stdlib/graphics.kn","line":56,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_graphics_buffer_label","qualified_name":"std::graphics::abi_graphics_buffer_label","kind":"extern_function","visibility":"private","signature":"fn abi_graphics_buffer_label(session_id: Int, buffer_id: Int) -> String","source_path":"stdlib/graphics.kn","line":59,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_graphics_shader_spirv_from_hex","qualified_name":"std::graphics::abi_graphics_shader_spirv_from_hex","kind":"extern_function","visibility":"private","signature":"fn abi_graphics_shader_spirv_from_hex(session_id: Int, key: String, stage: String, entry_point: String, bytes_hex: String) -> Int","source_path":"stdlib/graphics.kn","line":62,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_graphics_shader_spirv_from_file","qualified_name":"std::graphics::abi_graphics_shader_spirv_from_file","kind":"extern_function","visibility":"private","signature":"fn abi_graphics_shader_spirv_from_file(session_id: Int, key: String, stage: String, entry_point: String, path: String) -> Int","source_path":"stdlib/graphics.kn","line":65,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_graphics_shader_byte_length","qualified_name":"std::graphics::abi_graphics_shader_byte_length","kind":"extern_function","visibility":"private","signature":"fn abi_graphics_shader_byte_length(session_id: Int, shader_id: Int) -> Int","source_path":"stdlib/graphics.kn","line":68,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_graphics_shader_byte_at","qualified_name":"std::graphics::abi_graphics_shader_byte_at","kind":"extern_function","visibility":"private","signature":"fn abi_graphics_shader_byte_at(session_id: Int, shader_id: Int, byte_offset: Int) -> Int","source_path":"stdlib/graphics.kn","line":71,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_graphics_shader_key","qualified_name":"std::graphics::abi_graphics_shader_key","kind":"extern_function","visibility":"private","signature":"fn abi_graphics_shader_key(session_id: Int, shader_id: Int) -> String","source_path":"stdlib/graphics.kn","line":74,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_graphics_shader_stage","qualified_name":"std::graphics::abi_graphics_shader_stage","kind":"extern_function","visibility":"private","signature":"fn abi_graphics_shader_stage(session_id: Int, shader_id: Int) -> String","source_path":"stdlib/graphics.kn","line":77,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_graphics_mesh_create","qualified_name":"std::graphics::abi_graphics_mesh_create","kind":"extern_function","visibility":"private","signature":"fn abi_graphics_mesh_create(session_id: Int, label: String, vertex_buffer_id: Int, index_buffer_id: Int, vertex_count: Int, index_count: Int) -> Int","source_path":"stdlib/graphics.kn","line":80,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_graphics_mesh_vertex_count","qualified_name":"std::graphics::abi_graphics_mesh_vertex_count","kind":"extern_function","visibility":"private","signature":"fn abi_graphics_mesh_vertex_count(session_id: Int, mesh_id: Int) -> Int","source_path":"stdlib/graphics.kn","line":83,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_graphics_mesh_index_count","qualified_name":"std::graphics::abi_graphics_mesh_index_count","kind":"extern_function","visibility":"private","signature":"fn abi_graphics_mesh_index_count(session_id: Int, mesh_id: Int) -> Int","source_path":"stdlib/graphics.kn","line":86,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_graphics_mesh_label","qualified_name":"std::graphics::abi_graphics_mesh_label","kind":"extern_function","visibility":"private","signature":"fn abi_graphics_mesh_label(session_id: Int, mesh_id: Int) -> String","source_path":"stdlib/graphics.kn","line":89,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_graphics_pipeline_create","qualified_name":"std::graphics::abi_graphics_pipeline_create","kind":"extern_function","visibility":"private","signature":"fn abi_graphics_pipeline_create(session_id: Int, label: String, vertex_shader_id: Int, fragment_shader_id: Int, backend_id: String) -> Int","source_path":"stdlib/graphics.kn","line":92,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_graphics_pipeline_label","qualified_name":"std::graphics::abi_graphics_pipeline_label","kind":"extern_function","visibility":"private","signature":"fn abi_graphics_pipeline_label(session_id: Int, pipeline_id: Int) -> String","source_path":"stdlib/graphics.kn","line":95,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_graphics_pipeline_backend","qualified_name":"std::graphics::abi_graphics_pipeline_backend","kind":"extern_function","visibility":"private","signature":"fn abi_graphics_pipeline_backend(session_id: Int, pipeline_id: Int) -> String","source_path":"stdlib/graphics.kn","line":98,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_graphics_draw_mesh","qualified_name":"std::graphics::abi_graphics_draw_mesh","kind":"extern_function","visibility":"private","signature":"fn abi_graphics_draw_mesh(session_id: Int, pipeline_id: Int, mesh_id: Int, instance_count: Int) -> Int","source_path":"stdlib/graphics.kn","line":101,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_graphics_draw_command_count","qualified_name":"std::graphics::abi_graphics_draw_command_count","kind":"extern_function","visibility":"private","signature":"fn abi_graphics_draw_command_count(session_id: Int) -> Int","source_path":"stdlib/graphics.kn","line":104,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_graphics_draw_command_kind","qualified_name":"std::graphics::abi_graphics_draw_command_kind","kind":"extern_function","visibility":"private","signature":"fn abi_graphics_draw_command_kind(session_id: Int, command_index: Int) -> String","source_path":"stdlib/graphics.kn","line":107,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_graphics_draw_command_mesh","qualified_name":"std::graphics::abi_graphics_draw_command_mesh","kind":"extern_function","visibility":"private","signature":"fn abi_graphics_draw_command_mesh(session_id: Int, command_index: Int) -> Int","source_path":"stdlib/graphics.kn","line":110,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_graphics_draw_command_pipeline","qualified_name":"std::graphics::abi_graphics_draw_command_pipeline","kind":"extern_function","visibility":"private","signature":"fn abi_graphics_draw_command_pipeline(session_id: Int, command_index: Int) -> Int","source_path":"stdlib/graphics.kn","line":113,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_graphics_draw_command_instances","qualified_name":"std::graphics::abi_graphics_draw_command_instances","kind":"extern_function","visibility":"private","signature":"fn abi_graphics_draw_command_instances(session_id: Int, command_index: Int) -> Int","source_path":"stdlib/graphics.kn","line":116,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_graphics_last_status","qualified_name":"std::graphics::abi_graphics_last_status","kind":"extern_function","visibility":"private","signature":"fn abi_graphics_last_status() -> Int","source_path":"stdlib/graphics.kn","line":119,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_graphics_last_error_kind","qualified_name":"std::graphics::abi_graphics_last_error_kind","kind":"extern_function","visibility":"private","signature":"fn abi_graphics_last_error_kind() -> String","source_path":"stdlib/graphics.kn","line":122,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_graphics_last_error_message","qualified_name":"std::graphics::abi_graphics_last_error_message","kind":"extern_function","visibility":"private","signature":"fn abi_graphics_last_error_message() -> String","source_path":"stdlib/graphics.kn","line":125,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"native_graphics_reset","qualified_name":"std::graphics::native_graphics_reset","kind":"function","visibility":"public","signature":"fn native_graphics_reset() -> Int","source_path":"stdlib/graphics.kn","line":127,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_graphics_session_create","qualified_name":"std::graphics::native_graphics_session_create","kind":"function","visibility":"public","signature":"fn native_graphics_session_create(app_name: String, width: Int, height: Int) -> Int","source_path":"stdlib/graphics.kn","line":130,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_graphics_session_destroy","qualified_name":"std::graphics::native_graphics_session_destroy","kind":"function","visibility":"public","signature":"fn native_graphics_session_destroy(session_id: Int) -> Int","source_path":"stdlib/graphics.kn","line":133,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_graphics_session_count","qualified_name":"std::graphics::native_graphics_session_count","kind":"function","visibility":"public","signature":"fn native_graphics_session_count() -> Int","source_path":"stdlib/graphics.kn","line":136,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_graphics_backend_supported","qualified_name":"std::graphics::native_graphics_backend_supported","kind":"function","visibility":"public","signature":"fn native_graphics_backend_supported(backend_id: String) -> Int","source_path":"stdlib/graphics.kn","line":139,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_graphics_backend_available","qualified_name":"std::graphics::native_graphics_backend_available","kind":"function","visibility":"public","signature":"fn native_graphics_backend_available(backend_id: String) -> Int","source_path":"stdlib/graphics.kn","line":142,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_graphics_backend_status","qualified_name":"std::graphics::native_graphics_backend_status","kind":"function","visibility":"public","signature":"fn native_graphics_backend_status(backend_id: String) -> String","source_path":"stdlib/graphics.kn","line":145,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_graphics_backend_select","qualified_name":"std::graphics::native_graphics_backend_select","kind":"function","visibility":"public","signature":"fn native_graphics_backend_select(session_id: Int, backend_id: String) -> Int","source_path":"stdlib/graphics.kn","line":148,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_graphics_active_backend","qualified_name":"std::graphics::native_graphics_active_backend","kind":"function","visibility":"public","signature":"fn native_graphics_active_backend(session_id: Int) -> String","source_path":"stdlib/graphics.kn","line":151,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_graphics_begin_frame","qualified_name":"std::graphics::native_graphics_begin_frame","kind":"function","visibility":"public","signature":"fn native_graphics_begin_frame(session_id: Int, delta_ms: Float) -> Int","source_path":"stdlib/graphics.kn","line":154,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_graphics_end_frame","qualified_name":"std::graphics::native_graphics_end_frame","kind":"function","visibility":"public","signature":"fn native_graphics_end_frame(session_id: Int) -> Int","source_path":"stdlib/graphics.kn","line":157,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_graphics_present","qualified_name":"std::graphics::native_graphics_present","kind":"function","visibility":"public","signature":"fn native_graphics_present(session_id: Int) -> Int","source_path":"stdlib/graphics.kn","line":160,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_graphics_frame_index","qualified_name":"std::graphics::native_graphics_frame_index","kind":"function","visibility":"public","signature":"fn native_graphics_frame_index(session_id: Int) -> Int","source_path":"stdlib/graphics.kn","line":163,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_graphics_last_presented_frame","qualified_name":"std::graphics::native_graphics_last_presented_frame","kind":"function","visibility":"public","signature":"fn native_graphics_last_presented_frame(session_id: Int) -> Int","source_path":"stdlib/graphics.kn","line":166,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_graphics_buffer_create","qualified_name":"std::graphics::native_graphics_buffer_create","kind":"function","visibility":"public","signature":"fn native_graphics_buffer_create(session_id: Int, kind: String, label: String, byte_length: Int, element_stride: Int) -> Int","source_path":"stdlib/graphics.kn","line":169,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_graphics_buffer_create_from_hex","qualified_name":"std::graphics::native_graphics_buffer_create_from_hex","kind":"function","visibility":"public","signature":"fn native_graphics_buffer_create_from_hex(session_id: Int, kind: String, label: String, bytes_hex: String, element_stride: Int) -> Int","source_path":"stdlib/graphics.kn","line":172,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_graphics_buffer_byte_length","qualified_name":"std::graphics::native_graphics_buffer_byte_length","kind":"function","visibility":"public","signature":"fn native_graphics_buffer_byte_length(session_id: Int, buffer_id: Int) -> Int","source_path":"stdlib/graphics.kn","line":175,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_graphics_buffer_byte_at","qualified_name":"std::graphics::native_graphics_buffer_byte_at","kind":"function","visibility":"public","signature":"fn native_graphics_buffer_byte_at(session_id: Int, buffer_id: Int, byte_offset: Int) -> Int","source_path":"stdlib/graphics.kn","line":178,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_graphics_buffer_kind","qualified_name":"std::graphics::native_graphics_buffer_kind","kind":"function","visibility":"public","signature":"fn native_graphics_buffer_kind(session_id: Int, buffer_id: Int) -> String","source_path":"stdlib/graphics.kn","line":181,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_graphics_buffer_label","qualified_name":"std::graphics::native_graphics_buffer_label","kind":"function","visibility":"public","signature":"fn native_graphics_buffer_label(session_id: Int, buffer_id: Int) -> String","source_path":"stdlib/graphics.kn","line":184,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_graphics_shader_spirv_from_hex","qualified_name":"std::graphics::native_graphics_shader_spirv_from_hex","kind":"function","visibility":"public","signature":"fn native_graphics_shader_spirv_from_hex(session_id: Int, key: String, stage: String, entry_point: String, bytes_hex: String) -> Int","source_path":"stdlib/graphics.kn","line":187,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_graphics_shader_spirv_from_file","qualified_name":"std::graphics::native_graphics_shader_spirv_from_file","kind":"function","visibility":"public","signature":"fn native_graphics_shader_spirv_from_file(session_id: Int, key: String, stage: String, entry_point: String, path: String) -> Int","source_path":"stdlib/graphics.kn","line":190,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_graphics_shader_byte_length","qualified_name":"std::graphics::native_graphics_shader_byte_length","kind":"function","visibility":"public","signature":"fn native_graphics_shader_byte_length(session_id: Int, shader_id: Int) -> Int","source_path":"stdlib/graphics.kn","line":193,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_graphics_shader_byte_at","qualified_name":"std::graphics::native_graphics_shader_byte_at","kind":"function","visibility":"public","signature":"fn native_graphics_shader_byte_at(session_id: Int, shader_id: Int, byte_offset: Int) -> Int","source_path":"stdlib/graphics.kn","line":196,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_graphics_shader_key","qualified_name":"std::graphics::native_graphics_shader_key","kind":"function","visibility":"public","signature":"fn native_graphics_shader_key(session_id: Int, shader_id: Int) -> String","source_path":"stdlib/graphics.kn","line":199,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_graphics_shader_stage","qualified_name":"std::graphics::native_graphics_shader_stage","kind":"function","visibility":"public","signature":"fn native_graphics_shader_stage(session_id: Int, shader_id: Int) -> String","source_path":"stdlib/graphics.kn","line":202,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_graphics_mesh_create","qualified_name":"std::graphics::native_graphics_mesh_create","kind":"function","visibility":"public","signature":"fn native_graphics_mesh_create(session_id: Int, label: String, vertex_buffer_id: Int, index_buffer_id: Int, vertex_count: Int, index_count: Int) -> Int","source_path":"stdlib/graphics.kn","line":205,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_graphics_mesh_vertex_count","qualified_name":"std::graphics::native_graphics_mesh_vertex_count","kind":"function","visibility":"public","signature":"fn native_graphics_mesh_vertex_count(session_id: Int, mesh_id: Int) -> Int","source_path":"stdlib/graphics.kn","line":208,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_graphics_mesh_index_count","qualified_name":"std::graphics::native_graphics_mesh_index_count","kind":"function","visibility":"public","signature":"fn native_graphics_mesh_index_count(session_id: Int, mesh_id: Int) -> Int","source_path":"stdlib/graphics.kn","line":211,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_graphics_mesh_label","qualified_name":"std::graphics::native_graphics_mesh_label","kind":"function","visibility":"public","signature":"fn native_graphics_mesh_label(session_id: Int, mesh_id: Int) -> String","source_path":"stdlib/graphics.kn","line":214,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_graphics_pipeline_create","qualified_name":"std::graphics::native_graphics_pipeline_create","kind":"function","visibility":"public","signature":"fn native_graphics_pipeline_create(session_id: Int, label: String, vertex_shader_id: Int, fragment_shader_id: Int, backend_id: String) -> Int","source_path":"stdlib/graphics.kn","line":217,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_graphics_pipeline_label","qualified_name":"std::graphics::native_graphics_pipeline_label","kind":"function","visibility":"public","signature":"fn native_graphics_pipeline_label(session_id: Int, pipeline_id: Int) -> String","source_path":"stdlib/graphics.kn","line":220,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_graphics_pipeline_backend","qualified_name":"std::graphics::native_graphics_pipeline_backend","kind":"function","visibility":"public","signature":"fn native_graphics_pipeline_backend(session_id: Int, pipeline_id: Int) -> String","source_path":"stdlib/graphics.kn","line":223,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_graphics_draw_mesh","qualified_name":"std::graphics::native_graphics_draw_mesh","kind":"function","visibility":"public","signature":"fn native_graphics_draw_mesh(session_id: Int, pipeline_id: Int, mesh_id: Int, instance_count: Int) -> Int","source_path":"stdlib/graphics.kn","line":226,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_graphics_draw_command_count","qualified_name":"std::graphics::native_graphics_draw_command_count","kind":"function","visibility":"public","signature":"fn native_graphics_draw_command_count(session_id: Int) -> Int","source_path":"stdlib/graphics.kn","line":229,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_graphics_draw_command_kind","qualified_name":"std::graphics::native_graphics_draw_command_kind","kind":"function","visibility":"public","signature":"fn native_graphics_draw_command_kind(session_id: Int, command_index: Int) -> String","source_path":"stdlib/graphics.kn","line":232,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_graphics_draw_command_mesh","qualified_name":"std::graphics::native_graphics_draw_command_mesh","kind":"function","visibility":"public","signature":"fn native_graphics_draw_command_mesh(session_id: Int, command_index: Int) -> Int","source_path":"stdlib/graphics.kn","line":235,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_graphics_draw_command_pipeline","qualified_name":"std::graphics::native_graphics_draw_command_pipeline","kind":"function","visibility":"public","signature":"fn native_graphics_draw_command_pipeline(session_id: Int, command_index: Int) -> Int","source_path":"stdlib/graphics.kn","line":238,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_graphics_draw_command_instances","qualified_name":"std::graphics::native_graphics_draw_command_instances","kind":"function","visibility":"public","signature":"fn native_graphics_draw_command_instances(session_id: Int, command_index: Int) -> Int","source_path":"stdlib/graphics.kn","line":241,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_graphics_last_status","qualified_name":"std::graphics::native_graphics_last_status","kind":"function","visibility":"public","signature":"fn native_graphics_last_status() -> Int","source_path":"stdlib/graphics.kn","line":244,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_graphics_last_error_kind","qualified_name":"std::graphics::native_graphics_last_error_kind","kind":"function","visibility":"public","signature":"fn native_graphics_last_error_kind() -> String","source_path":"stdlib/graphics.kn","line":247,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_graphics_last_error_message","qualified_name":"std::graphics::native_graphics_last_error_message","kind":"function","visibility":"public","signature":"fn native_graphics_last_error_message() -> String","source_path":"stdlib/graphics.kn","line":250,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_reset","qualified_name":"std::graphics::graphics_reset","kind":"function","visibility":"public","signature":"fn graphics_reset() -> Int","source_path":"stdlib/graphics.kn","line":254,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_session_create","qualified_name":"std::graphics::graphics_session_create","kind":"function","visibility":"public","signature":"fn graphics_session_create(app_name: String, width: Int, height: Int) -> Int","source_path":"stdlib/graphics.kn","line":257,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_session_destroy","qualified_name":"std::graphics::graphics_session_destroy","kind":"function","visibility":"public","signature":"fn graphics_session_destroy(session_id: Int) -> Int","source_path":"stdlib/graphics.kn","line":260,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_session_count","qualified_name":"std::graphics::graphics_session_count","kind":"function","visibility":"public","signature":"fn graphics_session_count() -> Int","source_path":"stdlib/graphics.kn","line":263,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_backend_supported","qualified_name":"std::graphics::graphics_backend_supported","kind":"function","visibility":"public","signature":"fn graphics_backend_supported(backend_id: String) -> Int","source_path":"stdlib/graphics.kn","line":266,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_backend_available","qualified_name":"std::graphics::graphics_backend_available","kind":"function","visibility":"public","signature":"fn graphics_backend_available(backend_id: String) -> Int","source_path":"stdlib/graphics.kn","line":269,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_backend_status","qualified_name":"std::graphics::graphics_backend_status","kind":"function","visibility":"public","signature":"fn graphics_backend_status(backend_id: String) -> String","source_path":"stdlib/graphics.kn","line":272,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_backend_select","qualified_name":"std::graphics::graphics_backend_select","kind":"function","visibility":"public","signature":"fn graphics_backend_select(session_id: Int, backend_id: String) -> Int","source_path":"stdlib/graphics.kn","line":275,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_active_backend","qualified_name":"std::graphics::graphics_active_backend","kind":"function","visibility":"public","signature":"fn graphics_active_backend(session_id: Int) -> String","source_path":"stdlib/graphics.kn","line":278,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_begin_frame","qualified_name":"std::graphics::graphics_begin_frame","kind":"function","visibility":"public","signature":"fn graphics_begin_frame(session_id: Int, delta_ms: Float) -> Int","source_path":"stdlib/graphics.kn","line":281,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_end_frame","qualified_name":"std::graphics::graphics_end_frame","kind":"function","visibility":"public","signature":"fn graphics_end_frame(session_id: Int) -> Int","source_path":"stdlib/graphics.kn","line":284,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_present","qualified_name":"std::graphics::graphics_present","kind":"function","visibility":"public","signature":"fn graphics_present(session_id: Int) -> Int","source_path":"stdlib/graphics.kn","line":287,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_frame_index","qualified_name":"std::graphics::graphics_frame_index","kind":"function","visibility":"public","signature":"fn graphics_frame_index(session_id: Int) -> Int","source_path":"stdlib/graphics.kn","line":290,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_last_presented_frame","qualified_name":"std::graphics::graphics_last_presented_frame","kind":"function","visibility":"public","signature":"fn graphics_last_presented_frame(session_id: Int) -> Int","source_path":"stdlib/graphics.kn","line":293,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_buffer_create","qualified_name":"std::graphics::graphics_buffer_create","kind":"function","visibility":"public","signature":"fn graphics_buffer_create(session_id: Int, kind: String, label: String, byte_length: Int, element_stride: Int) -> Int","source_path":"stdlib/graphics.kn","line":296,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_buffer_create_from_hex","qualified_name":"std::graphics::graphics_buffer_create_from_hex","kind":"function","visibility":"public","signature":"fn graphics_buffer_create_from_hex(session_id: Int, kind: String, label: String, bytes_hex: String, element_stride: Int) -> Int","source_path":"stdlib/graphics.kn","line":299,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_buffer_byte_length","qualified_name":"std::graphics::graphics_buffer_byte_length","kind":"function","visibility":"public","signature":"fn graphics_buffer_byte_length(session_id: Int, buffer_id: Int) -> Int","source_path":"stdlib/graphics.kn","line":302,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_buffer_byte_at","qualified_name":"std::graphics::graphics_buffer_byte_at","kind":"function","visibility":"public","signature":"fn graphics_buffer_byte_at(session_id: Int, buffer_id: Int, byte_offset: Int) -> Int","source_path":"stdlib/graphics.kn","line":305,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_buffer_kind","qualified_name":"std::graphics::graphics_buffer_kind","kind":"function","visibility":"public","signature":"fn graphics_buffer_kind(session_id: Int, buffer_id: Int) -> String","source_path":"stdlib/graphics.kn","line":308,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_buffer_label","qualified_name":"std::graphics::graphics_buffer_label","kind":"function","visibility":"public","signature":"fn graphics_buffer_label(session_id: Int, buffer_id: Int) -> String","source_path":"stdlib/graphics.kn","line":311,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_shader_spirv_from_hex","qualified_name":"std::graphics::graphics_shader_spirv_from_hex","kind":"function","visibility":"public","signature":"fn graphics_shader_spirv_from_hex(session_id: Int, key: String, stage: String, entry_point: String, bytes_hex: String) -> Int","source_path":"stdlib/graphics.kn","line":314,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_shader_spirv_from_file","qualified_name":"std::graphics::graphics_shader_spirv_from_file","kind":"function","visibility":"public","signature":"fn graphics_shader_spirv_from_file(session_id: Int, key: String, stage: String, entry_point: String, path: String) -> Int","source_path":"stdlib/graphics.kn","line":317,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_shader_byte_length","qualified_name":"std::graphics::graphics_shader_byte_length","kind":"function","visibility":"public","signature":"fn graphics_shader_byte_length(session_id: Int, shader_id: Int) -> Int","source_path":"stdlib/graphics.kn","line":320,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_shader_byte_at","qualified_name":"std::graphics::graphics_shader_byte_at","kind":"function","visibility":"public","signature":"fn graphics_shader_byte_at(session_id: Int, shader_id: Int, byte_offset: Int) -> Int","source_path":"stdlib/graphics.kn","line":323,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_shader_key","qualified_name":"std::graphics::graphics_shader_key","kind":"function","visibility":"public","signature":"fn graphics_shader_key(session_id: Int, shader_id: Int) -> String","source_path":"stdlib/graphics.kn","line":326,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_shader_stage","qualified_name":"std::graphics::graphics_shader_stage","kind":"function","visibility":"public","signature":"fn graphics_shader_stage(session_id: Int, shader_id: Int) -> String","source_path":"stdlib/graphics.kn","line":329,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_mesh_create","qualified_name":"std::graphics::graphics_mesh_create","kind":"function","visibility":"public","signature":"fn graphics_mesh_create(session_id: Int, label: String, vertex_buffer_id: Int, index_buffer_id: Int, vertex_count: Int, index_count: Int) -> Int","source_path":"stdlib/graphics.kn","line":332,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_mesh_vertex_count","qualified_name":"std::graphics::graphics_mesh_vertex_count","kind":"function","visibility":"public","signature":"fn graphics_mesh_vertex_count(session_id: Int, mesh_id: Int) -> Int","source_path":"stdlib/graphics.kn","line":335,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_mesh_index_count","qualified_name":"std::graphics::graphics_mesh_index_count","kind":"function","visibility":"public","signature":"fn graphics_mesh_index_count(session_id: Int, mesh_id: Int) -> Int","source_path":"stdlib/graphics.kn","line":338,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_mesh_label","qualified_name":"std::graphics::graphics_mesh_label","kind":"function","visibility":"public","signature":"fn graphics_mesh_label(session_id: Int, mesh_id: Int) -> String","source_path":"stdlib/graphics.kn","line":341,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_pipeline_create","qualified_name":"std::graphics::graphics_pipeline_create","kind":"function","visibility":"public","signature":"fn graphics_pipeline_create(session_id: Int, label: String, vertex_shader_id: Int, fragment_shader_id: Int, backend_id: String) -> Int","source_path":"stdlib/graphics.kn","line":344,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_pipeline_label","qualified_name":"std::graphics::graphics_pipeline_label","kind":"function","visibility":"public","signature":"fn graphics_pipeline_label(session_id: Int, pipeline_id: Int) -> String","source_path":"stdlib/graphics.kn","line":347,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_pipeline_backend","qualified_name":"std::graphics::graphics_pipeline_backend","kind":"function","visibility":"public","signature":"fn graphics_pipeline_backend(session_id: Int, pipeline_id: Int) -> String","source_path":"stdlib/graphics.kn","line":350,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_draw_mesh","qualified_name":"std::graphics::graphics_draw_mesh","kind":"function","visibility":"public","signature":"fn graphics_draw_mesh(session_id: Int, pipeline_id: Int, mesh_id: Int, instance_count: Int) -> Int","source_path":"stdlib/graphics.kn","line":353,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_draw_command_count","qualified_name":"std::graphics::graphics_draw_command_count","kind":"function","visibility":"public","signature":"fn graphics_draw_command_count(session_id: Int) -> Int","source_path":"stdlib/graphics.kn","line":356,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_draw_command_kind","qualified_name":"std::graphics::graphics_draw_command_kind","kind":"function","visibility":"public","signature":"fn graphics_draw_command_kind(session_id: Int, command_index: Int) -> String","source_path":"stdlib/graphics.kn","line":359,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_draw_command_mesh","qualified_name":"std::graphics::graphics_draw_command_mesh","kind":"function","visibility":"public","signature":"fn graphics_draw_command_mesh(session_id: Int, command_index: Int) -> Int","source_path":"stdlib/graphics.kn","line":362,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_draw_command_pipeline","qualified_name":"std::graphics::graphics_draw_command_pipeline","kind":"function","visibility":"public","signature":"fn graphics_draw_command_pipeline(session_id: Int, command_index: Int) -> Int","source_path":"stdlib/graphics.kn","line":365,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_draw_command_instances","qualified_name":"std::graphics::graphics_draw_command_instances","kind":"function","visibility":"public","signature":"fn graphics_draw_command_instances(session_id: Int, command_index: Int) -> Int","source_path":"stdlib/graphics.kn","line":368,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_last_status","qualified_name":"std::graphics::graphics_last_status","kind":"function","visibility":"public","signature":"fn graphics_last_status() -> Int","source_path":"stdlib/graphics.kn","line":371,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_last_error_kind","qualified_name":"std::graphics::graphics_last_error_kind","kind":"function","visibility":"public","signature":"fn graphics_last_error_kind() -> String","source_path":"stdlib/graphics.kn","line":374,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_last_error_message","qualified_name":"std::graphics::graphics_last_error_message","kind":"function","visibility":"public","signature":"fn graphics_last_error_message() -> String","source_path":"stdlib/graphics.kn","line":377,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"graphics/shared","import_path":"std::graphics::shared","source_path":"stdlib/graphics_shared.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"GRAPHICS_SHARED_KIND_VERTEX_BUFFER","qualified_name":"std::graphics::shared::GRAPHICS_SHARED_KIND_VERTEX_BUFFER","kind":"const","visibility":"public","signature":"const GRAPHICS_SHARED_KIND_VERTEX_BUFFER: String","source_path":"stdlib/graphics_shared.kn","line":4,"attributes":[],"docs":[],"target_notes":[]},{"name":"GRAPHICS_SHARED_KIND_INDEX_BUFFER","qualified_name":"std::graphics::shared::GRAPHICS_SHARED_KIND_INDEX_BUFFER","kind":"const","visibility":"public","signature":"const GRAPHICS_SHARED_KIND_INDEX_BUFFER: String","source_path":"stdlib/graphics_shared.kn","line":5,"attributes":[],"docs":[],"target_notes":[]},{"name":"GRAPHICS_SHARED_KIND_UNIFORM_BUFFER","qualified_name":"std::graphics::shared::GRAPHICS_SHARED_KIND_UNIFORM_BUFFER","kind":"const","visibility":"public","signature":"const GRAPHICS_SHARED_KIND_UNIFORM_BUFFER: String","source_path":"stdlib/graphics_shared.kn","line":6,"attributes":[],"docs":[],"target_notes":[]},{"name":"GRAPHICS_SHARED_KIND_STORAGE_BUFFER","qualified_name":"std::graphics::shared::GRAPHICS_SHARED_KIND_STORAGE_BUFFER","kind":"const","visibility":"public","signature":"const GRAPHICS_SHARED_KIND_STORAGE_BUFFER: String","source_path":"stdlib/graphics_shared.kn","line":7,"attributes":[],"docs":[],"target_notes":[]},{"name":"GRAPHICS_SHARED_KIND_SAMPLED_IMAGE","qualified_name":"std::graphics::shared::GRAPHICS_SHARED_KIND_SAMPLED_IMAGE","kind":"const","visibility":"public","signature":"const GRAPHICS_SHARED_KIND_SAMPLED_IMAGE: String","source_path":"stdlib/graphics_shared.kn","line":8,"attributes":[],"docs":[],"target_notes":[]},{"name":"GRAPHICS_SHARED_KIND_STORAGE_IMAGE","qualified_name":"std::graphics::shared::GRAPHICS_SHARED_KIND_STORAGE_IMAGE","kind":"const","visibility":"public","signature":"const GRAPHICS_SHARED_KIND_STORAGE_IMAGE: String","source_path":"stdlib/graphics_shared.kn","line":9,"attributes":[],"docs":[],"target_notes":[]},{"name":"GRAPHICS_SHARED_KIND_COLOR_ATTACHMENT","qualified_name":"std::graphics::shared::GRAPHICS_SHARED_KIND_COLOR_ATTACHMENT","kind":"const","visibility":"public","signature":"const GRAPHICS_SHARED_KIND_COLOR_ATTACHMENT: String","source_path":"stdlib/graphics_shared.kn","line":10,"attributes":[],"docs":[],"target_notes":[]},{"name":"GRAPHICS_SHARED_KIND_DEPTH_ATTACHMENT","qualified_name":"std::graphics::shared::GRAPHICS_SHARED_KIND_DEPTH_ATTACHMENT","kind":"const","visibility":"public","signature":"const GRAPHICS_SHARED_KIND_DEPTH_ATTACHMENT: String","source_path":"stdlib/graphics_shared.kn","line":11,"attributes":[],"docs":[],"target_notes":[]},{"name":"GraphicsSharedBackend","qualified_name":"std::graphics::shared::GraphicsSharedBackend","kind":"struct","visibility":"public","signature":"struct GraphicsSharedBackend","source_path":"stdlib/graphics_shared.kn","line":13,"attributes":[],"docs":[],"target_notes":[]},{"name":"GraphicsSharedBuffer","qualified_name":"std::graphics::shared::GraphicsSharedBuffer","kind":"struct","visibility":"public","signature":"struct GraphicsSharedBuffer","source_path":"stdlib/graphics_shared.kn","line":18,"attributes":[],"docs":[],"target_notes":[]},{"name":"GraphicsSharedImage","qualified_name":"std::graphics::shared::GraphicsSharedImage","kind":"struct","visibility":"public","signature":"struct GraphicsSharedImage","source_path":"stdlib/graphics_shared.kn","line":25,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_shared_zero_copy_residency_flags","qualified_name":"std::graphics::shared::graphics_shared_zero_copy_residency_flags","kind":"function","visibility":"private","signature":"fn graphics_shared_zero_copy_residency_flags() -> Int","source_path":"stdlib/graphics_shared.kn","line":31,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_shared_buffer_ready","qualified_name":"std::graphics::shared::graphics_shared_buffer_ready","kind":"function","visibility":"private","signature":"fn graphics_shared_buffer_ready(resource: GpuBuffer, required_usage_flags: Int, binding: GpuBindingPlan) -> Bool","source_path":"stdlib/graphics_shared.kn","line":34,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_shared_image_ready","qualified_name":"std::graphics::shared::graphics_shared_image_ready","kind":"function","visibility":"private","signature":"fn graphics_shared_image_ready(resource: GpuImage, required_usage_flags: Int, binding: GpuBindingPlan) -> Bool","source_path":"stdlib/graphics_shared.kn","line":41,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_shared_backend","qualified_name":"std::graphics::shared::graphics_shared_backend","kind":"function","visibility":"public","signature":"fn graphics_shared_backend(backend_id: String) -> GraphicsSharedBackend","source_path":"stdlib/graphics_shared.kn","line":48,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_shared_preferred_backend","qualified_name":"std::graphics::shared::graphics_shared_preferred_backend","kind":"function","visibility":"public","signature":"fn graphics_shared_preferred_backend() -> GraphicsSharedBackend","source_path":"stdlib/graphics_shared.kn","line":61,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_shared_vertex_policy","qualified_name":"std::graphics::shared::graphics_shared_vertex_policy","kind":"function","visibility":"public","signature":"fn graphics_shared_vertex_policy(debug_name: String) -> GpuResourcePolicy","source_path":"stdlib/graphics_shared.kn","line":64,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_shared_index_policy","qualified_name":"std::graphics::shared::graphics_shared_index_policy","kind":"function","visibility":"public","signature":"fn graphics_shared_index_policy(debug_name: String) -> GpuResourcePolicy","source_path":"stdlib/graphics_shared.kn","line":76,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_shared_uniform_policy","qualified_name":"std::graphics::shared::graphics_shared_uniform_policy","kind":"function","visibility":"public","signature":"fn graphics_shared_uniform_policy(debug_name: String) -> GpuResourcePolicy","source_path":"stdlib/graphics_shared.kn","line":88,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_shared_storage_policy","qualified_name":"std::graphics::shared::graphics_shared_storage_policy","kind":"function","visibility":"public","signature":"fn graphics_shared_storage_policy(debug_name: String) -> GpuResourcePolicy","source_path":"stdlib/graphics_shared.kn","line":100,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_shared_sampled_image_policy","qualified_name":"std::graphics::shared::graphics_shared_sampled_image_policy","kind":"function","visibility":"public","signature":"fn graphics_shared_sampled_image_policy(debug_name: String) -> GpuResourcePolicy","source_path":"stdlib/graphics_shared.kn","line":112,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_shared_storage_image_policy","qualified_name":"std::graphics::shared::graphics_shared_storage_image_policy","kind":"function","visibility":"public","signature":"fn graphics_shared_storage_image_policy(debug_name: String) -> GpuResourcePolicy","source_path":"stdlib/graphics_shared.kn","line":124,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_shared_color_attachment_policy","qualified_name":"std::graphics::shared::graphics_shared_color_attachment_policy","kind":"function","visibility":"public","signature":"fn graphics_shared_color_attachment_policy(debug_name: String) -> GpuResourcePolicy","source_path":"stdlib/graphics_shared.kn","line":136,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_shared_depth_attachment_policy","qualified_name":"std::graphics::shared::graphics_shared_depth_attachment_policy","kind":"function","visibility":"public","signature":"fn graphics_shared_depth_attachment_policy(debug_name: String) -> GpuResourcePolicy","source_path":"stdlib/graphics_shared.kn","line":148,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_shared_vertex_buffer","qualified_name":"std::graphics::shared::graphics_shared_vertex_buffer","kind":"function","visibility":"public","signature":"fn graphics_shared_vertex_buffer(resource: GpuBuffer, element_stride: Int) -> GraphicsSharedBuffer","source_path":"stdlib/graphics_shared.kn","line":160,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_shared_index_buffer","qualified_name":"std::graphics::shared::graphics_shared_index_buffer","kind":"function","visibility":"public","signature":"fn graphics_shared_index_buffer(resource: GpuBuffer, element_stride: Int) -> GraphicsSharedBuffer","source_path":"stdlib/graphics_shared.kn","line":170,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_shared_uniform_binding","qualified_name":"std::graphics::shared::graphics_shared_uniform_binding","kind":"function","visibility":"public","signature":"fn graphics_shared_uniform_binding(resource: GpuBuffer, binding_slot: Int, stage_flags: Int) -> GraphicsSharedBuffer","source_path":"stdlib/graphics_shared.kn","line":180,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_shared_storage_binding","qualified_name":"std::graphics::shared::graphics_shared_storage_binding","kind":"function","visibility":"public","signature":"fn graphics_shared_storage_binding(resource: GpuBuffer, binding_slot: Int, stage_flags: Int, access_flags: Int) -> GraphicsSharedBuffer","source_path":"stdlib/graphics_shared.kn","line":190,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_shared_sampled_image","qualified_name":"std::graphics::shared::graphics_shared_sampled_image","kind":"function","visibility":"public","signature":"fn graphics_shared_sampled_image(resource: GpuImage, binding_slot: Int, stage_flags: Int) -> GraphicsSharedImage","source_path":"stdlib/graphics_shared.kn","line":200,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_shared_storage_image","qualified_name":"std::graphics::shared::graphics_shared_storage_image","kind":"function","visibility":"public","signature":"fn graphics_shared_storage_image(resource: GpuImage, binding_slot: Int, stage_flags: Int, access_flags: Int) -> GraphicsSharedImage","source_path":"stdlib/graphics_shared.kn","line":209,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_shared_color_attachment","qualified_name":"std::graphics::shared::graphics_shared_color_attachment","kind":"function","visibility":"public","signature":"fn graphics_shared_color_attachment(resource: GpuImage) -> GraphicsSharedImage","source_path":"stdlib/graphics_shared.kn","line":218,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_shared_depth_attachment","qualified_name":"std::graphics::shared::graphics_shared_depth_attachment","kind":"function","visibility":"public","signature":"fn graphics_shared_depth_attachment(resource: GpuImage) -> GraphicsSharedImage","source_path":"stdlib/graphics_shared.kn","line":227,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_shared_backend_descriptor","qualified_name":"std::graphics::shared::graphics_shared_backend_descriptor","kind":"function","visibility":"public","signature":"fn graphics_shared_backend_descriptor(state: GraphicsSharedBackend) -> Any","source_path":"stdlib/graphics_shared.kn","line":236,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_shared_buffer_descriptor","qualified_name":"std::graphics::shared::graphics_shared_buffer_descriptor","kind":"function","visibility":"public","signature":"fn graphics_shared_buffer_descriptor(resource_view: GraphicsSharedBuffer) -> Any","source_path":"stdlib/graphics_shared.kn","line":246,"attributes":[],"docs":[],"target_notes":[]},{"name":"graphics_shared_image_descriptor","qualified_name":"std::graphics::shared::graphics_shared_image_descriptor","kind":"function","visibility":"public","signature":"fn graphics_shared_image_descriptor(resource_view: GraphicsSharedImage) -> Any","source_path":"stdlib/graphics_shared.kn","line":258,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"hash","import_path":"std::hash","source_path":"stdlib/hash.kn","parse_status":{"status":"parsed"},"docs":["Canonical root hashing stdlib for Kain.","","This module is intentionally target-neutral Kain source: deterministic","32-bit word mixing, byte-fed FNV-1a, CRC32 byte folding, and fingerprint","combinators that are useful to capsules, caches, wire formats, benchmarks,","and compiler/runtime proof blades without depending on host string layout."],"symbols":[{"name":"HASH_U32_MASK","qualified_name":"std::hash::HASH_U32_MASK","kind":"const","visibility":"public","signature":"const HASH_U32_MASK: Int","source_path":"stdlib/hash.kn","line":8,"attributes":[],"docs":["Canonical root hashing stdlib for Kain.","","This module is intentionally target-neutral Kain source: deterministic","32-bit word mixing, byte-fed FNV-1a, CRC32 byte folding, and fingerprint","combinators that are useful to capsules, caches, wire formats, benchmarks,","and compiler/runtime proof blades without depending on host string layout."],"target_notes":[]},{"name":"HASH_BYTE_MASK","qualified_name":"std::hash::HASH_BYTE_MASK","kind":"const","visibility":"public","signature":"const HASH_BYTE_MASK: Int","source_path":"stdlib/hash.kn","line":9,"attributes":[],"docs":[],"target_notes":[]},{"name":"HASH_FNV1A32_OFFSET","qualified_name":"std::hash::HASH_FNV1A32_OFFSET","kind":"const","visibility":"public","signature":"const HASH_FNV1A32_OFFSET: Int","source_path":"stdlib/hash.kn","line":10,"attributes":[],"docs":[],"target_notes":[]},{"name":"HASH_FNV1A32_PRIME","qualified_name":"std::hash::HASH_FNV1A32_PRIME","kind":"const","visibility":"public","signature":"const HASH_FNV1A32_PRIME: Int","source_path":"stdlib/hash.kn","line":11,"attributes":[],"docs":[],"target_notes":[]},{"name":"HASH_CRC32_POLY","qualified_name":"std::hash::HASH_CRC32_POLY","kind":"const","visibility":"public","signature":"const HASH_CRC32_POLY: Int","source_path":"stdlib/hash.kn","line":12,"attributes":[],"docs":[],"target_notes":[]},{"name":"HASH_GOLDEN32","qualified_name":"std::hash::HASH_GOLDEN32","kind":"const","visibility":"public","signature":"const HASH_GOLDEN32: Int","source_path":"stdlib/hash.kn","line":13,"attributes":[],"docs":[],"target_notes":[]},{"name":"HASH_EMPTY32","qualified_name":"std::hash::HASH_EMPTY32","kind":"const","visibility":"public","signature":"const HASH_EMPTY32: Int","source_path":"stdlib/hash.kn","line":14,"attributes":[],"docs":[],"target_notes":[]},{"name":"HASH_I63_MASK","qualified_name":"std::hash::HASH_I63_MASK","kind":"const","visibility":"public","signature":"const HASH_I63_MASK: Int","source_path":"stdlib/hash.kn","line":15,"attributes":[],"docs":[],"target_notes":[]},{"name":"Hash32","qualified_name":"std::hash::Hash32","kind":"struct","visibility":"public","signature":"struct Hash32","source_path":"stdlib/hash.kn","line":17,"attributes":[],"docs":[],"target_notes":[]},{"name":"Fingerprint32","qualified_name":"std::hash::Fingerprint32","kind":"struct","visibility":"public","signature":"struct Fingerprint32","source_path":"stdlib/hash.kn","line":20,"attributes":[],"docs":[],"target_notes":[]},{"name":"hash_u32_mask","qualified_name":"std::hash::hash_u32_mask","kind":"function","visibility":"public","signature":"fn hash_u32_mask(value: Int) -> Int","source_path":"stdlib/hash.kn","line":25,"attributes":[],"docs":[],"target_notes":[]},{"name":"hash_byte_mask","qualified_name":"std::hash::hash_byte_mask","kind":"function","visibility":"public","signature":"fn hash_byte_mask(value: Int) -> Int","source_path":"stdlib/hash.kn","line":28,"attributes":[],"docs":[],"target_notes":[]},{"name":"hash_i63_mask","qualified_name":"std::hash::hash_i63_mask","kind":"function","visibility":"public","signature":"fn hash_i63_mask(value: Int) -> Int","source_path":"stdlib/hash.kn","line":31,"attributes":[],"docs":[],"target_notes":[]},{"name":"hash32","qualified_name":"std::hash::hash32","kind":"function","visibility":"public","signature":"fn hash32(value: Int) -> Hash32","source_path":"stdlib/hash.kn","line":34,"attributes":[],"docs":[],"target_notes":[]},{"name":"hash32_value","qualified_name":"std::hash::hash32_value","kind":"function","visibility":"public","signature":"fn hash32_value(hash: Hash32) -> Int","source_path":"stdlib/hash.kn","line":37,"attributes":[],"docs":[],"target_notes":[]},{"name":"hash32_is_zero","qualified_name":"std::hash::hash32_is_zero","kind":"function","visibility":"public","signature":"fn hash32_is_zero(hash: Hash32) -> Bool","source_path":"stdlib/hash.kn","line":40,"attributes":[],"docs":[],"target_notes":[]},{"name":"rotl32","qualified_name":"std::hash::rotl32","kind":"function","visibility":"public","signature":"fn rotl32(value: Int, bits: Int) -> Int","source_path":"stdlib/hash.kn","line":43,"attributes":[],"docs":[],"target_notes":[]},{"name":"rotr32","qualified_name":"std::hash::rotr32","kind":"function","visibility":"public","signature":"fn rotr32(value: Int, bits: Int) -> Int","source_path":"stdlib/hash.kn","line":52,"attributes":[],"docs":[],"target_notes":[]},{"name":"hash_wang32","qualified_name":"std::hash::hash_wang32","kind":"function","visibility":"public","signature":"fn hash_wang32(value: Int) -> Int","source_path":"stdlib/hash.kn","line":61,"attributes":[],"docs":[],"target_notes":[]},{"name":"hash_u32","qualified_name":"std::hash::hash_u32","kind":"function","visibility":"public","signature":"fn hash_u32(value: Int) -> Int","source_path":"stdlib/hash.kn","line":70,"attributes":[],"docs":[],"target_notes":[]},{"name":"hash_mix64","qualified_name":"std::hash::hash_mix64","kind":"function","visibility":"public","signature":"fn hash_mix64(value: Int) -> Int","source_path":"stdlib/hash.kn","line":73,"attributes":[],"docs":[],"target_notes":[]},{"name":"hash_u64","qualified_name":"std::hash::hash_u64","kind":"function","visibility":"public","signature":"fn hash_u64(value: Int) -> Int","source_path":"stdlib/hash.kn","line":79,"attributes":[],"docs":[],"target_notes":[]},{"name":"hash_u32_with_seed","qualified_name":"std::hash::hash_u32_with_seed","kind":"function","visibility":"public","signature":"fn hash_u32_with_seed(value: Int, seed: Int) -> Int","source_path":"stdlib/hash.kn","line":82,"attributes":[],"docs":[],"target_notes":[]},{"name":"hash_mix32","qualified_name":"std::hash::hash_mix32","kind":"function","visibility":"public","signature":"fn hash_mix32(seed: Int, value: Int) -> Int","source_path":"stdlib/hash.kn","line":86,"attributes":[],"docs":[],"target_notes":[]},{"name":"hash_pair32","qualified_name":"std::hash::hash_pair32","kind":"function","visibility":"public","signature":"fn hash_pair32(left: Int, right: Int) -> Int","source_path":"stdlib/hash.kn","line":92,"attributes":[],"docs":[],"target_notes":[]},{"name":"hash_triple32","qualified_name":"std::hash::hash_triple32","kind":"function","visibility":"public","signature":"fn hash_triple32(a: Int, b: Int, c: Int) -> Int","source_path":"stdlib/hash.kn","line":95,"attributes":[],"docs":[],"target_notes":[]},{"name":"hash_quad32","qualified_name":"std::hash::hash_quad32","kind":"function","visibility":"public","signature":"fn hash_quad32(a: Int, b: Int, c: Int, d: Int) -> Int","source_path":"stdlib/hash.kn","line":98,"attributes":[],"docs":[],"target_notes":[]},{"name":"hash_bool32","qualified_name":"std::hash::hash_bool32","kind":"function","visibility":"public","signature":"fn hash_bool32(value: Bool) -> Int","source_path":"stdlib/hash.kn","line":101,"attributes":[],"docs":[],"target_notes":[]},{"name":"hash_ordered_finish","qualified_name":"std::hash::hash_ordered_finish","kind":"function","visibility":"public","signature":"fn hash_ordered_finish(seed: Int, words: Int) -> Int","source_path":"stdlib/hash.kn","line":106,"attributes":[],"docs":[],"target_notes":[]},{"name":"hash_unordered_pair32","qualified_name":"std::hash::hash_unordered_pair32","kind":"function","visibility":"public","signature":"fn hash_unordered_pair32(left: Int, right: Int) -> Int","source_path":"stdlib/hash.kn","line":109,"attributes":[],"docs":[],"target_notes":[]},{"name":"hash_bucket_power_of_two","qualified_name":"std::hash::hash_bucket_power_of_two","kind":"function","visibility":"public","signature":"fn hash_bucket_power_of_two(hash: Int, capacity: Int) -> Int","source_path":"stdlib/hash.kn","line":114,"attributes":[],"docs":[],"target_notes":[]},{"name":"hash_bucket_mod","qualified_name":"std::hash::hash_bucket_mod","kind":"function","visibility":"public","signature":"fn hash_bucket_mod(hash: Int, capacity: Int) -> Int","source_path":"stdlib/hash.kn","line":119,"attributes":[],"docs":[],"target_notes":[]},{"name":"hash_bucket_mod64","qualified_name":"std::hash::hash_bucket_mod64","kind":"function","visibility":"public","signature":"fn hash_bucket_mod64(hash: Int, capacity: Int) -> Int","source_path":"stdlib/hash.kn","line":124,"attributes":[],"docs":[],"target_notes":[]},{"name":"hash_fnv1a32_init","qualified_name":"std::hash::hash_fnv1a32_init","kind":"function","visibility":"public","signature":"fn hash_fnv1a32_init() -> Int","source_path":"stdlib/hash.kn","line":129,"attributes":[],"docs":[],"target_notes":[]},{"name":"hash_fnv1a32_update_byte","qualified_name":"std::hash::hash_fnv1a32_update_byte","kind":"function","visibility":"public","signature":"fn hash_fnv1a32_update_byte(hash: Int, byte: Int) -> Int","source_path":"stdlib/hash.kn","line":132,"attributes":[],"docs":[],"target_notes":[]},{"name":"hash_fnv1a32_update_u32","qualified_name":"std::hash::hash_fnv1a32_update_u32","kind":"function","visibility":"public","signature":"fn hash_fnv1a32_update_u32(hash: Int, value: Int) -> Int","source_path":"stdlib/hash.kn","line":136,"attributes":[],"docs":[],"target_notes":[]},{"name":"hash_bytes4","qualified_name":"std::hash::hash_bytes4","kind":"function","visibility":"public","signature":"fn hash_bytes4(byte0: Int, byte1: Int, byte2: Int, byte3: Int) -> Int","source_path":"stdlib/hash.kn","line":145,"attributes":[],"docs":[],"target_notes":[]},{"name":"hash_crc32_init","qualified_name":"std::hash::hash_crc32_init","kind":"function","visibility":"public","signature":"fn hash_crc32_init() -> Int","source_path":"stdlib/hash.kn","line":153,"attributes":[],"docs":[],"target_notes":[]},{"name":"hash_crc32_update_byte","qualified_name":"std::hash::hash_crc32_update_byte","kind":"function","visibility":"public","signature":"fn hash_crc32_update_byte(crc: Int, byte: Int) -> Int","source_path":"stdlib/hash.kn","line":156,"attributes":[],"docs":[],"target_notes":[]},{"name":"hash_crc32_finish","qualified_name":"std::hash::hash_crc32_finish","kind":"function","visibility":"public","signature":"fn hash_crc32_finish(crc: Int) -> Int","source_path":"stdlib/hash.kn","line":167,"attributes":[],"docs":[],"target_notes":[]},{"name":"hash_crc32_bytes4","qualified_name":"std::hash::hash_crc32_bytes4","kind":"function","visibility":"public","signature":"fn hash_crc32_bytes4(byte0: Int, byte1: Int, byte2: Int, byte3: Int) -> Int","source_path":"stdlib/hash.kn","line":170,"attributes":[],"docs":[],"target_notes":[]},{"name":"fingerprint32_begin","qualified_name":"std::hash::fingerprint32_begin","kind":"function","visibility":"public","signature":"fn fingerprint32_begin(salt: Int) -> Fingerprint32","source_path":"stdlib/hash.kn","line":178,"attributes":[],"docs":[],"target_notes":[]},{"name":"fingerprint32_add_word","qualified_name":"std::hash::fingerprint32_add_word","kind":"function","visibility":"public","signature":"fn fingerprint32_add_word(fingerprint: Fingerprint32, word: Int) -> Fingerprint32","source_path":"stdlib/hash.kn","line":181,"attributes":[],"docs":[],"target_notes":[]},{"name":"fingerprint32_add_pair","qualified_name":"std::hash::fingerprint32_add_pair","kind":"function","visibility":"public","signature":"fn fingerprint32_add_pair(fingerprint: Fingerprint32, left: Int, right: Int) -> Fingerprint32","source_path":"stdlib/hash.kn","line":186,"attributes":[],"docs":[],"target_notes":[]},{"name":"fingerprint32_finish","qualified_name":"std::hash::fingerprint32_finish","kind":"function","visibility":"public","signature":"fn fingerprint32_finish(fingerprint: Fingerprint32) -> Int","source_path":"stdlib/hash.kn","line":190,"attributes":[],"docs":[],"target_notes":[]},{"name":"fingerprint32_words","qualified_name":"std::hash::fingerprint32_words","kind":"function","visibility":"public","signature":"fn fingerprint32_words(fingerprint: Fingerprint32) -> Int","source_path":"stdlib/hash.kn","line":193,"attributes":[],"docs":[],"target_notes":[]},{"name":"fingerprint32_value","qualified_name":"std::hash::fingerprint32_value","kind":"function","visibility":"public","signature":"fn fingerprint32_value(fingerprint: Fingerprint32) -> Int","source_path":"stdlib/hash.kn","line":196,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"http","import_path":"std::http","source_path":"stdlib/http.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"request_create","qualified_name":"std::http::request_create","kind":"function","visibility":"public","signature":"fn request_create(method: String, url: String) -> Int","source_path":"stdlib/http.kn","line":5,"attributes":[],"docs":[],"target_notes":[]},{"name":"request_create_checked","qualified_name":"std::http::request_create_checked","kind":"function","visibility":"public","signature":"fn request_create_checked(method: String, url: String) -> Int","source_path":"stdlib/http.kn","line":8,"attributes":[],"docs":[],"target_notes":[]},{"name":"request_create_uri","qualified_name":"std::http::request_create_uri","kind":"function","visibility":"public","signature":"fn request_create_uri(method: String, parsed_uri: Uri) -> Int","source_path":"stdlib/http.kn","line":14,"attributes":[],"docs":[],"target_notes":[]},{"name":"request_set_header","qualified_name":"std::http::request_set_header","kind":"function","visibility":"public","signature":"fn request_set_header(request_id: Int, key: String, value: String) -> Int","source_path":"stdlib/http.kn","line":19,"attributes":[],"docs":[],"target_notes":[]},{"name":"request_set_body_text","qualified_name":"std::http::request_set_body_text","kind":"function","visibility":"public","signature":"fn request_set_body_text(request_id: Int, payload: String) -> Int","source_path":"stdlib/http.kn","line":22,"attributes":[],"docs":[],"target_notes":[]},{"name":"request_set_body_buffered_text","qualified_name":"std::http::request_set_body_buffered_text","kind":"function","visibility":"public","signature":"fn request_set_body_buffered_text(request_id: Int, writer: BufferedWriter) -> Int","source_path":"stdlib/http.kn","line":25,"attributes":[],"docs":[],"target_notes":[]},{"name":"request_set_body_hex","qualified_name":"std::http::request_set_body_hex","kind":"function","visibility":"public","signature":"fn request_set_body_hex(request_id: Int, payload_hex: String) -> Int","source_path":"stdlib/http.kn","line":28,"attributes":[],"docs":[],"target_notes":[]},{"name":"request_set_timeout","qualified_name":"std::http::request_set_timeout","kind":"function","visibility":"public","signature":"fn request_set_timeout(request_id: Int, timeout_ms: Int) -> Int","source_path":"stdlib/http.kn","line":31,"attributes":[],"docs":[],"target_notes":[]},{"name":"request_set_protocol","qualified_name":"std::http::request_set_protocol","kind":"function","visibility":"public","signature":"fn request_set_protocol(request_id: Int, protocol_name: String) -> Int","source_path":"stdlib/http.kn","line":34,"attributes":[],"docs":[],"target_notes":[]},{"name":"request_protocol","qualified_name":"std::http::request_protocol","kind":"function","visibility":"public","signature":"fn request_protocol(request_id: Int) -> String","source_path":"stdlib/http.kn","line":37,"attributes":[],"docs":[],"target_notes":[]},{"name":"client_send","qualified_name":"std::http::client_send","kind":"function","visibility":"public","signature":"fn client_send(request_id: Int) -> Int","source_path":"stdlib/http.kn","line":40,"attributes":[],"docs":[],"target_notes":[]},{"name":"response_status","qualified_name":"std::http::response_status","kind":"function","visibility":"public","signature":"fn response_status(response_id: Int) -> Int","source_path":"stdlib/http.kn","line":43,"attributes":[],"docs":[],"target_notes":[]},{"name":"response_protocol","qualified_name":"std::http::response_protocol","kind":"function","visibility":"public","signature":"fn response_protocol(response_id: Int) -> String","source_path":"stdlib/http.kn","line":46,"attributes":[],"docs":[],"target_notes":[]},{"name":"response_header","qualified_name":"std::http::response_header","kind":"function","visibility":"public","signature":"fn response_header(response_id: Int, key: String) -> String","source_path":"stdlib/http.kn","line":49,"attributes":[],"docs":[],"target_notes":[]},{"name":"response_body_text","qualified_name":"std::http::response_body_text","kind":"function","visibility":"public","signature":"fn response_body_text(response_id: Int) -> String","source_path":"stdlib/http.kn","line":52,"attributes":[],"docs":[],"target_notes":[]},{"name":"response_buffered_reader","qualified_name":"std::http::response_buffered_reader","kind":"function","visibility":"public","signature":"fn response_buffered_reader(response_id: Int, capacity: Int) -> BufferedReader","source_path":"stdlib/http.kn","line":55,"attributes":[],"docs":[],"target_notes":[]},{"name":"response_body_hex","qualified_name":"std::http::response_body_hex","kind":"function","visibility":"public","signature":"fn response_body_hex(response_id: Int) -> String","source_path":"stdlib/http.kn","line":58,"attributes":[],"docs":[],"target_notes":[]},{"name":"request_destroy","qualified_name":"std::http::request_destroy","kind":"function","visibility":"public","signature":"fn request_destroy(request_id: Int) -> Int","source_path":"stdlib/http.kn","line":61,"attributes":[],"docs":[],"target_notes":[]},{"name":"response_destroy","qualified_name":"std::http::response_destroy","kind":"function","visibility":"public","signature":"fn response_destroy(response_id: Int) -> Int","source_path":"stdlib/http.kn","line":64,"attributes":[],"docs":[],"target_notes":[]},{"name":"server_create","qualified_name":"std::http::server_create","kind":"function","visibility":"public","signature":"fn server_create(host: String, port: Int) -> Int","source_path":"stdlib/http.kn","line":67,"attributes":[],"docs":[],"target_notes":[]},{"name":"server_create_localhost","qualified_name":"std::http::server_create_localhost","kind":"function","visibility":"public","signature":"fn server_create_localhost(port: Int) -> Int","source_path":"stdlib/http.kn","line":70,"attributes":[],"docs":[],"target_notes":[]},{"name":"server_listen","qualified_name":"std::http::server_listen","kind":"function","visibility":"public","signature":"fn server_listen(server_id: Int) -> Int","source_path":"stdlib/http.kn","line":73,"attributes":[],"docs":[],"target_notes":[]},{"name":"server_local_port","qualified_name":"std::http::server_local_port","kind":"function","visibility":"public","signature":"fn server_local_port(server_id: Int) -> Int","source_path":"stdlib/http.kn","line":76,"attributes":[],"docs":[],"target_notes":[]},{"name":"server_pending_request_count","qualified_name":"std::http::server_pending_request_count","kind":"function","visibility":"public","signature":"fn server_pending_request_count(server_id: Int) -> Int","source_path":"stdlib/http.kn","line":79,"attributes":[],"docs":[],"target_notes":[]},{"name":"route_actor","qualified_name":"std::http::route_actor","kind":"function","visibility":"public","signature":"fn route_actor(server_id: Int, method: String, path: String, actor_id: Int, message_kind: String) -> Int","source_path":"stdlib/http.kn","line":82,"attributes":[],"docs":[],"target_notes":[]},{"name":"server_pump","qualified_name":"std::http::server_pump","kind":"function","visibility":"public","signature":"fn server_pump(server_id: Int, timeout_ms: Int) -> Int","source_path":"stdlib/http.kn","line":85,"attributes":[],"docs":[],"target_notes":[]},{"name":"server_pump_batch","qualified_name":"std::http::server_pump_batch","kind":"function","visibility":"public","signature":"fn server_pump_batch(server_id: Int, timeout_ms: Int, max_requests: Int) -> Int","source_path":"stdlib/http.kn","line":88,"attributes":[],"docs":[],"target_notes":[]},{"name":"server_next_request","qualified_name":"std::http::server_next_request","kind":"function","visibility":"public","signature":"fn server_next_request(server_id: Int) -> Int","source_path":"stdlib/http.kn","line":91,"attributes":[],"docs":[],"target_notes":[]},{"name":"request_method","qualified_name":"std::http::request_method","kind":"function","visibility":"public","signature":"fn request_method(incoming_request_id: Int) -> String","source_path":"stdlib/http.kn","line":94,"attributes":[],"docs":[],"target_notes":[]},{"name":"request_path","qualified_name":"std::http::request_path","kind":"function","visibility":"public","signature":"fn request_path(incoming_request_id: Int) -> String","source_path":"stdlib/http.kn","line":97,"attributes":[],"docs":[],"target_notes":[]},{"name":"request_query","qualified_name":"std::http::request_query","kind":"function","visibility":"public","signature":"fn request_query(incoming_request_id: Int) -> String","source_path":"stdlib/http.kn","line":100,"attributes":[],"docs":[],"target_notes":[]},{"name":"request_header","qualified_name":"std::http::request_header","kind":"function","visibility":"public","signature":"fn request_header(incoming_request_id: Int, key: String) -> String","source_path":"stdlib/http.kn","line":103,"attributes":[],"docs":[],"target_notes":[]},{"name":"request_body_text","qualified_name":"std::http::request_body_text","kind":"function","visibility":"public","signature":"fn request_body_text(incoming_request_id: Int) -> String","source_path":"stdlib/http.kn","line":106,"attributes":[],"docs":[],"target_notes":[]},{"name":"request_body_buffered_reader","qualified_name":"std::http::request_body_buffered_reader","kind":"function","visibility":"public","signature":"fn request_body_buffered_reader(incoming_request_id: Int, capacity: Int) -> BufferedReader","source_path":"stdlib/http.kn","line":109,"attributes":[],"docs":[],"target_notes":[]},{"name":"request_body_hex","qualified_name":"std::http::request_body_hex","kind":"function","visibility":"public","signature":"fn request_body_hex(incoming_request_id: Int) -> String","source_path":"stdlib/http.kn","line":112,"attributes":[],"docs":[],"target_notes":[]},{"name":"respond_text","qualified_name":"std::http::respond_text","kind":"function","visibility":"public","signature":"fn respond_text(incoming_request_id: Int, status_code: Int, payload: String) -> Int","source_path":"stdlib/http.kn","line":115,"attributes":[],"docs":[],"target_notes":[]},{"name":"respond_buffered_text","qualified_name":"std::http::respond_buffered_text","kind":"function","visibility":"public","signature":"fn respond_buffered_text(incoming_request_id: Int, status_code: Int, writer: BufferedWriter) -> Int","source_path":"stdlib/http.kn","line":118,"attributes":[],"docs":[],"target_notes":[]},{"name":"respond_hex","qualified_name":"std::http::respond_hex","kind":"function","visibility":"public","signature":"fn respond_hex(incoming_request_id: Int, status_code: Int, payload_hex: String) -> Int","source_path":"stdlib/http.kn","line":121,"attributes":[],"docs":[],"target_notes":[]},{"name":"response_set_header_for_request","qualified_name":"std::http::response_set_header_for_request","kind":"function","visibility":"public","signature":"fn response_set_header_for_request(incoming_request_id: Int, key: String, value: String) -> Int","source_path":"stdlib/http.kn","line":124,"attributes":[],"docs":[],"target_notes":[]},{"name":"server_close","qualified_name":"std::http::server_close","kind":"function","visibility":"public","signature":"fn server_close(server_id: Int) -> Int","source_path":"stdlib/http.kn","line":127,"attributes":[],"docs":[],"target_notes":[]},{"name":"local_url","qualified_name":"std::http::local_url","kind":"function","visibility":"public","signature":"fn local_url(port: Int, path: String) -> String","source_path":"stdlib/http.kn","line":130,"attributes":[],"docs":[],"target_notes":[]},{"name":"local_uri","qualified_name":"std::http::local_uri","kind":"function","visibility":"public","signature":"fn local_uri(port: Int, path: String) -> Uri","source_path":"stdlib/http.kn","line":133,"attributes":[],"docs":[],"target_notes":[]},{"name":"get_text","qualified_name":"std::http::get_text","kind":"function","visibility":"public","signature":"fn get_text(url: String) -> String","source_path":"stdlib/http.kn","line":136,"attributes":[],"docs":[],"target_notes":[]},{"name":"post_text","qualified_name":"std::http::post_text","kind":"function","visibility":"public","signature":"fn post_text(url: String, payload: String) -> String","source_path":"stdlib/http.kn","line":139,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"http2","import_path":"std::http2","source_path":"stdlib/http2.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"http2_client_state","qualified_name":"std::http2::http2_client_state","kind":"function","visibility":"public","signature":"fn http2_client_state() -> Int","source_path":"stdlib/http2.kn","line":4,"attributes":[],"docs":[],"target_notes":[]},{"name":"http2_client_supported","qualified_name":"std::http2::http2_client_supported","kind":"function","visibility":"public","signature":"fn http2_client_supported() -> Bool","source_path":"stdlib/http2.kn","line":7,"attributes":[],"docs":[],"target_notes":[]},{"name":"http2_client_available","qualified_name":"std::http2::http2_client_available","kind":"function","visibility":"public","signature":"fn http2_client_available() -> Bool","source_path":"stdlib/http2.kn","line":10,"attributes":[],"docs":[],"target_notes":[]},{"name":"http2_request_upgrade","qualified_name":"std::http2::http2_request_upgrade","kind":"function","visibility":"public","signature":"fn http2_request_upgrade(request_id: Int) -> Int","source_path":"stdlib/http2.kn","line":13,"attributes":[],"docs":[],"target_notes":[]},{"name":"http2_request_create","qualified_name":"std::http2::http2_request_create","kind":"function","visibility":"public","signature":"fn http2_request_create(method: String, url: String) -> Int","source_path":"stdlib/http2.kn","line":16,"attributes":[],"docs":[],"target_notes":[]},{"name":"http2_request_protocol","qualified_name":"std::http2::http2_request_protocol","kind":"function","visibility":"public","signature":"fn http2_request_protocol(request_id: Int) -> String","source_path":"stdlib/http2.kn","line":21,"attributes":[],"docs":[],"target_notes":[]},{"name":"http2_client_send","qualified_name":"std::http2::http2_client_send","kind":"function","visibility":"public","signature":"fn http2_client_send(request_id: Int) -> Int","source_path":"stdlib/http2.kn","line":24,"attributes":[],"docs":[],"target_notes":[]},{"name":"http2_response_protocol","qualified_name":"std::http2::http2_response_protocol","kind":"function","visibility":"public","signature":"fn http2_response_protocol(response_id: Int) -> String","source_path":"stdlib/http2.kn","line":27,"attributes":[],"docs":[],"target_notes":[]},{"name":"http2_response_negotiated","qualified_name":"std::http2::http2_response_negotiated","kind":"function","visibility":"public","signature":"fn http2_response_negotiated(response_id: Int) -> Bool","source_path":"stdlib/http2.kn","line":30,"attributes":[],"docs":[],"target_notes":[]},{"name":"http2_get_text","qualified_name":"std::http2::http2_get_text","kind":"function","visibility":"public","signature":"fn http2_get_text(url: String) -> String","source_path":"stdlib/http2.kn","line":33,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"input","import_path":"std::input","source_path":"stdlib/input.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"abi_input_reset","qualified_name":"std::input::abi_input_reset","kind":"extern_function","visibility":"private","signature":"fn abi_input_reset() -> Int","source_path":"stdlib/input.kn","line":4,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_input_session_create","qualified_name":"std::input::abi_input_session_create","kind":"extern_function","visibility":"private","signature":"fn abi_input_session_create(name: String) -> Int","source_path":"stdlib/input.kn","line":7,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_input_session_destroy","qualified_name":"std::input::abi_input_session_destroy","kind":"extern_function","visibility":"private","signature":"fn abi_input_session_destroy(session_id: Int) -> Int","source_path":"stdlib/input.kn","line":10,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_input_session_count","qualified_name":"std::input::abi_input_session_count","kind":"extern_function","visibility":"private","signature":"fn abi_input_session_count() -> Int","source_path":"stdlib/input.kn","line":13,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_input_bind_action","qualified_name":"std::input::abi_input_bind_action","kind":"extern_function","visibility":"private","signature":"fn abi_input_bind_action(session_id: Int, source_kind: String, event_kind: String, code: String, action: String) -> Int","source_path":"stdlib/input.kn","line":16,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_input_bind_axis","qualified_name":"std::input::abi_input_bind_axis","kind":"extern_function","visibility":"private","signature":"fn abi_input_bind_axis(session_id: Int, source_kind: String, event_kind: String, code: String, axis: String, scale: Float) -> Int","source_path":"stdlib/input.kn","line":19,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_input_push_event","qualified_name":"std::input::abi_input_push_event","kind":"extern_function","visibility":"private","signature":"fn abi_input_push_event(session_id: Int, source_kind: String, source_id: String, event_kind: String, code: String, value: Float, text: String, confidence: Float) -> Int","source_path":"stdlib/input.kn","line":22,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_input_push_agent_intent","qualified_name":"std::input::abi_input_push_agent_intent","kind":"extern_function","visibility":"private","signature":"fn abi_input_push_agent_intent(session_id: Int, source_id: String, action: String, command_text: String, confidence: Float) -> Int","source_path":"stdlib/input.kn","line":25,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_input_begin_frame","qualified_name":"std::input::abi_input_begin_frame","kind":"extern_function","visibility":"private","signature":"fn abi_input_begin_frame(session_id: Int, delta_ms: Float) -> Int","source_path":"stdlib/input.kn","line":28,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_input_frame_index","qualified_name":"std::input::abi_input_frame_index","kind":"extern_function","visibility":"private","signature":"fn abi_input_frame_index(session_id: Int) -> Int","source_path":"stdlib/input.kn","line":31,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_input_event_count","qualified_name":"std::input::abi_input_event_count","kind":"extern_function","visibility":"private","signature":"fn abi_input_event_count(session_id: Int) -> Int","source_path":"stdlib/input.kn","line":34,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_input_event_kind","qualified_name":"std::input::abi_input_event_kind","kind":"extern_function","visibility":"private","signature":"fn abi_input_event_kind(session_id: Int, index: Int) -> String","source_path":"stdlib/input.kn","line":37,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_input_event_source_kind","qualified_name":"std::input::abi_input_event_source_kind","kind":"extern_function","visibility":"private","signature":"fn abi_input_event_source_kind(session_id: Int, index: Int) -> String","source_path":"stdlib/input.kn","line":40,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_input_event_code","qualified_name":"std::input::abi_input_event_code","kind":"extern_function","visibility":"private","signature":"fn abi_input_event_code(session_id: Int, index: Int) -> String","source_path":"stdlib/input.kn","line":43,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_input_event_action","qualified_name":"std::input::abi_input_event_action","kind":"extern_function","visibility":"private","signature":"fn abi_input_event_action(session_id: Int, index: Int) -> String","source_path":"stdlib/input.kn","line":46,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_input_event_text","qualified_name":"std::input::abi_input_event_text","kind":"extern_function","visibility":"private","signature":"fn abi_input_event_text(session_id: Int, index: Int) -> String","source_path":"stdlib/input.kn","line":49,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_input_action_pressed","qualified_name":"std::input::abi_input_action_pressed","kind":"extern_function","visibility":"private","signature":"fn abi_input_action_pressed(session_id: Int, action: String) -> Int","source_path":"stdlib/input.kn","line":52,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_input_action_down","qualified_name":"std::input::abi_input_action_down","kind":"extern_function","visibility":"private","signature":"fn abi_input_action_down(session_id: Int, action: String) -> Int","source_path":"stdlib/input.kn","line":55,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_input_action_released","qualified_name":"std::input::abi_input_action_released","kind":"extern_function","visibility":"private","signature":"fn abi_input_action_released(session_id: Int, action: String) -> Int","source_path":"stdlib/input.kn","line":58,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_input_axis_value","qualified_name":"std::input::abi_input_axis_value","kind":"extern_function","visibility":"private","signature":"fn abi_input_axis_value(session_id: Int, axis: String) -> Float","source_path":"stdlib/input.kn","line":61,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_input_text_commit_count","qualified_name":"std::input::abi_input_text_commit_count","kind":"extern_function","visibility":"private","signature":"fn abi_input_text_commit_count(session_id: Int) -> Int","source_path":"stdlib/input.kn","line":64,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_input_text_commit","qualified_name":"std::input::abi_input_text_commit","kind":"extern_function","visibility":"private","signature":"fn abi_input_text_commit(session_id: Int, index: Int) -> String","source_path":"stdlib/input.kn","line":67,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_input_trace_text","qualified_name":"std::input::abi_input_trace_text","kind":"extern_function","visibility":"private","signature":"fn abi_input_trace_text(session_id: Int) -> String","source_path":"stdlib/input.kn","line":70,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_input_replay_trace","qualified_name":"std::input::abi_input_replay_trace","kind":"extern_function","visibility":"private","signature":"fn abi_input_replay_trace(session_id: Int, trace_text: String) -> Int","source_path":"stdlib/input.kn","line":73,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_input_last_status","qualified_name":"std::input::abi_input_last_status","kind":"extern_function","visibility":"private","signature":"fn abi_input_last_status() -> Int","source_path":"stdlib/input.kn","line":76,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_input_last_error_kind","qualified_name":"std::input::abi_input_last_error_kind","kind":"extern_function","visibility":"private","signature":"fn abi_input_last_error_kind() -> String","source_path":"stdlib/input.kn","line":79,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_input_last_error_message","qualified_name":"std::input::abi_input_last_error_message","kind":"extern_function","visibility":"private","signature":"fn abi_input_last_error_message() -> String","source_path":"stdlib/input.kn","line":82,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"input_source_keyboard","qualified_name":"std::input::input_source_keyboard","kind":"function","visibility":"public","signature":"fn input_source_keyboard() -> String","source_path":"stdlib/input.kn","line":84,"attributes":[],"docs":[],"target_notes":[]},{"name":"input_source_pointer","qualified_name":"std::input::input_source_pointer","kind":"function","visibility":"public","signature":"fn input_source_pointer() -> String","source_path":"stdlib/input.kn","line":87,"attributes":[],"docs":[],"target_notes":[]},{"name":"input_source_cli","qualified_name":"std::input::input_source_cli","kind":"function","visibility":"public","signature":"fn input_source_cli() -> String","source_path":"stdlib/input.kn","line":90,"attributes":[],"docs":[],"target_notes":[]},{"name":"input_source_ui_runtime","qualified_name":"std::input::input_source_ui_runtime","kind":"function","visibility":"public","signature":"fn input_source_ui_runtime() -> String","source_path":"stdlib/input.kn","line":93,"attributes":[],"docs":[],"target_notes":[]},{"name":"input_source_agent","qualified_name":"std::input::input_source_agent","kind":"function","visibility":"public","signature":"fn input_source_agent() -> String","source_path":"stdlib/input.kn","line":96,"attributes":[],"docs":[],"target_notes":[]},{"name":"input_source_synthetic","qualified_name":"std::input::input_source_synthetic","kind":"function","visibility":"public","signature":"fn input_source_synthetic() -> String","source_path":"stdlib/input.kn","line":99,"attributes":[],"docs":[],"target_notes":[]},{"name":"input_source_native","qualified_name":"std::input::input_source_native","kind":"function","visibility":"public","signature":"fn input_source_native() -> String","source_path":"stdlib/input.kn","line":102,"attributes":[],"docs":[],"target_notes":[]},{"name":"InputEventRecord","qualified_name":"std::input::InputEventRecord","kind":"struct","visibility":"public","signature":"struct InputEventRecord","source_path":"stdlib/input.kn","line":105,"attributes":[],"docs":[],"target_notes":[]},{"name":"InputTraceRecord","qualified_name":"std::input::InputTraceRecord","kind":"struct","visibility":"public","signature":"struct InputTraceRecord","source_path":"stdlib/input.kn","line":113,"attributes":[],"docs":[],"target_notes":[]},{"name":"input_reset","qualified_name":"std::input::input_reset","kind":"function","visibility":"public","signature":"fn input_reset() -> Int","source_path":"stdlib/input.kn","line":119,"attributes":[],"docs":[],"target_notes":[]},{"name":"input_session_create","qualified_name":"std::input::input_session_create","kind":"function","visibility":"public","signature":"fn input_session_create(name: String) -> Int","source_path":"stdlib/input.kn","line":122,"attributes":[],"docs":[],"target_notes":[]},{"name":"input_session_destroy","qualified_name":"std::input::input_session_destroy","kind":"function","visibility":"public","signature":"fn input_session_destroy(session_id: Int) -> Int","source_path":"stdlib/input.kn","line":125,"attributes":[],"docs":[],"target_notes":[]},{"name":"input_session_count","qualified_name":"std::input::input_session_count","kind":"function","visibility":"public","signature":"fn input_session_count() -> Int","source_path":"stdlib/input.kn","line":128,"attributes":[],"docs":[],"target_notes":[]},{"name":"input_bind_action","qualified_name":"std::input::input_bind_action","kind":"function","visibility":"public","signature":"fn input_bind_action(session_id: Int, source_kind: String, event_kind: String, code: String, action: String) -> Int","source_path":"stdlib/input.kn","line":131,"attributes":[],"docs":[],"target_notes":[]},{"name":"input_bind_axis","qualified_name":"std::input::input_bind_axis","kind":"function","visibility":"public","signature":"fn input_bind_axis(session_id: Int, source_kind: String, event_kind: String, code: String, axis: String, scale: Float) -> Int","source_path":"stdlib/input.kn","line":134,"attributes":[],"docs":[],"target_notes":[]},{"name":"input_push_event","qualified_name":"std::input::input_push_event","kind":"function","visibility":"public","signature":"fn input_push_event(session_id: Int, source_kind: String, source_id: String, event_kind: String, code: String, value: Float, text: String, confidence: Float) -> Int","source_path":"stdlib/input.kn","line":137,"attributes":[],"docs":[],"target_notes":[]},{"name":"input_push_key_down","qualified_name":"std::input::input_push_key_down","kind":"function","visibility":"public","signature":"fn input_push_key_down(session_id: Int, source_id: String, code: String) -> Int","source_path":"stdlib/input.kn","line":140,"attributes":[],"docs":[],"target_notes":[]},{"name":"input_push_key_up","qualified_name":"std::input::input_push_key_up","kind":"function","visibility":"public","signature":"fn input_push_key_up(session_id: Int, source_id: String, code: String) -> Int","source_path":"stdlib/input.kn","line":143,"attributes":[],"docs":[],"target_notes":[]},{"name":"input_push_text","qualified_name":"std::input::input_push_text","kind":"function","visibility":"public","signature":"fn input_push_text(session_id: Int, source_kind: String, source_id: String, code: String, text: String) -> Int","source_path":"stdlib/input.kn","line":146,"attributes":[],"docs":[],"target_notes":[]},{"name":"input_push_axis","qualified_name":"std::input::input_push_axis","kind":"function","visibility":"public","signature":"fn input_push_axis(session_id: Int, source_kind: String, source_id: String, code: String, value: Float) -> Int","source_path":"stdlib/input.kn","line":149,"attributes":[],"docs":[],"target_notes":[]},{"name":"input_push_agent_intent","qualified_name":"std::input::input_push_agent_intent","kind":"function","visibility":"public","signature":"fn input_push_agent_intent(session_id: Int, source_id: String, action: String, command_text: String, confidence: Float) -> Int","source_path":"stdlib/input.kn","line":152,"attributes":[],"docs":[],"target_notes":[]},{"name":"input_begin_frame","qualified_name":"std::input::input_begin_frame","kind":"function","visibility":"public","signature":"fn input_begin_frame(session_id: Int, delta_ms: Float) -> Int","source_path":"stdlib/input.kn","line":155,"attributes":[],"docs":[],"target_notes":[]},{"name":"input_frame_index","qualified_name":"std::input::input_frame_index","kind":"function","visibility":"public","signature":"fn input_frame_index(session_id: Int) -> Int","source_path":"stdlib/input.kn","line":158,"attributes":[],"docs":[],"target_notes":[]},{"name":"input_event_count","qualified_name":"std::input::input_event_count","kind":"function","visibility":"public","signature":"fn input_event_count(session_id: Int) -> Int","source_path":"stdlib/input.kn","line":161,"attributes":[],"docs":[],"target_notes":[]},{"name":"input_event_kind","qualified_name":"std::input::input_event_kind","kind":"function","visibility":"public","signature":"fn input_event_kind(session_id: Int, index: Int) -> String","source_path":"stdlib/input.kn","line":164,"attributes":[],"docs":[],"target_notes":[]},{"name":"input_event_source_kind","qualified_name":"std::input::input_event_source_kind","kind":"function","visibility":"public","signature":"fn input_event_source_kind(session_id: Int, index: Int) -> String","source_path":"stdlib/input.kn","line":167,"attributes":[],"docs":[],"target_notes":[]},{"name":"input_event_code","qualified_name":"std::input::input_event_code","kind":"function","visibility":"public","signature":"fn input_event_code(session_id: Int, index: Int) -> String","source_path":"stdlib/input.kn","line":170,"attributes":[],"docs":[],"target_notes":[]},{"name":"input_event_action","qualified_name":"std::input::input_event_action","kind":"function","visibility":"public","signature":"fn input_event_action(session_id: Int, index: Int) -> String","source_path":"stdlib/input.kn","line":173,"attributes":[],"docs":[],"target_notes":[]},{"name":"input_event_text","qualified_name":"std::input::input_event_text","kind":"function","visibility":"public","signature":"fn input_event_text(session_id: Int, index: Int) -> String","source_path":"stdlib/input.kn","line":176,"attributes":[],"docs":[],"target_notes":[]},{"name":"input_event_record","qualified_name":"std::input::input_event_record","kind":"function","visibility":"public","signature":"fn input_event_record(session_id: Int, index: Int) -> InputEventRecord","source_path":"stdlib/input.kn","line":179,"attributes":[],"docs":[],"target_notes":[]},{"name":"input_event_record_json","qualified_name":"std::input::input_event_record_json","kind":"function","visibility":"public","signature":"fn input_event_record_json(event: InputEventRecord) -> JsonObject","source_path":"stdlib/input.kn","line":189,"attributes":[],"docs":[],"target_notes":[]},{"name":"input_action_pressed","qualified_name":"std::input::input_action_pressed","kind":"function","visibility":"public","signature":"fn input_action_pressed(session_id: Int, action: String) -> Int","source_path":"stdlib/input.kn","line":199,"attributes":[],"docs":[],"target_notes":[]},{"name":"input_action_down","qualified_name":"std::input::input_action_down","kind":"function","visibility":"public","signature":"fn input_action_down(session_id: Int, action: String) -> Int","source_path":"stdlib/input.kn","line":202,"attributes":[],"docs":[],"target_notes":[]},{"name":"input_action_released","qualified_name":"std::input::input_action_released","kind":"function","visibility":"public","signature":"fn input_action_released(session_id: Int, action: String) -> Int","source_path":"stdlib/input.kn","line":205,"attributes":[],"docs":[],"target_notes":[]},{"name":"input_axis_value","qualified_name":"std::input::input_axis_value","kind":"function","visibility":"public","signature":"fn input_axis_value(session_id: Int, axis: String) -> Float","source_path":"stdlib/input.kn","line":208,"attributes":[],"docs":[],"target_notes":[]},{"name":"input_text_commit_count","qualified_name":"std::input::input_text_commit_count","kind":"function","visibility":"public","signature":"fn input_text_commit_count(session_id: Int) -> Int","source_path":"stdlib/input.kn","line":211,"attributes":[],"docs":[],"target_notes":[]},{"name":"input_text_commit","qualified_name":"std::input::input_text_commit","kind":"function","visibility":"public","signature":"fn input_text_commit(session_id: Int, index: Int) -> String","source_path":"stdlib/input.kn","line":214,"attributes":[],"docs":[],"target_notes":[]},{"name":"input_trace_json","qualified_name":"std::input::input_trace_json","kind":"function","visibility":"public","signature":"fn input_trace_json(session_id: Int) -> String","source_path":"stdlib/input.kn","line":217,"attributes":[],"docs":[],"target_notes":[]},{"name":"input_trace_record","qualified_name":"std::input::input_trace_record","kind":"function","visibility":"public","signature":"fn input_trace_record(session_id: Int) -> InputTraceRecord","source_path":"stdlib/input.kn","line":220,"attributes":[],"docs":[],"target_notes":[]},{"name":"input_trace_record_json","qualified_name":"std::input::input_trace_record_json","kind":"function","visibility":"public","signature":"fn input_trace_record_json(trace: InputTraceRecord) -> JsonObject","source_path":"stdlib/input.kn","line":228,"attributes":[],"docs":[],"target_notes":[]},{"name":"input_replay_trace_record","qualified_name":"std::input::input_replay_trace_record","kind":"function","visibility":"public","signature":"fn input_replay_trace_record(session_id: Int, trace: InputTraceRecord) -> Int","source_path":"stdlib/input.kn","line":236,"attributes":[],"docs":[],"target_notes":[]},{"name":"input_replay_trace_json","qualified_name":"std::input::input_replay_trace_json","kind":"function","visibility":"public","signature":"fn input_replay_trace_json(session_id: Int, trace_json: String) -> Int","source_path":"stdlib/input.kn","line":239,"attributes":[],"docs":[],"target_notes":[]},{"name":"input_last_status","qualified_name":"std::input::input_last_status","kind":"function","visibility":"public","signature":"fn input_last_status() -> Int","source_path":"stdlib/input.kn","line":242,"attributes":[],"docs":[],"target_notes":[]},{"name":"input_last_error_kind","qualified_name":"std::input::input_last_error_kind","kind":"function","visibility":"public","signature":"fn input_last_error_kind() -> String","source_path":"stdlib/input.kn","line":245,"attributes":[],"docs":[],"target_notes":[]},{"name":"input_last_error_message","qualified_name":"std::input::input_last_error_message","kind":"function","visibility":"public","signature":"fn input_last_error_message() -> String","source_path":"stdlib/input.kn","line":248,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"intent","import_path":"std::intent","source_path":"stdlib/intent.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"abi_entangle_reset","qualified_name":"std::intent::abi_entangle_reset","kind":"extern_function","visibility":"private","signature":"fn abi_entangle_reset() -> Int","source_path":"stdlib/intent.kn","line":2,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_entangle_registered_count","qualified_name":"std::intent::abi_entangle_registered_count","kind":"extern_function","visibility":"private","signature":"fn abi_entangle_registered_count() -> Int","source_path":"stdlib/intent.kn","line":5,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_entangle_register","qualified_name":"std::intent::abi_entangle_register","kind":"extern_function","visibility":"private","signature":"fn abi_entangle_register(authority: String, mirror: String, policy: String, type_name: String) -> Int","source_path":"stdlib/intent.kn","line":8,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_entangle_get_authority","qualified_name":"std::intent::abi_entangle_get_authority","kind":"extern_function","visibility":"private","signature":"fn abi_entangle_get_authority(index: Int) -> String","source_path":"stdlib/intent.kn","line":11,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_entangle_get_mirror","qualified_name":"std::intent::abi_entangle_get_mirror","kind":"extern_function","visibility":"private","signature":"fn abi_entangle_get_mirror(index: Int) -> String","source_path":"stdlib/intent.kn","line":14,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_entangle_get_policy","qualified_name":"std::intent::abi_entangle_get_policy","kind":"extern_function","visibility":"private","signature":"fn abi_entangle_get_policy(index: Int) -> String","source_path":"stdlib/intent.kn","line":17,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_entangle_get_type_name","qualified_name":"std::intent::abi_entangle_get_type_name","kind":"extern_function","visibility":"private","signature":"fn abi_entangle_get_type_name(index: Int) -> String","source_path":"stdlib/intent.kn","line":20,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_patch_journal_count","qualified_name":"std::intent::abi_patch_journal_count","kind":"extern_function","visibility":"private","signature":"fn abi_patch_journal_count() -> Int","source_path":"stdlib/intent.kn","line":23,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_patch_last_path","qualified_name":"std::intent::abi_patch_last_path","kind":"extern_function","visibility":"private","signature":"fn abi_patch_last_path() -> String","source_path":"stdlib/intent.kn","line":26,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_resonate_mutation_count","qualified_name":"std::intent::abi_resonate_mutation_count","kind":"extern_function","visibility":"private","signature":"fn abi_resonate_mutation_count() -> Int","source_path":"stdlib/intent.kn","line":29,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_resonate_fire_count","qualified_name":"std::intent::abi_resonate_fire_count","kind":"extern_function","visibility":"private","signature":"fn abi_resonate_fire_count() -> Int","source_path":"stdlib/intent.kn","line":32,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_resonate_absorb_count","qualified_name":"std::intent::abi_resonate_absorb_count","kind":"extern_function","visibility":"private","signature":"fn abi_resonate_absorb_count() -> Int","source_path":"stdlib/intent.kn","line":35,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_resonate_last_target","qualified_name":"std::intent::abi_resonate_last_target","kind":"extern_function","visibility":"private","signature":"fn abi_resonate_last_target() -> String","source_path":"stdlib/intent.kn","line":38,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_resonate_last_old_i64","qualified_name":"std::intent::abi_resonate_last_old_i64","kind":"extern_function","visibility":"private","signature":"fn abi_resonate_last_old_i64() -> Int","source_path":"stdlib/intent.kn","line":41,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_resonate_last_new_i64","qualified_name":"std::intent::abi_resonate_last_new_i64","kind":"extern_function","visibility":"private","signature":"fn abi_resonate_last_new_i64() -> Int","source_path":"stdlib/intent.kn","line":44,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_resonate_last_dampen_ns","qualified_name":"std::intent::abi_resonate_last_dampen_ns","kind":"extern_function","visibility":"private","signature":"fn abi_resonate_last_dampen_ns() -> Int","source_path":"stdlib/intent.kn","line":47,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_entangle_propagation_count","qualified_name":"std::intent::abi_entangle_propagation_count","kind":"extern_function","visibility":"private","signature":"fn abi_entangle_propagation_count() -> Int","source_path":"stdlib/intent.kn","line":50,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_entangle_last_authority","qualified_name":"std::intent::abi_entangle_last_authority","kind":"extern_function","visibility":"private","signature":"fn abi_entangle_last_authority() -> String","source_path":"stdlib/intent.kn","line":53,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_entangle_last_mirror","qualified_name":"std::intent::abi_entangle_last_mirror","kind":"extern_function","visibility":"private","signature":"fn abi_entangle_last_mirror() -> String","source_path":"stdlib/intent.kn","line":56,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_converge_mismatch_count","qualified_name":"std::intent::abi_converge_mismatch_count","kind":"extern_function","visibility":"private","signature":"fn abi_converge_mismatch_count() -> Int","source_path":"stdlib/intent.kn","line":59,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_orchestrate_stage_count","qualified_name":"std::intent::abi_orchestrate_stage_count","kind":"extern_function","visibility":"private","signature":"fn abi_orchestrate_stage_count() -> Int","source_path":"stdlib/intent.kn","line":62,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_orchestrate_last_runtime","qualified_name":"std::intent::abi_orchestrate_last_runtime","kind":"extern_function","visibility":"private","signature":"fn abi_orchestrate_last_runtime() -> String","source_path":"stdlib/intent.kn","line":65,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_orchestrate_last_function","qualified_name":"std::intent::abi_orchestrate_last_function","kind":"extern_function","visibility":"private","signature":"fn abi_orchestrate_last_function() -> String","source_path":"stdlib/intent.kn","line":68,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_orchestrate_last_selector","qualified_name":"std::intent::abi_orchestrate_last_selector","kind":"extern_function","visibility":"private","signature":"fn abi_orchestrate_last_selector() -> String","source_path":"stdlib/intent.kn","line":71,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_orchestrate_last_dependencies","qualified_name":"std::intent::abi_orchestrate_last_dependencies","kind":"extern_function","visibility":"private","signature":"fn abi_orchestrate_last_dependencies() -> String","source_path":"stdlib/intent.kn","line":74,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_orchestrate_last_residency","qualified_name":"std::intent::abi_orchestrate_last_residency","kind":"extern_function","visibility":"private","signature":"fn abi_orchestrate_last_residency() -> String","source_path":"stdlib/intent.kn","line":77,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_orchestrate_last_transfer","qualified_name":"std::intent::abi_orchestrate_last_transfer","kind":"extern_function","visibility":"private","signature":"fn abi_orchestrate_last_transfer() -> String","source_path":"stdlib/intent.kn","line":80,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_orchestrate_last_guard","qualified_name":"std::intent::abi_orchestrate_last_guard","kind":"extern_function","visibility":"private","signature":"fn abi_orchestrate_last_guard() -> String","source_path":"stdlib/intent.kn","line":83,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_orchestrate_last_fallback","qualified_name":"std::intent::abi_orchestrate_last_fallback","kind":"extern_function","visibility":"private","signature":"fn abi_orchestrate_last_fallback() -> String","source_path":"stdlib/intent.kn","line":86,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_orchestrate_last_requires","qualified_name":"std::intent::abi_orchestrate_last_requires","kind":"extern_function","visibility":"private","signature":"fn abi_orchestrate_last_requires() -> String","source_path":"stdlib/intent.kn","line":89,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_orchestrate_last_policy","qualified_name":"std::intent::abi_orchestrate_last_policy","kind":"extern_function","visibility":"private","signature":"fn abi_orchestrate_last_policy() -> String","source_path":"stdlib/intent.kn","line":92,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_orchestrate_transfer_count","qualified_name":"std::intent::abi_orchestrate_transfer_count","kind":"extern_function","visibility":"private","signature":"fn abi_orchestrate_transfer_count() -> Int","source_path":"stdlib/intent.kn","line":95,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_orchestrate_fallback_count","qualified_name":"std::intent::abi_orchestrate_fallback_count","kind":"extern_function","visibility":"private","signature":"fn abi_orchestrate_fallback_count() -> Int","source_path":"stdlib/intent.kn","line":98,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_orchestrate_adaptive_stage_count","qualified_name":"std::intent::abi_orchestrate_adaptive_stage_count","kind":"extern_function","visibility":"private","signature":"fn abi_orchestrate_adaptive_stage_count() -> Int","source_path":"stdlib/intent.kn","line":101,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"native_entangle_reset","qualified_name":"std::intent::native_entangle_reset","kind":"function","visibility":"public","signature":"fn native_entangle_reset() -> Int","source_path":"stdlib/intent.kn","line":103,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_entangle_registered_count","qualified_name":"std::intent::native_entangle_registered_count","kind":"function","visibility":"public","signature":"fn native_entangle_registered_count() -> Int","source_path":"stdlib/intent.kn","line":106,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_entangle_register","qualified_name":"std::intent::native_entangle_register","kind":"function","visibility":"public","signature":"fn native_entangle_register(authority: String, mirror: String, policy: String, type_name: String) -> Int","source_path":"stdlib/intent.kn","line":109,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_entangle_has_bindings","qualified_name":"std::intent::native_entangle_has_bindings","kind":"function","visibility":"public","signature":"fn native_entangle_has_bindings() -> Bool","source_path":"stdlib/intent.kn","line":112,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_entangle_get_authority","qualified_name":"std::intent::native_entangle_get_authority","kind":"function","visibility":"public","signature":"fn native_entangle_get_authority(index: Int) -> String","source_path":"stdlib/intent.kn","line":115,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_entangle_get_mirror","qualified_name":"std::intent::native_entangle_get_mirror","kind":"function","visibility":"public","signature":"fn native_entangle_get_mirror(index: Int) -> String","source_path":"stdlib/intent.kn","line":118,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_entangle_get_policy","qualified_name":"std::intent::native_entangle_get_policy","kind":"function","visibility":"public","signature":"fn native_entangle_get_policy(index: Int) -> String","source_path":"stdlib/intent.kn","line":121,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_entangle_get_type_name","qualified_name":"std::intent::native_entangle_get_type_name","kind":"function","visibility":"public","signature":"fn native_entangle_get_type_name(index: Int) -> String","source_path":"stdlib/intent.kn","line":124,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_patch_journal_count","qualified_name":"std::intent::native_patch_journal_count","kind":"function","visibility":"public","signature":"fn native_patch_journal_count() -> Int","source_path":"stdlib/intent.kn","line":127,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_patch_last_path","qualified_name":"std::intent::native_patch_last_path","kind":"function","visibility":"public","signature":"fn native_patch_last_path() -> String","source_path":"stdlib/intent.kn","line":130,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_resonate_mutation_count","qualified_name":"std::intent::native_resonate_mutation_count","kind":"function","visibility":"public","signature":"fn native_resonate_mutation_count() -> Int","source_path":"stdlib/intent.kn","line":133,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_resonate_fire_count","qualified_name":"std::intent::native_resonate_fire_count","kind":"function","visibility":"public","signature":"fn native_resonate_fire_count() -> Int","source_path":"stdlib/intent.kn","line":136,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_resonate_absorb_count","qualified_name":"std::intent::native_resonate_absorb_count","kind":"function","visibility":"public","signature":"fn native_resonate_absorb_count() -> Int","source_path":"stdlib/intent.kn","line":139,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_resonate_last_target","qualified_name":"std::intent::native_resonate_last_target","kind":"function","visibility":"public","signature":"fn native_resonate_last_target() -> String","source_path":"stdlib/intent.kn","line":142,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_resonate_last_old_i64","qualified_name":"std::intent::native_resonate_last_old_i64","kind":"function","visibility":"public","signature":"fn native_resonate_last_old_i64() -> Int","source_path":"stdlib/intent.kn","line":145,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_resonate_last_new_i64","qualified_name":"std::intent::native_resonate_last_new_i64","kind":"function","visibility":"public","signature":"fn native_resonate_last_new_i64() -> Int","source_path":"stdlib/intent.kn","line":148,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_resonate_last_dampen_ns","qualified_name":"std::intent::native_resonate_last_dampen_ns","kind":"function","visibility":"public","signature":"fn native_resonate_last_dampen_ns() -> Int","source_path":"stdlib/intent.kn","line":151,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_entangle_propagation_count","qualified_name":"std::intent::native_entangle_propagation_count","kind":"function","visibility":"public","signature":"fn native_entangle_propagation_count() -> Int","source_path":"stdlib/intent.kn","line":154,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_entangle_last_authority","qualified_name":"std::intent::native_entangle_last_authority","kind":"function","visibility":"public","signature":"fn native_entangle_last_authority() -> String","source_path":"stdlib/intent.kn","line":157,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_entangle_last_mirror","qualified_name":"std::intent::native_entangle_last_mirror","kind":"function","visibility":"public","signature":"fn native_entangle_last_mirror() -> String","source_path":"stdlib/intent.kn","line":160,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_converge_mismatch_count","qualified_name":"std::intent::native_converge_mismatch_count","kind":"function","visibility":"public","signature":"fn native_converge_mismatch_count() -> Int","source_path":"stdlib/intent.kn","line":163,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_orchestrate_stage_count","qualified_name":"std::intent::native_orchestrate_stage_count","kind":"function","visibility":"public","signature":"fn native_orchestrate_stage_count() -> Int","source_path":"stdlib/intent.kn","line":166,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_orchestrate_last_runtime","qualified_name":"std::intent::native_orchestrate_last_runtime","kind":"function","visibility":"public","signature":"fn native_orchestrate_last_runtime() -> String","source_path":"stdlib/intent.kn","line":169,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_orchestrate_last_function","qualified_name":"std::intent::native_orchestrate_last_function","kind":"function","visibility":"public","signature":"fn native_orchestrate_last_function() -> String","source_path":"stdlib/intent.kn","line":172,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_orchestrate_last_selector","qualified_name":"std::intent::native_orchestrate_last_selector","kind":"function","visibility":"public","signature":"fn native_orchestrate_last_selector() -> String","source_path":"stdlib/intent.kn","line":175,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_orchestrate_last_dependencies","qualified_name":"std::intent::native_orchestrate_last_dependencies","kind":"function","visibility":"public","signature":"fn native_orchestrate_last_dependencies() -> String","source_path":"stdlib/intent.kn","line":178,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_orchestrate_last_residency","qualified_name":"std::intent::native_orchestrate_last_residency","kind":"function","visibility":"public","signature":"fn native_orchestrate_last_residency() -> String","source_path":"stdlib/intent.kn","line":181,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_orchestrate_last_transfer","qualified_name":"std::intent::native_orchestrate_last_transfer","kind":"function","visibility":"public","signature":"fn native_orchestrate_last_transfer() -> String","source_path":"stdlib/intent.kn","line":184,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_orchestrate_last_guard","qualified_name":"std::intent::native_orchestrate_last_guard","kind":"function","visibility":"public","signature":"fn native_orchestrate_last_guard() -> String","source_path":"stdlib/intent.kn","line":187,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_orchestrate_last_fallback","qualified_name":"std::intent::native_orchestrate_last_fallback","kind":"function","visibility":"public","signature":"fn native_orchestrate_last_fallback() -> String","source_path":"stdlib/intent.kn","line":190,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_orchestrate_last_requires","qualified_name":"std::intent::native_orchestrate_last_requires","kind":"function","visibility":"public","signature":"fn native_orchestrate_last_requires() -> String","source_path":"stdlib/intent.kn","line":193,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_orchestrate_last_policy","qualified_name":"std::intent::native_orchestrate_last_policy","kind":"function","visibility":"public","signature":"fn native_orchestrate_last_policy() -> String","source_path":"stdlib/intent.kn","line":196,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_orchestrate_transfer_count","qualified_name":"std::intent::native_orchestrate_transfer_count","kind":"function","visibility":"public","signature":"fn native_orchestrate_transfer_count() -> Int","source_path":"stdlib/intent.kn","line":199,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_orchestrate_fallback_count","qualified_name":"std::intent::native_orchestrate_fallback_count","kind":"function","visibility":"public","signature":"fn native_orchestrate_fallback_count() -> Int","source_path":"stdlib/intent.kn","line":202,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_orchestrate_adaptive_stage_count","qualified_name":"std::intent::native_orchestrate_adaptive_stage_count","kind":"function","visibility":"public","signature":"fn native_orchestrate_adaptive_stage_count() -> Int","source_path":"stdlib/intent.kn","line":205,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_law_status","qualified_name":"std::intent::native_law_status","kind":"function","visibility":"public","signature":"fn native_law_status(valid: Bool) -> Int","source_path":"stdlib/intent.kn","line":208,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_law_is_valid_status","qualified_name":"std::intent::native_law_is_valid_status","kind":"function","visibility":"public","signature":"fn native_law_is_valid_status(status: Int) -> Bool","source_path":"stdlib/intent.kn","line":213,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_patch_status","qualified_name":"std::intent::native_patch_status","kind":"function","visibility":"public","signature":"fn native_patch_status(changed: Bool) -> Int","source_path":"stdlib/intent.kn","line":216,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_patch_is_noop","qualified_name":"std::intent::native_patch_is_noop","kind":"function","visibility":"public","signature":"fn native_patch_is_noop(status: Int) -> Bool","source_path":"stdlib/intent.kn","line":221,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_patch_applied","qualified_name":"std::intent::native_patch_applied","kind":"function","visibility":"public","signature":"fn native_patch_applied(status: Int) -> Bool","source_path":"stdlib/intent.kn","line":224,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_converge_choose_int","qualified_name":"std::intent::native_converge_choose_int","kind":"function","visibility":"public","signature":"fn native_converge_choose_int(spec_value: Int, fast_value: Int) -> Int","source_path":"stdlib/intent.kn","line":227,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_converge_choose_bool","qualified_name":"std::intent::native_converge_choose_bool","kind":"function","visibility":"public","signature":"fn native_converge_choose_bool(spec_value: Bool, fast_value: Bool) -> Bool","source_path":"stdlib/intent.kn","line":232,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_converge_status","qualified_name":"std::intent::native_converge_status","kind":"function","visibility":"public","signature":"fn native_converge_status(spec_value: Int, fast_value: Int) -> Int","source_path":"stdlib/intent.kn","line":237,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_orchestrate_stage_status","qualified_name":"std::intent::native_orchestrate_stage_status","kind":"function","visibility":"public","signature":"fn native_orchestrate_stage_status(status: Int) -> Int","source_path":"stdlib/intent.kn","line":242,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_orchestrate_merge_status","qualified_name":"std::intent::native_orchestrate_merge_status","kind":"function","visibility":"public","signature":"fn native_orchestrate_merge_status(left: Int, right: Int) -> Int","source_path":"stdlib/intent.kn","line":245,"attributes":[],"docs":[],"target_notes":[]},{"name":"entangle_reset","qualified_name":"std::intent::entangle_reset","kind":"function","visibility":"public","signature":"fn entangle_reset() -> Int","source_path":"stdlib/intent.kn","line":251,"attributes":[],"docs":[],"target_notes":[]},{"name":"entangle_registered_count","qualified_name":"std::intent::entangle_registered_count","kind":"function","visibility":"public","signature":"fn entangle_registered_count() -> Int","source_path":"stdlib/intent.kn","line":254,"attributes":[],"docs":[],"target_notes":[]},{"name":"entangle_register","qualified_name":"std::intent::entangle_register","kind":"function","visibility":"public","signature":"fn entangle_register(authority: String, mirror: String, policy: String, type_name: String) -> Int","source_path":"stdlib/intent.kn","line":257,"attributes":[],"docs":[],"target_notes":[]},{"name":"entangle_has_bindings","qualified_name":"std::intent::entangle_has_bindings","kind":"function","visibility":"public","signature":"fn entangle_has_bindings() -> Bool","source_path":"stdlib/intent.kn","line":260,"attributes":[],"docs":[],"target_notes":[]},{"name":"entangle_get_authority","qualified_name":"std::intent::entangle_get_authority","kind":"function","visibility":"public","signature":"fn entangle_get_authority(index: Int) -> String","source_path":"stdlib/intent.kn","line":263,"attributes":[],"docs":[],"target_notes":[]},{"name":"entangle_get_mirror","qualified_name":"std::intent::entangle_get_mirror","kind":"function","visibility":"public","signature":"fn entangle_get_mirror(index: Int) -> String","source_path":"stdlib/intent.kn","line":266,"attributes":[],"docs":[],"target_notes":[]},{"name":"entangle_get_policy","qualified_name":"std::intent::entangle_get_policy","kind":"function","visibility":"public","signature":"fn entangle_get_policy(index: Int) -> String","source_path":"stdlib/intent.kn","line":269,"attributes":[],"docs":[],"target_notes":[]},{"name":"entangle_get_type_name","qualified_name":"std::intent::entangle_get_type_name","kind":"function","visibility":"public","signature":"fn entangle_get_type_name(index: Int) -> String","source_path":"stdlib/intent.kn","line":272,"attributes":[],"docs":[],"target_notes":[]},{"name":"patch_journal_count","qualified_name":"std::intent::patch_journal_count","kind":"function","visibility":"public","signature":"fn patch_journal_count() -> Int","source_path":"stdlib/intent.kn","line":275,"attributes":[],"docs":[],"target_notes":[]},{"name":"patch_last_path","qualified_name":"std::intent::patch_last_path","kind":"function","visibility":"public","signature":"fn patch_last_path() -> String","source_path":"stdlib/intent.kn","line":278,"attributes":[],"docs":[],"target_notes":[]},{"name":"resonate_mutation_count","qualified_name":"std::intent::resonate_mutation_count","kind":"function","visibility":"public","signature":"fn resonate_mutation_count() -> Int","source_path":"stdlib/intent.kn","line":281,"attributes":[],"docs":[],"target_notes":[]},{"name":"resonate_fire_count","qualified_name":"std::intent::resonate_fire_count","kind":"function","visibility":"public","signature":"fn resonate_fire_count() -> Int","source_path":"stdlib/intent.kn","line":284,"attributes":[],"docs":[],"target_notes":[]},{"name":"resonate_absorb_count","qualified_name":"std::intent::resonate_absorb_count","kind":"function","visibility":"public","signature":"fn resonate_absorb_count() -> Int","source_path":"stdlib/intent.kn","line":287,"attributes":[],"docs":[],"target_notes":[]},{"name":"resonate_last_target","qualified_name":"std::intent::resonate_last_target","kind":"function","visibility":"public","signature":"fn resonate_last_target() -> String","source_path":"stdlib/intent.kn","line":290,"attributes":[],"docs":[],"target_notes":[]},{"name":"resonate_last_old_i64","qualified_name":"std::intent::resonate_last_old_i64","kind":"function","visibility":"public","signature":"fn resonate_last_old_i64() -> Int","source_path":"stdlib/intent.kn","line":293,"attributes":[],"docs":[],"target_notes":[]},{"name":"resonate_last_new_i64","qualified_name":"std::intent::resonate_last_new_i64","kind":"function","visibility":"public","signature":"fn resonate_last_new_i64() -> Int","source_path":"stdlib/intent.kn","line":296,"attributes":[],"docs":[],"target_notes":[]},{"name":"resonate_last_dampen_ns","qualified_name":"std::intent::resonate_last_dampen_ns","kind":"function","visibility":"public","signature":"fn resonate_last_dampen_ns() -> Int","source_path":"stdlib/intent.kn","line":299,"attributes":[],"docs":[],"target_notes":[]},{"name":"entangle_propagation_count","qualified_name":"std::intent::entangle_propagation_count","kind":"function","visibility":"public","signature":"fn entangle_propagation_count() -> Int","source_path":"stdlib/intent.kn","line":302,"attributes":[],"docs":[],"target_notes":[]},{"name":"entangle_last_authority","qualified_name":"std::intent::entangle_last_authority","kind":"function","visibility":"public","signature":"fn entangle_last_authority() -> String","source_path":"stdlib/intent.kn","line":305,"attributes":[],"docs":[],"target_notes":[]},{"name":"entangle_last_mirror","qualified_name":"std::intent::entangle_last_mirror","kind":"function","visibility":"public","signature":"fn entangle_last_mirror() -> String","source_path":"stdlib/intent.kn","line":308,"attributes":[],"docs":[],"target_notes":[]},{"name":"converge_mismatch_count","qualified_name":"std::intent::converge_mismatch_count","kind":"function","visibility":"public","signature":"fn converge_mismatch_count() -> Int","source_path":"stdlib/intent.kn","line":311,"attributes":[],"docs":[],"target_notes":[]},{"name":"orchestrate_stage_count","qualified_name":"std::intent::orchestrate_stage_count","kind":"function","visibility":"public","signature":"fn orchestrate_stage_count() -> Int","source_path":"stdlib/intent.kn","line":314,"attributes":[],"docs":[],"target_notes":[]},{"name":"orchestrate_last_runtime","qualified_name":"std::intent::orchestrate_last_runtime","kind":"function","visibility":"public","signature":"fn orchestrate_last_runtime() -> String","source_path":"stdlib/intent.kn","line":317,"attributes":[],"docs":[],"target_notes":[]},{"name":"orchestrate_last_function","qualified_name":"std::intent::orchestrate_last_function","kind":"function","visibility":"public","signature":"fn orchestrate_last_function() -> String","source_path":"stdlib/intent.kn","line":320,"attributes":[],"docs":[],"target_notes":[]},{"name":"orchestrate_last_selector","qualified_name":"std::intent::orchestrate_last_selector","kind":"function","visibility":"public","signature":"fn orchestrate_last_selector() -> String","source_path":"stdlib/intent.kn","line":323,"attributes":[],"docs":[],"target_notes":[]},{"name":"orchestrate_last_dependencies","qualified_name":"std::intent::orchestrate_last_dependencies","kind":"function","visibility":"public","signature":"fn orchestrate_last_dependencies() -> String","source_path":"stdlib/intent.kn","line":326,"attributes":[],"docs":[],"target_notes":[]},{"name":"orchestrate_last_residency","qualified_name":"std::intent::orchestrate_last_residency","kind":"function","visibility":"public","signature":"fn orchestrate_last_residency() -> String","source_path":"stdlib/intent.kn","line":329,"attributes":[],"docs":[],"target_notes":[]},{"name":"orchestrate_last_transfer","qualified_name":"std::intent::orchestrate_last_transfer","kind":"function","visibility":"public","signature":"fn orchestrate_last_transfer() -> String","source_path":"stdlib/intent.kn","line":332,"attributes":[],"docs":[],"target_notes":[]},{"name":"orchestrate_last_guard","qualified_name":"std::intent::orchestrate_last_guard","kind":"function","visibility":"public","signature":"fn orchestrate_last_guard() -> String","source_path":"stdlib/intent.kn","line":335,"attributes":[],"docs":[],"target_notes":[]},{"name":"orchestrate_last_fallback","qualified_name":"std::intent::orchestrate_last_fallback","kind":"function","visibility":"public","signature":"fn orchestrate_last_fallback() -> String","source_path":"stdlib/intent.kn","line":338,"attributes":[],"docs":[],"target_notes":[]},{"name":"orchestrate_last_requires","qualified_name":"std::intent::orchestrate_last_requires","kind":"function","visibility":"public","signature":"fn orchestrate_last_requires() -> String","source_path":"stdlib/intent.kn","line":341,"attributes":[],"docs":[],"target_notes":[]},{"name":"orchestrate_last_policy","qualified_name":"std::intent::orchestrate_last_policy","kind":"function","visibility":"public","signature":"fn orchestrate_last_policy() -> String","source_path":"stdlib/intent.kn","line":344,"attributes":[],"docs":[],"target_notes":[]},{"name":"orchestrate_transfer_count","qualified_name":"std::intent::orchestrate_transfer_count","kind":"function","visibility":"public","signature":"fn orchestrate_transfer_count() -> Int","source_path":"stdlib/intent.kn","line":347,"attributes":[],"docs":[],"target_notes":[]},{"name":"orchestrate_fallback_count","qualified_name":"std::intent::orchestrate_fallback_count","kind":"function","visibility":"public","signature":"fn orchestrate_fallback_count() -> Int","source_path":"stdlib/intent.kn","line":350,"attributes":[],"docs":[],"target_notes":[]},{"name":"orchestrate_adaptive_stage_count","qualified_name":"std::intent::orchestrate_adaptive_stage_count","kind":"function","visibility":"public","signature":"fn orchestrate_adaptive_stage_count() -> Int","source_path":"stdlib/intent.kn","line":353,"attributes":[],"docs":[],"target_notes":[]},{"name":"law_status","qualified_name":"std::intent::law_status","kind":"function","visibility":"public","signature":"fn law_status(valid: Bool) -> Int","source_path":"stdlib/intent.kn","line":356,"attributes":[],"docs":[],"target_notes":[]},{"name":"law_is_valid_status","qualified_name":"std::intent::law_is_valid_status","kind":"function","visibility":"public","signature":"fn law_is_valid_status(status: Int) -> Bool","source_path":"stdlib/intent.kn","line":359,"attributes":[],"docs":[],"target_notes":[]},{"name":"patch_status","qualified_name":"std::intent::patch_status","kind":"function","visibility":"public","signature":"fn patch_status(changed: Bool) -> Int","source_path":"stdlib/intent.kn","line":362,"attributes":[],"docs":[],"target_notes":[]},{"name":"patch_is_noop","qualified_name":"std::intent::patch_is_noop","kind":"function","visibility":"public","signature":"fn patch_is_noop(status: Int) -> Bool","source_path":"stdlib/intent.kn","line":365,"attributes":[],"docs":[],"target_notes":[]},{"name":"patch_applied","qualified_name":"std::intent::patch_applied","kind":"function","visibility":"public","signature":"fn patch_applied(status: Int) -> Bool","source_path":"stdlib/intent.kn","line":368,"attributes":[],"docs":[],"target_notes":[]},{"name":"converge_choose_int","qualified_name":"std::intent::converge_choose_int","kind":"function","visibility":"public","signature":"fn converge_choose_int(spec_value: Int, fast_value: Int) -> Int","source_path":"stdlib/intent.kn","line":371,"attributes":[],"docs":[],"target_notes":[]},{"name":"converge_choose_bool","qualified_name":"std::intent::converge_choose_bool","kind":"function","visibility":"public","signature":"fn converge_choose_bool(spec_value: Bool, fast_value: Bool) -> Bool","source_path":"stdlib/intent.kn","line":374,"attributes":[],"docs":[],"target_notes":[]},{"name":"converge_status","qualified_name":"std::intent::converge_status","kind":"function","visibility":"public","signature":"fn converge_status(spec_value: Int, fast_value: Int) -> Int","source_path":"stdlib/intent.kn","line":377,"attributes":[],"docs":[],"target_notes":[]},{"name":"orchestrate_stage_status","qualified_name":"std::intent::orchestrate_stage_status","kind":"function","visibility":"public","signature":"fn orchestrate_stage_status(status: Int) -> Int","source_path":"stdlib/intent.kn","line":380,"attributes":[],"docs":[],"target_notes":[]},{"name":"orchestrate_merge_status","qualified_name":"std::intent::orchestrate_merge_status","kind":"function","visibility":"public","signature":"fn orchestrate_merge_status(left: Int, right: Int) -> Int","source_path":"stdlib/intent.kn","line":383,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"interop","import_path":"std::interop","source_path":"stdlib/interop.kn","parse_status":{"status":"parsed"},"docs":["Root shared-contract interop surface for Kain.","","These wrappers keep authored code talking in `interop_*` vocabulary while the","runtime continues to own the lower `kain_shared_*` builtins."],"symbols":[{"name":"KainSharedBufferInfo","qualified_name":"std::interop::KainSharedBufferInfo","kind":"struct","visibility":"public","signature":"struct KainSharedBufferInfo","source_path":"stdlib/interop.kn","line":8,"attributes":[],"docs":[],"target_notes":[]},{"name":"KainSharedImageInfo","qualified_name":"std::interop::KainSharedImageInfo","kind":"struct","visibility":"public","signature":"struct KainSharedImageInfo","source_path":"stdlib/interop.kn","line":38,"attributes":[],"docs":[],"target_notes":[]},{"name":"interop_shared_buffer_info","qualified_name":"std::interop::interop_shared_buffer_info","kind":"function","visibility":"public","signature":"fn interop_shared_buffer_info(target: Any) -> KainSharedBufferInfo","source_path":"stdlib/interop.kn","line":58,"attributes":[],"docs":[],"target_notes":[]},{"name":"interop_shared_buffer_bytes","qualified_name":"std::interop::interop_shared_buffer_bytes","kind":"function","visibility":"public","signature":"fn interop_shared_buffer_bytes(target: Any) -> Array","source_path":"stdlib/interop.kn","line":91,"attributes":[],"docs":[],"target_notes":[]},{"name":"interop_shared_buffer_from_bytes","qualified_name":"std::interop::interop_shared_buffer_from_bytes","kind":"function","visibility":"public","signature":"fn interop_shared_buffer_from_bytes(bytes: Any, element_type: String, shape: Any, format: String, mime_type: String) -> Any","source_path":"stdlib/interop.kn","line":94,"attributes":[],"docs":[],"target_notes":[]},{"name":"interop_shared_buffer_replace_bytes","qualified_name":"std::interop::interop_shared_buffer_replace_bytes","kind":"function","visibility":"public","signature":"fn interop_shared_buffer_replace_bytes(target: Any, bytes: Any)","source_path":"stdlib/interop.kn","line":97,"attributes":[],"docs":[],"target_notes":[]},{"name":"interop_shared_image_info","qualified_name":"std::interop::interop_shared_image_info","kind":"function","visibility":"public","signature":"fn interop_shared_image_info(target: Any) -> KainSharedImageInfo","source_path":"stdlib/interop.kn","line":100,"attributes":[],"docs":[],"target_notes":[]},{"name":"interop_shared_image_bytes","qualified_name":"std::interop::interop_shared_image_bytes","kind":"function","visibility":"public","signature":"fn interop_shared_image_bytes(target: Any) -> Array","source_path":"stdlib/interop.kn","line":123,"attributes":[],"docs":[],"target_notes":[]},{"name":"interop_shared_image_from_bytes","qualified_name":"std::interop::interop_shared_image_from_bytes","kind":"function","visibility":"public","signature":"fn interop_shared_image_from_bytes(bytes: Any, width: Int, height: Int, channels: Int, layout: String, pixel_format: String, mime_type: String) -> Any","source_path":"stdlib/interop.kn","line":126,"attributes":[],"docs":[],"target_notes":[]},{"name":"interop_shared_image_replace_bytes","qualified_name":"std::interop::interop_shared_image_replace_bytes","kind":"function","visibility":"public","signature":"fn interop_shared_image_replace_bytes(target: Any, bytes: Any)","source_path":"stdlib/interop.kn","line":129,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"io","import_path":"std::io","source_path":"stdlib/io.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"RingBuffer","qualified_name":"std::io::RingBuffer","kind":"struct","visibility":"public","signature":"struct RingBuffer","source_path":"stdlib/io.kn","line":5,"attributes":[],"docs":[],"target_notes":[]},{"name":"ring_buffer_new","qualified_name":"std::io::ring_buffer_new","kind":"function","visibility":"public","signature":"fn ring_buffer_new(capacity: Int) -> RingBuffer","source_path":"stdlib/io.kn","line":11,"attributes":[],"docs":[],"target_notes":[]},{"name":"ring_buffer_destroy","qualified_name":"std::io::ring_buffer_destroy","kind":"function","visibility":"public","signature":"fn ring_buffer_destroy(rb: RingBuffer) -> Int","source_path":"stdlib/io.kn","line":21,"attributes":[],"docs":[],"target_notes":[]},{"name":"ring_buffer_available_read","qualified_name":"std::io::ring_buffer_available_read","kind":"function","visibility":"public","signature":"fn ring_buffer_available_read(rb: RingBuffer) -> Int","source_path":"stdlib/io.kn","line":25,"attributes":[],"docs":[],"target_notes":[]},{"name":"ring_buffer_available_write","qualified_name":"std::io::ring_buffer_available_write","kind":"function","visibility":"public","signature":"fn ring_buffer_available_write(rb: RingBuffer) -> Int","source_path":"stdlib/io.kn","line":32,"attributes":[],"docs":[],"target_notes":[]},{"name":"ring_buffer_write","qualified_name":"std::io::ring_buffer_write","kind":"function","visibility":"public","signature":"fn ring_buffer_write(rb: ptr, src: ptr, count: Int) -> Int","source_path":"stdlib/io.kn","line":41,"attributes":[],"docs":[],"target_notes":[]},{"name":"ring_buffer_read","qualified_name":"std::io::ring_buffer_read","kind":"function","visibility":"public","signature":"fn ring_buffer_read(rb: ptr, dest: ptr, count: Int) -> Int","source_path":"stdlib/io.kn","line":69,"attributes":[],"docs":[],"target_notes":[]},{"name":"StringBuilder","qualified_name":"std::io::StringBuilder","kind":"struct","visibility":"public","signature":"struct StringBuilder","source_path":"stdlib/io.kn","line":98,"attributes":[],"docs":[],"target_notes":[]},{"name":"string_builder_new","qualified_name":"std::io::string_builder_new","kind":"function","visibility":"public","signature":"fn string_builder_new(initial_capacity: Int) -> StringBuilder","source_path":"stdlib/io.kn","line":103,"attributes":[],"docs":[],"target_notes":[]},{"name":"string_builder_destroy","qualified_name":"std::io::string_builder_destroy","kind":"function","visibility":"public","signature":"fn string_builder_destroy(sb: StringBuilder) -> Int","source_path":"stdlib/io.kn","line":112,"attributes":[],"docs":[],"target_notes":[]},{"name":"string_builder_append_char","qualified_name":"std::io::string_builder_append_char","kind":"function","visibility":"public","signature":"fn string_builder_append_char(sb: ptr, c: Int) -> Int","source_path":"stdlib/io.kn","line":117,"attributes":[],"docs":[],"target_notes":[]},{"name":"string_builder_append_string","qualified_name":"std::io::string_builder_append_string","kind":"function","visibility":"public","signature":"fn string_builder_append_string(sb: ptr, str: String) -> Int","source_path":"stdlib/io.kn","line":143,"attributes":[],"docs":[],"target_notes":[]},{"name":"string_builder_to_string","qualified_name":"std::io::string_builder_to_string","kind":"function","visibility":"public","signature":"fn string_builder_to_string(sb: StringBuilder) -> String","source_path":"stdlib/io.kn","line":153,"attributes":[],"docs":[],"target_notes":[]},{"name":"BufferedReader","qualified_name":"std::io::BufferedReader","kind":"struct","visibility":"public","signature":"struct BufferedReader","source_path":"stdlib/io.kn","line":165,"attributes":[],"docs":[],"target_notes":[]},{"name":"buffered_reader_new","qualified_name":"std::io::buffered_reader_new","kind":"function","visibility":"public","signature":"fn buffered_reader_new(capacity: Int) -> BufferedReader","source_path":"stdlib/io.kn","line":171,"attributes":[],"docs":[],"target_notes":[]},{"name":"buffered_reader_destroy","qualified_name":"std::io::buffered_reader_destroy","kind":"function","visibility":"public","signature":"fn buffered_reader_destroy(br: BufferedReader) -> Int","source_path":"stdlib/io.kn","line":181,"attributes":[],"docs":[],"target_notes":[]},{"name":"buffered_reader_fill","qualified_name":"std::io::buffered_reader_fill","kind":"function","visibility":"public","signature":"fn buffered_reader_fill(br: ptr, src: ptr, src_len: Int) -> Int","source_path":"stdlib/io.kn","line":186,"attributes":[],"docs":[],"target_notes":[]},{"name":"buffered_reader_read","qualified_name":"std::io::buffered_reader_read","kind":"function","visibility":"public","signature":"fn buffered_reader_read(br: ptr, dest: ptr, count: Int) -> Int","source_path":"stdlib/io.kn","line":211,"attributes":[],"docs":[],"target_notes":[]},{"name":"buffered_reader_load_text","qualified_name":"std::io::buffered_reader_load_text","kind":"function","visibility":"public","signature":"fn buffered_reader_load_text(br: ptr, text: String) -> Int","source_path":"stdlib/io.kn","line":233,"attributes":[],"docs":[],"target_notes":[]},{"name":"buffered_reader_new_from_text","qualified_name":"std::io::buffered_reader_new_from_text","kind":"function","visibility":"public","signature":"fn buffered_reader_new_from_text(capacity: Int, text: String) -> BufferedReader","source_path":"stdlib/io.kn","line":250,"attributes":[],"docs":[],"target_notes":[]},{"name":"buffered_reader_materialize_text","qualified_name":"std::io::buffered_reader_materialize_text","kind":"function","visibility":"public","signature":"fn buffered_reader_materialize_text(br: BufferedReader) -> String","source_path":"stdlib/io.kn","line":256,"attributes":[],"docs":[],"target_notes":[]},{"name":"BufferedWriter","qualified_name":"std::io::BufferedWriter","kind":"struct","visibility":"public","signature":"struct BufferedWriter","source_path":"stdlib/io.kn","line":266,"attributes":[],"docs":[],"target_notes":[]},{"name":"buffered_writer_new","qualified_name":"std::io::buffered_writer_new","kind":"function","visibility":"public","signature":"fn buffered_writer_new(capacity: Int) -> BufferedWriter","source_path":"stdlib/io.kn","line":271,"attributes":[],"docs":[],"target_notes":[]},{"name":"buffered_writer_destroy","qualified_name":"std::io::buffered_writer_destroy","kind":"function","visibility":"public","signature":"fn buffered_writer_destroy(bw: BufferedWriter) -> Int","source_path":"stdlib/io.kn","line":280,"attributes":[],"docs":[],"target_notes":[]},{"name":"buffered_writer_write","qualified_name":"std::io::buffered_writer_write","kind":"function","visibility":"public","signature":"fn buffered_writer_write(bw: ptr, src: ptr, count: Int, flush_target: ptr) -> Int","source_path":"stdlib/io.kn","line":285,"attributes":[],"docs":[],"target_notes":[]},{"name":"buffered_writer_flush","qualified_name":"std::io::buffered_writer_flush","kind":"function","visibility":"public","signature":"fn buffered_writer_flush(bw: ptr, dest: ptr) -> Int","source_path":"stdlib/io.kn","line":310,"attributes":[],"docs":[],"target_notes":[]},{"name":"buffered_writer_push_char","qualified_name":"std::io::buffered_writer_push_char","kind":"function","visibility":"public","signature":"fn buffered_writer_push_char(bw: ptr, code: Int, flush_target: ptr) -> Int","source_path":"stdlib/io.kn","line":326,"attributes":[],"docs":[],"target_notes":[]},{"name":"buffered_writer_write_text","qualified_name":"std::io::buffered_writer_write_text","kind":"function","visibility":"public","signature":"fn buffered_writer_write_text(bw: ptr, text: String, flush_target: ptr) -> Int","source_path":"stdlib/io.kn","line":340,"attributes":[],"docs":[],"target_notes":[]},{"name":"buffered_writer_materialize_text","qualified_name":"std::io::buffered_writer_materialize_text","kind":"function","visibility":"public","signature":"fn buffered_writer_materialize_text(bw: BufferedWriter) -> String","source_path":"stdlib/io.kn","line":347,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"js","import_path":"std::js","source_path":"stdlib/js.kn","parse_status":{"status":"parsed"},"docs":["Root JavaScript surface for Kain.","","This module folds the old `stdlib/javascript/*` helpers into one root","`std::js` lane. Raw host-backed JS builtins stay global, while this module","gives authored Kain one stable import for bridge, Node, web, and site flows."],"symbols":[{"name":"js_bridge_exec","qualified_name":"std::js::js_bridge_exec","kind":"function","visibility":"public","signature":"fn js_bridge_exec(code: String)","source_path":"stdlib/js.kn","line":7,"attributes":[],"docs":["Root JavaScript surface for Kain.","","This module folds the old `stdlib/javascript/*` helpers into one root","`std::js` lane. Raw host-backed JS builtins stay global, while this module","gives authored Kain one stable import for bridge, Node, web, and site flows."],"target_notes":[]},{"name":"js_bridge_eval","qualified_name":"std::js::js_bridge_eval","kind":"function","visibility":"public","signature":"fn js_bridge_eval(code: String) -> Any","source_path":"stdlib/js.kn","line":10,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_bridge_eval_raw","qualified_name":"std::js::js_bridge_eval_raw","kind":"function","visibility":"public","signature":"fn js_bridge_eval_raw(code: String) -> Any","source_path":"stdlib/js.kn","line":13,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_bridge_import","qualified_name":"std::js::js_bridge_import","kind":"function","visibility":"public","signature":"fn js_bridge_import(specifier: String) -> Any","source_path":"stdlib/js.kn","line":16,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_bridge_require","qualified_name":"std::js::js_bridge_require","kind":"function","visibility":"public","signature":"fn js_bridge_require(specifier: String) -> Any","source_path":"stdlib/js.kn","line":19,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_bridge_require_raw","qualified_name":"std::js::js_bridge_require_raw","kind":"function","visibility":"public","signature":"fn js_bridge_require_raw(specifier: String) -> Any","source_path":"stdlib/js.kn","line":22,"attributes":[],"docs":[],"target_notes":[]},{"name":"node_import","qualified_name":"std::js::node_import","kind":"function","visibility":"public","signature":"fn node_import(specifier: String) -> Any","source_path":"stdlib/js.kn","line":25,"attributes":[],"docs":[],"target_notes":[]},{"name":"node_require","qualified_name":"std::js::node_require","kind":"function","visibility":"public","signature":"fn node_require(specifier: String) -> Any","source_path":"stdlib/js.kn","line":28,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_bridge_call","qualified_name":"std::js::js_bridge_call","kind":"function","visibility":"public","signature":"fn js_bridge_call(target: Any, args: Any) -> Any","source_path":"stdlib/js.kn","line":31,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_bridge_call_raw","qualified_name":"std::js::js_bridge_call_raw","kind":"function","visibility":"public","signature":"fn js_bridge_call_raw(target: Any, args: Any) -> Any","source_path":"stdlib/js.kn","line":34,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_bridge_call_method","qualified_name":"std::js::js_bridge_call_method","kind":"function","visibility":"public","signature":"fn js_bridge_call_method(target: Any, name: String, args: Any) -> Any","source_path":"stdlib/js.kn","line":37,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_bridge_call_method_raw","qualified_name":"std::js::js_bridge_call_method_raw","kind":"function","visibility":"public","signature":"fn js_bridge_call_method_raw(target: Any, name: String, args: Any) -> Any","source_path":"stdlib/js.kn","line":40,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_bridge_getattr","qualified_name":"std::js::js_bridge_getattr","kind":"function","visibility":"public","signature":"fn js_bridge_getattr(target: Any, name: String) -> Any","source_path":"stdlib/js.kn","line":43,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_bridge_getattr_raw","qualified_name":"std::js::js_bridge_getattr_raw","kind":"function","visibility":"public","signature":"fn js_bridge_getattr_raw(target: Any, name: String) -> Any","source_path":"stdlib/js.kn","line":46,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_bridge_setattr","qualified_name":"std::js::js_bridge_setattr","kind":"function","visibility":"public","signature":"fn js_bridge_setattr(target: Any, name: String, value: Any)","source_path":"stdlib/js.kn","line":49,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_bridge_hasattr","qualified_name":"std::js::js_bridge_hasattr","kind":"function","visibility":"public","signature":"fn js_bridge_hasattr(target: Any, name: String) -> Bool","source_path":"stdlib/js.kn","line":52,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_bridge_buffer_info","qualified_name":"std::js::js_bridge_buffer_info","kind":"function","visibility":"public","signature":"fn js_bridge_buffer_info(target: Any) -> Any","source_path":"stdlib/js.kn","line":55,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_bridge_buffer_bytes","qualified_name":"std::js::js_bridge_buffer_bytes","kind":"function","visibility":"public","signature":"fn js_bridge_buffer_bytes(target: Any) -> Any","source_path":"stdlib/js.kn","line":58,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_bridge_document_info","qualified_name":"std::js::js_bridge_document_info","kind":"function","visibility":"public","signature":"fn js_bridge_document_info(target: Any) -> Any","source_path":"stdlib/js.kn","line":61,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_bridge_document_text","qualified_name":"std::js::js_bridge_document_text","kind":"function","visibility":"public","signature":"fn js_bridge_document_text(target: Any) -> String","source_path":"stdlib/js.kn","line":64,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_bridge_image_info","qualified_name":"std::js::js_bridge_image_info","kind":"function","visibility":"public","signature":"fn js_bridge_image_info(target: Any) -> Any","source_path":"stdlib/js.kn","line":67,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_bridge_image_text","qualified_name":"std::js::js_bridge_image_text","kind":"function","visibility":"public","signature":"fn js_bridge_image_text(target: Any) -> String","source_path":"stdlib/js.kn","line":70,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_bridge_image_bytes","qualified_name":"std::js::js_bridge_image_bytes","kind":"function","visibility":"public","signature":"fn js_bridge_image_bytes(target: Any) -> Any","source_path":"stdlib/js.kn","line":73,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_bridge_image_buffer","qualified_name":"std::js::js_bridge_image_buffer","kind":"function","visibility":"public","signature":"fn js_bridge_image_buffer(target: Any) -> Any","source_path":"stdlib/js.kn","line":76,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_web_fs","qualified_name":"std::js::js_web_fs","kind":"function","visibility":"public","signature":"fn js_web_fs() -> Any","source_path":"stdlib/js.kn","line":79,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_web_path","qualified_name":"std::js::js_web_path","kind":"function","visibility":"public","signature":"fn js_web_path() -> Any","source_path":"stdlib/js.kn","line":82,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_web_json","qualified_name":"std::js::js_web_json","kind":"function","visibility":"public","signature":"fn js_web_json() -> Any","source_path":"stdlib/js.kn","line":85,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_web_write_text","qualified_name":"std::js::js_web_write_text","kind":"function","visibility":"public","signature":"fn js_web_write_text(path: String, text: String)","source_path":"stdlib/js.kn","line":88,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_web_read_text","qualified_name":"std::js::js_web_read_text","kind":"function","visibility":"public","signature":"fn js_web_read_text(path: String) -> String","source_path":"stdlib/js.kn","line":91,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_web_path_basename","qualified_name":"std::js::js_web_path_basename","kind":"function","visibility":"public","signature":"fn js_web_path_basename(path: String) -> String","source_path":"stdlib/js.kn","line":94,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_web_path_join","qualified_name":"std::js::js_web_path_join","kind":"function","visibility":"public","signature":"fn js_web_path_join(parts: Any) -> String","source_path":"stdlib/js.kn","line":97,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_web_json_stringify","qualified_name":"std::js::js_web_json_stringify","kind":"function","visibility":"public","signature":"fn js_web_json_stringify(value: Any) -> String","source_path":"stdlib/js.kn","line":100,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_web_json_parse","qualified_name":"std::js::js_web_json_parse","kind":"function","visibility":"public","signature":"fn js_web_json_parse(text: String) -> Any","source_path":"stdlib/js.kn","line":103,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_web_buffer_info","qualified_name":"std::js::js_web_buffer_info","kind":"function","visibility":"public","signature":"fn js_web_buffer_info(target: Any) -> Any","source_path":"stdlib/js.kn","line":106,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_web_buffer_bytes","qualified_name":"std::js::js_web_buffer_bytes","kind":"function","visibility":"public","signature":"fn js_web_buffer_bytes(target: Any) -> Any","source_path":"stdlib/js.kn","line":109,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_web_document_info","qualified_name":"std::js::js_web_document_info","kind":"function","visibility":"public","signature":"fn js_web_document_info(target: Any) -> Any","source_path":"stdlib/js.kn","line":112,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_web_document_text","qualified_name":"std::js::js_web_document_text","kind":"function","visibility":"public","signature":"fn js_web_document_text(target: Any) -> String","source_path":"stdlib/js.kn","line":115,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_web_document_write","qualified_name":"std::js::js_web_document_write","kind":"function","visibility":"public","signature":"fn js_web_document_write(path: String, target: Any)","source_path":"stdlib/js.kn","line":118,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_web_image_info","qualified_name":"std::js::js_web_image_info","kind":"function","visibility":"public","signature":"fn js_web_image_info(target: Any) -> Any","source_path":"stdlib/js.kn","line":121,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_web_canvas_info","qualified_name":"std::js::js_web_canvas_info","kind":"function","visibility":"public","signature":"fn js_web_canvas_info(target: Any) -> Any","source_path":"stdlib/js.kn","line":124,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_web_image_text","qualified_name":"std::js::js_web_image_text","kind":"function","visibility":"public","signature":"fn js_web_image_text(target: Any) -> String","source_path":"stdlib/js.kn","line":127,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_web_image_bytes","qualified_name":"std::js::js_web_image_bytes","kind":"function","visibility":"public","signature":"fn js_web_image_bytes(target: Any) -> Any","source_path":"stdlib/js.kn","line":130,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_web_canvas_bytes","qualified_name":"std::js::js_web_canvas_bytes","kind":"function","visibility":"public","signature":"fn js_web_canvas_bytes(target: Any) -> Any","source_path":"stdlib/js.kn","line":133,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_web_image_buffer","qualified_name":"std::js::js_web_image_buffer","kind":"function","visibility":"public","signature":"fn js_web_image_buffer(target: Any) -> Any","source_path":"stdlib/js.kn","line":136,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_web_image_write","qualified_name":"std::js::js_web_image_write","kind":"function","visibility":"public","signature":"fn js_web_image_write(path: String, target: Any)","source_path":"stdlib/js.kn","line":139,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_web_canvas_write","qualified_name":"std::js::js_web_canvas_write","kind":"function","visibility":"public","signature":"fn js_web_canvas_write(path: String, target: Any)","source_path":"stdlib/js.kn","line":146,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_web_shared_buffer","qualified_name":"std::js::js_web_shared_buffer","kind":"function","visibility":"public","signature":"fn js_web_shared_buffer(target: Any) -> Any","source_path":"stdlib/js.kn","line":149,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_web_shared_image","qualified_name":"std::js::js_web_shared_image","kind":"function","visibility":"public","signature":"fn js_web_shared_image(target: Any) -> Any","source_path":"stdlib/js.kn","line":152,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_web_html_document","qualified_name":"std::js::js_web_html_document","kind":"function","visibility":"public","signature":"fn js_web_html_document(title: String, body: String, background: String, accent: String) -> String","source_path":"stdlib/js.kn","line":155,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_site_runtime","qualified_name":"std::js::js_site_runtime","kind":"function","visibility":"public","signature":"fn js_site_runtime() -> Any","source_path":"stdlib/js.kn","line":180,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_site_load_app","qualified_name":"std::js::js_site_load_app","kind":"function","visibility":"public","signature":"fn js_site_load_app(path: String) -> Any","source_path":"stdlib/js.kn","line":183,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_site_build_experience","qualified_name":"std::js::js_site_build_experience","kind":"function","visibility":"public","signature":"fn js_site_build_experience(path: String, experience_id: String) -> Any","source_path":"stdlib/js.kn","line":186,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_site_bundle_client","qualified_name":"std::js::js_site_bundle_client","kind":"function","visibility":"public","signature":"fn js_site_bundle_client(path: String) -> Any","source_path":"stdlib/js.kn","line":189,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_site_default_experience","qualified_name":"std::js::js_site_default_experience","kind":"function","visibility":"public","signature":"fn js_site_default_experience(path: String) -> String","source_path":"stdlib/js.kn","line":192,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_site_bundle_and_build","qualified_name":"std::js::js_site_bundle_and_build","kind":"function","visibility":"public","signature":"fn js_site_bundle_and_build(path: String) -> Any","source_path":"stdlib/js.kn","line":195,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_site_build","qualified_name":"std::js::js_site_build","kind":"function","visibility":"public","signature":"fn js_site_build(path: String) -> Any","source_path":"stdlib/js.kn","line":198,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_site_serve","qualified_name":"std::js::js_site_serve","kind":"function","visibility":"public","signature":"fn js_site_serve(path: String, experience_id: String) -> Any","source_path":"stdlib/js.kn","line":201,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_site_serve_default","qualified_name":"std::js::js_site_serve_default","kind":"function","visibility":"public","signature":"fn js_site_serve_default(path: String) -> Any","source_path":"stdlib/js.kn","line":204,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_site_catalog","qualified_name":"std::js::js_site_catalog","kind":"function","visibility":"public","signature":"fn js_site_catalog(path: String) -> Any","source_path":"stdlib/js.kn","line":207,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_site_build_matrix","qualified_name":"std::js::js_site_build_matrix","kind":"function","visibility":"public","signature":"fn js_site_build_matrix(path: String) -> Any","source_path":"stdlib/js.kn","line":210,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_site_write_matrix","qualified_name":"std::js::js_site_write_matrix","kind":"function","visibility":"public","signature":"fn js_site_write_matrix(path: String) -> Any","source_path":"stdlib/js.kn","line":213,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_site_actor_plan","qualified_name":"std::js::js_site_actor_plan","kind":"function","visibility":"public","signature":"fn js_site_actor_plan(path: String, experience_id: String) -> Any","source_path":"stdlib/js.kn","line":216,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_site_system_contract","qualified_name":"std::js::js_site_system_contract","kind":"function","visibility":"public","signature":"fn js_site_system_contract(path: String, experience_id: String) -> Any","source_path":"stdlib/js.kn","line":219,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_site_ui_schema","qualified_name":"std::js::js_site_ui_schema","kind":"function","visibility":"public","signature":"fn js_site_ui_schema(path: String, experience_id: String) -> Any","source_path":"stdlib/js.kn","line":222,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_site_actor_report","qualified_name":"std::js::js_site_actor_report","kind":"function","visibility":"public","signature":"fn js_site_actor_report(path: String, experience_id: String) -> String","source_path":"stdlib/js.kn","line":225,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_site_build_report","qualified_name":"std::js::js_site_build_report","kind":"function","visibility":"public","signature":"fn js_site_build_report(app_manifest_path: String, template_name: String, archetypes: String, outputs: String) -> String","source_path":"stdlib/js.kn","line":228,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_actor_runtime","qualified_name":"std::js::js_actor_runtime","kind":"function","visibility":"public","signature":"fn js_actor_runtime() -> Any","source_path":"stdlib/js.kn","line":248,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_actor_server_plan","qualified_name":"std::js::js_actor_server_plan","kind":"function","visibility":"public","signature":"fn js_actor_server_plan(path: String, experience_id: String) -> Any","source_path":"stdlib/js.kn","line":251,"attributes":[],"docs":[],"target_notes":[]},{"name":"js_actor_server_report","qualified_name":"std::js::js_actor_server_report","kind":"function","visibility":"public","signature":"fn js_actor_server_report(path: String, experience_id: String) -> String","source_path":"stdlib/js.kn","line":254,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"json","import_path":"std::json","source_path":"stdlib/json.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"JsonValue","qualified_name":"std::json::JsonValue","kind":"type_alias","visibility":"public","signature":"type JsonValue = Any","source_path":"stdlib/json.kn","line":6,"attributes":[],"docs":[],"target_notes":[]},{"name":"JsonObject","qualified_name":"std::json::JsonObject","kind":"type_alias","visibility":"public","signature":"type JsonObject = Any","source_path":"stdlib/json.kn","line":7,"attributes":[],"docs":[],"target_notes":[]},{"name":"JsonArray","qualified_name":"std::json::JsonArray","kind":"type_alias","visibility":"public","signature":"type JsonArray = Any","source_path":"stdlib/json.kn","line":8,"attributes":[],"docs":[],"target_notes":[]},{"name":"JSON_TOKEN_LBRACE","qualified_name":"std::json::JSON_TOKEN_LBRACE","kind":"const","visibility":"public","signature":"const JSON_TOKEN_LBRACE: String","source_path":"stdlib/json.kn","line":10,"attributes":[],"docs":[],"target_notes":[]},{"name":"JSON_TOKEN_RBRACE","qualified_name":"std::json::JSON_TOKEN_RBRACE","kind":"const","visibility":"public","signature":"const JSON_TOKEN_RBRACE: String","source_path":"stdlib/json.kn","line":11,"attributes":[],"docs":[],"target_notes":[]},{"name":"JSON_TOKEN_LBRACKET","qualified_name":"std::json::JSON_TOKEN_LBRACKET","kind":"const","visibility":"public","signature":"const JSON_TOKEN_LBRACKET: String","source_path":"stdlib/json.kn","line":12,"attributes":[],"docs":[],"target_notes":[]},{"name":"JSON_TOKEN_RBRACKET","qualified_name":"std::json::JSON_TOKEN_RBRACKET","kind":"const","visibility":"public","signature":"const JSON_TOKEN_RBRACKET: String","source_path":"stdlib/json.kn","line":13,"attributes":[],"docs":[],"target_notes":[]},{"name":"JSON_TOKEN_COLON","qualified_name":"std::json::JSON_TOKEN_COLON","kind":"const","visibility":"public","signature":"const JSON_TOKEN_COLON: String","source_path":"stdlib/json.kn","line":14,"attributes":[],"docs":[],"target_notes":[]},{"name":"JSON_TOKEN_COMMA","qualified_name":"std::json::JSON_TOKEN_COMMA","kind":"const","visibility":"public","signature":"const JSON_TOKEN_COMMA: String","source_path":"stdlib/json.kn","line":15,"attributes":[],"docs":[],"target_notes":[]},{"name":"JSON_TOKEN_STRING","qualified_name":"std::json::JSON_TOKEN_STRING","kind":"const","visibility":"public","signature":"const JSON_TOKEN_STRING: String","source_path":"stdlib/json.kn","line":16,"attributes":[],"docs":[],"target_notes":[]},{"name":"JSON_TOKEN_NUMBER","qualified_name":"std::json::JSON_TOKEN_NUMBER","kind":"const","visibility":"public","signature":"const JSON_TOKEN_NUMBER: String","source_path":"stdlib/json.kn","line":17,"attributes":[],"docs":[],"target_notes":[]},{"name":"JSON_TOKEN_TRUE","qualified_name":"std::json::JSON_TOKEN_TRUE","kind":"const","visibility":"public","signature":"const JSON_TOKEN_TRUE: String","source_path":"stdlib/json.kn","line":18,"attributes":[],"docs":[],"target_notes":[]},{"name":"JSON_TOKEN_FALSE","qualified_name":"std::json::JSON_TOKEN_FALSE","kind":"const","visibility":"public","signature":"const JSON_TOKEN_FALSE: String","source_path":"stdlib/json.kn","line":19,"attributes":[],"docs":[],"target_notes":[]},{"name":"JSON_TOKEN_NULL","qualified_name":"std::json::JSON_TOKEN_NULL","kind":"const","visibility":"public","signature":"const JSON_TOKEN_NULL: String","source_path":"stdlib/json.kn","line":20,"attributes":[],"docs":[],"target_notes":[]},{"name":"JSON_TOKEN_WHITESPACE","qualified_name":"std::json::JSON_TOKEN_WHITESPACE","kind":"const","visibility":"public","signature":"const JSON_TOKEN_WHITESPACE: String","source_path":"stdlib/json.kn","line":21,"attributes":[],"docs":[],"target_notes":[]},{"name":"JSON_TOKEN_UNKNOWN","qualified_name":"std::json::JSON_TOKEN_UNKNOWN","kind":"const","visibility":"public","signature":"const JSON_TOKEN_UNKNOWN: String","source_path":"stdlib/json.kn","line":22,"attributes":[],"docs":[],"target_notes":[]},{"name":"JSON_KIND_NULL","qualified_name":"std::json::JSON_KIND_NULL","kind":"const","visibility":"public","signature":"const JSON_KIND_NULL: String","source_path":"stdlib/json.kn","line":24,"attributes":[],"docs":[],"target_notes":[]},{"name":"JSON_KIND_BOOL","qualified_name":"std::json::JSON_KIND_BOOL","kind":"const","visibility":"public","signature":"const JSON_KIND_BOOL: String","source_path":"stdlib/json.kn","line":25,"attributes":[],"docs":[],"target_notes":[]},{"name":"JSON_KIND_INT","qualified_name":"std::json::JSON_KIND_INT","kind":"const","visibility":"public","signature":"const JSON_KIND_INT: String","source_path":"stdlib/json.kn","line":26,"attributes":[],"docs":[],"target_notes":[]},{"name":"JSON_KIND_FLOAT","qualified_name":"std::json::JSON_KIND_FLOAT","kind":"const","visibility":"public","signature":"const JSON_KIND_FLOAT: String","source_path":"stdlib/json.kn","line":27,"attributes":[],"docs":[],"target_notes":[]},{"name":"JSON_KIND_STRING","qualified_name":"std::json::JSON_KIND_STRING","kind":"const","visibility":"public","signature":"const JSON_KIND_STRING: String","source_path":"stdlib/json.kn","line":28,"attributes":[],"docs":[],"target_notes":[]},{"name":"JSON_KIND_OBJECT","qualified_name":"std::json::JSON_KIND_OBJECT","kind":"const","visibility":"public","signature":"const JSON_KIND_OBJECT: String","source_path":"stdlib/json.kn","line":29,"attributes":[],"docs":[],"target_notes":[]},{"name":"JSON_KIND_ARRAY","qualified_name":"std::json::JSON_KIND_ARRAY","kind":"const","visibility":"public","signature":"const JSON_KIND_ARRAY: String","source_path":"stdlib/json.kn","line":30,"attributes":[],"docs":[],"target_notes":[]},{"name":"JSON_KIND_UNKNOWN","qualified_name":"std::json::JSON_KIND_UNKNOWN","kind":"const","visibility":"public","signature":"const JSON_KIND_UNKNOWN: String","source_path":"stdlib/json.kn","line":31,"attributes":[],"docs":[],"target_notes":[]},{"name":"JSON_KIND_CODE_NULL","qualified_name":"std::json::JSON_KIND_CODE_NULL","kind":"const","visibility":"public","signature":"const JSON_KIND_CODE_NULL: Int","source_path":"stdlib/json.kn","line":33,"attributes":[],"docs":[],"target_notes":[]},{"name":"JSON_KIND_CODE_BOOL","qualified_name":"std::json::JSON_KIND_CODE_BOOL","kind":"const","visibility":"public","signature":"const JSON_KIND_CODE_BOOL: Int","source_path":"stdlib/json.kn","line":34,"attributes":[],"docs":[],"target_notes":[]},{"name":"JSON_KIND_CODE_INT","qualified_name":"std::json::JSON_KIND_CODE_INT","kind":"const","visibility":"public","signature":"const JSON_KIND_CODE_INT: Int","source_path":"stdlib/json.kn","line":35,"attributes":[],"docs":[],"target_notes":[]},{"name":"JSON_KIND_CODE_FLOAT","qualified_name":"std::json::JSON_KIND_CODE_FLOAT","kind":"const","visibility":"public","signature":"const JSON_KIND_CODE_FLOAT: Int","source_path":"stdlib/json.kn","line":36,"attributes":[],"docs":[],"target_notes":[]},{"name":"JSON_KIND_CODE_STRING","qualified_name":"std::json::JSON_KIND_CODE_STRING","kind":"const","visibility":"public","signature":"const JSON_KIND_CODE_STRING: Int","source_path":"stdlib/json.kn","line":37,"attributes":[],"docs":[],"target_notes":[]},{"name":"JSON_KIND_CODE_OBJECT","qualified_name":"std::json::JSON_KIND_CODE_OBJECT","kind":"const","visibility":"public","signature":"const JSON_KIND_CODE_OBJECT: Int","source_path":"stdlib/json.kn","line":38,"attributes":[],"docs":[],"target_notes":[]},{"name":"JSON_KIND_CODE_ARRAY","qualified_name":"std::json::JSON_KIND_CODE_ARRAY","kind":"const","visibility":"public","signature":"const JSON_KIND_CODE_ARRAY: Int","source_path":"stdlib/json.kn","line":39,"attributes":[],"docs":[],"target_notes":[]},{"name":"JSON_KIND_CODE_UNKNOWN","qualified_name":"std::json::JSON_KIND_CODE_UNKNOWN","kind":"const","visibility":"public","signature":"const JSON_KIND_CODE_UNKNOWN: Int","source_path":"stdlib/json.kn","line":40,"attributes":[],"docs":[],"target_notes":[]},{"name":"JSON_STATUS_OK","qualified_name":"std::json::JSON_STATUS_OK","kind":"const","visibility":"public","signature":"const JSON_STATUS_OK: Int","source_path":"stdlib/json.kn","line":42,"attributes":[],"docs":[],"target_notes":[]},{"name":"JSON_STATUS_MISSING_KEY","qualified_name":"std::json::JSON_STATUS_MISSING_KEY","kind":"const","visibility":"public","signature":"const JSON_STATUS_MISSING_KEY: Int","source_path":"stdlib/json.kn","line":43,"attributes":[],"docs":[],"target_notes":[]},{"name":"JSON_STATUS_WRONG_KIND","qualified_name":"std::json::JSON_STATUS_WRONG_KIND","kind":"const","visibility":"public","signature":"const JSON_STATUS_WRONG_KIND: Int","source_path":"stdlib/json.kn","line":44,"attributes":[],"docs":[],"target_notes":[]},{"name":"JSON_STATUS_INDEX_OUT_OF_RANGE","qualified_name":"std::json::JSON_STATUS_INDEX_OUT_OF_RANGE","kind":"const","visibility":"public","signature":"const JSON_STATUS_INDEX_OUT_OF_RANGE: Int","source_path":"stdlib/json.kn","line":45,"attributes":[],"docs":[],"target_notes":[]},{"name":"JSON_STATUS_SCAN_UNKNOWN_TOKEN","qualified_name":"std::json::JSON_STATUS_SCAN_UNKNOWN_TOKEN","kind":"const","visibility":"public","signature":"const JSON_STATUS_SCAN_UNKNOWN_TOKEN: Int","source_path":"stdlib/json.kn","line":46,"attributes":[],"docs":[],"target_notes":[]},{"name":"JSON_STATUS_SCAN_UNTERMINATED_STRING","qualified_name":"std::json::JSON_STATUS_SCAN_UNTERMINATED_STRING","kind":"const","visibility":"public","signature":"const JSON_STATUS_SCAN_UNTERMINATED_STRING: Int","source_path":"stdlib/json.kn","line":47,"attributes":[],"docs":[],"target_notes":[]},{"name":"JSON_STATUS_SCAN_UNBALANCED_DELIMITER","qualified_name":"std::json::JSON_STATUS_SCAN_UNBALANCED_DELIMITER","kind":"const","visibility":"public","signature":"const JSON_STATUS_SCAN_UNBALANCED_DELIMITER: Int","source_path":"stdlib/json.kn","line":48,"attributes":[],"docs":[],"target_notes":[]},{"name":"JSON_STATUS_SCAN_EMPTY_INPUT","qualified_name":"std::json::JSON_STATUS_SCAN_EMPTY_INPUT","kind":"const","visibility":"public","signature":"const JSON_STATUS_SCAN_EMPTY_INPUT: Int","source_path":"stdlib/json.kn","line":49,"attributes":[],"docs":[],"target_notes":[]},{"name":"JsonToken","qualified_name":"std::json::JsonToken","kind":"struct","visibility":"public","signature":"struct JsonToken","source_path":"stdlib/json.kn","line":51,"attributes":[],"docs":[],"target_notes":[]},{"name":"JsonStatus","qualified_name":"std::json::JsonStatus","kind":"struct","visibility":"public","signature":"struct JsonStatus","source_path":"stdlib/json.kn","line":57,"attributes":[],"docs":[],"target_notes":[]},{"name":"JsonStringResult","qualified_name":"std::json::JsonStringResult","kind":"struct","visibility":"public","signature":"struct JsonStringResult","source_path":"stdlib/json.kn","line":66,"attributes":[],"docs":[],"target_notes":[]},{"name":"JsonIntResult","qualified_name":"std::json::JsonIntResult","kind":"struct","visibility":"public","signature":"struct JsonIntResult","source_path":"stdlib/json.kn","line":71,"attributes":[],"docs":[],"target_notes":[]},{"name":"JsonFloatResult","qualified_name":"std::json::JsonFloatResult","kind":"struct","visibility":"public","signature":"struct JsonFloatResult","source_path":"stdlib/json.kn","line":76,"attributes":[],"docs":[],"target_notes":[]},{"name":"JsonBoolResult","qualified_name":"std::json::JsonBoolResult","kind":"struct","visibility":"public","signature":"struct JsonBoolResult","source_path":"stdlib/json.kn","line":81,"attributes":[],"docs":[],"target_notes":[]},{"name":"JsonObjectResult","qualified_name":"std::json::JsonObjectResult","kind":"struct","visibility":"public","signature":"struct JsonObjectResult","source_path":"stdlib/json.kn","line":86,"attributes":[],"docs":[],"target_notes":[]},{"name":"JsonArrayResult","qualified_name":"std::json::JsonArrayResult","kind":"struct","visibility":"public","signature":"struct JsonArrayResult","source_path":"stdlib/json.kn","line":91,"attributes":[],"docs":[],"target_notes":[]},{"name":"JsonStringArrayResult","qualified_name":"std::json::JsonStringArrayResult","kind":"struct","visibility":"public","signature":"struct JsonStringArrayResult","source_path":"stdlib/json.kn","line":96,"attributes":[],"docs":[],"target_notes":[]},{"name":"JsonIntArrayResult","qualified_name":"std::json::JsonIntArrayResult","kind":"struct","visibility":"public","signature":"struct JsonIntArrayResult","source_path":"stdlib/json.kn","line":101,"attributes":[],"docs":[],"target_notes":[]},{"name":"JsonFloatArrayResult","qualified_name":"std::json::JsonFloatArrayResult","kind":"struct","visibility":"public","signature":"struct JsonFloatArrayResult","source_path":"stdlib/json.kn","line":106,"attributes":[],"docs":[],"target_notes":[]},{"name":"JsonBoolArrayResult","qualified_name":"std::json::JsonBoolArrayResult","kind":"struct","visibility":"public","signature":"struct JsonBoolArrayResult","source_path":"stdlib/json.kn","line":111,"attributes":[],"docs":[],"target_notes":[]},{"name":"JsonParseResult","qualified_name":"std::json::JsonParseResult","kind":"struct","visibility":"public","signature":"struct JsonParseResult","source_path":"stdlib/json.kn","line":116,"attributes":[],"docs":[],"target_notes":[]},{"name":"JsonScanReport","qualified_name":"std::json::JsonScanReport","kind":"struct","visibility":"public","signature":"struct JsonScanReport","source_path":"stdlib/json.kn","line":121,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_token","qualified_name":"std::json::json_token","kind":"function","visibility":"private","signature":"fn json_token(kind: String, source: String, start: Int, length: Int) -> JsonToken","source_path":"stdlib/json.kn","line":129,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_status_ok","qualified_name":"std::json::json_status_ok","kind":"function","visibility":"private","signature":"fn json_status_ok() -> JsonStatus","source_path":"stdlib/json.kn","line":137,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_status_error","qualified_name":"std::json::json_status_error","kind":"function","visibility":"private","signature":"fn json_status_error(code: Int, key: String, expected_kind: String, actual_kind: String, index: Int, message: String) -> JsonStatus","source_path":"stdlib/json.kn","line":148,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_missing_key_status","qualified_name":"std::json::json_missing_key_status","kind":"function","visibility":"private","signature":"fn json_missing_key_status(key: String) -> JsonStatus","source_path":"stdlib/json.kn","line":159,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_wrong_kind_status","qualified_name":"std::json::json_wrong_kind_status","kind":"function","visibility":"private","signature":"fn json_wrong_kind_status(key: String, expected_kind: String, actual_kind: String, index: Int) -> JsonStatus","source_path":"stdlib/json.kn","line":169,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_index_status","qualified_name":"std::json::json_index_status","kind":"function","visibility":"private","signature":"fn json_index_status(index: Int, actual_kind: String) -> JsonStatus","source_path":"stdlib/json.kn","line":184,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_wrap_value","qualified_name":"std::json::json_wrap_value","kind":"function","visibility":"private","signature":"fn json_wrap_value(value: JsonValue) -> JsonObject","source_path":"stdlib/json.kn","line":194,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_native_kind_name","qualified_name":"std::json::json_native_kind_name","kind":"function","visibility":"private","signature":"fn json_native_kind_name(kind: Int) -> String","source_path":"stdlib/json.kn","line":199,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_string_value","qualified_name":"std::json::json_string_value","kind":"function","visibility":"private","signature":"fn json_string_value(value: JsonValue) -> String","source_path":"stdlib/json.kn","line":216,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_int_value","qualified_name":"std::json::json_int_value","kind":"function","visibility":"private","signature":"fn json_int_value(value: JsonValue) -> Int","source_path":"stdlib/json.kn","line":219,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_float_value","qualified_name":"std::json::json_float_value","kind":"function","visibility":"private","signature":"fn json_float_value(value: JsonValue, actual_kind: String) -> Float","source_path":"stdlib/json.kn","line":222,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_bool_value","qualified_name":"std::json::json_bool_value","kind":"function","visibility":"private","signature":"fn json_bool_value(value: JsonValue) -> Bool","source_path":"stdlib/json.kn","line":226,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_string_result_error","qualified_name":"std::json::json_string_result_error","kind":"function","visibility":"private","signature":"fn json_string_result_error(status: JsonStatus) -> JsonStringResult","source_path":"stdlib/json.kn","line":229,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_int_result_error","qualified_name":"std::json::json_int_result_error","kind":"function","visibility":"private","signature":"fn json_int_result_error(status: JsonStatus) -> JsonIntResult","source_path":"stdlib/json.kn","line":236,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_float_result_error","qualified_name":"std::json::json_float_result_error","kind":"function","visibility":"private","signature":"fn json_float_result_error(status: JsonStatus) -> JsonFloatResult","source_path":"stdlib/json.kn","line":243,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_bool_result_error","qualified_name":"std::json::json_bool_result_error","kind":"function","visibility":"private","signature":"fn json_bool_result_error(status: JsonStatus) -> JsonBoolResult","source_path":"stdlib/json.kn","line":250,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_object_result_error","qualified_name":"std::json::json_object_result_error","kind":"function","visibility":"private","signature":"fn json_object_result_error(status: JsonStatus) -> JsonObjectResult","source_path":"stdlib/json.kn","line":257,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_array_result_error","qualified_name":"std::json::json_array_result_error","kind":"function","visibility":"private","signature":"fn json_array_result_error(status: JsonStatus) -> JsonArrayResult","source_path":"stdlib/json.kn","line":264,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_string_array_result_error","qualified_name":"std::json::json_string_array_result_error","kind":"function","visibility":"private","signature":"fn json_string_array_result_error(status: JsonStatus) -> JsonStringArrayResult","source_path":"stdlib/json.kn","line":271,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_int_array_result_error","qualified_name":"std::json::json_int_array_result_error","kind":"function","visibility":"private","signature":"fn json_int_array_result_error(status: JsonStatus) -> JsonIntArrayResult","source_path":"stdlib/json.kn","line":278,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_float_array_result_error","qualified_name":"std::json::json_float_array_result_error","kind":"function","visibility":"private","signature":"fn json_float_array_result_error(status: JsonStatus) -> JsonFloatArrayResult","source_path":"stdlib/json.kn","line":285,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_bool_array_result_error","qualified_name":"std::json::json_bool_array_result_error","kind":"function","visibility":"private","signature":"fn json_bool_array_result_error(status: JsonStatus) -> JsonBoolArrayResult","source_path":"stdlib/json.kn","line":292,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_parse_result_error","qualified_name":"std::json::json_parse_result_error","kind":"function","visibility":"private","signature":"fn json_parse_result_error(status: JsonStatus) -> JsonParseResult","source_path":"stdlib/json.kn","line":299,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_status_from_scan_report","qualified_name":"std::json::json_status_from_scan_report","kind":"function","visibility":"private","signature":"fn json_status_from_scan_report(report: JsonScanReport) -> JsonStatus","source_path":"stdlib/json.kn","line":306,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_match_literal","qualified_name":"std::json::json_match_literal","kind":"function","visibility":"private","signature":"fn json_match_literal(text: String, start: Int, literal: String) -> Bool","source_path":"stdlib/json.kn","line":318,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_scan_string_end","qualified_name":"std::json::json_scan_string_end","kind":"function","visibility":"private","signature":"fn json_scan_string_end(text: String, start: Int) -> Int","source_path":"stdlib/json.kn","line":328,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_scan_number_end","qualified_name":"std::json::json_scan_number_end","kind":"function","visibility":"private","signature":"fn json_scan_number_end(text: String, start: Int) -> Int","source_path":"stdlib/json.kn","line":344,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_kind_from_rendered","qualified_name":"std::json::json_kind_from_rendered","kind":"function","visibility":"private","signature":"fn json_kind_from_rendered(rendered: String) -> String","source_path":"stdlib/json.kn","line":369,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_kind_from_value","qualified_name":"std::json::json_kind_from_value","kind":"function","visibility":"private","signature":"fn json_kind_from_value(value: JsonValue) -> String","source_path":"stdlib/json.kn","line":384,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_rendered_result","qualified_name":"std::json::json_rendered_result","kind":"function","visibility":"private","signature":"fn json_rendered_result(value: String) -> JsonStringResult","source_path":"stdlib/json.kn","line":387,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_value_end_token_index","qualified_name":"std::json::json_value_end_token_index","kind":"function","visibility":"private","signature":"fn json_value_end_token_index(tokens: Array, start_index: Int) -> Int","source_path":"stdlib/json.kn","line":394,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_field_rendered","qualified_name":"std::json::json_field_rendered","kind":"function","visibility":"private","signature":"fn json_field_rendered(object: JsonObject, key: String) -> JsonStringResult","source_path":"stdlib/json.kn","line":423,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_parse_text","qualified_name":"std::json::json_parse_text","kind":"function","visibility":"public","signature":"fn json_parse_text(text: String) -> JsonValue","source_path":"stdlib/json.kn","line":456,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_parse_text_result","qualified_name":"std::json::json_parse_text_result","kind":"function","visibility":"public","signature":"fn json_parse_text_result(text: String) -> JsonParseResult","source_path":"stdlib/json.kn","line":459,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_parse_text_or","qualified_name":"std::json::json_parse_text_or","kind":"function","visibility":"public","signature":"fn json_parse_text_or(text: String, fallback: JsonValue) -> JsonValue","source_path":"stdlib/json.kn","line":469,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_stringify","qualified_name":"std::json::json_stringify","kind":"function","visibility":"public","signature":"fn json_stringify(value: JsonValue) -> String","source_path":"stdlib/json.kn","line":475,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_has_key","qualified_name":"std::json::json_has_key","kind":"function","visibility":"public","signature":"fn json_has_key(object: JsonObject, key: String) -> Bool","source_path":"stdlib/json.kn","line":478,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_get_value","qualified_name":"std::json::json_get_value","kind":"function","visibility":"public","signature":"fn json_get_value(object: JsonObject, key: String) -> JsonValue","source_path":"stdlib/json.kn","line":481,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_value_kind","qualified_name":"std::json::json_value_kind","kind":"function","visibility":"public","signature":"fn json_value_kind(value: JsonValue) -> String","source_path":"stdlib/json.kn","line":484,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_value_kind_code","qualified_name":"std::json::json_value_kind_code","kind":"function","visibility":"public","signature":"fn json_value_kind_code(value: JsonValue) -> Int","source_path":"stdlib/json.kn","line":487,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_is_null","qualified_name":"std::json::json_is_null","kind":"function","visibility":"public","signature":"fn json_is_null(value: JsonValue) -> Bool","source_path":"stdlib/json.kn","line":490,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_is_string","qualified_name":"std::json::json_is_string","kind":"function","visibility":"public","signature":"fn json_is_string(value: JsonValue) -> Bool","source_path":"stdlib/json.kn","line":493,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_is_int","qualified_name":"std::json::json_is_int","kind":"function","visibility":"public","signature":"fn json_is_int(value: JsonValue) -> Bool","source_path":"stdlib/json.kn","line":496,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_is_float","qualified_name":"std::json::json_is_float","kind":"function","visibility":"public","signature":"fn json_is_float(value: JsonValue) -> Bool","source_path":"stdlib/json.kn","line":499,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_is_bool","qualified_name":"std::json::json_is_bool","kind":"function","visibility":"public","signature":"fn json_is_bool(value: JsonValue) -> Bool","source_path":"stdlib/json.kn","line":502,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_is_object","qualified_name":"std::json::json_is_object","kind":"function","visibility":"public","signature":"fn json_is_object(value: JsonValue) -> Bool","source_path":"stdlib/json.kn","line":505,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_is_array","qualified_name":"std::json::json_is_array","kind":"function","visibility":"public","signature":"fn json_is_array(value: JsonValue) -> Bool","source_path":"stdlib/json.kn","line":508,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_string_required","qualified_name":"std::json::json_string_required","kind":"function","visibility":"public","signature":"fn json_string_required(object: JsonObject, key: String) -> String","source_path":"stdlib/json.kn","line":511,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_int_required","qualified_name":"std::json::json_int_required","kind":"function","visibility":"public","signature":"fn json_int_required(object: JsonObject, key: String) -> Int","source_path":"stdlib/json.kn","line":514,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_float_required","qualified_name":"std::json::json_float_required","kind":"function","visibility":"public","signature":"fn json_float_required(object: JsonObject, key: String) -> Float","source_path":"stdlib/json.kn","line":517,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_bool_required","qualified_name":"std::json::json_bool_required","kind":"function","visibility":"public","signature":"fn json_bool_required(object: JsonObject, key: String) -> Bool","source_path":"stdlib/json.kn","line":520,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_string_or","qualified_name":"std::json::json_string_or","kind":"function","visibility":"public","signature":"fn json_string_or(object: JsonObject, key: String, default_value: String) -> String","source_path":"stdlib/json.kn","line":523,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_int_or","qualified_name":"std::json::json_int_or","kind":"function","visibility":"public","signature":"fn json_int_or(object: JsonObject, key: String, default_value: Int) -> Int","source_path":"stdlib/json.kn","line":528,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_float_or","qualified_name":"std::json::json_float_or","kind":"function","visibility":"public","signature":"fn json_float_or(object: JsonObject, key: String, default_value: Float) -> Float","source_path":"stdlib/json.kn","line":533,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_bool_or","qualified_name":"std::json::json_bool_or","kind":"function","visibility":"public","signature":"fn json_bool_or(object: JsonObject, key: String, default_value: Bool) -> Bool","source_path":"stdlib/json.kn","line":538,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_string_field","qualified_name":"std::json::json_string_field","kind":"function","visibility":"public","signature":"fn json_string_field(object: JsonObject, key: String) -> JsonStringResult","source_path":"stdlib/json.kn","line":543,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_int_field","qualified_name":"std::json::json_int_field","kind":"function","visibility":"public","signature":"fn json_int_field(object: JsonObject, key: String) -> JsonIntResult","source_path":"stdlib/json.kn","line":557,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_float_field","qualified_name":"std::json::json_float_field","kind":"function","visibility":"public","signature":"fn json_float_field(object: JsonObject, key: String) -> JsonFloatResult","source_path":"stdlib/json.kn","line":571,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_bool_field","qualified_name":"std::json::json_bool_field","kind":"function","visibility":"public","signature":"fn json_bool_field(object: JsonObject, key: String) -> JsonBoolResult","source_path":"stdlib/json.kn","line":585,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_object_field","qualified_name":"std::json::json_object_field","kind":"function","visibility":"public","signature":"fn json_object_field(object: JsonObject, key: String) -> JsonObjectResult","source_path":"stdlib/json.kn","line":599,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_array_field","qualified_name":"std::json::json_array_field","kind":"function","visibility":"public","signature":"fn json_array_field(object: JsonObject, key: String) -> JsonArrayResult","source_path":"stdlib/json.kn","line":613,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_object","qualified_name":"std::json::json_object","kind":"function","visibility":"public","signature":"fn json_object() -> JsonObject","source_path":"stdlib/json.kn","line":627,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_object_set_value","qualified_name":"std::json::json_object_set_value","kind":"function","visibility":"public","signature":"fn json_object_set_value(object: JsonObject, key: String, value: JsonValue) -> JsonObject","source_path":"stdlib/json.kn","line":630,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_object_set_string","qualified_name":"std::json::json_object_set_string","kind":"function","visibility":"public","signature":"fn json_object_set_string(object: JsonObject, key: String, value: String) -> JsonObject","source_path":"stdlib/json.kn","line":634,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_object_set_int","qualified_name":"std::json::json_object_set_int","kind":"function","visibility":"public","signature":"fn json_object_set_int(object: JsonObject, key: String, value: Int) -> JsonObject","source_path":"stdlib/json.kn","line":637,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_object_set_float","qualified_name":"std::json::json_object_set_float","kind":"function","visibility":"public","signature":"fn json_object_set_float(object: JsonObject, key: String, value: Float) -> JsonObject","source_path":"stdlib/json.kn","line":640,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_object_set_bool","qualified_name":"std::json::json_object_set_bool","kind":"function","visibility":"public","signature":"fn json_object_set_bool(object: JsonObject, key: String, value: Bool) -> JsonObject","source_path":"stdlib/json.kn","line":643,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_object_set_object","qualified_name":"std::json::json_object_set_object","kind":"function","visibility":"public","signature":"fn json_object_set_object(object: JsonObject, key: String, value: JsonObject) -> JsonObject","source_path":"stdlib/json.kn","line":646,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_object_set_array","qualified_name":"std::json::json_object_set_array","kind":"function","visibility":"public","signature":"fn json_object_set_array(object: JsonObject, key: String, value: JsonArray) -> JsonObject","source_path":"stdlib/json.kn","line":649,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_array","qualified_name":"std::json::json_array","kind":"function","visibility":"public","signature":"fn json_array() -> JsonArray","source_path":"stdlib/json.kn","line":652,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_array_push_value","qualified_name":"std::json::json_array_push_value","kind":"function","visibility":"public","signature":"fn json_array_push_value(array: JsonArray, value: JsonValue) -> JsonArray","source_path":"stdlib/json.kn","line":655,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_array_push_string","qualified_name":"std::json::json_array_push_string","kind":"function","visibility":"public","signature":"fn json_array_push_string(array: JsonArray, value: String) -> JsonArray","source_path":"stdlib/json.kn","line":659,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_array_push_int","qualified_name":"std::json::json_array_push_int","kind":"function","visibility":"public","signature":"fn json_array_push_int(array: JsonArray, value: Int) -> JsonArray","source_path":"stdlib/json.kn","line":662,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_array_push_float","qualified_name":"std::json::json_array_push_float","kind":"function","visibility":"public","signature":"fn json_array_push_float(array: JsonArray, value: Float) -> JsonArray","source_path":"stdlib/json.kn","line":665,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_array_push_bool","qualified_name":"std::json::json_array_push_bool","kind":"function","visibility":"public","signature":"fn json_array_push_bool(array: JsonArray, value: Bool) -> JsonArray","source_path":"stdlib/json.kn","line":668,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_array_push_object","qualified_name":"std::json::json_array_push_object","kind":"function","visibility":"public","signature":"fn json_array_push_object(array: JsonArray, value: JsonObject) -> JsonArray","source_path":"stdlib/json.kn","line":671,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_array_push_array","qualified_name":"std::json::json_array_push_array","kind":"function","visibility":"public","signature":"fn json_array_push_array(array: JsonArray, value: JsonArray) -> JsonArray","source_path":"stdlib/json.kn","line":674,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_array_length","qualified_name":"std::json::json_array_length","kind":"function","visibility":"public","signature":"fn json_array_length(array: JsonArray) -> Int","source_path":"stdlib/json.kn","line":677,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_array_value_at","qualified_name":"std::json::json_array_value_at","kind":"function","visibility":"public","signature":"fn json_array_value_at(array: JsonArray, index: Int) -> JsonValue","source_path":"stdlib/json.kn","line":680,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_string_array","qualified_name":"std::json::json_string_array","kind":"function","visibility":"public","signature":"fn json_string_array(values: JsonArray) -> Array","source_path":"stdlib/json.kn","line":683,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_int_array","qualified_name":"std::json::json_int_array","kind":"function","visibility":"public","signature":"fn json_int_array(values: JsonArray) -> Array","source_path":"stdlib/json.kn","line":691,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_float_array","qualified_name":"std::json::json_float_array","kind":"function","visibility":"public","signature":"fn json_float_array(values: JsonArray) -> Array","source_path":"stdlib/json.kn","line":699,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_bool_array","qualified_name":"std::json::json_bool_array","kind":"function","visibility":"public","signature":"fn json_bool_array(values: JsonArray) -> Array","source_path":"stdlib/json.kn","line":708,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_string_array_result","qualified_name":"std::json::json_string_array_result","kind":"function","visibility":"public","signature":"fn json_string_array_result(values: JsonArray) -> JsonStringArrayResult","source_path":"stdlib/json.kn","line":716,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_int_array_result","qualified_name":"std::json::json_int_array_result","kind":"function","visibility":"public","signature":"fn json_int_array_result(values: JsonArray) -> JsonIntArrayResult","source_path":"stdlib/json.kn","line":735,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_float_array_result","qualified_name":"std::json::json_float_array_result","kind":"function","visibility":"public","signature":"fn json_float_array_result(values: JsonArray) -> JsonFloatArrayResult","source_path":"stdlib/json.kn","line":754,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_bool_array_result","qualified_name":"std::json::json_bool_array_result","kind":"function","visibility":"public","signature":"fn json_bool_array_result(values: JsonArray) -> JsonBoolArrayResult","source_path":"stdlib/json.kn","line":773,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_string_array_field","qualified_name":"std::json::json_string_array_field","kind":"function","visibility":"public","signature":"fn json_string_array_field(object: JsonObject, key: String) -> Array","source_path":"stdlib/json.kn","line":792,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_string_array_field_result","qualified_name":"std::json::json_string_array_field_result","kind":"function","visibility":"public","signature":"fn json_string_array_field_result(object: JsonObject, key: String) -> JsonStringArrayResult","source_path":"stdlib/json.kn","line":798,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_int_array_field_result","qualified_name":"std::json::json_int_array_field_result","kind":"function","visibility":"public","signature":"fn json_int_array_field_result(object: JsonObject, key: String) -> JsonIntArrayResult","source_path":"stdlib/json.kn","line":804,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_float_array_field_result","qualified_name":"std::json::json_float_array_field_result","kind":"function","visibility":"public","signature":"fn json_float_array_field_result(object: JsonObject, key: String) -> JsonFloatArrayResult","source_path":"stdlib/json.kn","line":810,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_bool_array_field_result","qualified_name":"std::json::json_bool_array_field_result","kind":"function","visibility":"public","signature":"fn json_bool_array_field_result(object: JsonObject, key: String) -> JsonBoolArrayResult","source_path":"stdlib/json.kn","line":816,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_array_from_strings","qualified_name":"std::json::json_array_from_strings","kind":"function","visibility":"public","signature":"fn json_array_from_strings(values: Array) -> JsonArray","source_path":"stdlib/json.kn","line":822,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_array_from_ints","qualified_name":"std::json::json_array_from_ints","kind":"function","visibility":"public","signature":"fn json_array_from_ints(values: Array) -> JsonArray","source_path":"stdlib/json.kn","line":830,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_array_from_floats","qualified_name":"std::json::json_array_from_floats","kind":"function","visibility":"public","signature":"fn json_array_from_floats(values: Array) -> JsonArray","source_path":"stdlib/json.kn","line":838,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_array_from_bools","qualified_name":"std::json::json_array_from_bools","kind":"function","visibility":"public","signature":"fn json_array_from_bools(values: Array) -> JsonArray","source_path":"stdlib/json.kn","line":846,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_object_set_string_array","qualified_name":"std::json::json_object_set_string_array","kind":"function","visibility":"public","signature":"fn json_object_set_string_array(object: JsonObject, key: String, values: Array) -> JsonObject","source_path":"stdlib/json.kn","line":854,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_object_set_int_array","qualified_name":"std::json::json_object_set_int_array","kind":"function","visibility":"public","signature":"fn json_object_set_int_array(object: JsonObject, key: String, values: Array) -> JsonObject","source_path":"stdlib/json.kn","line":857,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_object_set_float_array","qualified_name":"std::json::json_object_set_float_array","kind":"function","visibility":"public","signature":"fn json_object_set_float_array(object: JsonObject, key: String, values: Array) -> JsonObject","source_path":"stdlib/json.kn","line":860,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_object_set_bool_array","qualified_name":"std::json::json_object_set_bool_array","kind":"function","visibility":"public","signature":"fn json_object_set_bool_array(object: JsonObject, key: String, values: Array) -> JsonObject","source_path":"stdlib/json.kn","line":863,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_object_with_string","qualified_name":"std::json::json_object_with_string","kind":"function","visibility":"public","signature":"fn json_object_with_string(key: String, value: String) -> JsonObject","source_path":"stdlib/json.kn","line":866,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_object_with_int","qualified_name":"std::json::json_object_with_int","kind":"function","visibility":"public","signature":"fn json_object_with_int(key: String, value: Int) -> JsonObject","source_path":"stdlib/json.kn","line":869,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_object_with_float","qualified_name":"std::json::json_object_with_float","kind":"function","visibility":"public","signature":"fn json_object_with_float(key: String, value: Float) -> JsonObject","source_path":"stdlib/json.kn","line":872,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_object_with_bool","qualified_name":"std::json::json_object_with_bool","kind":"function","visibility":"public","signature":"fn json_object_with_bool(key: String, value: Bool) -> JsonObject","source_path":"stdlib/json.kn","line":875,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_object_with_array","qualified_name":"std::json::json_object_with_array","kind":"function","visibility":"public","signature":"fn json_object_with_array(key: String, value: JsonArray) -> JsonObject","source_path":"stdlib/json.kn","line":878,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_object_with_object","qualified_name":"std::json::json_object_with_object","kind":"function","visibility":"public","signature":"fn json_object_with_object(key: String, value: JsonObject) -> JsonObject","source_path":"stdlib/json.kn","line":881,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_fmt_writer_push_value","qualified_name":"std::json::json_fmt_writer_push_value","kind":"function","visibility":"public","signature":"fn json_fmt_writer_push_value(writer: FmtWriter, value: JsonValue) -> FmtWriter","source_path":"stdlib/json.kn","line":884,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_string_builder_push_value","qualified_name":"std::json::json_string_builder_push_value","kind":"function","visibility":"public","signature":"fn json_string_builder_push_value(builder: ptr, value: JsonValue) -> Int","source_path":"stdlib/json.kn","line":887,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_scan","qualified_name":"std::json::json_scan","kind":"function","visibility":"public","signature":"fn json_scan(text: String) -> Array","source_path":"stdlib/json.kn","line":890,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_scan_significant","qualified_name":"std::json::json_scan_significant","kind":"function","visibility":"public","signature":"fn json_scan_significant(text: String) -> Array","source_path":"stdlib/json.kn","line":952,"attributes":[],"docs":[],"target_notes":[]},{"name":"json_scan_report","qualified_name":"std::json::json_scan_report","kind":"function","visibility":"public","signature":"fn json_scan_report(text: String) -> JsonScanReport","source_path":"stdlib/json.kn","line":962,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"kain","import_path":"std::kain","source_path":"stdlib/kain.kn","parse_status":{"status":"parsed"},"docs":["std::kain — Compiler service API","","This module exposes the Kain compiler as a service, allowing Kain-authored","tooling (LSP, formatters, analyzers, linters) to use the compiler's parser,","typechecker, indexing, and formatting capabilities through a clean Kain API.","","Architecture:","Kain types (this file) → builtin bridge (crates/service-bridge) → service-api (crates/service-api)","","The bridge layer is registered in the Kain runtime via register_stdlib_extension.","Complex results are returned as Value::Struct from builtins and destructured here."],"symbols":[{"name":"kain_service_open_workspace","qualified_name":"std::kain::kain_service_open_workspace","kind":"extern_function","visibility":"private","signature":"fn kain_service_open_workspace(root: String, target: Int) -> Any","source_path":"stdlib/kain.kn","line":16,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"kain_service_close_workspace","qualified_name":"std::kain::kain_service_close_workspace","kind":"extern_function","visibility":"private","signature":"fn kain_service_close_workspace(workspace_id: Int) -> Any","source_path":"stdlib/kain.kn","line":19,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"kain_service_open_document","qualified_name":"std::kain::kain_service_open_document","kind":"extern_function","visibility":"private","signature":"fn kain_service_open_document(workspace_id: Int, path: String, source: String, version: Int) -> Any","source_path":"stdlib/kain.kn","line":22,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"kain_service_update_document","qualified_name":"std::kain::kain_service_update_document","kind":"extern_function","visibility":"private","signature":"fn kain_service_update_document(workspace_id: Int, document_id: Int, source: String, version: Int) -> Any","source_path":"stdlib/kain.kn","line":25,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"kain_service_close_document","qualified_name":"std::kain::kain_service_close_document","kind":"extern_function","visibility":"private","signature":"fn kain_service_close_document(workspace_id: Int, document_id: Int) -> Any","source_path":"stdlib/kain.kn","line":28,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"kain_service_check_document","qualified_name":"std::kain::kain_service_check_document","kind":"extern_function","visibility":"private","signature":"fn kain_service_check_document(workspace_id: Int, document_id: Int) -> Any","source_path":"stdlib/kain.kn","line":31,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"kain_service_hover_at","qualified_name":"std::kain::kain_service_hover_at","kind":"extern_function","visibility":"private","signature":"fn kain_service_hover_at(workspace_id: Int, document_id: Int, pos_line: Int, column: Int) -> Any","source_path":"stdlib/kain.kn","line":34,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"kain_service_definition_at","qualified_name":"std::kain::kain_service_definition_at","kind":"extern_function","visibility":"private","signature":"fn kain_service_definition_at(workspace_id: Int, document_id: Int, pos_line: Int, column: Int) -> Any","source_path":"stdlib/kain.kn","line":37,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"kain_service_references_at","qualified_name":"std::kain::kain_service_references_at","kind":"extern_function","visibility":"private","signature":"fn kain_service_references_at(workspace_id: Int, document_id: Int, pos_line: Int, column: Int) -> Any","source_path":"stdlib/kain.kn","line":40,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"kain_service_completions_at","qualified_name":"std::kain::kain_service_completions_at","kind":"extern_function","visibility":"private","signature":"fn kain_service_completions_at(workspace_id: Int, document_id: Int, pos_line: Int, column: Int) -> Any","source_path":"stdlib/kain.kn","line":43,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"kain_service_document_symbols","qualified_name":"std::kain::kain_service_document_symbols","kind":"extern_function","visibility":"private","signature":"fn kain_service_document_symbols(workspace_id: Int, document_id: Int) -> Any","source_path":"stdlib/kain.kn","line":46,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"kain_service_workspace_symbols","qualified_name":"std::kain::kain_service_workspace_symbols","kind":"extern_function","visibility":"private","signature":"fn kain_service_workspace_symbols(workspace_id: Int, query: String) -> Any","source_path":"stdlib/kain.kn","line":49,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"kain_service_semantic_tokens","qualified_name":"std::kain::kain_service_semantic_tokens","kind":"extern_function","visibility":"private","signature":"fn kain_service_semantic_tokens(workspace_id: Int, document_id: Int) -> Any","source_path":"stdlib/kain.kn","line":52,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"kain_service_format_document","qualified_name":"std::kain::kain_service_format_document","kind":"extern_function","visibility":"private","signature":"fn kain_service_format_document(workspace_id: Int, document_id: Int) -> Any","source_path":"stdlib/kain.kn","line":55,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"Position","qualified_name":"std::kain::Position","kind":"struct","visibility":"public","signature":"struct Position","source_path":"stdlib/kain.kn","line":61,"attributes":[],"docs":["═══════════════════════════════════════════════════════════════════","Types","═══════════════════════════════════════════════════════════════════"],"target_notes":[]},{"name":"Range","qualified_name":"std::kain::Range","kind":"struct","visibility":"public","signature":"struct Range","source_path":"stdlib/kain.kn","line":66,"attributes":[],"docs":[],"target_notes":[]},{"name":"Location","qualified_name":"std::kain::Location","kind":"struct","visibility":"public","signature":"struct Location","source_path":"stdlib/kain.kn","line":70,"attributes":[],"docs":[],"target_notes":[]},{"name":"SymbolKind","qualified_name":"std::kain::SymbolKind","kind":"enum","visibility":"public","signature":"enum SymbolKind","source_path":"stdlib/kain.kn","line":75,"attributes":[],"docs":[],"target_notes":[]},{"name":"CompletionKind","qualified_name":"std::kain::CompletionKind","kind":"enum","visibility":"public","signature":"enum CompletionKind","source_path":"stdlib/kain.kn","line":91,"attributes":[],"docs":[],"target_notes":[]},{"name":"CompileTarget","qualified_name":"std::kain::CompileTarget","kind":"enum","visibility":"public","signature":"enum CompileTarget","source_path":"stdlib/kain.kn","line":107,"attributes":[],"docs":[],"target_notes":[]},{"name":"Symbol","qualified_name":"std::kain::Symbol","kind":"struct","visibility":"public","signature":"struct Symbol","source_path":"stdlib/kain.kn","line":127,"attributes":[],"docs":[],"target_notes":[]},{"name":"Completion","qualified_name":"std::kain::Completion","kind":"struct","visibility":"public","signature":"struct Completion","source_path":"stdlib/kain.kn","line":134,"attributes":[],"docs":[],"target_notes":[]},{"name":"SemanticToken","qualified_name":"std::kain::SemanticToken","kind":"struct","visibility":"public","signature":"struct SemanticToken","source_path":"stdlib/kain.kn","line":139,"attributes":[],"docs":[],"target_notes":[]},{"name":"Hover","qualified_name":"std::kain::Hover","kind":"struct","visibility":"public","signature":"struct Hover","source_path":"stdlib/kain.kn","line":144,"attributes":[],"docs":[],"target_notes":[]},{"name":"DiagnosticLabel","qualified_name":"std::kain::DiagnosticLabel","kind":"struct","visibility":"public","signature":"struct DiagnosticLabel","source_path":"stdlib/kain.kn","line":148,"attributes":[],"docs":[],"target_notes":[]},{"name":"DiagnosticFixIt","qualified_name":"std::kain::DiagnosticFixIt","kind":"struct","visibility":"public","signature":"struct DiagnosticFixIt","source_path":"stdlib/kain.kn","line":154,"attributes":[],"docs":[],"target_notes":[]},{"name":"Diagnostic","qualified_name":"std::kain::Diagnostic","kind":"struct","visibility":"public","signature":"struct Diagnostic","source_path":"stdlib/kain.kn","line":161,"attributes":[],"docs":[],"target_notes":[]},{"name":"CheckResult","qualified_name":"std::kain::CheckResult","kind":"struct","visibility":"public","signature":"struct CheckResult","source_path":"stdlib/kain.kn","line":174,"attributes":[],"docs":[],"target_notes":[]},{"name":"FormatResult","qualified_name":"std::kain::FormatResult","kind":"struct","visibility":"public","signature":"struct FormatResult","source_path":"stdlib/kain.kn","line":179,"attributes":[],"docs":[],"target_notes":[]},{"name":"Workspace","qualified_name":"std::kain::Workspace","kind":"struct","visibility":"public","signature":"struct Workspace","source_path":"stdlib/kain.kn","line":188,"attributes":[],"docs":["═══════════════════════════════════════════════════════════════════","Workspace and document handles (opaque Ints from the bridge)","═══════════════════════════════════════════════════════════════════"],"target_notes":[]},{"name":"Document","qualified_name":"std::kain::Document","kind":"struct","visibility":"public","signature":"struct Document","source_path":"stdlib/kain.kn","line":191,"attributes":[],"docs":[],"target_notes":[]},{"name":"_position_from","qualified_name":"std::kain::_position_from","kind":"function","visibility":"private","signature":"fn _position_from(value: Any) -> Position","source_path":"stdlib/kain.kn","line":199,"attributes":[],"docs":["═══════════════════════════════════════════════════════════════════","Conversions: JSON-like Value → typed structs","═══════════════════════════════════════════════════════════════════"],"target_notes":[]},{"name":"_range_from","qualified_name":"std::kain::_range_from","kind":"function","visibility":"private","signature":"fn _range_from(value: Any) -> Range","source_path":"stdlib/kain.kn","line":206,"attributes":[],"docs":[],"target_notes":[]},{"name":"_location_from","qualified_name":"std::kain::_location_from","kind":"function","visibility":"private","signature":"fn _location_from(value: Any) -> Location","source_path":"stdlib/kain.kn","line":212,"attributes":[],"docs":[],"target_notes":[]},{"name":"_symbol_kind_from","qualified_name":"std::kain::_symbol_kind_from","kind":"function","visibility":"private","signature":"fn _symbol_kind_from(code: Int) -> SymbolKind","source_path":"stdlib/kain.kn","line":219,"attributes":[],"docs":[],"target_notes":[]},{"name":"_completion_kind_from","qualified_name":"std::kain::_completion_kind_from","kind":"function","visibility":"private","signature":"fn _completion_kind_from(code: Int) -> CompletionKind","source_path":"stdlib/kain.kn","line":237,"attributes":[],"docs":[],"target_notes":[]},{"name":"_target_to_code","qualified_name":"std::kain::_target_to_code","kind":"function","visibility":"private","signature":"fn _target_to_code(target: CompileTarget) -> Int","source_path":"stdlib/kain.kn","line":255,"attributes":[],"docs":[],"target_notes":[]},{"name":"_diagnostic_label_from","qualified_name":"std::kain::_diagnostic_label_from","kind":"function","visibility":"private","signature":"fn _diagnostic_label_from(value: Any) -> DiagnosticLabel","source_path":"stdlib/kain.kn","line":276,"attributes":[],"docs":[],"target_notes":[]},{"name":"_diagnostic_fixit_from","qualified_name":"std::kain::_diagnostic_fixit_from","kind":"function","visibility":"private","signature":"fn _diagnostic_fixit_from(value: Any) -> DiagnosticFixIt","source_path":"stdlib/kain.kn","line":284,"attributes":[],"docs":[],"target_notes":[]},{"name":"_diagnostic_from","qualified_name":"std::kain::_diagnostic_from","kind":"function","visibility":"private","signature":"fn _diagnostic_from(value: Any) -> Diagnostic","source_path":"stdlib/kain.kn","line":293,"attributes":[],"docs":[],"target_notes":[]},{"name":"_symbol_from","qualified_name":"std::kain::_symbol_from","kind":"function","visibility":"private","signature":"fn _symbol_from(value: Any) -> Symbol","source_path":"stdlib/kain.kn","line":341,"attributes":[],"docs":[],"target_notes":[]},{"name":"_completion_from","qualified_name":"std::kain::_completion_from","kind":"function","visibility":"private","signature":"fn _completion_from(value: Any) -> Completion","source_path":"stdlib/kain.kn","line":355,"attributes":[],"docs":[],"target_notes":[]},{"name":"_semantic_token_from","qualified_name":"std::kain::_semantic_token_from","kind":"function","visibility":"private","signature":"fn _semantic_token_from(value: Any) -> SemanticToken","source_path":"stdlib/kain.kn","line":362,"attributes":[],"docs":[],"target_notes":[]},{"name":"open_workspace","qualified_name":"std::kain::open_workspace","kind":"function","visibility":"public","signature":"fn open_workspace(root: String, target: CompileTarget) -> Option","source_path":"stdlib/kain.kn","line":375,"attributes":[],"docs":["--- Workspace management ---"],"target_notes":[]},{"name":"close_workspace","qualified_name":"std::kain::close_workspace","kind":"function","visibility":"public","signature":"fn close_workspace(ws: Workspace) -> Bool","source_path":"stdlib/kain.kn","line":385,"attributes":[],"docs":[],"target_notes":[]},{"name":"open_document","qualified_name":"std::kain::open_document","kind":"function","visibility":"public","signature":"fn open_document(ws: Workspace, path: String, source: String, version: Int) -> Option","source_path":"stdlib/kain.kn","line":391,"attributes":[],"docs":["--- Document management ---"],"target_notes":[]},{"name":"update_document","qualified_name":"std::kain::update_document","kind":"function","visibility":"public","signature":"fn update_document(doc: Document, source: String, version: Int) -> Bool","source_path":"stdlib/kain.kn","line":401,"attributes":[],"docs":[],"target_notes":[]},{"name":"close_document","qualified_name":"std::kain::close_document","kind":"function","visibility":"public","signature":"fn close_document(doc: Document) -> Bool","source_path":"stdlib/kain.kn","line":405,"attributes":[],"docs":[],"target_notes":[]},{"name":"check_document","qualified_name":"std::kain::check_document","kind":"function","visibility":"public","signature":"fn check_document(doc: Document) -> CheckResult","source_path":"stdlib/kain.kn","line":411,"attributes":[],"docs":["--- Diagnostics ---"],"target_notes":[]},{"name":"hover_at","qualified_name":"std::kain::hover_at","kind":"function","visibility":"public","signature":"fn hover_at(doc: Document, pos_line: Int, pos_col: Int) -> Option","source_path":"stdlib/kain.kn","line":430,"attributes":[],"docs":["--- Queries ---"],"target_notes":[]},{"name":"definition_at","qualified_name":"std::kain::definition_at","kind":"function","visibility":"public","signature":"fn definition_at(doc: Document, pos_line: Int, pos_col: Int) -> Array","source_path":"stdlib/kain.kn","line":443,"attributes":[],"docs":[],"target_notes":[]},{"name":"references_at","qualified_name":"std::kain::references_at","kind":"function","visibility":"public","signature":"fn references_at(doc: Document, pos_line: Int, pos_col: Int) -> Array","source_path":"stdlib/kain.kn","line":457,"attributes":[],"docs":[],"target_notes":[]},{"name":"completions_at","qualified_name":"std::kain::completions_at","kind":"function","visibility":"public","signature":"fn completions_at(doc: Document, pos_line: Int, pos_col: Int) -> Array","source_path":"stdlib/kain.kn","line":471,"attributes":[],"docs":[],"target_notes":[]},{"name":"document_symbols","qualified_name":"std::kain::document_symbols","kind":"function","visibility":"public","signature":"fn document_symbols(doc: Document) -> Array","source_path":"stdlib/kain.kn","line":485,"attributes":[],"docs":[],"target_notes":[]},{"name":"workspace_symbols","qualified_name":"std::kain::workspace_symbols","kind":"function","visibility":"public","signature":"fn workspace_symbols(ws: Workspace, query: String) -> Array","source_path":"stdlib/kain.kn","line":499,"attributes":[],"docs":[],"target_notes":[]},{"name":"semantic_tokens","qualified_name":"std::kain::semantic_tokens","kind":"function","visibility":"public","signature":"fn semantic_tokens(doc: Document) -> Array","source_path":"stdlib/kain.kn","line":513,"attributes":[],"docs":[],"target_notes":[]},{"name":"format_document","qualified_name":"std::kain::format_document","kind":"function","visibility":"public","signature":"fn format_document(doc: Document) -> FormatResult","source_path":"stdlib/kain.kn","line":529,"attributes":[],"docs":["--- Formatting ---"],"target_notes":[]}]},{"name":"machine","import_path":"std::machine","source_path":"stdlib/machine.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"abi_cpu_pause","qualified_name":"std::machine::abi_cpu_pause","kind":"extern_function","visibility":"private","signature":"fn abi_cpu_pause() -> Int","source_path":"stdlib/machine.kn","line":4,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_cpu_rdtsc","qualified_name":"std::machine::abi_cpu_rdtsc","kind":"extern_function","visibility":"private","signature":"fn abi_cpu_rdtsc() -> Int","source_path":"stdlib/machine.kn","line":7,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_cpu_cpuid_lane","qualified_name":"std::machine::abi_cpu_cpuid_lane","kind":"extern_function","visibility":"private","signature":"fn abi_cpu_cpuid_lane(leaf: Int, subleaf: Int, lane: Int) -> Int","source_path":"stdlib/machine.kn","line":10,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_cpu_prefetch_read","qualified_name":"std::machine::abi_cpu_prefetch_read","kind":"extern_function","visibility":"private","signature":"fn abi_cpu_prefetch_read(address: ptr, locality: Int) -> Unit","source_path":"stdlib/machine.kn","line":13,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_cpu_prefetch_write","qualified_name":"std::machine::abi_cpu_prefetch_write","kind":"extern_function","visibility":"private","signature":"fn abi_cpu_prefetch_write(address: ptr, locality: Int) -> Unit","source_path":"stdlib/machine.kn","line":16,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_cpu_logical_count","qualified_name":"std::machine::abi_cpu_logical_count","kind":"extern_function","visibility":"private","signature":"fn abi_cpu_logical_count() -> Int","source_path":"stdlib/machine.kn","line":19,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_cpu_core_count","qualified_name":"std::machine::abi_cpu_core_count","kind":"extern_function","visibility":"private","signature":"fn abi_cpu_core_count() -> Int","source_path":"stdlib/machine.kn","line":22,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_cpu_package_count","qualified_name":"std::machine::abi_cpu_package_count","kind":"extern_function","visibility":"private","signature":"fn abi_cpu_package_count() -> Int","source_path":"stdlib/machine.kn","line":25,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_cpu_cache_line_bytes","qualified_name":"std::machine::abi_cpu_cache_line_bytes","kind":"extern_function","visibility":"private","signature":"fn abi_cpu_cache_line_bytes() -> Int","source_path":"stdlib/machine.kn","line":28,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_cpu_current_thread_id","qualified_name":"std::machine::abi_cpu_current_thread_id","kind":"extern_function","visibility":"private","signature":"fn abi_cpu_current_thread_id() -> Int","source_path":"stdlib/machine.kn","line":31,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_cpu_current_thread_affinity_mask","qualified_name":"std::machine::abi_cpu_current_thread_affinity_mask","kind":"extern_function","visibility":"private","signature":"fn abi_cpu_current_thread_affinity_mask() -> Int","source_path":"stdlib/machine.kn","line":34,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_cpu_set_current_thread_affinity","qualified_name":"std::machine::abi_cpu_set_current_thread_affinity","kind":"extern_function","visibility":"private","signature":"fn abi_cpu_set_current_thread_affinity(core_index: Int) -> Int","source_path":"stdlib/machine.kn","line":37,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_cpu_numa_node_count","qualified_name":"std::machine::abi_cpu_numa_node_count","kind":"extern_function","visibility":"private","signature":"fn abi_cpu_numa_node_count() -> Int","source_path":"stdlib/machine.kn","line":40,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_cpu_current_numa_node","qualified_name":"std::machine::abi_cpu_current_numa_node","kind":"extern_function","visibility":"private","signature":"fn abi_cpu_current_numa_node() -> Int","source_path":"stdlib/machine.kn","line":43,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_cpu_bind_current_thread_to_numa","qualified_name":"std::machine::abi_cpu_bind_current_thread_to_numa","kind":"extern_function","visibility":"private","signature":"fn abi_cpu_bind_current_thread_to_numa(node_index: Int) -> Int","source_path":"stdlib/machine.kn","line":46,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_vm_page_size","qualified_name":"std::machine::abi_vm_page_size","kind":"extern_function","visibility":"private","signature":"fn abi_vm_page_size() -> Int","source_path":"stdlib/machine.kn","line":49,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_vm_reserve","qualified_name":"std::machine::abi_vm_reserve","kind":"extern_function","visibility":"private","signature":"fn abi_vm_reserve(byte_count: Int) -> ptr","source_path":"stdlib/machine.kn","line":52,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_vm_commit","qualified_name":"std::machine::abi_vm_commit","kind":"extern_function","visibility":"private","signature":"fn abi_vm_commit(address: ptr, byte_count: Int) -> Int","source_path":"stdlib/machine.kn","line":55,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_vm_decommit","qualified_name":"std::machine::abi_vm_decommit","kind":"extern_function","visibility":"private","signature":"fn abi_vm_decommit(address: ptr, byte_count: Int) -> Int","source_path":"stdlib/machine.kn","line":58,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_vm_release","qualified_name":"std::machine::abi_vm_release","kind":"extern_function","visibility":"private","signature":"fn abi_vm_release(address: ptr, byte_count: Int) -> Int","source_path":"stdlib/machine.kn","line":61,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_vm_lock","qualified_name":"std::machine::abi_vm_lock","kind":"extern_function","visibility":"private","signature":"fn abi_vm_lock(address: ptr, byte_count: Int) -> Int","source_path":"stdlib/machine.kn","line":64,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_vm_unlock","qualified_name":"std::machine::abi_vm_unlock","kind":"extern_function","visibility":"private","signature":"fn abi_vm_unlock(address: ptr, byte_count: Int) -> Int","source_path":"stdlib/machine.kn","line":67,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_vm_map_huge","qualified_name":"std::machine::abi_vm_map_huge","kind":"extern_function","visibility":"private","signature":"fn abi_vm_map_huge(byte_count: Int) -> ptr","source_path":"stdlib/machine.kn","line":70,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_vm_map","qualified_name":"std::machine::abi_vm_map","kind":"extern_function","visibility":"private","signature":"fn abi_vm_map(byte_count: Int) -> ptr","source_path":"stdlib/machine.kn","line":73,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_vm_unmap","qualified_name":"std::machine::abi_vm_unmap","kind":"extern_function","visibility":"private","signature":"fn abi_vm_unmap(address: ptr, byte_count: Int) -> Int","source_path":"stdlib/machine.kn","line":76,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_vm_protect","qualified_name":"std::machine::abi_vm_protect","kind":"extern_function","visibility":"private","signature":"fn abi_vm_protect(address: ptr, byte_count: Int, mode: Int) -> Int","source_path":"stdlib/machine.kn","line":79,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"pause","qualified_name":"std::machine::pause","kind":"function","visibility":"public","signature":"fn pause() -> Int","source_path":"stdlib/machine.kn","line":81,"attributes":[],"docs":[],"target_notes":[]},{"name":"load_fence","qualified_name":"std::machine::load_fence","kind":"function","visibility":"public","signature":"fn load_fence() -> Unit","source_path":"stdlib/machine.kn","line":84,"attributes":[],"docs":[],"target_notes":[]},{"name":"store_fence","qualified_name":"std::machine::store_fence","kind":"function","visibility":"public","signature":"fn store_fence() -> Unit","source_path":"stdlib/machine.kn","line":87,"attributes":[],"docs":[],"target_notes":[]},{"name":"full_fence","qualified_name":"std::machine::full_fence","kind":"function","visibility":"public","signature":"fn full_fence() -> Unit","source_path":"stdlib/machine.kn","line":90,"attributes":[],"docs":[],"target_notes":[]},{"name":"cache_flush","qualified_name":"std::machine::cache_flush","kind":"function","visibility":"public","signature":"fn cache_flush(address: ptr) -> Unit","source_path":"stdlib/machine.kn","line":93,"attributes":[],"docs":[],"target_notes":[]},{"name":"spin_loop_hint","qualified_name":"std::machine::spin_loop_hint","kind":"function","visibility":"public","signature":"fn spin_loop_hint() -> Unit","source_path":"stdlib/machine.kn","line":96,"attributes":[],"docs":[],"target_notes":[]},{"name":"rdtsc","qualified_name":"std::machine::rdtsc","kind":"function","visibility":"public","signature":"fn rdtsc() -> Int","source_path":"stdlib/machine.kn","line":99,"attributes":[],"docs":[],"target_notes":[]},{"name":"cpuid_eax","qualified_name":"std::machine::cpuid_eax","kind":"function","visibility":"public","signature":"fn cpuid_eax(leaf: Int, subleaf: Int) -> Int","source_path":"stdlib/machine.kn","line":102,"attributes":[],"docs":[],"target_notes":[]},{"name":"cpuid_ebx","qualified_name":"std::machine::cpuid_ebx","kind":"function","visibility":"public","signature":"fn cpuid_ebx(leaf: Int, subleaf: Int) -> Int","source_path":"stdlib/machine.kn","line":105,"attributes":[],"docs":[],"target_notes":[]},{"name":"cpuid_ecx","qualified_name":"std::machine::cpuid_ecx","kind":"function","visibility":"public","signature":"fn cpuid_ecx(leaf: Int, subleaf: Int) -> Int","source_path":"stdlib/machine.kn","line":108,"attributes":[],"docs":[],"target_notes":[]},{"name":"cpuid_edx","qualified_name":"std::machine::cpuid_edx","kind":"function","visibility":"public","signature":"fn cpuid_edx(leaf: Int, subleaf: Int) -> Int","source_path":"stdlib/machine.kn","line":111,"attributes":[],"docs":[],"target_notes":[]},{"name":"prefetch_read","qualified_name":"std::machine::prefetch_read","kind":"function","visibility":"public","signature":"fn prefetch_read(address: ptr, locality: Int) -> Unit","source_path":"stdlib/machine.kn","line":114,"attributes":[],"docs":[],"target_notes":[]},{"name":"prefetch_write","qualified_name":"std::machine::prefetch_write","kind":"function","visibility":"public","signature":"fn prefetch_write(address: ptr, locality: Int) -> Unit","source_path":"stdlib/machine.kn","line":117,"attributes":[],"docs":[],"target_notes":[]},{"name":"cpu_logical_count","qualified_name":"std::machine::cpu_logical_count","kind":"function","visibility":"public","signature":"fn cpu_logical_count() -> Int","source_path":"stdlib/machine.kn","line":120,"attributes":[],"docs":[],"target_notes":[]},{"name":"cpu_core_count","qualified_name":"std::machine::cpu_core_count","kind":"function","visibility":"public","signature":"fn cpu_core_count() -> Int","source_path":"stdlib/machine.kn","line":123,"attributes":[],"docs":[],"target_notes":[]},{"name":"cpu_package_count","qualified_name":"std::machine::cpu_package_count","kind":"function","visibility":"public","signature":"fn cpu_package_count() -> Int","source_path":"stdlib/machine.kn","line":126,"attributes":[],"docs":[],"target_notes":[]},{"name":"cpu_cache_line_bytes","qualified_name":"std::machine::cpu_cache_line_bytes","kind":"function","visibility":"public","signature":"fn cpu_cache_line_bytes() -> Int","source_path":"stdlib/machine.kn","line":129,"attributes":[],"docs":[],"target_notes":[]},{"name":"current_thread_id","qualified_name":"std::machine::current_thread_id","kind":"function","visibility":"public","signature":"fn current_thread_id() -> Int","source_path":"stdlib/machine.kn","line":132,"attributes":[],"docs":[],"target_notes":[]},{"name":"current_thread_affinity_mask","qualified_name":"std::machine::current_thread_affinity_mask","kind":"function","visibility":"public","signature":"fn current_thread_affinity_mask() -> Int","source_path":"stdlib/machine.kn","line":135,"attributes":[],"docs":[],"target_notes":[]},{"name":"set_current_thread_affinity","qualified_name":"std::machine::set_current_thread_affinity","kind":"function","visibility":"public","signature":"fn set_current_thread_affinity(core_index: Int) -> Int","source_path":"stdlib/machine.kn","line":138,"attributes":[],"docs":[],"target_notes":[]},{"name":"numa_node_count","qualified_name":"std::machine::numa_node_count","kind":"function","visibility":"public","signature":"fn numa_node_count() -> Int","source_path":"stdlib/machine.kn","line":141,"attributes":[],"docs":[],"target_notes":[]},{"name":"numa_current_node","qualified_name":"std::machine::numa_current_node","kind":"function","visibility":"public","signature":"fn numa_current_node() -> Int","source_path":"stdlib/machine.kn","line":144,"attributes":[],"docs":[],"target_notes":[]},{"name":"numa_bind_current_thread","qualified_name":"std::machine::numa_bind_current_thread","kind":"function","visibility":"public","signature":"fn numa_bind_current_thread(node_index: Int) -> Int","source_path":"stdlib/machine.kn","line":147,"attributes":[],"docs":[],"target_notes":[]},{"name":"vm_page_size","qualified_name":"std::machine::vm_page_size","kind":"function","visibility":"public","signature":"fn vm_page_size() -> Int","source_path":"stdlib/machine.kn","line":150,"attributes":[],"docs":[],"target_notes":[]},{"name":"vm_reserve","qualified_name":"std::machine::vm_reserve","kind":"function","visibility":"public","signature":"fn vm_reserve(byte_count: Int) -> ptr","source_path":"stdlib/machine.kn","line":153,"attributes":[],"docs":[],"target_notes":[]},{"name":"vm_commit","qualified_name":"std::machine::vm_commit","kind":"function","visibility":"public","signature":"fn vm_commit(address: ptr, byte_count: Int) -> Int","source_path":"stdlib/machine.kn","line":156,"attributes":[],"docs":[],"target_notes":[]},{"name":"vm_decommit","qualified_name":"std::machine::vm_decommit","kind":"function","visibility":"public","signature":"fn vm_decommit(address: ptr, byte_count: Int) -> Int","source_path":"stdlib/machine.kn","line":159,"attributes":[],"docs":[],"target_notes":[]},{"name":"vm_release","qualified_name":"std::machine::vm_release","kind":"function","visibility":"public","signature":"fn vm_release(address: ptr, byte_count: Int) -> Int","source_path":"stdlib/machine.kn","line":162,"attributes":[],"docs":[],"target_notes":[]},{"name":"vm_lock","qualified_name":"std::machine::vm_lock","kind":"function","visibility":"public","signature":"fn vm_lock(address: ptr, byte_count: Int) -> Int","source_path":"stdlib/machine.kn","line":165,"attributes":[],"docs":[],"target_notes":[]},{"name":"vm_unlock","qualified_name":"std::machine::vm_unlock","kind":"function","visibility":"public","signature":"fn vm_unlock(address: ptr, byte_count: Int) -> Int","source_path":"stdlib/machine.kn","line":168,"attributes":[],"docs":[],"target_notes":[]},{"name":"vm_map_huge","qualified_name":"std::machine::vm_map_huge","kind":"function","visibility":"public","signature":"fn vm_map_huge(byte_count: Int) -> ptr","source_path":"stdlib/machine.kn","line":171,"attributes":[],"docs":[],"target_notes":[]},{"name":"vm_map","qualified_name":"std::machine::vm_map","kind":"function","visibility":"public","signature":"fn vm_map(byte_count: Int) -> ptr","source_path":"stdlib/machine.kn","line":174,"attributes":[],"docs":[],"target_notes":[]},{"name":"vm_unmap","qualified_name":"std::machine::vm_unmap","kind":"function","visibility":"public","signature":"fn vm_unmap(address: ptr, byte_count: Int) -> Int","source_path":"stdlib/machine.kn","line":177,"attributes":[],"docs":[],"target_notes":[]},{"name":"vm_protect_none","qualified_name":"std::machine::vm_protect_none","kind":"function","visibility":"public","signature":"fn vm_protect_none(address: ptr, byte_count: Int) -> Int","source_path":"stdlib/machine.kn","line":180,"attributes":[],"docs":[],"target_notes":[]},{"name":"vm_protect_read","qualified_name":"std::machine::vm_protect_read","kind":"function","visibility":"public","signature":"fn vm_protect_read(address: ptr, byte_count: Int) -> Int","source_path":"stdlib/machine.kn","line":183,"attributes":[],"docs":[],"target_notes":[]},{"name":"vm_protect_read_write","qualified_name":"std::machine::vm_protect_read_write","kind":"function","visibility":"public","signature":"fn vm_protect_read_write(address: ptr, byte_count: Int) -> Int","source_path":"stdlib/machine.kn","line":186,"attributes":[],"docs":[],"target_notes":[]},{"name":"vm_protect_execute_read","qualified_name":"std::machine::vm_protect_execute_read","kind":"function","visibility":"public","signature":"fn vm_protect_execute_read(address: ptr, byte_count: Int) -> Int","source_path":"stdlib/machine.kn","line":189,"attributes":[],"docs":[],"target_notes":[]},{"name":"vm_protect_execute_read_write","qualified_name":"std::machine::vm_protect_execute_read_write","kind":"function","visibility":"public","signature":"fn vm_protect_execute_read_write(address: ptr, byte_count: Int) -> Int","source_path":"stdlib/machine.kn","line":192,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"math","import_path":"std::math","source_path":"stdlib/math.kn","parse_status":{"status":"parsed"},"docs":["Canonical root math stdlib for Kain.","","This is the engine-facing math surface for native LLVM, shaders, UI,","graphics, simulation, procedural generation, and GPU layout authoring.","It favors explicit data layouts and free functions so the surface stays","stable across Kain's current compiler/runtime lanes."],"symbols":[{"name":"PI","qualified_name":"std::math::PI","kind":"const","visibility":"public","signature":"const PI: Float","source_path":"stdlib/math.kn","line":8,"attributes":[],"docs":["Canonical root math stdlib for Kain.","","This is the engine-facing math surface for native LLVM, shaders, UI,","graphics, simulation, procedural generation, and GPU layout authoring.","It favors explicit data layouts and free functions so the surface stays","stable across Kain's current compiler/runtime lanes."],"target_notes":[]},{"name":"TAU","qualified_name":"std::math::TAU","kind":"const","visibility":"public","signature":"const TAU: Float","source_path":"stdlib/math.kn","line":9,"attributes":[],"docs":[],"target_notes":[]},{"name":"HALF_PI","qualified_name":"std::math::HALF_PI","kind":"const","visibility":"public","signature":"const HALF_PI: Float","source_path":"stdlib/math.kn","line":10,"attributes":[],"docs":[],"target_notes":[]},{"name":"DEG_TO_RAD","qualified_name":"std::math::DEG_TO_RAD","kind":"const","visibility":"public","signature":"const DEG_TO_RAD: Float","source_path":"stdlib/math.kn","line":11,"attributes":[],"docs":[],"target_notes":[]},{"name":"RAD_TO_DEG","qualified_name":"std::math::RAD_TO_DEG","kind":"const","visibility":"public","signature":"const RAD_TO_DEG: Float","source_path":"stdlib/math.kn","line":12,"attributes":[],"docs":[],"target_notes":[]},{"name":"EPSILON","qualified_name":"std::math::EPSILON","kind":"const","visibility":"public","signature":"const EPSILON: Float","source_path":"stdlib/math.kn","line":13,"attributes":[],"docs":[],"target_notes":[]},{"name":"HUGE_EPSILON","qualified_name":"std::math::HUGE_EPSILON","kind":"const","visibility":"public","signature":"const HUGE_EPSILON: Float","source_path":"stdlib/math.kn","line":14,"attributes":[],"docs":[],"target_notes":[]},{"name":"pi","qualified_name":"std::math::pi","kind":"function","visibility":"public","signature":"fn pi() -> Float","source_path":"stdlib/math.kn","line":16,"attributes":[],"docs":[],"target_notes":[]},{"name":"tau","qualified_name":"std::math::tau","kind":"function","visibility":"public","signature":"fn tau() -> Float","source_path":"stdlib/math.kn","line":19,"attributes":[],"docs":[],"target_notes":[]},{"name":"half_pi","qualified_name":"std::math::half_pi","kind":"function","visibility":"public","signature":"fn half_pi() -> Float","source_path":"stdlib/math.kn","line":22,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec2","qualified_name":"std::math::vec2","kind":"function","visibility":"public","signature":"fn vec2(x: Float, y: Float) -> Vec2","source_path":"stdlib/math.kn","line":25,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec3","qualified_name":"std::math::vec3","kind":"function","visibility":"public","signature":"fn vec3(x: Float, y: Float, z: Float) -> Vec3","source_path":"stdlib/math.kn","line":28,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec4","qualified_name":"std::math::vec4","kind":"function","visibility":"public","signature":"fn vec4(x: Float, y: Float, z: Float, w: Float) -> Vec4","source_path":"stdlib/math.kn","line":31,"attributes":[],"docs":[],"target_notes":[]},{"name":"math_min","qualified_name":"std::math::math_min","kind":"function","visibility":"public","signature":"fn math_min(a: Float, b: Float) -> Float","source_path":"stdlib/math.kn","line":34,"attributes":[],"docs":[],"target_notes":[]},{"name":"math_max","qualified_name":"std::math::math_max","kind":"function","visibility":"public","signature":"fn math_max(a: Float, b: Float) -> Float","source_path":"stdlib/math.kn","line":39,"attributes":[],"docs":[],"target_notes":[]},{"name":"math_clamp","qualified_name":"std::math::math_clamp","kind":"function","visibility":"public","signature":"fn math_clamp(value: Float, low: Float, high: Float) -> Float","source_path":"stdlib/math.kn","line":44,"attributes":[],"docs":[],"target_notes":[]},{"name":"math_int_clamp","qualified_name":"std::math::math_int_clamp","kind":"function","visibility":"public","signature":"fn math_int_clamp(value: Int, low: Int, high: Int) -> Int","source_path":"stdlib/math.kn","line":47,"attributes":[],"docs":[],"target_notes":[]},{"name":"Vec3A","qualified_name":"std::math::Vec3A","kind":"struct","visibility":"public","signature":"struct Vec3A","source_path":"stdlib/math.kn","line":54,"attributes":[],"docs":[],"target_notes":[]},{"name":"Quat","qualified_name":"std::math::Quat","kind":"struct","visibility":"public","signature":"struct Quat","source_path":"stdlib/math.kn","line":60,"attributes":[],"docs":[],"target_notes":[]},{"name":"Mat3","qualified_name":"std::math::Mat3","kind":"struct","visibility":"public","signature":"struct Mat3","source_path":"stdlib/math.kn","line":66,"attributes":[],"docs":[],"target_notes":[]},{"name":"Mat4","qualified_name":"std::math::Mat4","kind":"struct","visibility":"public","signature":"struct Mat4","source_path":"stdlib/math.kn","line":71,"attributes":[],"docs":[],"target_notes":[]},{"name":"Affine2","qualified_name":"std::math::Affine2","kind":"struct","visibility":"public","signature":"struct Affine2","source_path":"stdlib/math.kn","line":77,"attributes":[],"docs":[],"target_notes":[]},{"name":"Affine3","qualified_name":"std::math::Affine3","kind":"struct","visibility":"public","signature":"struct Affine3","source_path":"stdlib/math.kn","line":82,"attributes":[],"docs":[],"target_notes":[]},{"name":"Float8","qualified_name":"std::math::Float8","kind":"struct","visibility":"public","signature":"struct Float8","source_path":"stdlib/math.kn","line":88,"attributes":[],"docs":[],"target_notes":[]},{"name":"Vec3x4","qualified_name":"std::math::Vec3x4","kind":"struct","visibility":"public","signature":"struct Vec3x4","source_path":"stdlib/math.kn","line":92,"attributes":[],"docs":[],"target_notes":[]},{"name":"Vec4x8","qualified_name":"std::math::Vec4x8","kind":"struct","visibility":"public","signature":"struct Vec4x8","source_path":"stdlib/math.kn","line":97,"attributes":[],"docs":[],"target_notes":[]},{"name":"GpuLayoutInfo","qualified_name":"std::math::GpuLayoutInfo","kind":"struct","visibility":"public","signature":"struct GpuLayoutInfo","source_path":"stdlib/math.kn","line":103,"attributes":[],"docs":[],"target_notes":[]},{"name":"CBuffer","qualified_name":"std::math::CBuffer","kind":"struct","visibility":"public","signature":"struct CBuffer","source_path":"stdlib/math.kn","line":109,"attributes":[],"docs":[],"target_notes":[]},{"name":"Std140","qualified_name":"std::math::Std140","kind":"struct","visibility":"public","signature":"struct Std140","source_path":"stdlib/math.kn","line":113,"attributes":[],"docs":[],"target_notes":[]},{"name":"Std430","qualified_name":"std::math::Std430","kind":"struct","visibility":"public","signature":"struct Std430","source_path":"stdlib/math.kn","line":117,"attributes":[],"docs":[],"target_notes":[]},{"name":"Std140Vec3","qualified_name":"std::math::Std140Vec3","kind":"struct","visibility":"public","signature":"struct Std140Vec3","source_path":"stdlib/math.kn","line":121,"attributes":[],"docs":[],"target_notes":[]},{"name":"Std140Mat3","qualified_name":"std::math::Std140Mat3","kind":"struct","visibility":"public","signature":"struct Std140Mat3","source_path":"stdlib/math.kn","line":127,"attributes":[],"docs":[],"target_notes":[]},{"name":"Plane","qualified_name":"std::math::Plane","kind":"struct","visibility":"public","signature":"struct Plane","source_path":"stdlib/math.kn","line":132,"attributes":[],"docs":[],"target_notes":[]},{"name":"Ray3","qualified_name":"std::math::Ray3","kind":"struct","visibility":"public","signature":"struct Ray3","source_path":"stdlib/math.kn","line":136,"attributes":[],"docs":[],"target_notes":[]},{"name":"Aabb","qualified_name":"std::math::Aabb","kind":"struct","visibility":"public","signature":"struct Aabb","source_path":"stdlib/math.kn","line":140,"attributes":[],"docs":[],"target_notes":[]},{"name":"Obb","qualified_name":"std::math::Obb","kind":"struct","visibility":"public","signature":"struct Obb","source_path":"stdlib/math.kn","line":144,"attributes":[],"docs":[],"target_notes":[]},{"name":"BoundingSphere","qualified_name":"std::math::BoundingSphere","kind":"struct","visibility":"public","signature":"struct BoundingSphere","source_path":"stdlib/math.kn","line":151,"attributes":[],"docs":[],"target_notes":[]},{"name":"Frustum","qualified_name":"std::math::Frustum","kind":"struct","visibility":"public","signature":"struct Frustum","source_path":"stdlib/math.kn","line":155,"attributes":[],"docs":[],"target_notes":[]},{"name":"RayHit","qualified_name":"std::math::RayHit","kind":"struct","visibility":"public","signature":"struct RayHit","source_path":"stdlib/math.kn","line":163,"attributes":[],"docs":[],"target_notes":[]},{"name":"ColorRgb","qualified_name":"std::math::ColorRgb","kind":"struct","visibility":"public","signature":"struct ColorRgb","source_path":"stdlib/math.kn","line":170,"attributes":[],"docs":[],"target_notes":[]},{"name":"ColorRgba","qualified_name":"std::math::ColorRgba","kind":"struct","visibility":"public","signature":"struct ColorRgba","source_path":"stdlib/math.kn","line":175,"attributes":[],"docs":[],"target_notes":[]},{"name":"Hsv","qualified_name":"std::math::Hsv","kind":"struct","visibility":"public","signature":"struct Hsv","source_path":"stdlib/math.kn","line":181,"attributes":[],"docs":[],"target_notes":[]},{"name":"Hsl","qualified_name":"std::math::Hsl","kind":"struct","visibility":"public","signature":"struct Hsl","source_path":"stdlib/math.kn","line":186,"attributes":[],"docs":[],"target_notes":[]},{"name":"degrees_to_radians","qualified_name":"std::math::degrees_to_radians","kind":"function","visibility":"public","signature":"fn degrees_to_radians(value: Float) -> Float","source_path":"stdlib/math.kn","line":191,"attributes":[],"docs":[],"target_notes":[]},{"name":"radians_to_degrees","qualified_name":"std::math::radians_to_degrees","kind":"function","visibility":"public","signature":"fn radians_to_degrees(value: Float) -> Float","source_path":"stdlib/math.kn","line":194,"attributes":[],"docs":[],"target_notes":[]},{"name":"saturate","qualified_name":"std::math::saturate","kind":"function","visibility":"public","signature":"fn saturate(value: Float) -> Float","source_path":"stdlib/math.kn","line":197,"attributes":[],"docs":[],"target_notes":[]},{"name":"sign_nonzero","qualified_name":"std::math::sign_nonzero","kind":"function","visibility":"public","signature":"fn sign_nonzero(value: Float) -> Float","source_path":"stdlib/math.kn","line":200,"attributes":[],"docs":[],"target_notes":[]},{"name":"inverse_lerp","qualified_name":"std::math::inverse_lerp","kind":"function","visibility":"public","signature":"fn inverse_lerp(a: Float, b: Float, value: Float) -> Float","source_path":"stdlib/math.kn","line":205,"attributes":[],"docs":[],"target_notes":[]},{"name":"lerp","qualified_name":"std::math::lerp","kind":"function","visibility":"public","signature":"fn lerp(a: Float, b: Float, t: Float) -> Float","source_path":"stdlib/math.kn","line":211,"attributes":[],"docs":[],"target_notes":[]},{"name":"smoothstep","qualified_name":"std::math::smoothstep","kind":"function","visibility":"public","signature":"fn smoothstep(edge0: Float, edge1: Float, value: Float) -> Float","source_path":"stdlib/math.kn","line":214,"attributes":[],"docs":[],"target_notes":[]},{"name":"smootherstep","qualified_name":"std::math::smootherstep","kind":"function","visibility":"public","signature":"fn smootherstep(edge0: Float, edge1: Float, value: Float) -> Float","source_path":"stdlib/math.kn","line":218,"attributes":[],"docs":[],"target_notes":[]},{"name":"nearly_equal","qualified_name":"std::math::nearly_equal","kind":"function","visibility":"public","signature":"fn nearly_equal(a: Float, b: Float, epsilon: Float) -> Bool","source_path":"stdlib/math.kn","line":222,"attributes":[],"docs":[],"target_notes":[]},{"name":"fast_sin","qualified_name":"std::math::fast_sin","kind":"function","visibility":"public","signature":"fn fast_sin(angle: Float) -> Float","source_path":"stdlib/math.kn","line":225,"attributes":[],"docs":[],"target_notes":[]},{"name":"fast_cos","qualified_name":"std::math::fast_cos","kind":"function","visibility":"public","signature":"fn fast_cos(angle: Float) -> Float","source_path":"stdlib/math.kn","line":233,"attributes":[],"docs":[],"target_notes":[]},{"name":"fast_atan2","qualified_name":"std::math::fast_atan2","kind":"function","visibility":"public","signature":"fn fast_atan2(y: Float, x: Float) -> Float","source_path":"stdlib/math.kn","line":236,"attributes":[],"docs":[],"target_notes":[]},{"name":"fast_acos","qualified_name":"std::math::fast_acos","kind":"function","visibility":"public","signature":"fn fast_acos(value: Float) -> Float","source_path":"stdlib/math.kn","line":254,"attributes":[],"docs":[],"target_notes":[]},{"name":"tan_scalar","qualified_name":"std::math::tan_scalar","kind":"function","visibility":"public","signature":"fn tan_scalar(value: Float) -> Float","source_path":"stdlib/math.kn","line":265,"attributes":[],"docs":[],"target_notes":[]},{"name":"fma_scalar","qualified_name":"std::math::fma_scalar","kind":"function","visibility":"public","signature":"fn fma_scalar(a: Float, b: Float, c: Float) -> Float","source_path":"stdlib/math.kn","line":271,"attributes":[],"docs":[],"target_notes":[]},{"name":"frac_scalar","qualified_name":"std::math::frac_scalar","kind":"function","visibility":"public","signature":"fn frac_scalar(value: Float) -> Float","source_path":"stdlib/math.kn","line":274,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec2_zero","qualified_name":"std::math::vec2_zero","kind":"function","visibility":"public","signature":"fn vec2_zero() -> Vec2","source_path":"stdlib/math.kn","line":277,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec2_one","qualified_name":"std::math::vec2_one","kind":"function","visibility":"public","signature":"fn vec2_one() -> Vec2","source_path":"stdlib/math.kn","line":280,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec2_splat","qualified_name":"std::math::vec2_splat","kind":"function","visibility":"public","signature":"fn vec2_splat(value: Float) -> Vec2","source_path":"stdlib/math.kn","line":283,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec3_zero","qualified_name":"std::math::vec3_zero","kind":"function","visibility":"public","signature":"fn vec3_zero() -> Vec3","source_path":"stdlib/math.kn","line":286,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec3_one","qualified_name":"std::math::vec3_one","kind":"function","visibility":"public","signature":"fn vec3_one() -> Vec3","source_path":"stdlib/math.kn","line":289,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec3_up","qualified_name":"std::math::vec3_up","kind":"function","visibility":"public","signature":"fn vec3_up() -> Vec3","source_path":"stdlib/math.kn","line":292,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec3_right","qualified_name":"std::math::vec3_right","kind":"function","visibility":"public","signature":"fn vec3_right() -> Vec3","source_path":"stdlib/math.kn","line":295,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec3_forward","qualified_name":"std::math::vec3_forward","kind":"function","visibility":"public","signature":"fn vec3_forward() -> Vec3","source_path":"stdlib/math.kn","line":298,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec3_splat","qualified_name":"std::math::vec3_splat","kind":"function","visibility":"public","signature":"fn vec3_splat(value: Float) -> Vec3","source_path":"stdlib/math.kn","line":301,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec4_zero","qualified_name":"std::math::vec4_zero","kind":"function","visibility":"public","signature":"fn vec4_zero() -> Vec4","source_path":"stdlib/math.kn","line":304,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec4_one","qualified_name":"std::math::vec4_one","kind":"function","visibility":"public","signature":"fn vec4_one() -> Vec4","source_path":"stdlib/math.kn","line":307,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec4_splat","qualified_name":"std::math::vec4_splat","kind":"function","visibility":"public","signature":"fn vec4_splat(value: Float) -> Vec4","source_path":"stdlib/math.kn","line":310,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec2_dot","qualified_name":"std::math::vec2_dot","kind":"function","visibility":"public","signature":"fn vec2_dot(a: Vec2, b: Vec2) -> Float","source_path":"stdlib/math.kn","line":313,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec3_dot","qualified_name":"std::math::vec3_dot","kind":"function","visibility":"public","signature":"fn vec3_dot(a: Vec3, b: Vec3) -> Float","source_path":"stdlib/math.kn","line":316,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec4_dot","qualified_name":"std::math::vec4_dot","kind":"function","visibility":"public","signature":"fn vec4_dot(a: Vec4, b: Vec4) -> Float","source_path":"stdlib/math.kn","line":319,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec3_cross","qualified_name":"std::math::vec3_cross","kind":"function","visibility":"public","signature":"fn vec3_cross(a: Vec3, b: Vec3) -> Vec3","source_path":"stdlib/math.kn","line":322,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec2_length","qualified_name":"std::math::vec2_length","kind":"function","visibility":"public","signature":"fn vec2_length(value: Vec2) -> Float","source_path":"stdlib/math.kn","line":325,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec3_length","qualified_name":"std::math::vec3_length","kind":"function","visibility":"public","signature":"fn vec3_length(value: Vec3) -> Float","source_path":"stdlib/math.kn","line":328,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec4_length","qualified_name":"std::math::vec4_length","kind":"function","visibility":"public","signature":"fn vec4_length(value: Vec4) -> Float","source_path":"stdlib/math.kn","line":331,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec2_length_squared","qualified_name":"std::math::vec2_length_squared","kind":"function","visibility":"public","signature":"fn vec2_length_squared(value: Vec2) -> Float","source_path":"stdlib/math.kn","line":334,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec2_add","qualified_name":"std::math::vec2_add","kind":"function","visibility":"public","signature":"fn vec2_add(a: Vec2, b: Vec2) -> Vec2","source_path":"stdlib/math.kn","line":337,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec2_sub","qualified_name":"std::math::vec2_sub","kind":"function","visibility":"public","signature":"fn vec2_sub(a: Vec2, b: Vec2) -> Vec2","source_path":"stdlib/math.kn","line":340,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec2_mul_scalar","qualified_name":"std::math::vec2_mul_scalar","kind":"function","visibility":"public","signature":"fn vec2_mul_scalar(value: Vec2, scalar: Float) -> Vec2","source_path":"stdlib/math.kn","line":343,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec2_div_scalar","qualified_name":"std::math::vec2_div_scalar","kind":"function","visibility":"public","signature":"fn vec2_div_scalar(value: Vec2, scalar: Float) -> Vec2","source_path":"stdlib/math.kn","line":346,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec2_hadamard","qualified_name":"std::math::vec2_hadamard","kind":"function","visibility":"public","signature":"fn vec2_hadamard(a: Vec2, b: Vec2) -> Vec2","source_path":"stdlib/math.kn","line":349,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec2_floor","qualified_name":"std::math::vec2_floor","kind":"function","visibility":"public","signature":"fn vec2_floor(value: Vec2) -> Vec2","source_path":"stdlib/math.kn","line":352,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec2_frac","qualified_name":"std::math::vec2_frac","kind":"function","visibility":"public","signature":"fn vec2_frac(value: Vec2) -> Vec2","source_path":"stdlib/math.kn","line":355,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec3_add","qualified_name":"std::math::vec3_add","kind":"function","visibility":"public","signature":"fn vec3_add(a: Vec3, b: Vec3) -> Vec3","source_path":"stdlib/math.kn","line":358,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec3_sub","qualified_name":"std::math::vec3_sub","kind":"function","visibility":"public","signature":"fn vec3_sub(a: Vec3, b: Vec3) -> Vec3","source_path":"stdlib/math.kn","line":361,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec3_mul_scalar","qualified_name":"std::math::vec3_mul_scalar","kind":"function","visibility":"public","signature":"fn vec3_mul_scalar(value: Vec3, scalar: Float) -> Vec3","source_path":"stdlib/math.kn","line":364,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec3_div_scalar","qualified_name":"std::math::vec3_div_scalar","kind":"function","visibility":"public","signature":"fn vec3_div_scalar(value: Vec3, scalar: Float) -> Vec3","source_path":"stdlib/math.kn","line":367,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec3_neg","qualified_name":"std::math::vec3_neg","kind":"function","visibility":"public","signature":"fn vec3_neg(value: Vec3) -> Vec3","source_path":"stdlib/math.kn","line":370,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec3_abs","qualified_name":"std::math::vec3_abs","kind":"function","visibility":"public","signature":"fn vec3_abs(value: Vec3) -> Vec3","source_path":"stdlib/math.kn","line":373,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec4_add","qualified_name":"std::math::vec4_add","kind":"function","visibility":"public","signature":"fn vec4_add(a: Vec4, b: Vec4) -> Vec4","source_path":"stdlib/math.kn","line":376,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec4_sub","qualified_name":"std::math::vec4_sub","kind":"function","visibility":"public","signature":"fn vec4_sub(a: Vec4, b: Vec4) -> Vec4","source_path":"stdlib/math.kn","line":379,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec4_mul_scalar","qualified_name":"std::math::vec4_mul_scalar","kind":"function","visibility":"public","signature":"fn vec4_mul_scalar(value: Vec4, scalar: Float) -> Vec4","source_path":"stdlib/math.kn","line":382,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec4_div_scalar","qualified_name":"std::math::vec4_div_scalar","kind":"function","visibility":"public","signature":"fn vec4_div_scalar(value: Vec4, scalar: Float) -> Vec4","source_path":"stdlib/math.kn","line":385,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec3_length_squared","qualified_name":"std::math::vec3_length_squared","kind":"function","visibility":"public","signature":"fn vec3_length_squared(value: Vec3) -> Float","source_path":"stdlib/math.kn","line":388,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec4_length_squared","qualified_name":"std::math::vec4_length_squared","kind":"function","visibility":"public","signature":"fn vec4_length_squared(value: Vec4) -> Float","source_path":"stdlib/math.kn","line":391,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec2_distance","qualified_name":"std::math::vec2_distance","kind":"function","visibility":"public","signature":"fn vec2_distance(a: Vec2, b: Vec2) -> Float","source_path":"stdlib/math.kn","line":394,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec3_distance","qualified_name":"std::math::vec3_distance","kind":"function","visibility":"public","signature":"fn vec3_distance(a: Vec3, b: Vec3) -> Float","source_path":"stdlib/math.kn","line":397,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec4_distance","qualified_name":"std::math::vec4_distance","kind":"function","visibility":"public","signature":"fn vec4_distance(a: Vec4, b: Vec4) -> Float","source_path":"stdlib/math.kn","line":400,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec2_normalize_or_zero","qualified_name":"std::math::vec2_normalize_or_zero","kind":"function","visibility":"public","signature":"fn vec2_normalize_or_zero(value: Vec2) -> Vec2","source_path":"stdlib/math.kn","line":403,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec3_normalize_or_zero","qualified_name":"std::math::vec3_normalize_or_zero","kind":"function","visibility":"public","signature":"fn vec3_normalize_or_zero(value: Vec3) -> Vec3","source_path":"stdlib/math.kn","line":409,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec4_normalize_or_zero","qualified_name":"std::math::vec4_normalize_or_zero","kind":"function","visibility":"public","signature":"fn vec4_normalize_or_zero(value: Vec4) -> Vec4","source_path":"stdlib/math.kn","line":415,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec2_perp","qualified_name":"std::math::vec2_perp","kind":"function","visibility":"public","signature":"fn vec2_perp(value: Vec2) -> Vec2","source_path":"stdlib/math.kn","line":421,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec2_rotate","qualified_name":"std::math::vec2_rotate","kind":"function","visibility":"public","signature":"fn vec2_rotate(value: Vec2, angle: Float) -> Vec2","source_path":"stdlib/math.kn","line":424,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec2_lerp","qualified_name":"std::math::vec2_lerp","kind":"function","visibility":"public","signature":"fn vec2_lerp(a: Vec2, b: Vec2, t: Float) -> Vec2","source_path":"stdlib/math.kn","line":429,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec3_lerp","qualified_name":"std::math::vec3_lerp","kind":"function","visibility":"public","signature":"fn vec3_lerp(a: Vec3, b: Vec3, t: Float) -> Vec3","source_path":"stdlib/math.kn","line":432,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec4_lerp","qualified_name":"std::math::vec4_lerp","kind":"function","visibility":"public","signature":"fn vec4_lerp(a: Vec4, b: Vec4, t: Float) -> Vec4","source_path":"stdlib/math.kn","line":435,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec2_min","qualified_name":"std::math::vec2_min","kind":"function","visibility":"public","signature":"fn vec2_min(a: Vec2, b: Vec2) -> Vec2","source_path":"stdlib/math.kn","line":438,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec2_max","qualified_name":"std::math::vec2_max","kind":"function","visibility":"public","signature":"fn vec2_max(a: Vec2, b: Vec2) -> Vec2","source_path":"stdlib/math.kn","line":441,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec3_min","qualified_name":"std::math::vec3_min","kind":"function","visibility":"public","signature":"fn vec3_min(a: Vec3, b: Vec3) -> Vec3","source_path":"stdlib/math.kn","line":444,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec3_max","qualified_name":"std::math::vec3_max","kind":"function","visibility":"public","signature":"fn vec3_max(a: Vec3, b: Vec3) -> Vec3","source_path":"stdlib/math.kn","line":447,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec4_min","qualified_name":"std::math::vec4_min","kind":"function","visibility":"public","signature":"fn vec4_min(a: Vec4, b: Vec4) -> Vec4","source_path":"stdlib/math.kn","line":450,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec4_max","qualified_name":"std::math::vec4_max","kind":"function","visibility":"public","signature":"fn vec4_max(a: Vec4, b: Vec4) -> Vec4","source_path":"stdlib/math.kn","line":453,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec3_clamp","qualified_name":"std::math::vec3_clamp","kind":"function","visibility":"public","signature":"fn vec3_clamp(value: Vec3, lo: Vec3, hi: Vec3) -> Vec3","source_path":"stdlib/math.kn","line":456,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec4_clamp","qualified_name":"std::math::vec4_clamp","kind":"function","visibility":"public","signature":"fn vec4_clamp(value: Vec4, lo: Vec4, hi: Vec4) -> Vec4","source_path":"stdlib/math.kn","line":463,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec3_hadamard","qualified_name":"std::math::vec3_hadamard","kind":"function","visibility":"public","signature":"fn vec3_hadamard(a: Vec3, b: Vec3) -> Vec3","source_path":"stdlib/math.kn","line":471,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec3_floor","qualified_name":"std::math::vec3_floor","kind":"function","visibility":"public","signature":"fn vec3_floor(value: Vec3) -> Vec3","source_path":"stdlib/math.kn","line":474,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec3_frac","qualified_name":"std::math::vec3_frac","kind":"function","visibility":"public","signature":"fn vec3_frac(value: Vec3) -> Vec3","source_path":"stdlib/math.kn","line":477,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec4_hadamard","qualified_name":"std::math::vec4_hadamard","kind":"function","visibility":"public","signature":"fn vec4_hadamard(a: Vec4, b: Vec4) -> Vec4","source_path":"stdlib/math.kn","line":480,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec3_project","qualified_name":"std::math::vec3_project","kind":"function","visibility":"public","signature":"fn vec3_project(a: Vec3, onto: Vec3) -> Vec3","source_path":"stdlib/math.kn","line":483,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec3_reject","qualified_name":"std::math::vec3_reject","kind":"function","visibility":"public","signature":"fn vec3_reject(a: Vec3, onto: Vec3) -> Vec3","source_path":"stdlib/math.kn","line":489,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec3_reflect","qualified_name":"std::math::vec3_reflect","kind":"function","visibility":"public","signature":"fn vec3_reflect(direction: Vec3, normal: Vec3) -> Vec3","source_path":"stdlib/math.kn","line":492,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec3_refract","qualified_name":"std::math::vec3_refract","kind":"function","visibility":"public","signature":"fn vec3_refract(direction: Vec3, normal: Vec3, eta: Float) -> Vec3","source_path":"stdlib/math.kn","line":496,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec3_faceforward","qualified_name":"std::math::vec3_faceforward","kind":"function","visibility":"public","signature":"fn vec3_faceforward(normal: Vec3, incident: Vec3, reference_normal: Vec3) -> Vec3","source_path":"stdlib/math.kn","line":506,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec3a","qualified_name":"std::math::vec3a","kind":"function","visibility":"public","signature":"fn vec3a(value: Vec3) -> Vec3A","source_path":"stdlib/math.kn","line":511,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec3a_to_vec3","qualified_name":"std::math::vec3a_to_vec3","kind":"function","visibility":"public","signature":"fn vec3a_to_vec3(value: Vec3A) -> Vec3","source_path":"stdlib/math.kn","line":514,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec3a_length","qualified_name":"std::math::vec3a_length","kind":"function","visibility":"public","signature":"fn vec3a_length(value: Vec3A) -> Float","source_path":"stdlib/math.kn","line":517,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec3a_normalize_or_zero","qualified_name":"std::math::vec3a_normalize_or_zero","kind":"function","visibility":"public","signature":"fn vec3a_normalize_or_zero(value: Vec3A) -> Vec3A","source_path":"stdlib/math.kn","line":520,"attributes":[],"docs":[],"target_notes":[]},{"name":"float8_splat","qualified_name":"std::math::float8_splat","kind":"function","visibility":"public","signature":"fn float8_splat(value: Float) -> Float8","source_path":"stdlib/math.kn","line":531,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec3x4_from_vec3","qualified_name":"std::math::vec3x4_from_vec3","kind":"function","visibility":"public","signature":"fn vec3x4_from_vec3(a: Vec3, b: Vec3, c: Vec3, d: Vec3) -> Vec3x4","source_path":"stdlib/math.kn","line":534,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec3x4_add","qualified_name":"std::math::vec3x4_add","kind":"function","visibility":"public","signature":"fn vec3x4_add(a: Vec3x4, b: Vec3x4) -> Vec3x4","source_path":"stdlib/math.kn","line":541,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec3x4_sub","qualified_name":"std::math::vec3x4_sub","kind":"function","visibility":"public","signature":"fn vec3x4_sub(a: Vec3x4, b: Vec3x4) -> Vec3x4","source_path":"stdlib/math.kn","line":544,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec3x4_mul_scalar","qualified_name":"std::math::vec3x4_mul_scalar","kind":"function","visibility":"public","signature":"fn vec3x4_mul_scalar(a: Vec3x4, value: Float) -> Vec3x4","source_path":"stdlib/math.kn","line":547,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec3x4_dot","qualified_name":"std::math::vec3x4_dot","kind":"function","visibility":"public","signature":"fn vec3x4_dot(a: Vec3x4, b: Vec3x4) -> Vec4","source_path":"stdlib/math.kn","line":550,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec3x4_length_squared","qualified_name":"std::math::vec3x4_length_squared","kind":"function","visibility":"public","signature":"fn vec3x4_length_squared(value: Vec3x4) -> Vec4","source_path":"stdlib/math.kn","line":553,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec3x4_normalize_or_zero","qualified_name":"std::math::vec3x4_normalize_or_zero","kind":"function","visibility":"public","signature":"fn vec3x4_normalize_or_zero(value: Vec3x4) -> Vec3x4","source_path":"stdlib/math.kn","line":556,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec4x8_make","qualified_name":"std::math::vec4x8_make","kind":"function","visibility":"public","signature":"fn vec4x8_make(x_lo: Vec4, x_hi: Vec4, y_lo: Vec4, y_hi: Vec4, z_lo: Vec4, z_hi: Vec4, w_lo: Vec4, w_hi: Vec4) -> Vec4x8","source_path":"stdlib/math.kn","line":569,"attributes":[],"docs":[],"target_notes":[]},{"name":"vec4x8_add","qualified_name":"std::math::vec4x8_add","kind":"function","visibility":"public","signature":"fn vec4x8_add(a: Vec4x8, b: Vec4x8) -> Vec4x8","source_path":"stdlib/math.kn","line":577,"attributes":[],"docs":[],"target_notes":[]},{"name":"quat_identity","qualified_name":"std::math::quat_identity","kind":"function","visibility":"public","signature":"fn quat_identity() -> Quat","source_path":"stdlib/math.kn","line":585,"attributes":[],"docs":[],"target_notes":[]},{"name":"quat_conjugate","qualified_name":"std::math::quat_conjugate","kind":"function","visibility":"public","signature":"fn quat_conjugate(value: Quat) -> Quat","source_path":"stdlib/math.kn","line":588,"attributes":[],"docs":[],"target_notes":[]},{"name":"quat_dot","qualified_name":"std::math::quat_dot","kind":"function","visibility":"public","signature":"fn quat_dot(a: Quat, b: Quat) -> Float","source_path":"stdlib/math.kn","line":591,"attributes":[],"docs":[],"target_notes":[]},{"name":"quat_length","qualified_name":"std::math::quat_length","kind":"function","visibility":"public","signature":"fn quat_length(value: Quat) -> Float","source_path":"stdlib/math.kn","line":594,"attributes":[],"docs":[],"target_notes":[]},{"name":"quat_normalize_or_identity","qualified_name":"std::math::quat_normalize_or_identity","kind":"function","visibility":"public","signature":"fn quat_normalize_or_identity(value: Quat) -> Quat","source_path":"stdlib/math.kn","line":597,"attributes":[],"docs":[],"target_notes":[]},{"name":"quat_from_axis_angle","qualified_name":"std::math::quat_from_axis_angle","kind":"function","visibility":"public","signature":"fn quat_from_axis_angle(axis: Vec3, angle: Float) -> Quat","source_path":"stdlib/math.kn","line":608,"attributes":[],"docs":[],"target_notes":[]},{"name":"quat_mul","qualified_name":"std::math::quat_mul","kind":"function","visibility":"public","signature":"fn quat_mul(a: Quat, b: Quat) -> Quat","source_path":"stdlib/math.kn","line":614,"attributes":[],"docs":[],"target_notes":[]},{"name":"quat_rotate_vec3","qualified_name":"std::math::quat_rotate_vec3","kind":"function","visibility":"public","signature":"fn quat_rotate_vec3(rotation: Quat, value: Vec3) -> Vec3","source_path":"stdlib/math.kn","line":622,"attributes":[],"docs":[],"target_notes":[]},{"name":"quat_nlerp","qualified_name":"std::math::quat_nlerp","kind":"function","visibility":"public","signature":"fn quat_nlerp(a: Quat, b: Quat, t: Float) -> Quat","source_path":"stdlib/math.kn","line":629,"attributes":[],"docs":[],"target_notes":[]},{"name":"quat_slerp","qualified_name":"std::math::quat_slerp","kind":"function","visibility":"public","signature":"fn quat_slerp(a: Quat, b: Quat, t: Float) -> Quat","source_path":"stdlib/math.kn","line":638,"attributes":[],"docs":[],"target_notes":[]},{"name":"mat3_identity","qualified_name":"std::math::mat3_identity","kind":"function","visibility":"public","signature":"fn mat3_identity() -> Mat3","source_path":"stdlib/math.kn","line":657,"attributes":[],"docs":[],"target_notes":[]},{"name":"mat3_mul_vec3","qualified_name":"std::math::mat3_mul_vec3","kind":"function","visibility":"public","signature":"fn mat3_mul_vec3(transform_matrix: Mat3, value: Vec3) -> Vec3","source_path":"stdlib/math.kn","line":664,"attributes":[],"docs":[],"target_notes":[]},{"name":"mat3_transpose","qualified_name":"std::math::mat3_transpose","kind":"function","visibility":"public","signature":"fn mat3_transpose(transform_matrix: Mat3) -> Mat3","source_path":"stdlib/math.kn","line":671,"attributes":[],"docs":[],"target_notes":[]},{"name":"mat4_identity","qualified_name":"std::math::mat4_identity","kind":"function","visibility":"public","signature":"fn mat4_identity() -> Mat4","source_path":"stdlib/math.kn","line":678,"attributes":[],"docs":[],"target_notes":[]},{"name":"mat4_translation","qualified_name":"std::math::mat4_translation","kind":"function","visibility":"public","signature":"fn mat4_translation(offset: Vec3) -> Mat4","source_path":"stdlib/math.kn","line":686,"attributes":[],"docs":[],"target_notes":[]},{"name":"mat4_scale","qualified_name":"std::math::mat4_scale","kind":"function","visibility":"public","signature":"fn mat4_scale(scale: Vec3) -> Mat4","source_path":"stdlib/math.kn","line":694,"attributes":[],"docs":[],"target_notes":[]},{"name":"mat4_rotation_x","qualified_name":"std::math::mat4_rotation_x","kind":"function","visibility":"public","signature":"fn mat4_rotation_x(angle: Float) -> Mat4","source_path":"stdlib/math.kn","line":702,"attributes":[],"docs":[],"target_notes":[]},{"name":"mat4_rotation_y","qualified_name":"std::math::mat4_rotation_y","kind":"function","visibility":"public","signature":"fn mat4_rotation_y(angle: Float) -> Mat4","source_path":"stdlib/math.kn","line":712,"attributes":[],"docs":[],"target_notes":[]},{"name":"mat4_rotation_z","qualified_name":"std::math::mat4_rotation_z","kind":"function","visibility":"public","signature":"fn mat4_rotation_z(angle: Float) -> Mat4","source_path":"stdlib/math.kn","line":722,"attributes":[],"docs":[],"target_notes":[]},{"name":"mat4_from_quat","qualified_name":"std::math::mat4_from_quat","kind":"function","visibility":"public","signature":"fn mat4_from_quat(value: Quat) -> Mat4","source_path":"stdlib/math.kn","line":732,"attributes":[],"docs":[],"target_notes":[]},{"name":"mat4_rotation_xyz","qualified_name":"std::math::mat4_rotation_xyz","kind":"function","visibility":"public","signature":"fn mat4_rotation_xyz(angles: Vec3) -> Mat4","source_path":"stdlib/math.kn","line":750,"attributes":[],"docs":[],"target_notes":[]},{"name":"mat4_transpose","qualified_name":"std::math::mat4_transpose","kind":"function","visibility":"public","signature":"fn mat4_transpose(transform_matrix: Mat4) -> Mat4","source_path":"stdlib/math.kn","line":753,"attributes":[],"docs":[],"target_notes":[]},{"name":"mat4_mul","qualified_name":"std::math::mat4_mul","kind":"function","visibility":"public","signature":"fn mat4_mul(a: Mat4, b: Mat4) -> Mat4","source_path":"stdlib/math.kn","line":761,"attributes":[],"docs":[],"target_notes":[]},{"name":"mat4_transform_point","qualified_name":"std::math::mat4_transform_point","kind":"function","visibility":"public","signature":"fn mat4_transform_point(transform_matrix: Mat4, point: Vec3) -> Vec3","source_path":"stdlib/math.kn","line":770,"attributes":[],"docs":[],"target_notes":[]},{"name":"mat4_transform_vector","qualified_name":"std::math::mat4_transform_vector","kind":"function","visibility":"public","signature":"fn mat4_transform_vector(transform_matrix: Mat4, vector: Vec3) -> Vec3","source_path":"stdlib/math.kn","line":780,"attributes":[],"docs":[],"target_notes":[]},{"name":"mat4_from_trs","qualified_name":"std::math::mat4_from_trs","kind":"function","visibility":"public","signature":"fn mat4_from_trs(translation: Vec3, rotation: Quat, scale: Vec3) -> Mat4","source_path":"stdlib/math.kn","line":784,"attributes":[],"docs":[],"target_notes":[]},{"name":"mat4_perspective","qualified_name":"std::math::mat4_perspective","kind":"function","visibility":"public","signature":"fn mat4_perspective(fov_y_radians: Float, aspect: Float, near_plane: Float, far_plane: Float) -> Mat4","source_path":"stdlib/math.kn","line":787,"attributes":[],"docs":[],"target_notes":[]},{"name":"mat4_orthographic","qualified_name":"std::math::mat4_orthographic","kind":"function","visibility":"public","signature":"fn mat4_orthographic(left: Float, right: Float, bottom: Float, top: Float, near_plane: Float, far_plane: Float) -> Mat4","source_path":"stdlib/math.kn","line":797,"attributes":[],"docs":[],"target_notes":[]},{"name":"mat4_look_at","qualified_name":"std::math::mat4_look_at","kind":"function","visibility":"public","signature":"fn mat4_look_at(eye: Vec3, target: Vec3, up: Vec3) -> Mat4","source_path":"stdlib/math.kn","line":808,"attributes":[],"docs":[],"target_notes":[]},{"name":"affine2_identity","qualified_name":"std::math::affine2_identity","kind":"function","visibility":"public","signature":"fn affine2_identity() -> Affine2","source_path":"stdlib/math.kn","line":819,"attributes":[],"docs":[],"target_notes":[]},{"name":"affine2_transform_point","qualified_name":"std::math::affine2_transform_point","kind":"function","visibility":"public","signature":"fn affine2_transform_point(transform: Affine2, point: Vec2) -> Vec2","source_path":"stdlib/math.kn","line":822,"attributes":[],"docs":[],"target_notes":[]},{"name":"affine3_identity","qualified_name":"std::math::affine3_identity","kind":"function","visibility":"public","signature":"fn affine3_identity() -> Affine3","source_path":"stdlib/math.kn","line":828,"attributes":[],"docs":[],"target_notes":[]},{"name":"affine3_from_trs","qualified_name":"std::math::affine3_from_trs","kind":"function","visibility":"public","signature":"fn affine3_from_trs(translation: Vec3, rotation: Quat, scale: Vec3) -> Affine3","source_path":"stdlib/math.kn","line":831,"attributes":[],"docs":[],"target_notes":[]},{"name":"affine3_transform_point","qualified_name":"std::math::affine3_transform_point","kind":"function","visibility":"public","signature":"fn affine3_transform_point(transform: Affine3, point: Vec3) -> Vec3","source_path":"stdlib/math.kn","line":840,"attributes":[],"docs":[],"target_notes":[]},{"name":"affine3_transform_vector","qualified_name":"std::math::affine3_transform_vector","kind":"function","visibility":"public","signature":"fn affine3_transform_vector(transform: Affine3, vector: Vec3) -> Vec3","source_path":"stdlib/math.kn","line":844,"attributes":[],"docs":[],"target_notes":[]},{"name":"affine3_to_mat4","qualified_name":"std::math::affine3_to_mat4","kind":"function","visibility":"public","signature":"fn affine3_to_mat4(transform: Affine3) -> Mat4","source_path":"stdlib/math.kn","line":847,"attributes":[],"docs":[],"target_notes":[]},{"name":"affine3_mul","qualified_name":"std::math::affine3_mul","kind":"function","visibility":"public","signature":"fn affine3_mul(a: Affine3, b: Affine3) -> Affine3","source_path":"stdlib/math.kn","line":855,"attributes":[],"docs":[],"target_notes":[]},{"name":"align_up_int","qualified_name":"std::math::align_up_int","kind":"function","visibility":"public","signature":"fn align_up_int(value: Int, alignment: Int) -> Int","source_path":"stdlib/math.kn","line":863,"attributes":[],"docs":[],"target_notes":[]},{"name":"gpu_layout_info","qualified_name":"std::math::gpu_layout_info","kind":"function","visibility":"public","signature":"fn gpu_layout_info(size_bytes: Int, alignment_bytes: Int) -> GpuLayoutInfo","source_path":"stdlib/math.kn","line":871,"attributes":[],"docs":[],"target_notes":[]},{"name":"std140_vec3","qualified_name":"std::math::std140_vec3","kind":"function","visibility":"public","signature":"fn std140_vec3(value: Vec3) -> Std140","source_path":"stdlib/math.kn","line":880,"attributes":[],"docs":[],"target_notes":[]},{"name":"std140_vec4","qualified_name":"std::math::std140_vec4","kind":"function","visibility":"public","signature":"fn std140_vec4(value: Vec4) -> Std140","source_path":"stdlib/math.kn","line":886,"attributes":[],"docs":[],"target_notes":[]},{"name":"std140_mat3","qualified_name":"std::math::std140_mat3","kind":"function","visibility":"public","signature":"fn std140_mat3(value: Mat3) -> Std140","source_path":"stdlib/math.kn","line":889,"attributes":[],"docs":[],"target_notes":[]},{"name":"std140_mat4","qualified_name":"std::math::std140_mat4","kind":"function","visibility":"public","signature":"fn std140_mat4(value: Mat4) -> Std140","source_path":"stdlib/math.kn","line":899,"attributes":[],"docs":[],"target_notes":[]},{"name":"std430_vec3a","qualified_name":"std::math::std430_vec3a","kind":"function","visibility":"public","signature":"fn std430_vec3a(value: Vec3A) -> Std430","source_path":"stdlib/math.kn","line":902,"attributes":[],"docs":[],"target_notes":[]},{"name":"std430_vec4","qualified_name":"std::math::std430_vec4","kind":"function","visibility":"public","signature":"fn std430_vec4(value: Vec4) -> Std430","source_path":"stdlib/math.kn","line":905,"attributes":[],"docs":[],"target_notes":[]},{"name":"cbuffer_mat4","qualified_name":"std::math::cbuffer_mat4","kind":"function","visibility":"public","signature":"fn cbuffer_mat4(value: Mat4) -> CBuffer","source_path":"stdlib/math.kn","line":908,"attributes":[],"docs":[],"target_notes":[]},{"name":"std140_mat4_alignment_bytes","qualified_name":"std::math::std140_mat4_alignment_bytes","kind":"function","visibility":"public","signature":"fn std140_mat4_alignment_bytes(value: Std140) -> Int","source_path":"stdlib/math.kn","line":911,"attributes":[],"docs":[],"target_notes":[]},{"name":"std140_mat4_stride_bytes","qualified_name":"std::math::std140_mat4_stride_bytes","kind":"function","visibility":"public","signature":"fn std140_mat4_stride_bytes(value: Std140) -> Int","source_path":"stdlib/math.kn","line":914,"attributes":[],"docs":[],"target_notes":[]},{"name":"color_rgba_red","qualified_name":"std::math::color_rgba_red","kind":"function","visibility":"public","signature":"fn color_rgba_red(value: ColorRgba) -> Float","source_path":"stdlib/math.kn","line":917,"attributes":[],"docs":[],"target_notes":[]},{"name":"color_rgba_green","qualified_name":"std::math::color_rgba_green","kind":"function","visibility":"public","signature":"fn color_rgba_green(value: ColorRgba) -> Float","source_path":"stdlib/math.kn","line":920,"attributes":[],"docs":[],"target_notes":[]},{"name":"color_rgba_blue","qualified_name":"std::math::color_rgba_blue","kind":"function","visibility":"public","signature":"fn color_rgba_blue(value: ColorRgba) -> Float","source_path":"stdlib/math.kn","line":923,"attributes":[],"docs":[],"target_notes":[]},{"name":"color_rgba_alpha","qualified_name":"std::math::color_rgba_alpha","kind":"function","visibility":"public","signature":"fn color_rgba_alpha(value: ColorRgba) -> Float","source_path":"stdlib/math.kn","line":926,"attributes":[],"docs":[],"target_notes":[]},{"name":"ray_hit_is_hit","qualified_name":"std::math::ray_hit_is_hit","kind":"function","visibility":"public","signature":"fn ray_hit_is_hit(value: RayHit) -> Bool","source_path":"stdlib/math.kn","line":929,"attributes":[],"docs":[],"target_notes":[]},{"name":"plane_from_point_normal","qualified_name":"std::math::plane_from_point_normal","kind":"function","visibility":"public","signature":"fn plane_from_point_normal(point: Vec3, normal: Vec3) -> Plane","source_path":"stdlib/math.kn","line":932,"attributes":[],"docs":[],"target_notes":[]},{"name":"plane_signed_distance","qualified_name":"std::math::plane_signed_distance","kind":"function","visibility":"public","signature":"fn plane_signed_distance(plane: Plane, point: Vec3) -> Float","source_path":"stdlib/math.kn","line":936,"attributes":[],"docs":[],"target_notes":[]},{"name":"plane_normalize","qualified_name":"std::math::plane_normalize","kind":"function","visibility":"public","signature":"fn plane_normalize(plane: Plane) -> Plane","source_path":"stdlib/math.kn","line":939,"attributes":[],"docs":[],"target_notes":[]},{"name":"ray3","qualified_name":"std::math::ray3","kind":"function","visibility":"public","signature":"fn ray3(origin: Vec3, direction: Vec3) -> Ray3","source_path":"stdlib/math.kn","line":945,"attributes":[],"docs":[],"target_notes":[]},{"name":"aabb_center","qualified_name":"std::math::aabb_center","kind":"function","visibility":"public","signature":"fn aabb_center(bounds: Aabb) -> Vec3","source_path":"stdlib/math.kn","line":948,"attributes":[],"docs":[],"target_notes":[]},{"name":"aabb_half_extents","qualified_name":"std::math::aabb_half_extents","kind":"function","visibility":"public","signature":"fn aabb_half_extents(bounds: Aabb) -> Vec3","source_path":"stdlib/math.kn","line":951,"attributes":[],"docs":[],"target_notes":[]},{"name":"aabb_expand_point","qualified_name":"std::math::aabb_expand_point","kind":"function","visibility":"public","signature":"fn aabb_expand_point(bounds: Aabb, point: Vec3) -> Aabb","source_path":"stdlib/math.kn","line":954,"attributes":[],"docs":[],"target_notes":[]},{"name":"aabb_union","qualified_name":"std::math::aabb_union","kind":"function","visibility":"public","signature":"fn aabb_union(a: Aabb, b: Aabb) -> Aabb","source_path":"stdlib/math.kn","line":957,"attributes":[],"docs":[],"target_notes":[]},{"name":"aabb_contains_point","qualified_name":"std::math::aabb_contains_point","kind":"function","visibility":"public","signature":"fn aabb_contains_point(bounds: Aabb, point: Vec3) -> Bool","source_path":"stdlib/math.kn","line":960,"attributes":[],"docs":[],"target_notes":[]},{"name":"sphere_contains_point","qualified_name":"std::math::sphere_contains_point","kind":"function","visibility":"public","signature":"fn sphere_contains_point(sphere: BoundingSphere, point: Vec3) -> Bool","source_path":"stdlib/math.kn","line":964,"attributes":[],"docs":[],"target_notes":[]},{"name":"closest_point_on_aabb","qualified_name":"std::math::closest_point_on_aabb","kind":"function","visibility":"public","signature":"fn closest_point_on_aabb(bounds: Aabb, point: Vec3) -> Vec3","source_path":"stdlib/math.kn","line":967,"attributes":[],"docs":[],"target_notes":[]},{"name":"closest_point_on_obb","qualified_name":"std::math::closest_point_on_obb","kind":"function","visibility":"public","signature":"fn closest_point_on_obb(bounds: Obb, point: Vec3) -> Vec3","source_path":"stdlib/math.kn","line":970,"attributes":[],"docs":[],"target_notes":[]},{"name":"sphere_vs_obb","qualified_name":"std::math::sphere_vs_obb","kind":"function","visibility":"public","signature":"fn sphere_vs_obb(sphere: BoundingSphere, bounds: Obb) -> Bool","source_path":"stdlib/math.kn","line":980,"attributes":[],"docs":[],"target_notes":[]},{"name":"ray_vs_aabb","qualified_name":"std::math::ray_vs_aabb","kind":"function","visibility":"public","signature":"fn ray_vs_aabb(ray: Ray3, bounds: Aabb) -> RayHit","source_path":"stdlib/math.kn","line":984,"attributes":[],"docs":[],"target_notes":[]},{"name":"ray_vs_triangle","qualified_name":"std::math::ray_vs_triangle","kind":"function","visibility":"public","signature":"fn ray_vs_triangle(ray: Ray3, a: Vec3, b: Vec3, c: Vec3) -> RayHit","source_path":"stdlib/math.kn","line":1012,"attributes":[],"docs":[],"target_notes":[]},{"name":"frustum_contains_point","qualified_name":"std::math::frustum_contains_point","kind":"function","visibility":"public","signature":"fn frustum_contains_point(frustum: Frustum, point: Vec3) -> Bool","source_path":"stdlib/math.kn","line":1040,"attributes":[],"docs":[],"target_notes":[]},{"name":"aabb_support_point","qualified_name":"std::math::aabb_support_point","kind":"function","visibility":"public","signature":"fn aabb_support_point(bounds: Aabb, normal: Vec3) -> Vec3","source_path":"stdlib/math.kn","line":1044,"attributes":[],"docs":[],"target_notes":[]},{"name":"plane_accepts_aabb","qualified_name":"std::math::plane_accepts_aabb","kind":"function","visibility":"public","signature":"fn plane_accepts_aabb(plane: Plane, bounds: Aabb) -> Bool","source_path":"stdlib/math.kn","line":1050,"attributes":[],"docs":[],"target_notes":[]},{"name":"frustum_vs_aabb","qualified_name":"std::math::frustum_vs_aabb","kind":"function","visibility":"public","signature":"fn frustum_vs_aabb(frustum: Frustum, bounds: Aabb) -> Bool","source_path":"stdlib/math.kn","line":1054,"attributes":[],"docs":[],"target_notes":[]},{"name":"bezier_quadratic_vec2","qualified_name":"std::math::bezier_quadratic_vec2","kind":"function","visibility":"public","signature":"fn bezier_quadratic_vec2(a: Vec2, b: Vec2, c: Vec2, t: Float) -> Vec2","source_path":"stdlib/math.kn","line":1057,"attributes":[],"docs":[],"target_notes":[]},{"name":"bezier_quadratic_vec3","qualified_name":"std::math::bezier_quadratic_vec3","kind":"function","visibility":"public","signature":"fn bezier_quadratic_vec3(a: Vec3, b: Vec3, c: Vec3, t: Float) -> Vec3","source_path":"stdlib/math.kn","line":1061,"attributes":[],"docs":[],"target_notes":[]},{"name":"bezier_quadratic_tangent_vec3","qualified_name":"std::math::bezier_quadratic_tangent_vec3","kind":"function","visibility":"public","signature":"fn bezier_quadratic_tangent_vec3(a: Vec3, b: Vec3, c: Vec3, t: Float) -> Vec3","source_path":"stdlib/math.kn","line":1065,"attributes":[],"docs":[],"target_notes":[]},{"name":"bezier_cubic_vec2","qualified_name":"std::math::bezier_cubic_vec2","kind":"function","visibility":"public","signature":"fn bezier_cubic_vec2(a: Vec2, b: Vec2, c: Vec2, d: Vec2, t: Float) -> Vec2","source_path":"stdlib/math.kn","line":1068,"attributes":[],"docs":[],"target_notes":[]},{"name":"bezier_cubic_vec3","qualified_name":"std::math::bezier_cubic_vec3","kind":"function","visibility":"public","signature":"fn bezier_cubic_vec3(a: Vec3, b: Vec3, c: Vec3, d: Vec3, t: Float) -> Vec3","source_path":"stdlib/math.kn","line":1074,"attributes":[],"docs":[],"target_notes":[]},{"name":"bezier_cubic_tangent_vec3","qualified_name":"std::math::bezier_cubic_tangent_vec3","kind":"function","visibility":"public","signature":"fn bezier_cubic_tangent_vec3(a: Vec3, b: Vec3, c: Vec3, d: Vec3, t: Float) -> Vec3","source_path":"stdlib/math.kn","line":1080,"attributes":[],"docs":[],"target_notes":[]},{"name":"catmull_rom_vec3","qualified_name":"std::math::catmull_rom_vec3","kind":"function","visibility":"public","signature":"fn catmull_rom_vec3(p0: Vec3, p1: Vec3, p2: Vec3, p3: Vec3, t: Float) -> Vec3","source_path":"stdlib/math.kn","line":1085,"attributes":[],"docs":[],"target_notes":[]},{"name":"catmull_rom_tangent_vec3","qualified_name":"std::math::catmull_rom_tangent_vec3","kind":"function","visibility":"public","signature":"fn catmull_rom_tangent_vec3(p0: Vec3, p1: Vec3, p2: Vec3, p3: Vec3, t: Float) -> Vec3","source_path":"stdlib/math.kn","line":1096,"attributes":[],"docs":[],"target_notes":[]},{"name":"bspline_cubic_vec3","qualified_name":"std::math::bspline_cubic_vec3","kind":"function","visibility":"public","signature":"fn bspline_cubic_vec3(p0: Vec3, p1: Vec3, p2: Vec3, p3: Vec3, t: Float) -> Vec3","source_path":"stdlib/math.kn","line":1104,"attributes":[],"docs":[],"target_notes":[]},{"name":"color_rgb","qualified_name":"std::math::color_rgb","kind":"function","visibility":"public","signature":"fn color_rgb(r: Float, g: Float, b: Float) -> ColorRgb","source_path":"stdlib/math.kn","line":1113,"attributes":[],"docs":[],"target_notes":[]},{"name":"color_rgba","qualified_name":"std::math::color_rgba","kind":"function","visibility":"public","signature":"fn color_rgba(r: Float, g: Float, b: Float, a: Float) -> ColorRgba","source_path":"stdlib/math.kn","line":1116,"attributes":[],"docs":[],"target_notes":[]},{"name":"color_rgb_to_vec3","qualified_name":"std::math::color_rgb_to_vec3","kind":"function","visibility":"public","signature":"fn color_rgb_to_vec3(value: ColorRgb) -> Vec3","source_path":"stdlib/math.kn","line":1119,"attributes":[],"docs":[],"target_notes":[]},{"name":"color_rgba_to_vec4","qualified_name":"std::math::color_rgba_to_vec4","kind":"function","visibility":"public","signature":"fn color_rgba_to_vec4(value: ColorRgba) -> Vec4","source_path":"stdlib/math.kn","line":1122,"attributes":[],"docs":[],"target_notes":[]},{"name":"srgb_to_linear_scalar","qualified_name":"std::math::srgb_to_linear_scalar","kind":"function","visibility":"public","signature":"fn srgb_to_linear_scalar(value: Float) -> Float","source_path":"stdlib/math.kn","line":1125,"attributes":[],"docs":[],"target_notes":[]},{"name":"linear_to_srgb_scalar","qualified_name":"std::math::linear_to_srgb_scalar","kind":"function","visibility":"public","signature":"fn linear_to_srgb_scalar(value: Float) -> Float","source_path":"stdlib/math.kn","line":1131,"attributes":[],"docs":[],"target_notes":[]},{"name":"srgb_to_linear","qualified_name":"std::math::srgb_to_linear","kind":"function","visibility":"public","signature":"fn srgb_to_linear(color: Vec3) -> Vec3","source_path":"stdlib/math.kn","line":1137,"attributes":[],"docs":[],"target_notes":[]},{"name":"linear_to_srgb","qualified_name":"std::math::linear_to_srgb","kind":"function","visibility":"public","signature":"fn linear_to_srgb(color: Vec3) -> Vec3","source_path":"stdlib/math.kn","line":1144,"attributes":[],"docs":[],"target_notes":[]},{"name":"rgb_to_hsv","qualified_name":"std::math::rgb_to_hsv","kind":"function","visibility":"public","signature":"fn rgb_to_hsv(rgb: Vec3) -> Hsv","source_path":"stdlib/math.kn","line":1151,"attributes":[],"docs":[],"target_notes":[]},{"name":"hsv_to_rgb","qualified_name":"std::math::hsv_to_rgb","kind":"function","visibility":"public","signature":"fn hsv_to_rgb(hsv: Hsv) -> Vec3","source_path":"stdlib/math.kn","line":1169,"attributes":[],"docs":[],"target_notes":[]},{"name":"rgb_to_hsl","qualified_name":"std::math::rgb_to_hsl","kind":"function","visibility":"public","signature":"fn rgb_to_hsl(rgb: Vec3) -> Hsl","source_path":"stdlib/math.kn","line":1186,"attributes":[],"docs":[],"target_notes":[]},{"name":"hsl_to_rgb","qualified_name":"std::math::hsl_to_rgb","kind":"function","visibility":"public","signature":"fn hsl_to_rgb(hsl: Hsl) -> Vec3","source_path":"stdlib/math.kn","line":1204,"attributes":[],"docs":[],"target_notes":[]},{"name":"tonemap_aces","qualified_name":"std::math::tonemap_aces","kind":"function","visibility":"public","signature":"fn tonemap_aces(color: Vec3) -> Vec3","source_path":"stdlib/math.kn","line":1221,"attributes":[],"docs":[],"target_notes":[]},{"name":"tonemap_reinhard","qualified_name":"std::math::tonemap_reinhard","kind":"function","visibility":"public","signature":"fn tonemap_reinhard(color: Vec3) -> Vec3","source_path":"stdlib/math.kn","line":1237,"attributes":[],"docs":[],"target_notes":[]},{"name":"tonemap_uncharted2","qualified_name":"std::math::tonemap_uncharted2","kind":"function","visibility":"public","signature":"fn tonemap_uncharted2(color: Vec3) -> Vec3","source_path":"stdlib/math.kn","line":1244,"attributes":[],"docs":[],"target_notes":[]},{"name":"pack_unorm8","qualified_name":"std::math::pack_unorm8","kind":"function","visibility":"public","signature":"fn pack_unorm8(value: Float) -> Int","source_path":"stdlib/math.kn","line":1259,"attributes":[],"docs":[],"target_notes":[]},{"name":"pack_unorm4x8","qualified_name":"std::math::pack_unorm4x8","kind":"function","visibility":"public","signature":"fn pack_unorm4x8(value: Vec4) -> Int","source_path":"stdlib/math.kn","line":1262,"attributes":[],"docs":[],"target_notes":[]},{"name":"pack_rgba_to_u32","qualified_name":"std::math::pack_rgba_to_u32","kind":"function","visibility":"public","signature":"fn pack_rgba_to_u32(value: ColorRgba) -> Int","source_path":"stdlib/math.kn","line":1269,"attributes":[],"docs":[],"target_notes":[]},{"name":"unpack_u32_to_rgba","qualified_name":"std::math::unpack_u32_to_rgba","kind":"function","visibility":"public","signature":"fn unpack_u32_to_rgba(packed: Int) -> ColorRgba","source_path":"stdlib/math.kn","line":1272,"attributes":[],"docs":[],"target_notes":[]},{"name":"hash11","qualified_name":"std::math::hash11","kind":"function","visibility":"public","signature":"fn hash11(x: Float) -> Float","source_path":"stdlib/math.kn","line":1284,"attributes":[],"docs":[],"target_notes":[]},{"name":"hash22","qualified_name":"std::math::hash22","kind":"function","visibility":"public","signature":"fn hash22(p: Vec2) -> Vec2","source_path":"stdlib/math.kn","line":1287,"attributes":[],"docs":[],"target_notes":[]},{"name":"hash33","qualified_name":"std::math::hash33","kind":"function","visibility":"public","signature":"fn hash33(p: Vec3) -> Vec3","source_path":"stdlib/math.kn","line":1294,"attributes":[],"docs":[],"target_notes":[]},{"name":"pcg32_step","qualified_name":"std::math::pcg32_step","kind":"function","visibility":"public","signature":"fn pcg32_step(state: Int) -> Int","source_path":"stdlib/math.kn","line":1306,"attributes":[],"docs":[],"target_notes":[]},{"name":"noise2","qualified_name":"std::math::noise2","kind":"function","visibility":"public","signature":"fn noise2(p: Vec2) -> Float","source_path":"stdlib/math.kn","line":1309,"attributes":[],"docs":[],"target_notes":[]},{"name":"noise3","qualified_name":"std::math::noise3","kind":"function","visibility":"public","signature":"fn noise3(p: Vec3) -> Float","source_path":"stdlib/math.kn","line":1321,"attributes":[],"docs":[],"target_notes":[]},{"name":"fbm2","qualified_name":"std::math::fbm2","kind":"function","visibility":"public","signature":"fn fbm2(p: Vec2, octaves: Int) -> Float","source_path":"stdlib/math.kn","line":1341,"attributes":[],"docs":[],"target_notes":[]},{"name":"fbm3","qualified_name":"std::math::fbm3","kind":"function","visibility":"public","signature":"fn fbm3(p: Vec3, octaves: Int) -> Float","source_path":"stdlib/math.kn","line":1353,"attributes":[],"docs":[],"target_notes":[]},{"name":"worley_noise","qualified_name":"std::math::worley_noise","kind":"function","visibility":"public","signature":"fn worley_noise(uv: Vec2, scale: Float, randomness: Float, seed: Float) -> Float","source_path":"stdlib/math.kn","line":1369,"attributes":[],"docs":[],"target_notes":[]},{"name":"blue_noise_dither_approx","qualified_name":"std::math::blue_noise_dither_approx","kind":"function","visibility":"public","signature":"fn blue_noise_dither_approx(pixel_x: Int, pixel_y: Int, frame: Int) -> Float","source_path":"stdlib/math.kn","line":1389,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"mcp","import_path":"std::mcp","source_path":"stdlib/mcp.kn","parse_status":{"status":"parsed"},"docs":["============================================================================","std::mcp — Model Context Protocol","============================================================================","Kain-native MCP server construction for the 2025-03-26 protocol revision.","","This module provides universal JSON-RPC 2.0 framing, the lifecycle handshake,","content-type constructors, stdio transport I/O, structured logging to stderr,","and a reference event loop. Streamable HTTP transport is a future lane.","","Import: use std::mcp","","Runtime primitives used directly (no @extern wrappers needed):","read_line() — block until newline on stdin, return line (\"\" on EOF)","stdout_write(s) — write to stdout, flush","stderr_write(s) — write to stderr, flush"],"symbols":[{"name":"MCP_PROTOCOL_VERSION","qualified_name":"std::mcp::MCP_PROTOCOL_VERSION","kind":"const","visibility":"public","signature":"const MCP_PROTOCOL_VERSION: String","source_path":"stdlib/mcp.kn","line":23,"attributes":[],"docs":["===========================================================================","Protocol constants","==========================================================================="],"target_notes":[]},{"name":"MCP_JSONRPC_VERSION","qualified_name":"std::mcp::MCP_JSONRPC_VERSION","kind":"const","visibility":"public","signature":"const MCP_JSONRPC_VERSION: String","source_path":"stdlib/mcp.kn","line":24,"attributes":[],"docs":[],"target_notes":[]},{"name":"MCP_ERROR_PARSE","qualified_name":"std::mcp::MCP_ERROR_PARSE","kind":"const","visibility":"public","signature":"const MCP_ERROR_PARSE: Int","source_path":"stdlib/mcp.kn","line":27,"attributes":[],"docs":["JSON-RPC 2.0 standard error codes"],"target_notes":[]},{"name":"MCP_ERROR_INVALID_REQUEST","qualified_name":"std::mcp::MCP_ERROR_INVALID_REQUEST","kind":"const","visibility":"public","signature":"const MCP_ERROR_INVALID_REQUEST: Int","source_path":"stdlib/mcp.kn","line":28,"attributes":[],"docs":[],"target_notes":[]},{"name":"MCP_ERROR_METHOD_NOT_FOUND","qualified_name":"std::mcp::MCP_ERROR_METHOD_NOT_FOUND","kind":"const","visibility":"public","signature":"const MCP_ERROR_METHOD_NOT_FOUND: Int","source_path":"stdlib/mcp.kn","line":29,"attributes":[],"docs":[],"target_notes":[]},{"name":"MCP_ERROR_INVALID_PARAMS","qualified_name":"std::mcp::MCP_ERROR_INVALID_PARAMS","kind":"const","visibility":"public","signature":"const MCP_ERROR_INVALID_PARAMS: Int","source_path":"stdlib/mcp.kn","line":30,"attributes":[],"docs":[],"target_notes":[]},{"name":"MCP_ERROR_INTERNAL","qualified_name":"std::mcp::MCP_ERROR_INTERNAL","kind":"const","visibility":"public","signature":"const MCP_ERROR_INTERNAL: Int","source_path":"stdlib/mcp.kn","line":31,"attributes":[],"docs":[],"target_notes":[]},{"name":"MCP_ERROR_TOOL_NOT_FOUND","qualified_name":"std::mcp::MCP_ERROR_TOOL_NOT_FOUND","kind":"const","visibility":"public","signature":"const MCP_ERROR_TOOL_NOT_FOUND: Int","source_path":"stdlib/mcp.kn","line":34,"attributes":[],"docs":["MCP server-defined error codes"],"target_notes":[]},{"name":"MCP_ERROR_RESOURCE_NOT_FOUND","qualified_name":"std::mcp::MCP_ERROR_RESOURCE_NOT_FOUND","kind":"const","visibility":"public","signature":"const MCP_ERROR_RESOURCE_NOT_FOUND: Int","source_path":"stdlib/mcp.kn","line":35,"attributes":[],"docs":[],"target_notes":[]},{"name":"MCP_ERROR_PROMPT_NOT_FOUND","qualified_name":"std::mcp::MCP_ERROR_PROMPT_NOT_FOUND","kind":"const","visibility":"public","signature":"const MCP_ERROR_PROMPT_NOT_FOUND: Int","source_path":"stdlib/mcp.kn","line":36,"attributes":[],"docs":[],"target_notes":[]},{"name":"McpServer","qualified_name":"std::mcp::McpServer","kind":"struct","visibility":"public","signature":"struct McpServer","source_path":"stdlib/mcp.kn","line":42,"attributes":[],"docs":["===========================================================================","Type definitions","==========================================================================="],"target_notes":[]},{"name":"McpToolDef","qualified_name":"std::mcp::McpToolDef","kind":"struct","visibility":"public","signature":"struct McpToolDef","source_path":"stdlib/mcp.kn","line":47,"attributes":[],"docs":[],"target_notes":[]},{"name":"McpCallResult","qualified_name":"std::mcp::McpCallResult","kind":"struct","visibility":"public","signature":"struct McpCallResult","source_path":"stdlib/mcp.kn","line":52,"attributes":[],"docs":[],"target_notes":[]},{"name":"McpResourceDef","qualified_name":"std::mcp::McpResourceDef","kind":"struct","visibility":"public","signature":"struct McpResourceDef","source_path":"stdlib/mcp.kn","line":56,"attributes":[],"docs":[],"target_notes":[]},{"name":"McpPromptDef","qualified_name":"std::mcp::McpPromptDef","kind":"struct","visibility":"public","signature":"struct McpPromptDef","source_path":"stdlib/mcp.kn","line":62,"attributes":[],"docs":[],"target_notes":[]},{"name":"McpRequest","qualified_name":"std::mcp::McpRequest","kind":"struct","visibility":"public","signature":"struct McpRequest","source_path":"stdlib/mcp.kn","line":67,"attributes":[],"docs":["Parsed incoming request (for manual dispatch loops)"],"target_notes":[]},{"name":"mcp_server_new","qualified_name":"std::mcp::mcp_server_new","kind":"function","visibility":"public","signature":"fn mcp_server_new(name: String, version: String) -> McpServer","source_path":"stdlib/mcp.kn","line":79,"attributes":[],"docs":["===========================================================================","Server lifecycle","==========================================================================="],"target_notes":[]},{"name":"mcp_server_with_instructions","qualified_name":"std::mcp::mcp_server_with_instructions","kind":"function","visibility":"public","signature":"fn mcp_server_with_instructions(name: String, version: String, instructions: String) -> McpServer","source_path":"stdlib/mcp.kn","line":86,"attributes":[],"docs":[],"target_notes":[]},{"name":"mcp_tool_def","qualified_name":"std::mcp::mcp_tool_def","kind":"function","visibility":"public","signature":"fn mcp_tool_def(name: String, description: String, schema_json: String) -> McpToolDef","source_path":"stdlib/mcp.kn","line":99,"attributes":[],"docs":["Create a tool definition. schema_json is a JSON Schema string like:","{\"type\":\"object\",\"properties\":{\"city\":{\"type\":\"string\",\"description\":\"City name\"}},\"required\":[\"city\"]}"],"target_notes":[]},{"name":"mcp_tool_def_no_args","qualified_name":"std::mcp::mcp_tool_def_no_args","kind":"function","visibility":"public","signature":"fn mcp_tool_def_no_args(name: String, description: String) -> McpToolDef","source_path":"stdlib/mcp.kn","line":107,"attributes":[],"docs":["Create a tool definition with no input parameters."],"target_notes":[]},{"name":"mcp_resource_def","qualified_name":"std::mcp::mcp_resource_def","kind":"function","visibility":"public","signature":"fn mcp_resource_def(uri: String, name: String, description: String, mime_type: String) -> McpResourceDef","source_path":"stdlib/mcp.kn","line":115,"attributes":[],"docs":["Create a resource definition for the catalog/list surface."],"target_notes":[]},{"name":"mcp_prompt_def","qualified_name":"std::mcp::mcp_prompt_def","kind":"function","visibility":"public","signature":"fn mcp_prompt_def(name: String, description: String) -> McpPromptDef","source_path":"stdlib/mcp.kn","line":124,"attributes":[],"docs":["Create a prompt definition for the catalog/list surface."],"target_notes":[]},{"name":"mcp_object_set_any","qualified_name":"std::mcp::mcp_object_set_any","kind":"function","visibility":"private","signature":"fn mcp_object_set_any(obj: JsonObject, key: String, value: JsonValue) -> JsonObject","source_path":"stdlib/mcp.kn","line":132,"attributes":[],"docs":["Set a field on a JsonObject where the value may be any JSON type.","MCP ids and tool payloads can be string, numeric, object, array, or null."],"target_notes":[]},{"name":"MCP_KIND_NULL","qualified_name":"std::mcp::MCP_KIND_NULL","kind":"const","visibility":"private","signature":"const MCP_KIND_NULL: Int","source_path":"stdlib/mcp.kn","line":136,"attributes":[],"docs":["JSON kind code constants (matching std::json JSON_KIND_CODE_*)"],"target_notes":[]},{"name":"MCP_KIND_BOOL","qualified_name":"std::mcp::MCP_KIND_BOOL","kind":"const","visibility":"private","signature":"const MCP_KIND_BOOL: Int","source_path":"stdlib/mcp.kn","line":137,"attributes":[],"docs":[],"target_notes":[]},{"name":"MCP_KIND_INT","qualified_name":"std::mcp::MCP_KIND_INT","kind":"const","visibility":"private","signature":"const MCP_KIND_INT: Int","source_path":"stdlib/mcp.kn","line":138,"attributes":[],"docs":[],"target_notes":[]},{"name":"MCP_KIND_FLOAT","qualified_name":"std::mcp::MCP_KIND_FLOAT","kind":"const","visibility":"private","signature":"const MCP_KIND_FLOAT: Int","source_path":"stdlib/mcp.kn","line":139,"attributes":[],"docs":[],"target_notes":[]},{"name":"MCP_KIND_STRING","qualified_name":"std::mcp::MCP_KIND_STRING","kind":"const","visibility":"private","signature":"const MCP_KIND_STRING: Int","source_path":"stdlib/mcp.kn","line":140,"attributes":[],"docs":[],"target_notes":[]},{"name":"MCP_KIND_OBJECT","qualified_name":"std::mcp::MCP_KIND_OBJECT","kind":"const","visibility":"private","signature":"const MCP_KIND_OBJECT: Int","source_path":"stdlib/mcp.kn","line":141,"attributes":[],"docs":[],"target_notes":[]},{"name":"MCP_KIND_ARRAY","qualified_name":"std::mcp::MCP_KIND_ARRAY","kind":"const","visibility":"private","signature":"const MCP_KIND_ARRAY: Int","source_path":"stdlib/mcp.kn","line":142,"attributes":[],"docs":[],"target_notes":[]},{"name":"mcp_build_response","qualified_name":"std::mcp::mcp_build_response","kind":"function","visibility":"public","signature":"fn mcp_build_response(id_value: JsonValue, result: JsonObject) -> JsonObject","source_path":"stdlib/mcp.kn","line":149,"attributes":[],"docs":["Build a success response: {\"jsonrpc\":\"2.0\",\"id\":,\"result\":}"],"target_notes":[]},{"name":"mcp_build_error","qualified_name":"std::mcp::mcp_build_error","kind":"function","visibility":"public","signature":"fn mcp_build_error(id_value: JsonValue, code: Int, message: String) -> JsonObject","source_path":"stdlib/mcp.kn","line":157,"attributes":[],"docs":["Build an error response: {\"jsonrpc\":\"2.0\",\"id\":,\"error\":{\"code\":,\"message\":}}"],"target_notes":[]},{"name":"mcp_build_notification","qualified_name":"std::mcp::mcp_build_notification","kind":"function","visibility":"public","signature":"fn mcp_build_notification(method: String, params: JsonObject) -> JsonObject","source_path":"stdlib/mcp.kn","line":168,"attributes":[],"docs":["Build a notification (no id field): {\"jsonrpc\":\"2.0\",\"method\":,\"params\":

}"],"target_notes":[]},{"name":"mcp_build_initialize_result","qualified_name":"std::mcp::mcp_build_initialize_result","kind":"function","visibility":"public","signature":"fn mcp_build_initialize_result(server: McpServer, supports_tools: Bool, supports_resources: Bool, supports_prompts: Bool, supports_logging: Bool) -> JsonObject","source_path":"stdlib/mcp.kn","line":180,"attributes":[],"docs":["Build the initialize response result. Pass to mcp_build_response() with the id."],"target_notes":[]},{"name":"mcp_build_tools_list","qualified_name":"std::mcp::mcp_build_tools_list","kind":"function","visibility":"public","signature":"fn mcp_build_tools_list(tools: Array) -> JsonObject","source_path":"stdlib/mcp.kn","line":225,"attributes":[],"docs":["===========================================================================","MCP tools/list result builder","==========================================================================="],"target_notes":[]},{"name":"mcp_build_resources_list","qualified_name":"std::mcp::mcp_build_resources_list","kind":"function","visibility":"public","signature":"fn mcp_build_resources_list(resources: Array) -> JsonObject","source_path":"stdlib/mcp.kn","line":241,"attributes":[],"docs":["Build a {\"resources\":[...]} JSON object from resource definitions."],"target_notes":[]},{"name":"mcp_build_prompts_list","qualified_name":"std::mcp::mcp_build_prompts_list","kind":"function","visibility":"public","signature":"fn mcp_build_prompts_list(prompts: Array) -> JsonObject","source_path":"stdlib/mcp.kn","line":257,"attributes":[],"docs":["Build a {\"prompts\":[...]} JSON object from prompt definitions."],"target_notes":[]},{"name":"mcp_json_escape","qualified_name":"std::mcp::mcp_json_escape","kind":"function","visibility":"public","signature":"fn mcp_json_escape(s: String) -> String","source_path":"stdlib/mcp.kn","line":274,"attributes":[],"docs":["===========================================================================","JSON string escaping (for safe embedding inside JSON strings)","==========================================================================="],"target_notes":[]},{"name":"mcp_content_text","qualified_name":"std::mcp::mcp_content_text","kind":"function","visibility":"public","signature":"fn mcp_content_text(text: String) -> String","source_path":"stdlib/mcp.kn","line":304,"attributes":[],"docs":["Build a {\"type\":\"text\",\"text\":\"...\"} JSON fragment string."],"target_notes":[]},{"name":"mcp_content_image","qualified_name":"std::mcp::mcp_content_image","kind":"function","visibility":"public","signature":"fn mcp_content_image(base64_data: String, mime_type: String) -> String","source_path":"stdlib/mcp.kn","line":308,"attributes":[],"docs":["Build a {\"type\":\"image\",\"data\":\"...\",\"mimeType\":\"...\"} JSON fragment string."],"target_notes":[]},{"name":"mcp_content_audio","qualified_name":"std::mcp::mcp_content_audio","kind":"function","visibility":"public","signature":"fn mcp_content_audio(base64_data: String, mime_type: String) -> String","source_path":"stdlib/mcp.kn","line":312,"attributes":[],"docs":["Build a {\"type\":\"audio\",\"data\":\"...\",\"mimeType\":\"...\"} JSON fragment string."],"target_notes":[]},{"name":"mcp_content_embedded_resource_text","qualified_name":"std::mcp::mcp_content_embedded_resource_text","kind":"function","visibility":"public","signature":"fn mcp_content_embedded_resource_text(uri: String, mime_type: String, text: String) -> String","source_path":"stdlib/mcp.kn","line":316,"attributes":[],"docs":["Build a {\"type\":\"resource\",\"resource\":{...}} JSON fragment string for embedded text content."],"target_notes":[]},{"name":"mcp_content_embedded_resource_blob","qualified_name":"std::mcp::mcp_content_embedded_resource_blob","kind":"function","visibility":"public","signature":"fn mcp_content_embedded_resource_blob(uri: String, mime_type: String, blob_base64: String) -> String","source_path":"stdlib/mcp.kn","line":320,"attributes":[],"docs":["Build a {\"type\":\"resource\",\"resource\":{...}} JSON fragment string for embedded binary content."],"target_notes":[]},{"name":"mcp_content_array_text","qualified_name":"std::mcp::mcp_content_array_text","kind":"function","visibility":"public","signature":"fn mcp_content_array_text(text: String) -> String","source_path":"stdlib/mcp.kn","line":324,"attributes":[],"docs":["Build a content array from a single text item: [{\"type\":\"text\",\"text\":\"...\"}]"],"target_notes":[]},{"name":"mcp_content_array_image","qualified_name":"std::mcp::mcp_content_array_image","kind":"function","visibility":"public","signature":"fn mcp_content_array_image(base64_data: String, mime_type: String) -> String","source_path":"stdlib/mcp.kn","line":328,"attributes":[],"docs":["Build a content array from a single image item."],"target_notes":[]},{"name":"mcp_content_array_audio","qualified_name":"std::mcp::mcp_content_array_audio","kind":"function","visibility":"public","signature":"fn mcp_content_array_audio(base64_data: String, mime_type: String) -> String","source_path":"stdlib/mcp.kn","line":332,"attributes":[],"docs":["Build a content array from a single audio item."],"target_notes":[]},{"name":"mcp_content_array_embedded_resource_text","qualified_name":"std::mcp::mcp_content_array_embedded_resource_text","kind":"function","visibility":"public","signature":"fn mcp_content_array_embedded_resource_text(uri: String, mime_type: String, text: String) -> String","source_path":"stdlib/mcp.kn","line":336,"attributes":[],"docs":["Build a content array from a single embedded text resource item."],"target_notes":[]},{"name":"mcp_content_array_embedded_resource_blob","qualified_name":"std::mcp::mcp_content_array_embedded_resource_blob","kind":"function","visibility":"public","signature":"fn mcp_content_array_embedded_resource_blob(uri: String, mime_type: String, blob_base64: String) -> String","source_path":"stdlib/mcp.kn","line":340,"attributes":[],"docs":["Build a content array from a single embedded binary resource item."],"target_notes":[]},{"name":"mcp_text_result","qualified_name":"std::mcp::mcp_text_result","kind":"function","visibility":"public","signature":"fn mcp_text_result(text: String) -> McpCallResult","source_path":"stdlib/mcp.kn","line":347,"attributes":[],"docs":["===========================================================================","McpCallResult constructors (for tools/call responses)","==========================================================================="],"target_notes":[]},{"name":"mcp_error_result","qualified_name":"std::mcp::mcp_error_result","kind":"function","visibility":"public","signature":"fn mcp_error_result(message: String) -> McpCallResult","source_path":"stdlib/mcp.kn","line":353,"attributes":[],"docs":[],"target_notes":[]},{"name":"mcp_image_result","qualified_name":"std::mcp::mcp_image_result","kind":"function","visibility":"public","signature":"fn mcp_image_result(base64_data: String, mime_type: String) -> McpCallResult","source_path":"stdlib/mcp.kn","line":359,"attributes":[],"docs":[],"target_notes":[]},{"name":"mcp_build_call_result_parts","qualified_name":"std::mcp::mcp_build_call_result_parts","kind":"function","visibility":"public","signature":"fn mcp_build_call_result_parts(content_json: String, is_error: Bool) -> JsonObject","source_path":"stdlib/mcp.kn","line":366,"attributes":[],"docs":["Build the full tools/call response result object from an McpCallResult."],"target_notes":[]},{"name":"mcp_build_call_result","qualified_name":"std::mcp::mcp_build_call_result","kind":"function","visibility":"public","signature":"fn mcp_build_call_result(cr: McpCallResult) -> JsonObject","source_path":"stdlib/mcp.kn","line":372,"attributes":[],"docs":[],"target_notes":[]},{"name":"mcp_read_message","qualified_name":"std::mcp::mcp_read_message","kind":"function","visibility":"public","signature":"fn mcp_read_message() -> String","source_path":"stdlib/mcp.kn","line":380,"attributes":[],"docs":["Read one newline-delimited JSON-RPC message from stdin. Returns \"\" on EOF."],"target_notes":[]},{"name":"mcp_write_message","qualified_name":"std::mcp::mcp_write_message","kind":"function","visibility":"public","signature":"fn mcp_write_message(msg: String) -> Unit","source_path":"stdlib/mcp.kn","line":385,"attributes":[],"docs":["Write one JSON-RPC message to stdout. Appends newline, flushes.","The message MUST be compact single-line JSON with no embedded newlines."],"target_notes":[]},{"name":"mcp_write_response","qualified_name":"std::mcp::mcp_write_response","kind":"function","visibility":"public","signature":"fn mcp_write_response(obj: JsonObject) -> Unit","source_path":"stdlib/mcp.kn","line":389,"attributes":[],"docs":["Serialize a JsonObject and write it to stdout as a JSON-RPC message."],"target_notes":[]},{"name":"MCP_LOG_DEBUG","qualified_name":"std::mcp::MCP_LOG_DEBUG","kind":"const","visibility":"public","signature":"const MCP_LOG_DEBUG: String","source_path":"stdlib/mcp.kn","line":396,"attributes":[],"docs":["===========================================================================","Logging (all output goes to STDERR — never touches stdout)","==========================================================================="],"target_notes":[]},{"name":"MCP_LOG_INFO","qualified_name":"std::mcp::MCP_LOG_INFO","kind":"const","visibility":"public","signature":"const MCP_LOG_INFO: String","source_path":"stdlib/mcp.kn","line":397,"attributes":[],"docs":[],"target_notes":[]},{"name":"MCP_LOG_NOTICE","qualified_name":"std::mcp::MCP_LOG_NOTICE","kind":"const","visibility":"public","signature":"const MCP_LOG_NOTICE: String","source_path":"stdlib/mcp.kn","line":398,"attributes":[],"docs":[],"target_notes":[]},{"name":"MCP_LOG_WARNING","qualified_name":"std::mcp::MCP_LOG_WARNING","kind":"const","visibility":"public","signature":"const MCP_LOG_WARNING: String","source_path":"stdlib/mcp.kn","line":399,"attributes":[],"docs":[],"target_notes":[]},{"name":"MCP_LOG_ERROR","qualified_name":"std::mcp::MCP_LOG_ERROR","kind":"const","visibility":"public","signature":"const MCP_LOG_ERROR: String","source_path":"stdlib/mcp.kn","line":400,"attributes":[],"docs":[],"target_notes":[]},{"name":"MCP_LOG_CRITICAL","qualified_name":"std::mcp::MCP_LOG_CRITICAL","kind":"const","visibility":"public","signature":"const MCP_LOG_CRITICAL: String","source_path":"stdlib/mcp.kn","line":401,"attributes":[],"docs":[],"target_notes":[]},{"name":"MCP_LOG_ALERT","qualified_name":"std::mcp::MCP_LOG_ALERT","kind":"const","visibility":"public","signature":"const MCP_LOG_ALERT: String","source_path":"stdlib/mcp.kn","line":402,"attributes":[],"docs":[],"target_notes":[]},{"name":"MCP_LOG_EMERGENCY","qualified_name":"std::mcp::MCP_LOG_EMERGENCY","kind":"const","visibility":"public","signature":"const MCP_LOG_EMERGENCY: String","source_path":"stdlib/mcp.kn","line":403,"attributes":[],"docs":[],"target_notes":[]},{"name":"mcp_log","qualified_name":"std::mcp::mcp_log","kind":"function","visibility":"public","signature":"fn mcp_log(level: String, message: String) -> Unit","source_path":"stdlib/mcp.kn","line":405,"attributes":[],"docs":[],"target_notes":[]},{"name":"mcp_debug","qualified_name":"std::mcp::mcp_debug","kind":"function","visibility":"public","signature":"fn mcp_debug(msg: String) -> Unit","source_path":"stdlib/mcp.kn","line":408,"attributes":[],"docs":[],"target_notes":[]},{"name":"mcp_info","qualified_name":"std::mcp::mcp_info","kind":"function","visibility":"public","signature":"fn mcp_info(msg: String) -> Unit","source_path":"stdlib/mcp.kn","line":411,"attributes":[],"docs":[],"target_notes":[]},{"name":"mcp_warn","qualified_name":"std::mcp::mcp_warn","kind":"function","visibility":"public","signature":"fn mcp_warn(msg: String) -> Unit","source_path":"stdlib/mcp.kn","line":414,"attributes":[],"docs":[],"target_notes":[]},{"name":"mcp_error_log","qualified_name":"std::mcp::mcp_error_log","kind":"function","visibility":"public","signature":"fn mcp_error_log(msg: String) -> Unit","source_path":"stdlib/mcp.kn","line":417,"attributes":[],"docs":[],"target_notes":[]},{"name":"mcp_run_stdio","qualified_name":"std::mcp::mcp_run_stdio","kind":"function","visibility":"public","signature":"fn mcp_run_stdio(server: McpServer, tools: Array) -> Int","source_path":"stdlib/mcp.kn","line":431,"attributes":[],"docs":["Run a complete MCP stdio server. Blocks until stdin EOF.","","The server handles: initialize, ping, tools/list.","tools/call is STUBBED — the caller must replace the dispatch in their own","loop, or use the manual dispatch API below.","","Returns 0 on clean shutdown, non-zero on fatal error."],"target_notes":[]},{"name":"mcp_read_request","qualified_name":"std::mcp::mcp_read_request","kind":"function","visibility":"public","signature":"fn mcp_read_request() -> McpRequest","source_path":"stdlib/mcp.kn","line":518,"attributes":[],"docs":["Read and parse one request. Returns McpRequest with method/id/params extracted.","On EOF or parse failure, method will be \"\"."],"target_notes":[]},{"name":"mcp_send_response","qualified_name":"std::mcp::mcp_send_response","kind":"function","visibility":"public","signature":"fn mcp_send_response(req: McpRequest, result: JsonObject) -> Unit","source_path":"stdlib/mcp.kn","line":547,"attributes":[],"docs":["Send a success response for a request."],"target_notes":[]},{"name":"mcp_send_error","qualified_name":"std::mcp::mcp_send_error","kind":"function","visibility":"public","signature":"fn mcp_send_error(req: McpRequest, code: Int, message: String) -> Unit","source_path":"stdlib/mcp.kn","line":552,"attributes":[],"docs":["Send an error response for a request."],"target_notes":[]},{"name":"mcp_is_initialize","qualified_name":"std::mcp::mcp_is_initialize","kind":"function","visibility":"public","signature":"fn mcp_is_initialize(req: McpRequest) -> Bool","source_path":"stdlib/mcp.kn","line":557,"attributes":[],"docs":["Check if a request is the \"initialize\" method."],"target_notes":[]},{"name":"mcp_is_tools_list","qualified_name":"std::mcp::mcp_is_tools_list","kind":"function","visibility":"public","signature":"fn mcp_is_tools_list(req: McpRequest) -> Bool","source_path":"stdlib/mcp.kn","line":561,"attributes":[],"docs":["Check if a request is the \"tools/list\" method."],"target_notes":[]},{"name":"mcp_is_tools_call","qualified_name":"std::mcp::mcp_is_tools_call","kind":"function","visibility":"public","signature":"fn mcp_is_tools_call(req: McpRequest) -> Bool","source_path":"stdlib/mcp.kn","line":565,"attributes":[],"docs":["Check if a request is the \"tools/call\" method."],"target_notes":[]},{"name":"mcp_is_ping","qualified_name":"std::mcp::mcp_is_ping","kind":"function","visibility":"public","signature":"fn mcp_is_ping(req: McpRequest) -> Bool","source_path":"stdlib/mcp.kn","line":569,"attributes":[],"docs":["Check if a request is the \"ping\" method."],"target_notes":[]},{"name":"mcp_is_notification","qualified_name":"std::mcp::mcp_is_notification","kind":"function","visibility":"public","signature":"fn mcp_is_notification(req: McpRequest) -> Bool","source_path":"stdlib/mcp.kn","line":573,"attributes":[],"docs":["Check if a request is a notification (no id field)."],"target_notes":[]},{"name":"mcp_is_eof","qualified_name":"std::mcp::mcp_is_eof","kind":"function","visibility":"public","signature":"fn mcp_is_eof(req: McpRequest) -> Bool","source_path":"stdlib/mcp.kn","line":577,"attributes":[],"docs":["Check if the request is an EOF/disconnect (empty method, empty raw_json)."],"target_notes":[]},{"name":"mcp_tool_call_name","qualified_name":"std::mcp::mcp_tool_call_name","kind":"function","visibility":"public","signature":"fn mcp_tool_call_name(req: McpRequest) -> String","source_path":"stdlib/mcp.kn","line":585,"attributes":[],"docs":["Extract the tool name from a tools/call request params."],"target_notes":[]},{"name":"mcp_tool_call_args","qualified_name":"std::mcp::mcp_tool_call_args","kind":"function","visibility":"public","signature":"fn mcp_tool_call_args(req: McpRequest) -> JsonObject","source_path":"stdlib/mcp.kn","line":594,"attributes":[],"docs":["Extract the tool arguments from a tools/call request params.","Returns a JsonObject (empty object if extraction fails)."],"target_notes":[]},{"name":"mcp_str_to_int","qualified_name":"std::mcp::mcp_str_to_int","kind":"function","visibility":"private","signature":"fn mcp_str_to_int(s: String) -> Int","source_path":"stdlib/mcp.kn","line":608,"attributes":[],"docs":["===========================================================================","Internal: string parsers (no dependency on std::math etc.)","==========================================================================="],"target_notes":[]},{"name":"mcp_str_to_float","qualified_name":"std::mcp::mcp_str_to_float","kind":"function","visibility":"private","signature":"fn mcp_str_to_float(s: String) -> Float","source_path":"stdlib/mcp.kn","line":627,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"memory","import_path":"std::memory","source_path":"stdlib/memory.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"ATOMIC_RELAXED","qualified_name":"std::memory::ATOMIC_RELAXED","kind":"const","visibility":"private","signature":"const ATOMIC_RELAXED: Int","source_path":"stdlib/memory.kn","line":3,"attributes":[],"docs":[],"target_notes":[]},{"name":"ATOMIC_ACQUIRE","qualified_name":"std::memory::ATOMIC_ACQUIRE","kind":"const","visibility":"private","signature":"const ATOMIC_ACQUIRE: Int","source_path":"stdlib/memory.kn","line":4,"attributes":[],"docs":[],"target_notes":[]},{"name":"ATOMIC_RELEASE","qualified_name":"std::memory::ATOMIC_RELEASE","kind":"const","visibility":"private","signature":"const ATOMIC_RELEASE: Int","source_path":"stdlib/memory.kn","line":5,"attributes":[],"docs":[],"target_notes":[]},{"name":"ATOMIC_ACQ_REL","qualified_name":"std::memory::ATOMIC_ACQ_REL","kind":"const","visibility":"private","signature":"const ATOMIC_ACQ_REL: Int","source_path":"stdlib/memory.kn","line":6,"attributes":[],"docs":[],"target_notes":[]},{"name":"ATOMIC_SEQ_CST","qualified_name":"std::memory::ATOMIC_SEQ_CST","kind":"const","visibility":"private","signature":"const ATOMIC_SEQ_CST: Int","source_path":"stdlib/memory.kn","line":7,"attributes":[],"docs":[],"target_notes":[]},{"name":"volatile_load_int","qualified_name":"std::memory::volatile_load_int","kind":"function","visibility":"public","signature":"fn volatile_load_int(address: ptr) -> Int","source_path":"stdlib/memory.kn","line":9,"attributes":[],"docs":[],"target_notes":[]},{"name":"volatile_store_int","qualified_name":"std::memory::volatile_store_int","kind":"function","visibility":"public","signature":"fn volatile_store_int(address: ptr, value: Int) -> Int","source_path":"stdlib/memory.kn","line":12,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_load_relaxed","qualified_name":"std::memory::atomic_load_relaxed","kind":"function","visibility":"public","signature":"fn atomic_load_relaxed(address: ptr) -> Int","source_path":"stdlib/memory.kn","line":16,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_load_acquire","qualified_name":"std::memory::atomic_load_acquire","kind":"function","visibility":"public","signature":"fn atomic_load_acquire(address: ptr) -> Int","source_path":"stdlib/memory.kn","line":19,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_load_seqcst","qualified_name":"std::memory::atomic_load_seqcst","kind":"function","visibility":"public","signature":"fn atomic_load_seqcst(address: ptr) -> Int","source_path":"stdlib/memory.kn","line":22,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_store_relaxed","qualified_name":"std::memory::atomic_store_relaxed","kind":"function","visibility":"public","signature":"fn atomic_store_relaxed(address: ptr, value: Int) -> Int","source_path":"stdlib/memory.kn","line":25,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_store_release","qualified_name":"std::memory::atomic_store_release","kind":"function","visibility":"public","signature":"fn atomic_store_release(address: ptr, value: Int) -> Int","source_path":"stdlib/memory.kn","line":29,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_store_seqcst","qualified_name":"std::memory::atomic_store_seqcst","kind":"function","visibility":"public","signature":"fn atomic_store_seqcst(address: ptr, value: Int) -> Int","source_path":"stdlib/memory.kn","line":33,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_add_acqrel","qualified_name":"std::memory::atomic_add_acqrel","kind":"function","visibility":"public","signature":"fn atomic_add_acqrel(address: ptr, value: Int) -> Int","source_path":"stdlib/memory.kn","line":37,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_sub_acqrel","qualified_name":"std::memory::atomic_sub_acqrel","kind":"function","visibility":"public","signature":"fn atomic_sub_acqrel(address: ptr, value: Int) -> Int","source_path":"stdlib/memory.kn","line":40,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_and_acqrel","qualified_name":"std::memory::atomic_and_acqrel","kind":"function","visibility":"public","signature":"fn atomic_and_acqrel(address: ptr, value: Int) -> Int","source_path":"stdlib/memory.kn","line":43,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_or_acqrel","qualified_name":"std::memory::atomic_or_acqrel","kind":"function","visibility":"public","signature":"fn atomic_or_acqrel(address: ptr, value: Int) -> Int","source_path":"stdlib/memory.kn","line":46,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_xor_acqrel","qualified_name":"std::memory::atomic_xor_acqrel","kind":"function","visibility":"public","signature":"fn atomic_xor_acqrel(address: ptr, value: Int) -> Int","source_path":"stdlib/memory.kn","line":49,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_exchange_acqrel","qualified_name":"std::memory::atomic_exchange_acqrel","kind":"function","visibility":"public","signature":"fn atomic_exchange_acqrel(address: ptr, value: Int) -> Int","source_path":"stdlib/memory.kn","line":52,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_compare_exchange_seqcst","qualified_name":"std::memory::atomic_compare_exchange_seqcst","kind":"function","visibility":"public","signature":"fn atomic_compare_exchange_seqcst(address: ptr, expected: Int, desired: Int) -> Bool","source_path":"stdlib/memory.kn","line":55,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_fence_acquire","qualified_name":"std::memory::atomic_fence_acquire","kind":"function","visibility":"public","signature":"fn atomic_fence_acquire() -> Int","source_path":"stdlib/memory.kn","line":58,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_fence_release","qualified_name":"std::memory::atomic_fence_release","kind":"function","visibility":"public","signature":"fn atomic_fence_release() -> Int","source_path":"stdlib/memory.kn","line":62,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_fence_acqrel","qualified_name":"std::memory::atomic_fence_acqrel","kind":"function","visibility":"public","signature":"fn atomic_fence_acqrel() -> Int","source_path":"stdlib/memory.kn","line":66,"attributes":[],"docs":[],"target_notes":[]},{"name":"atomic_fence_seqcst","qualified_name":"std::memory::atomic_fence_seqcst","kind":"function","visibility":"public","signature":"fn atomic_fence_seqcst() -> Int","source_path":"stdlib/memory.kn","line":70,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"mmio","import_path":"std::mmio","source_path":"stdlib/mmio.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"MMIO_ACCESS_RO","qualified_name":"std::mmio::MMIO_ACCESS_RO","kind":"const","visibility":"public","signature":"const MMIO_ACCESS_RO: Int","source_path":"stdlib/mmio.kn","line":4,"attributes":[],"docs":[],"target_notes":[]},{"name":"MMIO_ACCESS_WO","qualified_name":"std::mmio::MMIO_ACCESS_WO","kind":"const","visibility":"public","signature":"const MMIO_ACCESS_WO: Int","source_path":"stdlib/mmio.kn","line":5,"attributes":[],"docs":[],"target_notes":[]},{"name":"MMIO_ACCESS_RW","qualified_name":"std::mmio::MMIO_ACCESS_RW","kind":"const","visibility":"public","signature":"const MMIO_ACCESS_RW: Int","source_path":"stdlib/mmio.kn","line":6,"attributes":[],"docs":[],"target_notes":[]},{"name":"MMIO_ACCESS_W1C","qualified_name":"std::mmio::MMIO_ACCESS_W1C","kind":"const","visibility":"public","signature":"const MMIO_ACCESS_W1C: Int","source_path":"stdlib/mmio.kn","line":7,"attributes":[],"docs":[],"target_notes":[]},{"name":"MMIO_ENDIAN_NATIVE","qualified_name":"std::mmio::MMIO_ENDIAN_NATIVE","kind":"const","visibility":"public","signature":"const MMIO_ENDIAN_NATIVE: Int","source_path":"stdlib/mmio.kn","line":9,"attributes":[],"docs":[],"target_notes":[]},{"name":"MMIO_ENDIAN_LITTLE","qualified_name":"std::mmio::MMIO_ENDIAN_LITTLE","kind":"const","visibility":"public","signature":"const MMIO_ENDIAN_LITTLE: Int","source_path":"stdlib/mmio.kn","line":10,"attributes":[],"docs":[],"target_notes":[]},{"name":"MMIO_ENDIAN_BIG","qualified_name":"std::mmio::MMIO_ENDIAN_BIG","kind":"const","visibility":"public","signature":"const MMIO_ENDIAN_BIG: Int","source_path":"stdlib/mmio.kn","line":11,"attributes":[],"docs":[],"target_notes":[]},{"name":"mmio_bit_mask","qualified_name":"std::mmio::mmio_bit_mask","kind":"function","visibility":"public","signature":"fn mmio_bit_mask(width: Int) -> Int","source_path":"stdlib/mmio.kn","line":13,"attributes":[],"docs":[],"target_notes":[]},{"name":"mmio_field_get","qualified_name":"std::mmio::mmio_field_get","kind":"function","visibility":"public","signature":"fn mmio_field_get(word: Int, bit_offset: Int, width: Int) -> Int","source_path":"stdlib/mmio.kn","line":20,"attributes":[],"docs":[],"target_notes":[]},{"name":"mmio_field_set","qualified_name":"std::mmio::mmio_field_set","kind":"function","visibility":"public","signature":"fn mmio_field_set(word: Int, bit_offset: Int, width: Int, value: Int) -> Int","source_path":"stdlib/mmio.kn","line":23,"attributes":[],"docs":[],"target_notes":[]},{"name":"mmio_field_w1c","qualified_name":"std::mmio::mmio_field_w1c","kind":"function","visibility":"public","signature":"fn mmio_field_w1c(word: Int, bit_offset: Int, width: Int, clear_bits: Int) -> Int","source_path":"stdlib/mmio.kn","line":29,"attributes":[],"docs":[],"target_notes":[]},{"name":"mmio_swap16","qualified_name":"std::mmio::mmio_swap16","kind":"function","visibility":"public","signature":"fn mmio_swap16(value: Int) -> Int","source_path":"stdlib/mmio.kn","line":33,"attributes":[],"docs":[],"target_notes":[]},{"name":"mmio_swap32","qualified_name":"std::mmio::mmio_swap32","kind":"function","visibility":"public","signature":"fn mmio_swap32(value: Int) -> Int","source_path":"stdlib/mmio.kn","line":36,"attributes":[],"docs":[],"target_notes":[]},{"name":"mmio_to_little32","qualified_name":"std::mmio::mmio_to_little32","kind":"function","visibility":"public","signature":"fn mmio_to_little32(value: Int) -> Int","source_path":"stdlib/mmio.kn","line":43,"attributes":[],"docs":[],"target_notes":[]},{"name":"mmio_from_little32","qualified_name":"std::mmio::mmio_from_little32","kind":"function","visibility":"public","signature":"fn mmio_from_little32(value: Int) -> Int","source_path":"stdlib/mmio.kn","line":46,"attributes":[],"docs":[],"target_notes":[]},{"name":"mmio_to_big32","qualified_name":"std::mmio::mmio_to_big32","kind":"function","visibility":"public","signature":"fn mmio_to_big32(value: Int) -> Int","source_path":"stdlib/mmio.kn","line":49,"attributes":[],"docs":[],"target_notes":[]},{"name":"mmio_from_big32","qualified_name":"std::mmio::mmio_from_big32","kind":"function","visibility":"public","signature":"fn mmio_from_big32(value: Int) -> Int","source_path":"stdlib/mmio.kn","line":52,"attributes":[],"docs":[],"target_notes":[]},{"name":"mmio_read_int","qualified_name":"std::mmio::mmio_read_int","kind":"function","visibility":"public","signature":"fn mmio_read_int(address: ptr) -> Int","source_path":"stdlib/mmio.kn","line":55,"attributes":[],"docs":[],"target_notes":[]},{"name":"mmio_write_int","qualified_name":"std::mmio::mmio_write_int","kind":"function","visibility":"public","signature":"fn mmio_write_int(address: ptr, value: Int) -> Int","source_path":"stdlib/mmio.kn","line":61,"attributes":[],"docs":[],"target_notes":[]},{"name":"mmio_write_one_to_clear","qualified_name":"std::mmio::mmio_write_one_to_clear","kind":"function","visibility":"public","signature":"fn mmio_write_one_to_clear(address: ptr, bit_offset: Int, width: Int, clear_bits: Int) -> Int","source_path":"stdlib/mmio.kn","line":67,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"net","import_path":"std::net","source_path":"stdlib/net.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"abi_net_reset","qualified_name":"std::net::abi_net_reset","kind":"extern_function","visibility":"private","signature":"fn abi_net_reset() -> Int","source_path":"stdlib/net.kn","line":4,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_net_platform_available","qualified_name":"std::net::abi_net_platform_available","kind":"extern_function","visibility":"private","signature":"fn abi_net_platform_available() -> Int","source_path":"stdlib/net.kn","line":7,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_net_platform_name","qualified_name":"std::net::abi_net_platform_name","kind":"extern_function","visibility":"private","signature":"fn abi_net_platform_name() -> String","source_path":"stdlib/net.kn","line":10,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_net_capability_state","qualified_name":"std::net::abi_net_capability_state","kind":"extern_function","visibility":"private","signature":"fn abi_net_capability_state(capability_key: String) -> Int","source_path":"stdlib/net.kn","line":13,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_tcp_connect","qualified_name":"std::net::abi_tcp_connect","kind":"extern_function","visibility":"private","signature":"fn abi_tcp_connect(host: String, port: Int, timeout_ms: Int) -> Int","source_path":"stdlib/net.kn","line":16,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_tcp_listen","qualified_name":"std::net::abi_tcp_listen","kind":"extern_function","visibility":"private","signature":"fn abi_tcp_listen(host: String, port: Int) -> Int","source_path":"stdlib/net.kn","line":19,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_tcp_listener_local_port","qualified_name":"std::net::abi_tcp_listener_local_port","kind":"extern_function","visibility":"private","signature":"fn abi_tcp_listener_local_port(listener_id: Int) -> Int","source_path":"stdlib/net.kn","line":22,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_tcp_accept","qualified_name":"std::net::abi_tcp_accept","kind":"extern_function","visibility":"private","signature":"fn abi_tcp_accept(listener_id: Int, timeout_ms: Int) -> Int","source_path":"stdlib/net.kn","line":25,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_tcp_read_text","qualified_name":"std::net::abi_tcp_read_text","kind":"extern_function","visibility":"private","signature":"fn abi_tcp_read_text(connection_id: Int) -> String","source_path":"stdlib/net.kn","line":28,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_tcp_read_hex","qualified_name":"std::net::abi_tcp_read_hex","kind":"extern_function","visibility":"private","signature":"fn abi_tcp_read_hex(connection_id: Int) -> String","source_path":"stdlib/net.kn","line":31,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_tcp_write_text","qualified_name":"std::net::abi_tcp_write_text","kind":"extern_function","visibility":"private","signature":"fn abi_tcp_write_text(connection_id: Int, payload: String) -> Int","source_path":"stdlib/net.kn","line":34,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_tcp_write_hex","qualified_name":"std::net::abi_tcp_write_hex","kind":"extern_function","visibility":"private","signature":"fn abi_tcp_write_hex(connection_id: Int, payload_hex: String) -> Int","source_path":"stdlib/net.kn","line":37,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_tcp_close","qualified_name":"std::net::abi_tcp_close","kind":"extern_function","visibility":"private","signature":"fn abi_tcp_close(connection_id: Int) -> Int","source_path":"stdlib/net.kn","line":40,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_tcp_listener_close","qualified_name":"std::net::abi_tcp_listener_close","kind":"extern_function","visibility":"private","signature":"fn abi_tcp_listener_close(listener_id: Int) -> Int","source_path":"stdlib/net.kn","line":43,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_http_request_create","qualified_name":"std::net::abi_http_request_create","kind":"extern_function","visibility":"private","signature":"fn abi_http_request_create(method: String, url: String) -> Int","source_path":"stdlib/net.kn","line":46,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_http_request_set_header","qualified_name":"std::net::abi_http_request_set_header","kind":"extern_function","visibility":"private","signature":"fn abi_http_request_set_header(request_id: Int, key: String, value: String) -> Int","source_path":"stdlib/net.kn","line":49,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_http_request_set_body_text","qualified_name":"std::net::abi_http_request_set_body_text","kind":"extern_function","visibility":"private","signature":"fn abi_http_request_set_body_text(request_id: Int, payload: String) -> Int","source_path":"stdlib/net.kn","line":52,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_http_request_set_body_hex","qualified_name":"std::net::abi_http_request_set_body_hex","kind":"extern_function","visibility":"private","signature":"fn abi_http_request_set_body_hex(request_id: Int, payload_hex: String) -> Int","source_path":"stdlib/net.kn","line":55,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_http_request_set_timeout","qualified_name":"std::net::abi_http_request_set_timeout","kind":"extern_function","visibility":"private","signature":"fn abi_http_request_set_timeout(request_id: Int, timeout_ms: Int) -> Int","source_path":"stdlib/net.kn","line":58,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_http_request_set_protocol","qualified_name":"std::net::abi_http_request_set_protocol","kind":"extern_function","visibility":"private","signature":"fn abi_http_request_set_protocol(request_id: Int, protocol_name: String) -> Int","source_path":"stdlib/net.kn","line":61,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_http_request_protocol","qualified_name":"std::net::abi_http_request_protocol","kind":"extern_function","visibility":"private","signature":"fn abi_http_request_protocol(request_id: Int) -> String","source_path":"stdlib/net.kn","line":64,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_http_client_send","qualified_name":"std::net::abi_http_client_send","kind":"extern_function","visibility":"private","signature":"fn abi_http_client_send(request_id: Int) -> Int","source_path":"stdlib/net.kn","line":67,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_http_response_status","qualified_name":"std::net::abi_http_response_status","kind":"extern_function","visibility":"private","signature":"fn abi_http_response_status(response_id: Int) -> Int","source_path":"stdlib/net.kn","line":70,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_http_response_protocol","qualified_name":"std::net::abi_http_response_protocol","kind":"extern_function","visibility":"private","signature":"fn abi_http_response_protocol(response_id: Int) -> String","source_path":"stdlib/net.kn","line":73,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_http_response_header","qualified_name":"std::net::abi_http_response_header","kind":"extern_function","visibility":"private","signature":"fn abi_http_response_header(response_id: Int, key: String) -> String","source_path":"stdlib/net.kn","line":76,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_http_response_body_text","qualified_name":"std::net::abi_http_response_body_text","kind":"extern_function","visibility":"private","signature":"fn abi_http_response_body_text(response_id: Int) -> String","source_path":"stdlib/net.kn","line":79,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_http_response_body_hex","qualified_name":"std::net::abi_http_response_body_hex","kind":"extern_function","visibility":"private","signature":"fn abi_http_response_body_hex(response_id: Int) -> String","source_path":"stdlib/net.kn","line":82,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_http_request_destroy","qualified_name":"std::net::abi_http_request_destroy","kind":"extern_function","visibility":"private","signature":"fn abi_http_request_destroy(request_id: Int) -> Int","source_path":"stdlib/net.kn","line":85,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_http_response_destroy","qualified_name":"std::net::abi_http_response_destroy","kind":"extern_function","visibility":"private","signature":"fn abi_http_response_destroy(response_id: Int) -> Int","source_path":"stdlib/net.kn","line":88,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_http_server_create","qualified_name":"std::net::abi_http_server_create","kind":"extern_function","visibility":"private","signature":"fn abi_http_server_create(host: String, port: Int) -> Int","source_path":"stdlib/net.kn","line":91,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_http_server_listen","qualified_name":"std::net::abi_http_server_listen","kind":"extern_function","visibility":"private","signature":"fn abi_http_server_listen(server_id: Int) -> Int","source_path":"stdlib/net.kn","line":94,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_http_server_local_port","qualified_name":"std::net::abi_http_server_local_port","kind":"extern_function","visibility":"private","signature":"fn abi_http_server_local_port(server_id: Int) -> Int","source_path":"stdlib/net.kn","line":97,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_http_server_route_actor","qualified_name":"std::net::abi_http_server_route_actor","kind":"extern_function","visibility":"private","signature":"fn abi_http_server_route_actor(server_id: Int, method: String, path: String, actor_id: Int, message_kind: String) -> Int","source_path":"stdlib/net.kn","line":100,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_http_server_pump","qualified_name":"std::net::abi_http_server_pump","kind":"extern_function","visibility":"private","signature":"fn abi_http_server_pump(server_id: Int, timeout_ms: Int) -> Int","source_path":"stdlib/net.kn","line":103,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_http_server_pump_batch","qualified_name":"std::net::abi_http_server_pump_batch","kind":"extern_function","visibility":"private","signature":"fn abi_http_server_pump_batch(server_id: Int, timeout_ms: Int, max_requests: Int) -> Int","source_path":"stdlib/net.kn","line":106,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_http_server_pending_request_count","qualified_name":"std::net::abi_http_server_pending_request_count","kind":"extern_function","visibility":"private","signature":"fn abi_http_server_pending_request_count(server_id: Int) -> Int","source_path":"stdlib/net.kn","line":109,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_http_server_next_request","qualified_name":"std::net::abi_http_server_next_request","kind":"extern_function","visibility":"private","signature":"fn abi_http_server_next_request(server_id: Int) -> Int","source_path":"stdlib/net.kn","line":112,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_http_request_method","qualified_name":"std::net::abi_http_request_method","kind":"extern_function","visibility":"private","signature":"fn abi_http_request_method(incoming_request_id: Int) -> String","source_path":"stdlib/net.kn","line":115,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_http_request_path","qualified_name":"std::net::abi_http_request_path","kind":"extern_function","visibility":"private","signature":"fn abi_http_request_path(incoming_request_id: Int) -> String","source_path":"stdlib/net.kn","line":118,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_http_request_query","qualified_name":"std::net::abi_http_request_query","kind":"extern_function","visibility":"private","signature":"fn abi_http_request_query(incoming_request_id: Int) -> String","source_path":"stdlib/net.kn","line":121,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_http_request_header","qualified_name":"std::net::abi_http_request_header","kind":"extern_function","visibility":"private","signature":"fn abi_http_request_header(incoming_request_id: Int, key: String) -> String","source_path":"stdlib/net.kn","line":124,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_http_request_body_text","qualified_name":"std::net::abi_http_request_body_text","kind":"extern_function","visibility":"private","signature":"fn abi_http_request_body_text(incoming_request_id: Int) -> String","source_path":"stdlib/net.kn","line":127,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_http_request_body_hex","qualified_name":"std::net::abi_http_request_body_hex","kind":"extern_function","visibility":"private","signature":"fn abi_http_request_body_hex(incoming_request_id: Int) -> String","source_path":"stdlib/net.kn","line":130,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_http_respond_text","qualified_name":"std::net::abi_http_respond_text","kind":"extern_function","visibility":"private","signature":"fn abi_http_respond_text(incoming_request_id: Int, status_code: Int, payload: String) -> Int","source_path":"stdlib/net.kn","line":133,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_http_respond_hex","qualified_name":"std::net::abi_http_respond_hex","kind":"extern_function","visibility":"private","signature":"fn abi_http_respond_hex(incoming_request_id: Int, status_code: Int, payload_hex: String) -> Int","source_path":"stdlib/net.kn","line":136,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_http_response_set_header_for_request","qualified_name":"std::net::abi_http_response_set_header_for_request","kind":"extern_function","visibility":"private","signature":"fn abi_http_response_set_header_for_request(incoming_request_id: Int, key: String, value: String) -> Int","source_path":"stdlib/net.kn","line":139,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_http_server_close","qualified_name":"std::net::abi_http_server_close","kind":"extern_function","visibility":"private","signature":"fn abi_http_server_close(server_id: Int) -> Int","source_path":"stdlib/net.kn","line":142,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_http_local_url","qualified_name":"std::net::abi_http_local_url","kind":"extern_function","visibility":"private","signature":"fn abi_http_local_url(port: Int, path: String) -> String","source_path":"stdlib/net.kn","line":145,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_net_last_status","qualified_name":"std::net::abi_net_last_status","kind":"extern_function","visibility":"private","signature":"fn abi_net_last_status() -> Int","source_path":"stdlib/net.kn","line":148,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_net_last_error_kind","qualified_name":"std::net::abi_net_last_error_kind","kind":"extern_function","visibility":"private","signature":"fn abi_net_last_error_kind() -> String","source_path":"stdlib/net.kn","line":151,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_net_last_error_message","qualified_name":"std::net::abi_net_last_error_message","kind":"extern_function","visibility":"private","signature":"fn abi_net_last_error_message() -> String","source_path":"stdlib/net.kn","line":154,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"net_reset","qualified_name":"std::net::net_reset","kind":"function","visibility":"public","signature":"fn net_reset() -> Int","source_path":"stdlib/net.kn","line":156,"attributes":[],"docs":[],"target_notes":[]},{"name":"net_platform_available","qualified_name":"std::net::net_platform_available","kind":"function","visibility":"public","signature":"fn net_platform_available() -> Int","source_path":"stdlib/net.kn","line":159,"attributes":[],"docs":[],"target_notes":[]},{"name":"net_platform_name","qualified_name":"std::net::net_platform_name","kind":"function","visibility":"public","signature":"fn net_platform_name() -> String","source_path":"stdlib/net.kn","line":162,"attributes":[],"docs":[],"target_notes":[]},{"name":"net_capability_state","qualified_name":"std::net::net_capability_state","kind":"function","visibility":"public","signature":"fn net_capability_state(capability_key: String) -> Int","source_path":"stdlib/net.kn","line":165,"attributes":[],"docs":[],"target_notes":[]},{"name":"net_capability_supported","qualified_name":"std::net::net_capability_supported","kind":"function","visibility":"public","signature":"fn net_capability_supported(capability_key: String) -> Bool","source_path":"stdlib/net.kn","line":168,"attributes":[],"docs":[],"target_notes":[]},{"name":"net_capability_available","qualified_name":"std::net::net_capability_available","kind":"function","visibility":"public","signature":"fn net_capability_available(capability_key: String) -> Bool","source_path":"stdlib/net.kn","line":171,"attributes":[],"docs":[],"target_notes":[]},{"name":"tcp_connect","qualified_name":"std::net::tcp_connect","kind":"function","visibility":"public","signature":"fn tcp_connect(host: String, port: Int, timeout_ms: Int) -> Int","source_path":"stdlib/net.kn","line":174,"attributes":[],"docs":[],"target_notes":[]},{"name":"tcp_listen","qualified_name":"std::net::tcp_listen","kind":"function","visibility":"public","signature":"fn tcp_listen(host: String, port: Int) -> Int","source_path":"stdlib/net.kn","line":177,"attributes":[],"docs":[],"target_notes":[]},{"name":"tcp_listener_local_port","qualified_name":"std::net::tcp_listener_local_port","kind":"function","visibility":"public","signature":"fn tcp_listener_local_port(listener_id: Int) -> Int","source_path":"stdlib/net.kn","line":180,"attributes":[],"docs":[],"target_notes":[]},{"name":"tcp_accept","qualified_name":"std::net::tcp_accept","kind":"function","visibility":"public","signature":"fn tcp_accept(listener_id: Int, timeout_ms: Int) -> Int","source_path":"stdlib/net.kn","line":183,"attributes":[],"docs":[],"target_notes":[]},{"name":"tcp_read_text","qualified_name":"std::net::tcp_read_text","kind":"function","visibility":"public","signature":"fn tcp_read_text(connection_id: Int) -> String","source_path":"stdlib/net.kn","line":186,"attributes":[],"docs":[],"target_notes":[]},{"name":"tcp_buffered_reader","qualified_name":"std::net::tcp_buffered_reader","kind":"function","visibility":"public","signature":"fn tcp_buffered_reader(connection_id: Int, capacity: Int) -> BufferedReader","source_path":"stdlib/net.kn","line":189,"attributes":[],"docs":[],"target_notes":[]},{"name":"tcp_read_hex","qualified_name":"std::net::tcp_read_hex","kind":"function","visibility":"public","signature":"fn tcp_read_hex(connection_id: Int) -> String","source_path":"stdlib/net.kn","line":192,"attributes":[],"docs":[],"target_notes":[]},{"name":"tcp_write_text","qualified_name":"std::net::tcp_write_text","kind":"function","visibility":"public","signature":"fn tcp_write_text(connection_id: Int, payload: String) -> Int","source_path":"stdlib/net.kn","line":195,"attributes":[],"docs":[],"target_notes":[]},{"name":"tcp_write_buffered_text","qualified_name":"std::net::tcp_write_buffered_text","kind":"function","visibility":"public","signature":"fn tcp_write_buffered_text(connection_id: Int, writer: BufferedWriter) -> Int","source_path":"stdlib/net.kn","line":198,"attributes":[],"docs":[],"target_notes":[]},{"name":"tcp_write_hex","qualified_name":"std::net::tcp_write_hex","kind":"function","visibility":"public","signature":"fn tcp_write_hex(connection_id: Int, payload_hex: String) -> Int","source_path":"stdlib/net.kn","line":201,"attributes":[],"docs":[],"target_notes":[]},{"name":"tcp_close","qualified_name":"std::net::tcp_close","kind":"function","visibility":"public","signature":"fn tcp_close(connection_id: Int) -> Int","source_path":"stdlib/net.kn","line":204,"attributes":[],"docs":[],"target_notes":[]},{"name":"tcp_listener_close","qualified_name":"std::net::tcp_listener_close","kind":"function","visibility":"public","signature":"fn tcp_listener_close(listener_id: Int) -> Int","source_path":"stdlib/net.kn","line":207,"attributes":[],"docs":[],"target_notes":[]},{"name":"http_request_create","qualified_name":"std::net::http_request_create","kind":"function","visibility":"public","signature":"fn http_request_create(method: String, url: String) -> Int","source_path":"stdlib/net.kn","line":210,"attributes":[],"docs":[],"target_notes":[]},{"name":"http_request_set_header","qualified_name":"std::net::http_request_set_header","kind":"function","visibility":"public","signature":"fn http_request_set_header(request_id: Int, key: String, value: String) -> Int","source_path":"stdlib/net.kn","line":213,"attributes":[],"docs":[],"target_notes":[]},{"name":"http_request_set_body_text","qualified_name":"std::net::http_request_set_body_text","kind":"function","visibility":"public","signature":"fn http_request_set_body_text(request_id: Int, payload: String) -> Int","source_path":"stdlib/net.kn","line":216,"attributes":[],"docs":[],"target_notes":[]},{"name":"http_request_set_body_hex","qualified_name":"std::net::http_request_set_body_hex","kind":"function","visibility":"public","signature":"fn http_request_set_body_hex(request_id: Int, payload_hex: String) -> Int","source_path":"stdlib/net.kn","line":219,"attributes":[],"docs":[],"target_notes":[]},{"name":"http_request_set_timeout","qualified_name":"std::net::http_request_set_timeout","kind":"function","visibility":"public","signature":"fn http_request_set_timeout(request_id: Int, timeout_ms: Int) -> Int","source_path":"stdlib/net.kn","line":222,"attributes":[],"docs":[],"target_notes":[]},{"name":"http_request_set_protocol","qualified_name":"std::net::http_request_set_protocol","kind":"function","visibility":"public","signature":"fn http_request_set_protocol(request_id: Int, protocol_name: String) -> Int","source_path":"stdlib/net.kn","line":225,"attributes":[],"docs":[],"target_notes":[]},{"name":"http_request_protocol","qualified_name":"std::net::http_request_protocol","kind":"function","visibility":"public","signature":"fn http_request_protocol(request_id: Int) -> String","source_path":"stdlib/net.kn","line":228,"attributes":[],"docs":[],"target_notes":[]},{"name":"http_client_send","qualified_name":"std::net::http_client_send","kind":"function","visibility":"public","signature":"fn http_client_send(request_id: Int) -> Int","source_path":"stdlib/net.kn","line":231,"attributes":[],"docs":[],"target_notes":[]},{"name":"http_response_status","qualified_name":"std::net::http_response_status","kind":"function","visibility":"public","signature":"fn http_response_status(response_id: Int) -> Int","source_path":"stdlib/net.kn","line":234,"attributes":[],"docs":[],"target_notes":[]},{"name":"http_response_protocol","qualified_name":"std::net::http_response_protocol","kind":"function","visibility":"public","signature":"fn http_response_protocol(response_id: Int) -> String","source_path":"stdlib/net.kn","line":237,"attributes":[],"docs":[],"target_notes":[]},{"name":"http_response_header","qualified_name":"std::net::http_response_header","kind":"function","visibility":"public","signature":"fn http_response_header(response_id: Int, key: String) -> String","source_path":"stdlib/net.kn","line":240,"attributes":[],"docs":[],"target_notes":[]},{"name":"http_response_body_text","qualified_name":"std::net::http_response_body_text","kind":"function","visibility":"public","signature":"fn http_response_body_text(response_id: Int) -> String","source_path":"stdlib/net.kn","line":243,"attributes":[],"docs":[],"target_notes":[]},{"name":"http_response_body_hex","qualified_name":"std::net::http_response_body_hex","kind":"function","visibility":"public","signature":"fn http_response_body_hex(response_id: Int) -> String","source_path":"stdlib/net.kn","line":246,"attributes":[],"docs":[],"target_notes":[]},{"name":"http_request_destroy","qualified_name":"std::net::http_request_destroy","kind":"function","visibility":"public","signature":"fn http_request_destroy(request_id: Int) -> Int","source_path":"stdlib/net.kn","line":249,"attributes":[],"docs":[],"target_notes":[]},{"name":"http_response_destroy","qualified_name":"std::net::http_response_destroy","kind":"function","visibility":"public","signature":"fn http_response_destroy(response_id: Int) -> Int","source_path":"stdlib/net.kn","line":252,"attributes":[],"docs":[],"target_notes":[]},{"name":"http_server_create","qualified_name":"std::net::http_server_create","kind":"function","visibility":"public","signature":"fn http_server_create(host: String, port: Int) -> Int","source_path":"stdlib/net.kn","line":255,"attributes":[],"docs":[],"target_notes":[]},{"name":"http_server_create_localhost","qualified_name":"std::net::http_server_create_localhost","kind":"function","visibility":"public","signature":"fn http_server_create_localhost(port: Int) -> Int","source_path":"stdlib/net.kn","line":258,"attributes":[],"docs":[],"target_notes":[]},{"name":"http_server_listen","qualified_name":"std::net::http_server_listen","kind":"function","visibility":"public","signature":"fn http_server_listen(server_id: Int) -> Int","source_path":"stdlib/net.kn","line":261,"attributes":[],"docs":[],"target_notes":[]},{"name":"http_server_local_port","qualified_name":"std::net::http_server_local_port","kind":"function","visibility":"public","signature":"fn http_server_local_port(server_id: Int) -> Int","source_path":"stdlib/net.kn","line":264,"attributes":[],"docs":[],"target_notes":[]},{"name":"http_route_actor","qualified_name":"std::net::http_route_actor","kind":"function","visibility":"public","signature":"fn http_route_actor(server_id: Int, method: String, path: String, actor_id: Int, message_kind: String) -> Int","source_path":"stdlib/net.kn","line":267,"attributes":[],"docs":[],"target_notes":[]},{"name":"http_server_pump","qualified_name":"std::net::http_server_pump","kind":"function","visibility":"public","signature":"fn http_server_pump(server_id: Int, timeout_ms: Int) -> Int","source_path":"stdlib/net.kn","line":270,"attributes":[],"docs":[],"target_notes":[]},{"name":"http_server_pump_batch","qualified_name":"std::net::http_server_pump_batch","kind":"function","visibility":"public","signature":"fn http_server_pump_batch(server_id: Int, timeout_ms: Int, max_requests: Int) -> Int","source_path":"stdlib/net.kn","line":273,"attributes":[],"docs":[],"target_notes":[]},{"name":"http_server_pending_request_count","qualified_name":"std::net::http_server_pending_request_count","kind":"function","visibility":"public","signature":"fn http_server_pending_request_count(server_id: Int) -> Int","source_path":"stdlib/net.kn","line":276,"attributes":[],"docs":[],"target_notes":[]},{"name":"http_server_next_request","qualified_name":"std::net::http_server_next_request","kind":"function","visibility":"public","signature":"fn http_server_next_request(server_id: Int) -> Int","source_path":"stdlib/net.kn","line":279,"attributes":[],"docs":[],"target_notes":[]},{"name":"http_request_method","qualified_name":"std::net::http_request_method","kind":"function","visibility":"public","signature":"fn http_request_method(incoming_request_id: Int) -> String","source_path":"stdlib/net.kn","line":282,"attributes":[],"docs":[],"target_notes":[]},{"name":"http_request_path","qualified_name":"std::net::http_request_path","kind":"function","visibility":"public","signature":"fn http_request_path(incoming_request_id: Int) -> String","source_path":"stdlib/net.kn","line":285,"attributes":[],"docs":[],"target_notes":[]},{"name":"http_request_query","qualified_name":"std::net::http_request_query","kind":"function","visibility":"public","signature":"fn http_request_query(incoming_request_id: Int) -> String","source_path":"stdlib/net.kn","line":288,"attributes":[],"docs":[],"target_notes":[]},{"name":"http_request_header","qualified_name":"std::net::http_request_header","kind":"function","visibility":"public","signature":"fn http_request_header(incoming_request_id: Int, key: String) -> String","source_path":"stdlib/net.kn","line":291,"attributes":[],"docs":[],"target_notes":[]},{"name":"http_request_body_text","qualified_name":"std::net::http_request_body_text","kind":"function","visibility":"public","signature":"fn http_request_body_text(incoming_request_id: Int) -> String","source_path":"stdlib/net.kn","line":294,"attributes":[],"docs":[],"target_notes":[]},{"name":"http_request_body_hex","qualified_name":"std::net::http_request_body_hex","kind":"function","visibility":"public","signature":"fn http_request_body_hex(incoming_request_id: Int) -> String","source_path":"stdlib/net.kn","line":297,"attributes":[],"docs":[],"target_notes":[]},{"name":"http_respond_text","qualified_name":"std::net::http_respond_text","kind":"function","visibility":"public","signature":"fn http_respond_text(incoming_request_id: Int, status_code: Int, payload: String) -> Int","source_path":"stdlib/net.kn","line":300,"attributes":[],"docs":[],"target_notes":[]},{"name":"http_respond_hex","qualified_name":"std::net::http_respond_hex","kind":"function","visibility":"public","signature":"fn http_respond_hex(incoming_request_id: Int, status_code: Int, payload_hex: String) -> Int","source_path":"stdlib/net.kn","line":303,"attributes":[],"docs":[],"target_notes":[]},{"name":"http_response_set_header_for_request","qualified_name":"std::net::http_response_set_header_for_request","kind":"function","visibility":"public","signature":"fn http_response_set_header_for_request(incoming_request_id: Int, key: String, value: String) -> Int","source_path":"stdlib/net.kn","line":306,"attributes":[],"docs":[],"target_notes":[]},{"name":"http_server_close","qualified_name":"std::net::http_server_close","kind":"function","visibility":"public","signature":"fn http_server_close(server_id: Int) -> Int","source_path":"stdlib/net.kn","line":309,"attributes":[],"docs":[],"target_notes":[]},{"name":"http_local_url","qualified_name":"std::net::http_local_url","kind":"function","visibility":"public","signature":"fn http_local_url(port: Int, path: String) -> String","source_path":"stdlib/net.kn","line":312,"attributes":[],"docs":[],"target_notes":[]},{"name":"http_get_text","qualified_name":"std::net::http_get_text","kind":"function","visibility":"public","signature":"fn http_get_text(url: String) -> String","source_path":"stdlib/net.kn","line":315,"attributes":[],"docs":[],"target_notes":[]},{"name":"http_post_text","qualified_name":"std::net::http_post_text","kind":"function","visibility":"public","signature":"fn http_post_text(url: String, payload: String) -> String","source_path":"stdlib/net.kn","line":320,"attributes":[],"docs":[],"target_notes":[]},{"name":"net_last_status","qualified_name":"std::net::net_last_status","kind":"function","visibility":"public","signature":"fn net_last_status() -> Int","source_path":"stdlib/net.kn","line":326,"attributes":[],"docs":[],"target_notes":[]},{"name":"net_last_error_kind","qualified_name":"std::net::net_last_error_kind","kind":"function","visibility":"public","signature":"fn net_last_error_kind() -> String","source_path":"stdlib/net.kn","line":329,"attributes":[],"docs":[],"target_notes":[]},{"name":"net_last_error_message","qualified_name":"std::net::net_last_error_message","kind":"function","visibility":"public","signature":"fn net_last_error_message() -> String","source_path":"stdlib/net.kn","line":332,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"os","import_path":"std::os","source_path":"stdlib/os.kn","parse_status":{"status":"parsed"},"docs":["============================================================================","std::os — The Mothership OS Module","============================================================================","Zig-flavored OS substrate meets Python ergonomics.","Uses the 'import os' mental model: one module, everything the OS gives you.","","Architecture:","Layer 0 ─ raw @extern ABIs (fs, process, machine, platform, runtime, time)","Layer 1 ─ this module: Python-like unified facade","Layer 2 ─ std::os::path (os_path.kn) for path manipulation","","Usage:","use std::os","let cwd = os_getcwd()","let files = os_listdir(\".\")","let home = os_getenv(\"HOME\")","os_makedirs(\"a/b/c\")","","Zig inspiration per X:\\reference\\zigos:","- Platform-specific raw bindings → os.linux.zig / os.windows.zig pattern","- Sub-modules for syscall/DLL imports → kernel32.zig, ntdll.zig","- Cross-platform posix layer atop raw os → our wrappers here","- Higher stdlib (fs, process, net) consume os as substrate","============================================================================"],"symbols":[{"name":"abi_os_setenv","qualified_name":"std::os::abi_os_setenv","kind":"extern_function","visibility":"private","signature":"fn abi_os_setenv(key: String, value: String) -> Int","source_path":"stdlib/os.kn","line":36,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_os_getenv","qualified_name":"std::os::abi_os_getenv","kind":"extern_function","visibility":"private","signature":"fn abi_os_getenv(key: String) -> String","source_path":"stdlib/os.kn","line":39,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_os_unsetenv","qualified_name":"std::os::abi_os_unsetenv","kind":"extern_function","visibility":"private","signature":"fn abi_os_unsetenv(key: String) -> Int","source_path":"stdlib/os.kn","line":42,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_os_chdir","qualified_name":"std::os::abi_os_chdir","kind":"extern_function","visibility":"private","signature":"fn abi_os_chdir(path: String) -> Int","source_path":"stdlib/os.kn","line":45,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_os_getppid","qualified_name":"std::os::abi_os_getppid","kind":"extern_function","visibility":"private","signature":"fn abi_os_getppid() -> Int","source_path":"stdlib/os.kn","line":48,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_os_getlogin","qualified_name":"std::os::abi_os_getlogin","kind":"extern_function","visibility":"private","signature":"fn abi_os_getlogin() -> String","source_path":"stdlib/os.kn","line":51,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_os_getuid","qualified_name":"std::os::abi_os_getuid","kind":"extern_function","visibility":"private","signature":"fn abi_os_getuid() -> Int","source_path":"stdlib/os.kn","line":54,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_os_getgid","qualified_name":"std::os::abi_os_getgid","kind":"extern_function","visibility":"private","signature":"fn abi_os_getgid() -> Int","source_path":"stdlib/os.kn","line":57,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_os_symlink","qualified_name":"std::os::abi_os_symlink","kind":"extern_function","visibility":"private","signature":"fn abi_os_symlink(src: String, dst: String) -> Int","source_path":"stdlib/os.kn","line":60,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_os_readlink","qualified_name":"std::os::abi_os_readlink","kind":"extern_function","visibility":"private","signature":"fn abi_os_readlink(path: String) -> String","source_path":"stdlib/os.kn","line":63,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_os_urandom","qualified_name":"std::os::abi_os_urandom","kind":"extern_function","visibility":"private","signature":"fn abi_os_urandom(byte_count: Int) -> String","source_path":"stdlib/os.kn","line":66,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_os_terminal_columns","qualified_name":"std::os::abi_os_terminal_columns","kind":"extern_function","visibility":"private","signature":"fn abi_os_terminal_columns() -> Int","source_path":"stdlib/os.kn","line":69,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_os_terminal_rows","qualified_name":"std::os::abi_os_terminal_rows","kind":"extern_function","visibility":"private","signature":"fn abi_os_terminal_rows() -> Int","source_path":"stdlib/os.kn","line":72,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_os_last_status","qualified_name":"std::os::abi_os_last_status","kind":"extern_function","visibility":"private","signature":"fn abi_os_last_status() -> Int","source_path":"stdlib/os.kn","line":75,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_os_last_error_kind","qualified_name":"std::os::abi_os_last_error_kind","kind":"extern_function","visibility":"private","signature":"fn abi_os_last_error_kind() -> String","source_path":"stdlib/os.kn","line":78,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_os_last_error_message","qualified_name":"std::os::abi_os_last_error_message","kind":"extern_function","visibility":"private","signature":"fn abi_os_last_error_message() -> String","source_path":"stdlib/os.kn","line":81,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_os_syscall0","qualified_name":"std::os::abi_os_syscall0","kind":"extern_function","visibility":"private","signature":"fn abi_os_syscall0(sysno: Int) -> Int","source_path":"stdlib/os.kn","line":86,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_os_syscall1","qualified_name":"std::os::abi_os_syscall1","kind":"extern_function","visibility":"private","signature":"fn abi_os_syscall1(sysno: Int, arg1: Int) -> Int","source_path":"stdlib/os.kn","line":89,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_os_syscall2","qualified_name":"std::os::abi_os_syscall2","kind":"extern_function","visibility":"private","signature":"fn abi_os_syscall2(sysno: Int, arg1: Int, arg2: Int) -> Int","source_path":"stdlib/os.kn","line":92,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_os_syscall3","qualified_name":"std::os::abi_os_syscall3","kind":"extern_function","visibility":"private","signature":"fn abi_os_syscall3(sysno: Int, arg1: Int, arg2: Int, arg3: Int) -> Int","source_path":"stdlib/os.kn","line":95,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_os_syscall4","qualified_name":"std::os::abi_os_syscall4","kind":"extern_function","visibility":"private","signature":"fn abi_os_syscall4(sysno: Int, arg1: Int, arg2: Int, arg3: Int, arg4: Int) -> Int","source_path":"stdlib/os.kn","line":98,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_os_syscall5","qualified_name":"std::os::abi_os_syscall5","kind":"extern_function","visibility":"private","signature":"fn abi_os_syscall5(sysno: Int, arg1: Int, arg2: Int, arg3: Int, arg4: Int, arg5: Int) -> Int","source_path":"stdlib/os.kn","line":101,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_os_syscall6","qualified_name":"std::os::abi_os_syscall6","kind":"extern_function","visibility":"private","signature":"fn abi_os_syscall6(sysno: Int, arg1: Int, arg2: Int, arg3: Int, arg4: Int, arg5: Int, arg6: Int) -> Int","source_path":"stdlib/os.kn","line":104,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_os_mmap_anon","qualified_name":"std::os::abi_os_mmap_anon","kind":"extern_function","visibility":"private","signature":"fn abi_os_mmap_anon(byte_count: Int, prot: Int, flags: Int) -> Int","source_path":"stdlib/os.kn","line":109,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_os_mmap_file","qualified_name":"std::os::abi_os_mmap_file","kind":"extern_function","visibility":"private","signature":"fn abi_os_mmap_file(byte_count: Int, prot: Int, flags: Int, fd: Int, offset: Int) -> Int","source_path":"stdlib/os.kn","line":112,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_os_munmap","qualified_name":"std::os::abi_os_munmap","kind":"extern_function","visibility":"private","signature":"fn abi_os_munmap(addr: Int, byte_count: Int) -> Int","source_path":"stdlib/os.kn","line":115,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_os_mprotect","qualified_name":"std::os::abi_os_mprotect","kind":"extern_function","visibility":"private","signature":"fn abi_os_mprotect(addr: Int, byte_count: Int, prot: Int) -> Int","source_path":"stdlib/os.kn","line":118,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_os_madvise","qualified_name":"std::os::abi_os_madvise","kind":"extern_function","visibility":"private","signature":"fn abi_os_madvise(addr: Int, byte_count: Int, advice: Int) -> Int","source_path":"stdlib/os.kn","line":121,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_os_msync","qualified_name":"std::os::abi_os_msync","kind":"extern_function","visibility":"private","signature":"fn abi_os_msync(addr: Int, byte_count: Int, flags: Int) -> Int","source_path":"stdlib/os.kn","line":124,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_os_mlock","qualified_name":"std::os::abi_os_mlock","kind":"extern_function","visibility":"private","signature":"fn abi_os_mlock(addr: Int, byte_count: Int) -> Int","source_path":"stdlib/os.kn","line":127,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_os_munlock","qualified_name":"std::os::abi_os_munlock","kind":"extern_function","visibility":"private","signature":"fn abi_os_munlock(addr: Int, byte_count: Int) -> Int","source_path":"stdlib/os.kn","line":130,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_os_fork","qualified_name":"std::os::abi_os_fork","kind":"extern_function","visibility":"private","signature":"fn abi_os_fork() -> Int","source_path":"stdlib/os.kn","line":135,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_os_execve","qualified_name":"std::os::abi_os_execve","kind":"extern_function","visibility":"private","signature":"fn abi_os_execve(path: String, argv: ptr, envp: ptr) -> Int","source_path":"stdlib/os.kn","line":138,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_os_waitpid","qualified_name":"std::os::abi_os_waitpid","kind":"extern_function","visibility":"private","signature":"fn abi_os_waitpid(pid: Int, options: Int) -> Int","source_path":"stdlib/os.kn","line":141,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_os_io_uring_setup","qualified_name":"std::os::abi_os_io_uring_setup","kind":"extern_function","visibility":"private","signature":"fn abi_os_io_uring_setup(entries: Int) -> Int","source_path":"stdlib/os.kn","line":146,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_os_io_uring_enter","qualified_name":"std::os::abi_os_io_uring_enter","kind":"extern_function","visibility":"private","signature":"fn abi_os_io_uring_enter(ring_fd: Int, to_submit: Int, min_complete: Int, flags: Int) -> Int","source_path":"stdlib/os.kn","line":149,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"OS_SEP","qualified_name":"std::os::OS_SEP","kind":"const","visibility":"public","signature":"const OS_SEP: String","source_path":"stdlib/os.kn","line":156,"attributes":[],"docs":["─── Path & line separators ──────────────────────────────────────────────"],"target_notes":[]},{"name":"OS_ALT_SEP","qualified_name":"std::os::OS_ALT_SEP","kind":"const","visibility":"public","signature":"const OS_ALT_SEP: String","source_path":"stdlib/os.kn","line":157,"attributes":[],"docs":[],"target_notes":[]},{"name":"OS_LINESEP","qualified_name":"std::os::OS_LINESEP","kind":"const","visibility":"public","signature":"const OS_LINESEP: String","source_path":"stdlib/os.kn","line":158,"attributes":[],"docs":[],"target_notes":[]},{"name":"OS_PATHSEP","qualified_name":"std::os::OS_PATHSEP","kind":"const","visibility":"public","signature":"const OS_PATHSEP: String","source_path":"stdlib/os.kn","line":159,"attributes":[],"docs":[],"target_notes":[]},{"name":"OS_DEVNULL","qualified_name":"std::os::OS_DEVNULL","kind":"const","visibility":"public","signature":"const OS_DEVNULL: String","source_path":"stdlib/os.kn","line":160,"attributes":[],"docs":[],"target_notes":[]},{"name":"OsKind","qualified_name":"std::os::OsKind","kind":"enum","visibility":"public","signature":"enum OsKind","source_path":"stdlib/os.kn","line":163,"attributes":[],"docs":["─── Platform enums ──────────────────────────────────────────────────────"],"target_notes":[]},{"name":"ArchKind","qualified_name":"std::os::ArchKind","kind":"enum","visibility":"public","signature":"enum ArchKind","source_path":"stdlib/os.kn","line":171,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_name","qualified_name":"std::os::os_name","kind":"function","visibility":"public","signature":"fn os_name() -> String","source_path":"stdlib/os.kn","line":178,"attributes":[],"docs":["─── Platform name (Python: os.name) ─────────────────────────────────────"],"target_notes":[]},{"name":"os_platform_name","qualified_name":"std::os::os_platform_name","kind":"function","visibility":"public","signature":"fn os_platform_name() -> String","source_path":"stdlib/os.kn","line":189,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_arch_name","qualified_name":"std::os::os_arch_name","kind":"function","visibility":"public","signature":"fn os_arch_name() -> String","source_path":"stdlib/os.kn","line":200,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_is_windows","qualified_name":"std::os::os_is_windows","kind":"function","visibility":"public","signature":"fn os_is_windows() -> Bool","source_path":"stdlib/os.kn","line":214,"attributes":[],"docs":["─── Boolean platform checks ─────────────────────────────────────────────","NOTE: Use match not == for enum comparison — LLVM codegen for enum ==","is not yet reliable; match arms produce correct branching.","Also avoid `return` inside match arms (LLVM codegen limitation)."],"target_notes":[]},{"name":"os_is_linux","qualified_name":"std::os::os_is_linux","kind":"function","visibility":"public","signature":"fn os_is_linux() -> Bool","source_path":"stdlib/os.kn","line":222,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_is_macos","qualified_name":"std::os::os_is_macos","kind":"function","visibility":"public","signature":"fn os_is_macos() -> Bool","source_path":"stdlib/os.kn","line":230,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_is_wasi","qualified_name":"std::os::os_is_wasi","kind":"function","visibility":"public","signature":"fn os_is_wasi() -> Bool","source_path":"stdlib/os.kn","line":238,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_is_64bit","qualified_name":"std::os::os_is_64bit","kind":"function","visibility":"public","signature":"fn os_is_64bit() -> Bool","source_path":"stdlib/os.kn","line":246,"attributes":[],"docs":[],"target_notes":[]},{"name":"OsUname","qualified_name":"std::os::OsUname","kind":"struct","visibility":"public","signature":"struct OsUname","source_path":"stdlib/os.kn","line":251,"attributes":[],"docs":["─── Version / uname ─────────────────────────────────────────────────────"],"target_notes":[]},{"name":"os_uname","qualified_name":"std::os::os_uname","kind":"function","visibility":"public","signature":"fn os_uname() -> OsUname","source_path":"stdlib/os.kn","line":258,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_getenv","qualified_name":"std::os::os_getenv","kind":"function","visibility":"public","signature":"fn os_getenv(key: String) -> String","source_path":"stdlib/os.kn","line":288,"attributes":[],"docs":["============================================================================","SECTION 2: Environment Variables","============================================================================","Python: os.environ, os.getenv(), os.putenv(), os.unsetenv()"],"target_notes":[]},{"name":"os_getenv_default","qualified_name":"std::os::os_getenv_default","kind":"function","visibility":"public","signature":"fn os_getenv_default(key: String, default_value: String) -> String","source_path":"stdlib/os.kn","line":291,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_setenv","qualified_name":"std::os::os_setenv","kind":"function","visibility":"public","signature":"fn os_setenv(key: String, value: String) -> Bool","source_path":"stdlib/os.kn","line":298,"attributes":[],"docs":["─── Set/unset environment ───────────────────────────────────────────────"],"target_notes":[]},{"name":"os_unsetenv","qualified_name":"std::os::os_unsetenv","kind":"function","visibility":"public","signature":"fn os_unsetenv(key: String) -> Bool","source_path":"stdlib/os.kn","line":301,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_getpid","qualified_name":"std::os::os_getpid","kind":"function","visibility":"public","signature":"fn os_getpid() -> Int","source_path":"stdlib/os.kn","line":309,"attributes":[],"docs":["============================================================================","SECTION 3: Process Identity","============================================================================","Python: os.getpid(), os.getppid(), os.getuid(), os.getgid(), os.getlogin()"],"target_notes":[]},{"name":"os_getppid","qualified_name":"std::os::os_getppid","kind":"function","visibility":"public","signature":"fn os_getppid() -> Int","source_path":"stdlib/os.kn","line":312,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_getlogin","qualified_name":"std::os::os_getlogin","kind":"function","visibility":"public","signature":"fn os_getlogin() -> String","source_path":"stdlib/os.kn","line":315,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_getuid","qualified_name":"std::os::os_getuid","kind":"function","visibility":"public","signature":"fn os_getuid() -> Int","source_path":"stdlib/os.kn","line":318,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_getgid","qualified_name":"std::os::os_getgid","kind":"function","visibility":"public","signature":"fn os_getgid() -> Int","source_path":"stdlib/os.kn","line":321,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_getcwd","qualified_name":"std::os::os_getcwd","kind":"function","visibility":"public","signature":"fn os_getcwd() -> String","source_path":"stdlib/os.kn","line":329,"attributes":[],"docs":["============================================================================","SECTION 4: Working Directory","============================================================================","Python: os.getcwd(), os.chdir()"],"target_notes":[]},{"name":"os_chdir","qualified_name":"std::os::os_chdir","kind":"function","visibility":"public","signature":"fn os_chdir(path: String) -> Bool","source_path":"stdlib/os.kn","line":332,"attributes":[],"docs":[],"target_notes":[]},{"name":"OsDirEntry","qualified_name":"std::os::OsDirEntry","kind":"struct","visibility":"public","signature":"struct OsDirEntry","source_path":"stdlib/os.kn","line":342,"attributes":[],"docs":["─── Directory listing ───────────────────────────────────────────────────"],"target_notes":[]},{"name":"os_listdir","qualified_name":"std::os::os_listdir","kind":"function","visibility":"public","signature":"fn os_listdir(path: String) -> Array","source_path":"stdlib/os.kn","line":351,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_scandir","qualified_name":"std::os::os_scandir","kind":"function","visibility":"public","signature":"fn os_scandir(path: String) -> Array","source_path":"stdlib/os.kn","line":369,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_mkdir","qualified_name":"std::os::os_mkdir","kind":"function","visibility":"public","signature":"fn os_mkdir(path: String) -> Bool","source_path":"stdlib/os.kn","line":403,"attributes":[],"docs":["─── Directory creation ──────────────────────────────────────────────────"],"target_notes":[]},{"name":"os_makedirs","qualified_name":"std::os::os_makedirs","kind":"function","visibility":"public","signature":"fn os_makedirs(path: String) -> Bool","source_path":"stdlib/os.kn","line":406,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_remove","qualified_name":"std::os::os_remove","kind":"function","visibility":"public","signature":"fn os_remove(path: String) -> Bool","source_path":"stdlib/os.kn","line":410,"attributes":[],"docs":["─── File/directory removal ──────────────────────────────────────────────"],"target_notes":[]},{"name":"os_rmdir","qualified_name":"std::os::os_rmdir","kind":"function","visibility":"public","signature":"fn os_rmdir(path: String) -> Bool","source_path":"stdlib/os.kn","line":413,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_removedirs","qualified_name":"std::os::os_removedirs","kind":"function","visibility":"public","signature":"fn os_removedirs(path: String) -> Bool","source_path":"stdlib/os.kn","line":416,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_rename","qualified_name":"std::os::os_rename","kind":"function","visibility":"public","signature":"fn os_rename(src: String, dst: String) -> Bool","source_path":"stdlib/os.kn","line":420,"attributes":[],"docs":["─── Rename / move ───────────────────────────────────────────────────────"],"target_notes":[]},{"name":"os_replace","qualified_name":"std::os::os_replace","kind":"function","visibility":"public","signature":"fn os_replace(src: String, dst: String) -> Bool","source_path":"stdlib/os.kn","line":423,"attributes":[],"docs":[],"target_notes":[]},{"name":"OsStatResult","qualified_name":"std::os::OsStatResult","kind":"struct","visibility":"public","signature":"struct OsStatResult","source_path":"stdlib/os.kn","line":427,"attributes":[],"docs":["─── File stat ───────────────────────────────────────────────────────────"],"target_notes":[]},{"name":"os_stat","qualified_name":"std::os::os_stat","kind":"function","visibility":"public","signature":"fn os_stat(path: String) -> OsStatResult","source_path":"stdlib/os.kn","line":437,"attributes":[],"docs":[],"target_notes":[]},{"name":"_meta_field","qualified_name":"std::os::_meta_field","kind":"function","visibility":"private","signature":"fn _meta_field(text: String, key: String) -> String","source_path":"stdlib/os.kn","line":456,"attributes":[],"docs":[],"target_notes":[]},{"name":"_meta_int","qualified_name":"std::os::_meta_int","kind":"function","visibility":"private","signature":"fn _meta_int(text: String, key: String) -> Int","source_path":"stdlib/os.kn","line":481,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_symlink","qualified_name":"std::os::os_symlink","kind":"function","visibility":"public","signature":"fn os_symlink(src: String, dst: String) -> Bool","source_path":"stdlib/os.kn","line":499,"attributes":[],"docs":["─── Symlinks ────────────────────────────────────────────────────────────"],"target_notes":[]},{"name":"os_readlink","qualified_name":"std::os::os_readlink","kind":"function","visibility":"public","signature":"fn os_readlink(path: String) -> String","source_path":"stdlib/os.kn","line":502,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_exists","qualified_name":"std::os::os_exists","kind":"function","visibility":"public","signature":"fn os_exists(path: String) -> Bool","source_path":"stdlib/os.kn","line":506,"attributes":[],"docs":["─── Convenience: existence checks ───────────────────────────────────────"],"target_notes":[]},{"name":"os_isfile","qualified_name":"std::os::os_isfile","kind":"function","visibility":"public","signature":"fn os_isfile(path: String) -> Bool","source_path":"stdlib/os.kn","line":509,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_isdir","qualified_name":"std::os::os_isdir","kind":"function","visibility":"public","signature":"fn os_isdir(path: String) -> Bool","source_path":"stdlib/os.kn","line":512,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_tmpfile","qualified_name":"std::os::os_tmpfile","kind":"function","visibility":"public","signature":"fn os_tmpfile(prefix: String) -> String","source_path":"stdlib/os.kn","line":516,"attributes":[],"docs":["─── Temp files ──────────────────────────────────────────────────────────"],"target_notes":[]},{"name":"os_tmpdir","qualified_name":"std::os::os_tmpdir","kind":"function","visibility":"public","signature":"fn os_tmpdir(prefix: String) -> String","source_path":"stdlib/os.kn","line":519,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_read_text","qualified_name":"std::os::os_read_text","kind":"function","visibility":"public","signature":"fn os_read_text(path: String) -> String","source_path":"stdlib/os.kn","line":523,"attributes":[],"docs":["─── Text I/O convenience ────────────────────────────────────────────────"],"target_notes":[]},{"name":"os_write_text","qualified_name":"std::os::os_write_text","kind":"function","visibility":"public","signature":"fn os_write_text(path: String, content: String) -> Bool","source_path":"stdlib/os.kn","line":526,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_append_text","qualified_name":"std::os::os_append_text","kind":"function","visibility":"public","signature":"fn os_append_text(path: String, content: String) -> Bool","source_path":"stdlib/os.kn","line":530,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_atomic_write_text","qualified_name":"std::os::os_atomic_write_text","kind":"function","visibility":"public","signature":"fn os_atomic_write_text(path: String, content: String) -> Bool","source_path":"stdlib/os.kn","line":534,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_system","qualified_name":"std::os::os_system","kind":"function","visibility":"public","signature":"fn os_system(command: String) -> Int","source_path":"stdlib/os.kn","line":543,"attributes":[],"docs":["============================================================================","SECTION 6: Process Execution","============================================================================","Python: os.system(), os.popen()"],"target_notes":[]},{"name":"os_popen_read","qualified_name":"std::os::os_popen_read","kind":"function","visibility":"public","signature":"fn os_popen_read(command: String, timeout_ms: Int) -> String","source_path":"stdlib/os.kn","line":556,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_popen_status","qualified_name":"std::os::os_popen_status","kind":"function","visibility":"public","signature":"fn os_popen_status(command: String, timeout_ms: Int) -> Int","source_path":"stdlib/os.kn","line":568,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_cpu_count","qualified_name":"std::os::os_cpu_count","kind":"function","visibility":"public","signature":"fn os_cpu_count() -> Int","source_path":"stdlib/os.kn","line":577,"attributes":[],"docs":["============================================================================","SECTION 7: System Information","============================================================================","Python: os.cpu_count(), os.urandom(), os.get_terminal_size()"],"target_notes":[]},{"name":"os_cpu_core_count","qualified_name":"std::os::os_cpu_core_count","kind":"function","visibility":"public","signature":"fn os_cpu_core_count() -> Int","source_path":"stdlib/os.kn","line":580,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_cpu_package_count","qualified_name":"std::os::os_cpu_package_count","kind":"function","visibility":"public","signature":"fn os_cpu_package_count() -> Int","source_path":"stdlib/os.kn","line":583,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_urandom","qualified_name":"std::os::os_urandom","kind":"function","visibility":"public","signature":"fn os_urandom(byte_count: Int) -> String","source_path":"stdlib/os.kn","line":587,"attributes":[],"docs":["─── Random bytes ────────────────────────────────────────────────────────"],"target_notes":[]},{"name":"os_urandom_bytes","qualified_name":"std::os::os_urandom_bytes","kind":"function","visibility":"public","signature":"fn os_urandom_bytes(byte_count: Int) -> Array","source_path":"stdlib/os.kn","line":590,"attributes":[],"docs":[],"target_notes":[]},{"name":"OsTerminalSize","qualified_name":"std::os::OsTerminalSize","kind":"struct","visibility":"public","signature":"struct OsTerminalSize","source_path":"stdlib/os.kn","line":600,"attributes":[],"docs":["─── Terminal size ───────────────────────────────────────────────────────"],"target_notes":[]},{"name":"os_get_terminal_size","qualified_name":"std::os::os_get_terminal_size","kind":"function","visibility":"public","signature":"fn os_get_terminal_size() -> OsTerminalSize","source_path":"stdlib/os.kn","line":604,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_getpagesize","qualified_name":"std::os::os_getpagesize","kind":"function","visibility":"public","signature":"fn os_getpagesize() -> Int","source_path":"stdlib/os.kn","line":613,"attributes":[],"docs":["─── Page size ───────────────────────────────────────────────────────────"],"target_notes":[]},{"name":"os_sleep_millis","qualified_name":"std::os::os_sleep_millis","kind":"function","visibility":"public","signature":"fn os_sleep_millis(ms: Int) -> Unit","source_path":"stdlib/os.kn","line":620,"attributes":[],"docs":["============================================================================","SECTION 8: Time Utilities","============================================================================"],"target_notes":[]},{"name":"os_now_millis","qualified_name":"std::os::os_now_millis","kind":"function","visibility":"public","signature":"fn os_now_millis() -> Int","source_path":"stdlib/os.kn","line":623,"attributes":[],"docs":[],"target_notes":[]},{"name":"OsFile","qualified_name":"std::os::OsFile","kind":"struct","visibility":"public","signature":"struct OsFile","source_path":"stdlib/os.kn","line":631,"attributes":[],"docs":["============================================================================","SECTION 9: File Descriptor / Handle Operations","============================================================================","Zig-style: fd_t operations for the low-level crowd."],"target_notes":[]},{"name":"os_open","qualified_name":"std::os::os_open","kind":"function","visibility":"public","signature":"fn os_open(path: String, mode: String) -> OsFile","source_path":"stdlib/os.kn","line":636,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_close","qualified_name":"std::os::os_close","kind":"function","visibility":"public","signature":"fn os_close(file: OsFile) -> Int","source_path":"stdlib/os.kn","line":640,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_read","qualified_name":"std::os::os_read","kind":"function","visibility":"public","signature":"fn os_read(file: OsFile, buffer: ptr, byte_count: Int) -> Int","source_path":"stdlib/os.kn","line":643,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_write","qualified_name":"std::os::os_write","kind":"function","visibility":"public","signature":"fn os_write(file: OsFile, buffer: ptr, byte_count: Int) -> Int","source_path":"stdlib/os.kn","line":646,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_seek","qualified_name":"std::os::os_seek","kind":"function","visibility":"public","signature":"fn os_seek(file: OsFile, offset: Int, origin: Int) -> Int","source_path":"stdlib/os.kn","line":649,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_tell","qualified_name":"std::os::os_tell","kind":"function","visibility":"public","signature":"fn os_tell(file: OsFile) -> Int","source_path":"stdlib/os.kn","line":652,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_flush","qualified_name":"std::os::os_flush","kind":"function","visibility":"public","signature":"fn os_flush(file: OsFile) -> Int","source_path":"stdlib/os.kn","line":655,"attributes":[],"docs":[],"target_notes":[]},{"name":"OsError","qualified_name":"std::os::OsError","kind":"struct","visibility":"public","signature":"struct OsError","source_path":"stdlib/os.kn","line":662,"attributes":[],"docs":["============================================================================","SECTION 10: Error Utilities","============================================================================"],"target_notes":[]},{"name":"os_last_error","qualified_name":"std::os::os_last_error","kind":"function","visibility":"public","signature":"fn os_last_error() -> OsError","source_path":"stdlib/os.kn","line":667,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_syscall","qualified_name":"std::os::os_syscall","kind":"function","visibility":"public","signature":"fn os_syscall(sysno: Int, a1: Int, a2: Int, a3: Int, a4: Int, a5: Int, a6: Int) -> Int","source_path":"stdlib/os.kn","line":706,"attributes":[],"docs":["============================================================================","SECTION 11: Raw Syscall Escape Hatch","============================================================================","The nuclear option. When you need to talk to the kernel directly.","No libc, no runtime bridge, just inline asm → kernel.","Available on Linux x86_64 and aarch64; stubs on Windows.","","Architecture:","os_syscall(nr, a1, a2, a3, a4, a5, a6) → Int","Dispatches to the right abi_os_syscallN variant by arg count.","","Common Linux syscall numbers:","0 = read 1 = write 9 = mmap","11 = munmap 25 = mremap 35 = nanosleep","57 = fork 59 = execve 61 = wait4","231 = exit_group 291 = epoll_create 425 = io_uring_setup","See /usr/include/asm/unistd_64.h for the full table."],"target_notes":[]},{"name":"os_syscall0","qualified_name":"std::os::os_syscall0","kind":"function","visibility":"public","signature":"fn os_syscall0(nr: Int) -> Int","source_path":"stdlib/os.kn","line":709,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_syscall1","qualified_name":"std::os::os_syscall1","kind":"function","visibility":"public","signature":"fn os_syscall1(nr: Int, a1: Int) -> Int","source_path":"stdlib/os.kn","line":712,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_syscall2","qualified_name":"std::os::os_syscall2","kind":"function","visibility":"public","signature":"fn os_syscall2(nr: Int, a1: Int, a2: Int) -> Int","source_path":"stdlib/os.kn","line":715,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_syscall3","qualified_name":"std::os::os_syscall3","kind":"function","visibility":"public","signature":"fn os_syscall3(nr: Int, a1: Int, a2: Int, a3: Int) -> Int","source_path":"stdlib/os.kn","line":718,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_syscall4","qualified_name":"std::os::os_syscall4","kind":"function","visibility":"public","signature":"fn os_syscall4(nr: Int, a1: Int, a2: Int, a3: Int, a4: Int) -> Int","source_path":"stdlib/os.kn","line":721,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_syscall5","qualified_name":"std::os::os_syscall5","kind":"function","visibility":"public","signature":"fn os_syscall5(nr: Int, a1: Int, a2: Int, a3: Int, a4: Int, a5: Int) -> Int","source_path":"stdlib/os.kn","line":724,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_syscall6","qualified_name":"std::os::os_syscall6","kind":"function","visibility":"public","signature":"fn os_syscall6(nr: Int, a1: Int, a2: Int, a3: Int, a4: Int, a5: Int, a6: Int) -> Int","source_path":"stdlib/os.kn","line":727,"attributes":[],"docs":[],"target_notes":[]},{"name":"MMAP_PROT_NONE","qualified_name":"std::os::MMAP_PROT_NONE","kind":"const","visibility":"public","signature":"const MMAP_PROT_NONE: Int","source_path":"stdlib/os.kn","line":737,"attributes":[],"docs":["─── Protection constants ────────────────────────────────────────────────"],"target_notes":[]},{"name":"MMAP_PROT_READ","qualified_name":"std::os::MMAP_PROT_READ","kind":"const","visibility":"public","signature":"const MMAP_PROT_READ: Int","source_path":"stdlib/os.kn","line":738,"attributes":[],"docs":[],"target_notes":[]},{"name":"MMAP_PROT_WRITE","qualified_name":"std::os::MMAP_PROT_WRITE","kind":"const","visibility":"public","signature":"const MMAP_PROT_WRITE: Int","source_path":"stdlib/os.kn","line":739,"attributes":[],"docs":[],"target_notes":[]},{"name":"MMAP_PROT_RW","qualified_name":"std::os::MMAP_PROT_RW","kind":"const","visibility":"public","signature":"const MMAP_PROT_RW: Int","source_path":"stdlib/os.kn","line":740,"attributes":[],"docs":[],"target_notes":[]},{"name":"MMAP_PROT_EXEC","qualified_name":"std::os::MMAP_PROT_EXEC","kind":"const","visibility":"public","signature":"const MMAP_PROT_EXEC: Int","source_path":"stdlib/os.kn","line":741,"attributes":[],"docs":[],"target_notes":[]},{"name":"MMAP_PROT_RX","qualified_name":"std::os::MMAP_PROT_RX","kind":"const","visibility":"public","signature":"const MMAP_PROT_RX: Int","source_path":"stdlib/os.kn","line":742,"attributes":[],"docs":[],"target_notes":[]},{"name":"MMAP_PROT_RWX","qualified_name":"std::os::MMAP_PROT_RWX","kind":"const","visibility":"public","signature":"const MMAP_PROT_RWX: Int","source_path":"stdlib/os.kn","line":743,"attributes":[],"docs":[],"target_notes":[]},{"name":"MMAP_SHARED","qualified_name":"std::os::MMAP_SHARED","kind":"const","visibility":"public","signature":"const MMAP_SHARED: Int","source_path":"stdlib/os.kn","line":746,"attributes":[],"docs":["─── Map flags ───────────────────────────────────────────────────────────"],"target_notes":[]},{"name":"MMAP_PRIVATE","qualified_name":"std::os::MMAP_PRIVATE","kind":"const","visibility":"public","signature":"const MMAP_PRIVATE: Int","source_path":"stdlib/os.kn","line":747,"attributes":[],"docs":[],"target_notes":[]},{"name":"MMAP_FIXED","qualified_name":"std::os::MMAP_FIXED","kind":"const","visibility":"public","signature":"const MMAP_FIXED: Int","source_path":"stdlib/os.kn","line":748,"attributes":[],"docs":[],"target_notes":[]},{"name":"MMAP_HUGETLB","qualified_name":"std::os::MMAP_HUGETLB","kind":"const","visibility":"public","signature":"const MMAP_HUGETLB: Int","source_path":"stdlib/os.kn","line":749,"attributes":[],"docs":[],"target_notes":[]},{"name":"MADV_NORMAL","qualified_name":"std::os::MADV_NORMAL","kind":"const","visibility":"public","signature":"const MADV_NORMAL: Int","source_path":"stdlib/os.kn","line":752,"attributes":[],"docs":["─── madvise hints ───────────────────────────────────────────────────────"],"target_notes":[]},{"name":"MADV_RANDOM","qualified_name":"std::os::MADV_RANDOM","kind":"const","visibility":"public","signature":"const MADV_RANDOM: Int","source_path":"stdlib/os.kn","line":753,"attributes":[],"docs":[],"target_notes":[]},{"name":"MADV_SEQUENTIAL","qualified_name":"std::os::MADV_SEQUENTIAL","kind":"const","visibility":"public","signature":"const MADV_SEQUENTIAL: Int","source_path":"stdlib/os.kn","line":754,"attributes":[],"docs":[],"target_notes":[]},{"name":"MADV_WILLNEED","qualified_name":"std::os::MADV_WILLNEED","kind":"const","visibility":"public","signature":"const MADV_WILLNEED: Int","source_path":"stdlib/os.kn","line":755,"attributes":[],"docs":[],"target_notes":[]},{"name":"MADV_DONTNEED","qualified_name":"std::os::MADV_DONTNEED","kind":"const","visibility":"public","signature":"const MADV_DONTNEED: Int","source_path":"stdlib/os.kn","line":756,"attributes":[],"docs":[],"target_notes":[]},{"name":"MADV_FREE","qualified_name":"std::os::MADV_FREE","kind":"const","visibility":"public","signature":"const MADV_FREE: Int","source_path":"stdlib/os.kn","line":757,"attributes":[],"docs":[],"target_notes":[]},{"name":"MADV_HUGEPAGE","qualified_name":"std::os::MADV_HUGEPAGE","kind":"const","visibility":"public","signature":"const MADV_HUGEPAGE: Int","source_path":"stdlib/os.kn","line":758,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_mmap_anon","qualified_name":"std::os::os_mmap_anon","kind":"function","visibility":"public","signature":"fn os_mmap_anon(byte_count: Int) -> Int","source_path":"stdlib/os.kn","line":761,"attributes":[],"docs":["─── Map anonymous memory ────────────────────────────────────────────────"],"target_notes":[]},{"name":"os_mmap_anon_prot","qualified_name":"std::os::os_mmap_anon_prot","kind":"function","visibility":"public","signature":"fn os_mmap_anon_prot(byte_count: Int, prot: Int) -> Int","source_path":"stdlib/os.kn","line":764,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_mmap_anon_flags","qualified_name":"std::os::os_mmap_anon_flags","kind":"function","visibility":"public","signature":"fn os_mmap_anon_flags(byte_count: Int, prot: Int, flags: Int) -> Int","source_path":"stdlib/os.kn","line":767,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_mmap_file","qualified_name":"std::os::os_mmap_file","kind":"function","visibility":"public","signature":"fn os_mmap_file(byte_count: Int, prot: Int, flags: Int, fd: Int, offset: Int) -> Int","source_path":"stdlib/os.kn","line":771,"attributes":[],"docs":["─── Map a file into memory (zero-copy file I/O) ────────────────────────"],"target_notes":[]},{"name":"os_mmap_file_read","qualified_name":"std::os::os_mmap_file_read","kind":"function","visibility":"public","signature":"fn os_mmap_file_read(path: String) -> (Int, Int)","source_path":"stdlib/os.kn","line":774,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_munmap","qualified_name":"std::os::os_munmap","kind":"function","visibility":"public","signature":"fn os_munmap(addr: Int, byte_count: Int) -> Bool","source_path":"stdlib/os.kn","line":789,"attributes":[],"docs":["─── Tear down a mapping ─────────────────────────────────────────────────"],"target_notes":[]},{"name":"os_mprotect","qualified_name":"std::os::os_mprotect","kind":"function","visibility":"public","signature":"fn os_mprotect(addr: Int, byte_count: Int, prot: Int) -> Bool","source_path":"stdlib/os.kn","line":793,"attributes":[],"docs":["─── Change page protection (JIT code pages, sandboxing) ────────────────"],"target_notes":[]},{"name":"os_make_rwx","qualified_name":"std::os::os_make_rwx","kind":"function","visibility":"public","signature":"fn os_make_rwx(addr: Int, byte_count: Int) -> Bool","source_path":"stdlib/os.kn","line":796,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_make_rx","qualified_name":"std::os::os_make_rx","kind":"function","visibility":"public","signature":"fn os_make_rx(addr: Int, byte_count: Int) -> Bool","source_path":"stdlib/os.kn","line":799,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_madvise","qualified_name":"std::os::os_madvise","kind":"function","visibility":"public","signature":"fn os_madvise(addr: Int, byte_count: Int, advice: Int) -> Bool","source_path":"stdlib/os.kn","line":803,"attributes":[],"docs":["─── Memory advice ───────────────────────────────────────────────────────"],"target_notes":[]},{"name":"os_madvise_sequential","qualified_name":"std::os::os_madvise_sequential","kind":"function","visibility":"public","signature":"fn os_madvise_sequential(addr: Int, byte_count: Int) -> Bool","source_path":"stdlib/os.kn","line":806,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_madvise_willneed","qualified_name":"std::os::os_madvise_willneed","kind":"function","visibility":"public","signature":"fn os_madvise_willneed(addr: Int, byte_count: Int) -> Bool","source_path":"stdlib/os.kn","line":809,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_madvise_dontneed","qualified_name":"std::os::os_madvise_dontneed","kind":"function","visibility":"public","signature":"fn os_madvise_dontneed(addr: Int, byte_count: Int) -> Bool","source_path":"stdlib/os.kn","line":812,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_madvise_hugepage","qualified_name":"std::os::os_madvise_hugepage","kind":"function","visibility":"public","signature":"fn os_madvise_hugepage(addr: Int, byte_count: Int) -> Bool","source_path":"stdlib/os.kn","line":815,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_msync","qualified_name":"std::os::os_msync","kind":"function","visibility":"public","signature":"fn os_msync(addr: Int, byte_count: Int) -> Bool","source_path":"stdlib/os.kn","line":819,"attributes":[],"docs":["─── Synchronize & lock ──────────────────────────────────────────────────"],"target_notes":[]},{"name":"os_mlock","qualified_name":"std::os::os_mlock","kind":"function","visibility":"public","signature":"fn os_mlock(addr: Int, byte_count: Int) -> Bool","source_path":"stdlib/os.kn","line":822,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_munlock","qualified_name":"std::os::os_munlock","kind":"function","visibility":"public","signature":"fn os_munlock(addr: Int, byte_count: Int) -> Bool","source_path":"stdlib/os.kn","line":825,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_fork","qualified_name":"std::os::os_fork","kind":"function","visibility":"public","signature":"fn os_fork() -> Int","source_path":"stdlib/os.kn","line":834,"attributes":[],"docs":["============================================================================","SECTION 13: Process Primitives","============================================================================","fork / execve / waitpid — raw process control.","Bypasses the shell path (cmd.exe /c, /bin/sh -c) entirely."],"target_notes":[]},{"name":"os_execve","qualified_name":"std::os::os_execve","kind":"function","visibility":"public","signature":"fn os_execve(path: String, argv: Array, envp: Array) -> Int","source_path":"stdlib/os.kn","line":838,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_waitpid","qualified_name":"std::os::os_waitpid","kind":"function","visibility":"public","signature":"fn os_waitpid(pid: Int, options: Int) -> Int","source_path":"stdlib/os.kn","line":845,"attributes":[],"docs":[],"target_notes":[]},{"name":"WNOHANG","qualified_name":"std::os::WNOHANG","kind":"const","visibility":"public","signature":"const WNOHANG: Int","source_path":"stdlib/os.kn","line":850,"attributes":[],"docs":["waitpid constants"],"target_notes":[]},{"name":"WUNTRACED","qualified_name":"std::os::WUNTRACED","kind":"const","visibility":"public","signature":"const WUNTRACED: Int","source_path":"stdlib/os.kn","line":851,"attributes":[],"docs":[],"target_notes":[]},{"name":"WCONTINUED","qualified_name":"std::os::WCONTINUED","kind":"const","visibility":"public","signature":"const WCONTINUED: Int","source_path":"stdlib/os.kn","line":852,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_waitpid_block","qualified_name":"std::os::os_waitpid_block","kind":"function","visibility":"public","signature":"fn os_waitpid_block(pid: Int) -> (Int, Int)","source_path":"stdlib/os.kn","line":854,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_waitpid_nohang","qualified_name":"std::os::os_waitpid_nohang","kind":"function","visibility":"public","signature":"fn os_waitpid_nohang(pid: Int) -> (Int, Int)","source_path":"stdlib/os.kn","line":864,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_io_uring_setup","qualified_name":"std::os::os_io_uring_setup","kind":"function","visibility":"public","signature":"fn os_io_uring_setup(entries: Int) -> Int","source_path":"stdlib/os.kn","line":883,"attributes":[],"docs":["============================================================================","SECTION 14: io_uring (Linux >= 5.1)","============================================================================","Kernel-side async I/O submission.","No threads, no blocking, no libuv — just an SQ and CQ ring buffer.","This is the primitive that makes \"actors are lightweight\" real."],"target_notes":[]},{"name":"os_io_uring_enter","qualified_name":"std::os::os_io_uring_enter","kind":"function","visibility":"public","signature":"fn os_io_uring_enter(ring_fd: Int, to_submit: Int, min_complete: Int) -> Int","source_path":"stdlib/os.kn","line":886,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"os_path","import_path":"std::os_path","source_path":"stdlib/os_path.kn","parse_status":{"status":"parsed"},"docs":["============================================================================","std::os::path — Path Manipulation Powerhouse","============================================================================","Python os.path + pathlib vibes, Kain performance.","Extends std::path with richer cross-platform path operations.","","Usage:","use std::os::path","let full = os_path_join(\"a\", \"b\", \"c.txt\") // \"a/b/c.txt\"","let (dir, name) = os_path_split(full) // (\"a/b\", \"c.txt\")","let ext = os_path_splitext(\"file.tar.gz\") // (\"file.tar\", \".gz\")","if os_path_exists(\"/some/path\"): ...","","Architecture note:","This is the Kain equivalent of os_path_*.kn → std::os::path.","The underscore convention maps to :: in the import path.","============================================================================"],"symbols":[{"name":"os_path_sep","qualified_name":"std::os_path::os_path_sep","kind":"function","visibility":"public","signature":"fn os_path_sep() -> String","source_path":"stdlib/os_path.kn","line":28,"attributes":[],"docs":["============================================================================","SECTION 1: Path Constants & Separators","============================================================================"],"target_notes":[]},{"name":"os_path_altsep","qualified_name":"std::os_path::os_path_altsep","kind":"function","visibility":"public","signature":"fn os_path_altsep() -> String","source_path":"stdlib/os_path.kn","line":31,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_path_extsep","qualified_name":"std::os_path::os_path_extsep","kind":"function","visibility":"public","signature":"fn os_path_extsep() -> String","source_path":"stdlib/os_path.kn","line":41,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_path_pathsep","qualified_name":"std::os_path::os_path_pathsep","kind":"function","visibility":"public","signature":"fn os_path_pathsep() -> String","source_path":"stdlib/os_path.kn","line":44,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_path_devnull","qualified_name":"std::os_path::os_path_devnull","kind":"function","visibility":"public","signature":"fn os_path_devnull() -> String","source_path":"stdlib/os_path.kn","line":47,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_path_join","qualified_name":"std::os_path::os_path_join","kind":"function","visibility":"public","signature":"fn os_path_join(a: String, b: String) -> String","source_path":"stdlib/os_path.kn","line":60,"attributes":[],"docs":["─── join(components...) → combined path ─────────────────────────────────"],"target_notes":[]},{"name":"os_path_split","qualified_name":"std::os_path::os_path_split","kind":"function","visibility":"public","signature":"fn os_path_split(path: String) -> (String, String)","source_path":"stdlib/os_path.kn","line":64,"attributes":[],"docs":["─── split(path) → (head, tail) ──────────────────────────────────────────"],"target_notes":[]},{"name":"os_path_dirname","qualified_name":"std::os_path::os_path_dirname","kind":"function","visibility":"public","signature":"fn os_path_dirname(path: String) -> String","source_path":"stdlib/os_path.kn","line":70,"attributes":[],"docs":["─── dirname / basename ──────────────────────────────────────────────────"],"target_notes":[]},{"name":"os_path_basename","qualified_name":"std::os_path::os_path_basename","kind":"function","visibility":"public","signature":"fn os_path_basename(path: String) -> String","source_path":"stdlib/os_path.kn","line":73,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_path_splitext","qualified_name":"std::os_path::os_path_splitext","kind":"function","visibility":"public","signature":"fn os_path_splitext(path: String) -> (String, String)","source_path":"stdlib/os_path.kn","line":78,"attributes":[],"docs":["─── splitext(path) → (root, ext) ────────────────────────────────────────","\"file.tar.gz\" → (\"file.tar\", \".gz\")"],"target_notes":[]},{"name":"os_path_splitdrive","qualified_name":"std::os_path::os_path_splitdrive","kind":"function","visibility":"public","signature":"fn os_path_splitdrive(path: String) -> (String, String)","source_path":"stdlib/os_path.kn","line":103,"attributes":[],"docs":["─── splitdrive(path) → (drive, tail) ────────────────────────────────────","Windows: \"C:/foo\" → (\"C:\", \"/foo\")","Linux: \"/foo\" → (\"\", \"/foo\")"],"target_notes":[]},{"name":"os_path_commonpath","qualified_name":"std::os_path::os_path_commonpath","kind":"function","visibility":"public","signature":"fn os_path_commonpath(paths: Array) -> String","source_path":"stdlib/os_path.kn","line":111,"attributes":[],"docs":["─── commonpath(paths) → longest common parent ───────────────────────────"],"target_notes":[]},{"name":"os_path_split_components","qualified_name":"std::os_path::os_path_split_components","kind":"function","visibility":"private","signature":"fn os_path_split_components(path: String) -> Array","source_path":"stdlib/os_path.kn","line":162,"attributes":[],"docs":["─── split_components(path) → Array of path parts ────────────────────────"],"target_notes":[]},{"name":"os_path_normpath","qualified_name":"std::os_path::os_path_normpath","kind":"function","visibility":"public","signature":"fn os_path_normpath(path: String) -> String","source_path":"stdlib/os_path.kn","line":194,"attributes":[],"docs":["─── normpath(path) → clean normalized path ──────────────────────────────","\"a//b/./c/../d\" → \"a/b/d\""],"target_notes":[]},{"name":"os_path_abspath","qualified_name":"std::os_path::os_path_abspath","kind":"function","visibility":"public","signature":"fn os_path_abspath(path: String) -> String","source_path":"stdlib/os_path.kn","line":237,"attributes":[],"docs":["─── abspath(path) → absolute path ───────────────────────────────────────"],"target_notes":[]},{"name":"os_path_getcwd","qualified_name":"std::os_path::os_path_getcwd","kind":"function","visibility":"private","signature":"fn os_path_getcwd() -> String","source_path":"stdlib/os_path.kn","line":245,"attributes":[],"docs":["Helper: getcwd (uses process module to avoid duplicate @extern)"],"target_notes":[]},{"name":"os_path_relpath","qualified_name":"std::os_path::os_path_relpath","kind":"function","visibility":"public","signature":"fn os_path_relpath(path: String, start: String) -> String","source_path":"stdlib/os_path.kn","line":249,"attributes":[],"docs":["─── relpath(path, start) → relative path ────────────────────────────────"],"target_notes":[]},{"name":"os_path_realpath","qualified_name":"std::os_path::os_path_realpath","kind":"function","visibility":"public","signature":"fn os_path_realpath(path: String) -> String","source_path":"stdlib/os_path.kn","line":288,"attributes":[],"docs":["─── realpath(path) → canonical absolute path with symlinks resolved ─────"],"target_notes":[]},{"name":"os_path_isabs","qualified_name":"std::os_path::os_path_isabs","kind":"function","visibility":"public","signature":"fn os_path_isabs(path: String) -> Bool","source_path":"stdlib/os_path.kn","line":296,"attributes":[],"docs":["============================================================================","SECTION 4: Path Predicates","============================================================================"],"target_notes":[]},{"name":"os_path_exists","qualified_name":"std::os_path::os_path_exists","kind":"function","visibility":"public","signature":"fn os_path_exists(path: String) -> Bool","source_path":"stdlib/os_path.kn","line":299,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_path_isfile","qualified_name":"std::os_path::os_path_isfile","kind":"function","visibility":"public","signature":"fn os_path_isfile(path: String) -> Bool","source_path":"stdlib/os_path.kn","line":302,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_path_isdir","qualified_name":"std::os_path::os_path_isdir","kind":"function","visibility":"public","signature":"fn os_path_isdir(path: String) -> Bool","source_path":"stdlib/os_path.kn","line":305,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_path_ismount","qualified_name":"std::os_path::os_path_ismount","kind":"function","visibility":"public","signature":"fn os_path_ismount(path: String) -> Bool","source_path":"stdlib/os_path.kn","line":309,"attributes":[],"docs":["─── ismount ─────────────────────────────────────────────────────────────"],"target_notes":[]},{"name":"os_path_islink","qualified_name":"std::os_path::os_path_islink","kind":"function","visibility":"public","signature":"fn os_path_islink(path: String) -> Bool","source_path":"stdlib/os_path.kn","line":325,"attributes":[],"docs":["─── islink ──────────────────────────────────────────────────────────────"],"target_notes":[]},{"name":"os_path_samefile","qualified_name":"std::os_path::os_path_samefile","kind":"function","visibility":"public","signature":"fn os_path_samefile(path_a: String, path_b: String) -> Bool","source_path":"stdlib/os_path.kn","line":331,"attributes":[],"docs":["─── samefile ────────────────────────────────────────────────────────────"],"target_notes":[]},{"name":"os_path_getsize","qualified_name":"std::os_path::os_path_getsize","kind":"function","visibility":"public","signature":"fn os_path_getsize(path: String) -> Int","source_path":"stdlib/os_path.kn","line":340,"attributes":[],"docs":["============================================================================","SECTION 5: Path Metadata","============================================================================"],"target_notes":[]},{"name":"os_path_getmtime","qualified_name":"std::os_path::os_path_getmtime","kind":"function","visibility":"public","signature":"fn os_path_getmtime(path: String) -> Int","source_path":"stdlib/os_path.kn","line":344,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_path_getctime","qualified_name":"std::os_path::os_path_getctime","kind":"function","visibility":"public","signature":"fn os_path_getctime(path: String) -> Int","source_path":"stdlib/os_path.kn","line":348,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_path_getatime","qualified_name":"std::os_path::os_path_getatime","kind":"function","visibility":"public","signature":"fn os_path_getatime(path: String) -> Int","source_path":"stdlib/os_path.kn","line":352,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_path_expanduser","qualified_name":"std::os_path::os_path_expanduser","kind":"function","visibility":"public","signature":"fn os_path_expanduser(path: String) -> String","source_path":"stdlib/os_path.kn","line":361,"attributes":[],"docs":["─── expanduser(path) → expand ~ and ~user ───────────────────────────────"],"target_notes":[]},{"name":"os_path_expandvars","qualified_name":"std::os_path::os_path_expandvars","kind":"function","visibility":"public","signature":"fn os_path_expandvars(path: String) -> String","source_path":"stdlib/os_path.kn","line":392,"attributes":[],"docs":["─── expandvars(path) → expand $VAR / %VAR% ──────────────────────────────"],"target_notes":[]},{"name":"_is_path_var_char","qualified_name":"std::os_path::_is_path_var_char","kind":"function","visibility":"private","signature":"fn _is_path_var_char(ch: String) -> Bool","source_path":"stdlib/os_path.kn","line":445,"attributes":[],"docs":[],"target_notes":[]},{"name":"os_path_getenv","qualified_name":"std::os_path::os_path_getenv","kind":"function","visibility":"private","signature":"fn os_path_getenv(key: String) -> String","source_path":"stdlib/os_path.kn","line":449,"attributes":[],"docs":["Helper: getenv (forward to process module)"],"target_notes":[]},{"name":"os_path_with_suffix","qualified_name":"std::os_path::os_path_with_suffix","kind":"function","visibility":"public","signature":"fn os_path_with_suffix(path: String, suffix: String) -> String","source_path":"stdlib/os_path.kn","line":457,"attributes":[],"docs":["─── with_suffix(path, new_suffix) → path with extension swapped ─────────"],"target_notes":[]},{"name":"os_path_with_name","qualified_name":"std::os_path::os_path_with_name","kind":"function","visibility":"public","signature":"fn os_path_with_name(path: String, name: String) -> String","source_path":"stdlib/os_path.kn","line":462,"attributes":[],"docs":["─── with_name(path, new_name) → path with filename swapped ──────────────"],"target_notes":[]},{"name":"os_path_with_stem","qualified_name":"std::os_path::os_path_with_stem","kind":"function","visibility":"public","signature":"fn os_path_with_stem(path: String, stem: String) -> String","source_path":"stdlib/os_path.kn","line":469,"attributes":[],"docs":["─── with_stem(path, new_stem) → keep extension, swap stem ───────────────"],"target_notes":[]},{"name":"_ospath_meta_field","qualified_name":"std::os_path::_ospath_meta_field","kind":"function","visibility":"private","signature":"fn _ospath_meta_field(text: String, key: String) -> String","source_path":"stdlib/os_path.kn","line":477,"attributes":[],"docs":["============================================================================","INTERNAL: Metadata Helpers","============================================================================"],"target_notes":[]},{"name":"_ospath_meta_int","qualified_name":"std::os_path::_ospath_meta_int","kind":"function","visibility":"private","signature":"fn _ospath_meta_int(text: String, key: String) -> Int","source_path":"stdlib/os_path.kn","line":500,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"path","import_path":"std::path","source_path":"stdlib/path.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"path_sep","qualified_name":"std::path::path_sep","kind":"function","visibility":"public","signature":"fn path_sep() -> String","source_path":"stdlib/path.kn","line":3,"attributes":[],"docs":[],"target_notes":[]},{"name":"path_delimiter","qualified_name":"std::path::path_delimiter","kind":"function","visibility":"public","signature":"fn path_delimiter() -> String","source_path":"stdlib/path.kn","line":11,"attributes":[],"docs":[],"target_notes":[]},{"name":"path_is_absolute","qualified_name":"std::path::path_is_absolute","kind":"function","visibility":"public","signature":"fn path_is_absolute(path: String) -> Bool","source_path":"stdlib/path.kn","line":19,"attributes":[],"docs":[],"target_notes":[]},{"name":"path_join","qualified_name":"std::path::path_join","kind":"function","visibility":"public","signature":"fn path_join(base: String, child: String) -> String","source_path":"stdlib/path.kn","line":35,"attributes":[],"docs":[],"target_notes":[]},{"name":"path_parent","qualified_name":"std::path::path_parent","kind":"function","visibility":"public","signature":"fn path_parent(path: String) -> String","source_path":"stdlib/path.kn","line":52,"attributes":[],"docs":[],"target_notes":[]},{"name":"path_file_name","qualified_name":"std::path::path_file_name","kind":"function","visibility":"public","signature":"fn path_file_name(path: String) -> String","source_path":"stdlib/path.kn","line":66,"attributes":[],"docs":[],"target_notes":[]},{"name":"path_extension","qualified_name":"std::path::path_extension","kind":"function","visibility":"public","signature":"fn path_extension(path: String) -> String","source_path":"stdlib/path.kn","line":78,"attributes":[],"docs":[],"target_notes":[]},{"name":"path_stem","qualified_name":"std::path::path_stem","kind":"function","visibility":"public","signature":"fn path_stem(path: String) -> String","source_path":"stdlib/path.kn","line":102,"attributes":[],"docs":[],"target_notes":[]},{"name":"path_normalize","qualified_name":"std::path::path_normalize","kind":"function","visibility":"public","signature":"fn path_normalize(path: String) -> String","source_path":"stdlib/path.kn","line":126,"attributes":[],"docs":[],"target_notes":[]},{"name":"path_canonicalize","qualified_name":"std::path::path_canonicalize","kind":"function","visibility":"public","signature":"fn path_canonicalize(path: String) -> String","source_path":"stdlib/path.kn","line":193,"attributes":[],"docs":[],"target_notes":[]},{"name":"path_split","qualified_name":"std::path::path_split","kind":"function","visibility":"public","signature":"fn path_split(path: String) -> Array","source_path":"stdlib/path.kn","line":260,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"platform","import_path":"std::platform","source_path":"stdlib/platform.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"abi_platform_current_kind","qualified_name":"std::platform::abi_platform_current_kind","kind":"extern_function","visibility":"private","signature":"fn abi_platform_current_kind() -> Int","source_path":"stdlib/platform.kn","line":2,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_platform_current_name","qualified_name":"std::platform::abi_platform_current_name","kind":"extern_function","visibility":"private","signature":"fn abi_platform_current_name() -> String","source_path":"stdlib/platform.kn","line":5,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_platform_current_service_mask","qualified_name":"std::platform::abi_platform_current_service_mask","kind":"extern_function","visibility":"private","signature":"fn abi_platform_current_service_mask() -> Int","source_path":"stdlib/platform.kn","line":8,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_platform_current_optional_service_mask","qualified_name":"std::platform::abi_platform_current_optional_service_mask","kind":"extern_function","visibility":"private","signature":"fn abi_platform_current_optional_service_mask() -> Int","source_path":"stdlib/platform.kn","line":11,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_platform_library_open","qualified_name":"std::platform::abi_platform_library_open","kind":"extern_function","visibility":"private","signature":"fn abi_platform_library_open(path: String) -> Int","source_path":"stdlib/platform.kn","line":14,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_platform_library_close","qualified_name":"std::platform::abi_platform_library_close","kind":"extern_function","visibility":"private","signature":"fn abi_platform_library_close(handle: Int) -> Int","source_path":"stdlib/platform.kn","line":17,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_platform_library_resolve","qualified_name":"std::platform::abi_platform_library_resolve","kind":"extern_function","visibility":"private","signature":"fn abi_platform_library_resolve(handle: Int, symbol_name: String) -> Int","source_path":"stdlib/platform.kn","line":20,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_platform_library_is_valid","qualified_name":"std::platform::abi_platform_library_is_valid","kind":"extern_function","visibility":"private","signature":"fn abi_platform_library_is_valid(handle: Int) -> Int","source_path":"stdlib/platform.kn","line":23,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_platform_library_live_count","qualified_name":"std::platform::abi_platform_library_live_count","kind":"extern_function","visibility":"private","signature":"fn abi_platform_library_live_count() -> Int","source_path":"stdlib/platform.kn","line":26,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_platform_library_last_status","qualified_name":"std::platform::abi_platform_library_last_status","kind":"extern_function","visibility":"private","signature":"fn abi_platform_library_last_status() -> Int","source_path":"stdlib/platform.kn","line":29,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_platform_library_last_error_kind","qualified_name":"std::platform::abi_platform_library_last_error_kind","kind":"extern_function","visibility":"private","signature":"fn abi_platform_library_last_error_kind() -> String","source_path":"stdlib/platform.kn","line":32,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_platform_library_last_error_message","qualified_name":"std::platform::abi_platform_library_last_error_message","kind":"extern_function","visibility":"private","signature":"fn abi_platform_library_last_error_message() -> String","source_path":"stdlib/platform.kn","line":35,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"native_platform_current_kind","qualified_name":"std::platform::native_platform_current_kind","kind":"function","visibility":"public","signature":"fn native_platform_current_kind() -> Int","source_path":"stdlib/platform.kn","line":37,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_platform_current_name","qualified_name":"std::platform::native_platform_current_name","kind":"function","visibility":"public","signature":"fn native_platform_current_name() -> String","source_path":"stdlib/platform.kn","line":40,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_platform_current_service_mask","qualified_name":"std::platform::native_platform_current_service_mask","kind":"function","visibility":"public","signature":"fn native_platform_current_service_mask() -> Int","source_path":"stdlib/platform.kn","line":43,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_platform_current_optional_service_mask","qualified_name":"std::platform::native_platform_current_optional_service_mask","kind":"function","visibility":"public","signature":"fn native_platform_current_optional_service_mask() -> Int","source_path":"stdlib/platform.kn","line":46,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_platform_library_open","qualified_name":"std::platform::native_platform_library_open","kind":"function","visibility":"public","signature":"fn native_platform_library_open(path: String) -> Int","source_path":"stdlib/platform.kn","line":49,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_platform_library_close","qualified_name":"std::platform::native_platform_library_close","kind":"function","visibility":"public","signature":"fn native_platform_library_close(handle: Int) -> Int","source_path":"stdlib/platform.kn","line":52,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_platform_library_resolve","qualified_name":"std::platform::native_platform_library_resolve","kind":"function","visibility":"public","signature":"fn native_platform_library_resolve(handle: Int, symbol_name: String) -> Int","source_path":"stdlib/platform.kn","line":55,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_platform_library_is_valid","qualified_name":"std::platform::native_platform_library_is_valid","kind":"function","visibility":"public","signature":"fn native_platform_library_is_valid(handle: Int) -> Bool","source_path":"stdlib/platform.kn","line":58,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_platform_library_live_count","qualified_name":"std::platform::native_platform_library_live_count","kind":"function","visibility":"public","signature":"fn native_platform_library_live_count() -> Int","source_path":"stdlib/platform.kn","line":61,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_platform_library_last_status","qualified_name":"std::platform::native_platform_library_last_status","kind":"function","visibility":"public","signature":"fn native_platform_library_last_status() -> Int","source_path":"stdlib/platform.kn","line":64,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_platform_library_last_error_kind","qualified_name":"std::platform::native_platform_library_last_error_kind","kind":"function","visibility":"public","signature":"fn native_platform_library_last_error_kind() -> String","source_path":"stdlib/platform.kn","line":67,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_platform_library_last_error_message","qualified_name":"std::platform::native_platform_library_last_error_message","kind":"function","visibility":"public","signature":"fn native_platform_library_last_error_message() -> String","source_path":"stdlib/platform.kn","line":70,"attributes":[],"docs":[],"target_notes":[]},{"name":"platform_current_kind","qualified_name":"std::platform::platform_current_kind","kind":"function","visibility":"public","signature":"fn platform_current_kind() -> Int","source_path":"stdlib/platform.kn","line":74,"attributes":[],"docs":[],"target_notes":[]},{"name":"platform_current_name","qualified_name":"std::platform::platform_current_name","kind":"function","visibility":"public","signature":"fn platform_current_name() -> String","source_path":"stdlib/platform.kn","line":77,"attributes":[],"docs":[],"target_notes":[]},{"name":"platform_current_service_mask","qualified_name":"std::platform::platform_current_service_mask","kind":"function","visibility":"public","signature":"fn platform_current_service_mask() -> Int","source_path":"stdlib/platform.kn","line":80,"attributes":[],"docs":[],"target_notes":[]},{"name":"platform_current_optional_service_mask","qualified_name":"std::platform::platform_current_optional_service_mask","kind":"function","visibility":"public","signature":"fn platform_current_optional_service_mask() -> Int","source_path":"stdlib/platform.kn","line":83,"attributes":[],"docs":[],"target_notes":[]},{"name":"platform_library_open","qualified_name":"std::platform::platform_library_open","kind":"function","visibility":"public","signature":"fn platform_library_open(path: String) -> Int","source_path":"stdlib/platform.kn","line":86,"attributes":[],"docs":[],"target_notes":[]},{"name":"platform_library_close","qualified_name":"std::platform::platform_library_close","kind":"function","visibility":"public","signature":"fn platform_library_close(handle: Int) -> Int","source_path":"stdlib/platform.kn","line":89,"attributes":[],"docs":[],"target_notes":[]},{"name":"platform_library_resolve","qualified_name":"std::platform::platform_library_resolve","kind":"function","visibility":"public","signature":"fn platform_library_resolve(handle: Int, symbol_name: String) -> Int","source_path":"stdlib/platform.kn","line":92,"attributes":[],"docs":[],"target_notes":[]},{"name":"platform_library_is_valid","qualified_name":"std::platform::platform_library_is_valid","kind":"function","visibility":"public","signature":"fn platform_library_is_valid(handle: Int) -> Bool","source_path":"stdlib/platform.kn","line":95,"attributes":[],"docs":[],"target_notes":[]},{"name":"platform_library_live_count","qualified_name":"std::platform::platform_library_live_count","kind":"function","visibility":"public","signature":"fn platform_library_live_count() -> Int","source_path":"stdlib/platform.kn","line":98,"attributes":[],"docs":[],"target_notes":[]},{"name":"platform_library_last_status","qualified_name":"std::platform::platform_library_last_status","kind":"function","visibility":"public","signature":"fn platform_library_last_status() -> Int","source_path":"stdlib/platform.kn","line":101,"attributes":[],"docs":[],"target_notes":[]},{"name":"platform_library_last_error_kind","qualified_name":"std::platform::platform_library_last_error_kind","kind":"function","visibility":"public","signature":"fn platform_library_last_error_kind() -> String","source_path":"stdlib/platform.kn","line":104,"attributes":[],"docs":[],"target_notes":[]},{"name":"platform_library_last_error_message","qualified_name":"std::platform::platform_library_last_error_message","kind":"function","visibility":"public","signature":"fn platform_library_last_error_message() -> String","source_path":"stdlib/platform.kn","line":107,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"process","import_path":"std::process","source_path":"stdlib/process.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"abi_process_reset","qualified_name":"std::process::abi_process_reset","kind":"extern_function","visibility":"private","signature":"fn abi_process_reset() -> Int","source_path":"stdlib/process.kn","line":6,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_process_platform_available","qualified_name":"std::process::abi_process_platform_available","kind":"extern_function","visibility":"private","signature":"fn abi_process_platform_available() -> Int","source_path":"stdlib/process.kn","line":9,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_process_arg_count","qualified_name":"std::process::abi_process_arg_count","kind":"extern_function","visibility":"private","signature":"fn abi_process_arg_count() -> Int","source_path":"stdlib/process.kn","line":12,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_process_arg","qualified_name":"std::process::abi_process_arg","kind":"extern_function","visibility":"private","signature":"fn abi_process_arg(index: Int) -> String","source_path":"stdlib/process.kn","line":15,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_process_current_working_directory","qualified_name":"std::process::abi_process_current_working_directory","kind":"extern_function","visibility":"private","signature":"fn abi_process_current_working_directory() -> String","source_path":"stdlib/process.kn","line":18,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_process_environment","qualified_name":"std::process::abi_process_environment","kind":"extern_function","visibility":"private","signature":"fn abi_process_environment(key: String) -> String","source_path":"stdlib/process.kn","line":21,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_process_current_executable_path","qualified_name":"std::process::abi_process_current_executable_path","kind":"extern_function","visibility":"private","signature":"fn abi_process_current_executable_path() -> String","source_path":"stdlib/process.kn","line":24,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_process_current_id","qualified_name":"std::process::abi_process_current_id","kind":"extern_function","visibility":"private","signature":"fn abi_process_current_id() -> Int","source_path":"stdlib/process.kn","line":27,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_process_spec_create","qualified_name":"std::process::abi_process_spec_create","kind":"extern_function","visibility":"private","signature":"fn abi_process_spec_create(executable: String) -> Int","source_path":"stdlib/process.kn","line":30,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_process_spec_destroy","qualified_name":"std::process::abi_process_spec_destroy","kind":"extern_function","visibility":"private","signature":"fn abi_process_spec_destroy(spec_id: Int) -> Int","source_path":"stdlib/process.kn","line":33,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_process_spec_count","qualified_name":"std::process::abi_process_spec_count","kind":"extern_function","visibility":"private","signature":"fn abi_process_spec_count() -> Int","source_path":"stdlib/process.kn","line":36,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_process_spec_add_arg","qualified_name":"std::process::abi_process_spec_add_arg","kind":"extern_function","visibility":"private","signature":"fn abi_process_spec_add_arg(spec_id: Int, argument: String) -> Int","source_path":"stdlib/process.kn","line":39,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_process_spec_set_cwd","qualified_name":"std::process::abi_process_spec_set_cwd","kind":"extern_function","visibility":"private","signature":"fn abi_process_spec_set_cwd(spec_id: Int, cwd_path: String) -> Int","source_path":"stdlib/process.kn","line":42,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_process_spec_set_env","qualified_name":"std::process::abi_process_spec_set_env","kind":"extern_function","visibility":"private","signature":"fn abi_process_spec_set_env(spec_id: Int, key: String, value: String) -> Int","source_path":"stdlib/process.kn","line":45,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_process_spec_set_inherit_environment","qualified_name":"std::process::abi_process_spec_set_inherit_environment","kind":"extern_function","visibility":"private","signature":"fn abi_process_spec_set_inherit_environment(spec_id: Int, enabled: Int) -> Int","source_path":"stdlib/process.kn","line":48,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_process_spec_set_stdin_mode","qualified_name":"std::process::abi_process_spec_set_stdin_mode","kind":"extern_function","visibility":"private","signature":"fn abi_process_spec_set_stdin_mode(spec_id: Int, mode: String) -> Int","source_path":"stdlib/process.kn","line":51,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_process_spec_set_stdout_mode","qualified_name":"std::process::abi_process_spec_set_stdout_mode","kind":"extern_function","visibility":"private","signature":"fn abi_process_spec_set_stdout_mode(spec_id: Int, mode: String) -> Int","source_path":"stdlib/process.kn","line":54,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_process_spec_set_stderr_mode","qualified_name":"std::process::abi_process_spec_set_stderr_mode","kind":"extern_function","visibility":"private","signature":"fn abi_process_spec_set_stderr_mode(spec_id: Int, mode: String) -> Int","source_path":"stdlib/process.kn","line":57,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_process_spawn","qualified_name":"std::process::abi_process_spawn","kind":"extern_function","visibility":"private","signature":"fn abi_process_spawn(spec_id: Int) -> Int","source_path":"stdlib/process.kn","line":60,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_process_spawn_pty","qualified_name":"std::process::abi_process_spawn_pty","kind":"extern_function","visibility":"private","signature":"fn abi_process_spawn_pty(spec_id: Int, columns: Int, rows: Int) -> Int","source_path":"stdlib/process.kn","line":63,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_process_count","qualified_name":"std::process::abi_process_count","kind":"extern_function","visibility":"private","signature":"fn abi_process_count() -> Int","source_path":"stdlib/process.kn","line":66,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_process_close","qualified_name":"std::process::abi_process_close","kind":"extern_function","visibility":"private","signature":"fn abi_process_close(process_id: Int) -> Int","source_path":"stdlib/process.kn","line":69,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_process_poll","qualified_name":"std::process::abi_process_poll","kind":"extern_function","visibility":"private","signature":"fn abi_process_poll(process_id: Int) -> Int","source_path":"stdlib/process.kn","line":72,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_process_wait","qualified_name":"std::process::abi_process_wait","kind":"extern_function","visibility":"private","signature":"fn abi_process_wait(process_id: Int, timeout_ms: Int) -> Int","source_path":"stdlib/process.kn","line":75,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_process_is_running","qualified_name":"std::process::abi_process_is_running","kind":"extern_function","visibility":"private","signature":"fn abi_process_is_running(process_id: Int) -> Int","source_path":"stdlib/process.kn","line":78,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_process_exit_code","qualified_name":"std::process::abi_process_exit_code","kind":"extern_function","visibility":"private","signature":"fn abi_process_exit_code(process_id: Int) -> Int","source_path":"stdlib/process.kn","line":81,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_process_os_pid","qualified_name":"std::process::abi_process_os_pid","kind":"extern_function","visibility":"private","signature":"fn abi_process_os_pid(process_id: Int) -> Int","source_path":"stdlib/process.kn","line":84,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_process_terminate","qualified_name":"std::process::abi_process_terminate","kind":"extern_function","visibility":"private","signature":"fn abi_process_terminate(process_id: Int) -> Int","source_path":"stdlib/process.kn","line":87,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_process_kill","qualified_name":"std::process::abi_process_kill","kind":"extern_function","visibility":"private","signature":"fn abi_process_kill(process_id: Int) -> Int","source_path":"stdlib/process.kn","line":90,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_process_stdin_write_text","qualified_name":"std::process::abi_process_stdin_write_text","kind":"extern_function","visibility":"private","signature":"fn abi_process_stdin_write_text(process_id: Int, text: String) -> Int","source_path":"stdlib/process.kn","line":93,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_process_stdin_write_hex","qualified_name":"std::process::abi_process_stdin_write_hex","kind":"extern_function","visibility":"private","signature":"fn abi_process_stdin_write_hex(process_id: Int, bytes_hex: String) -> Int","source_path":"stdlib/process.kn","line":96,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_process_stdin_close","qualified_name":"std::process::abi_process_stdin_close","kind":"extern_function","visibility":"private","signature":"fn abi_process_stdin_close(process_id: Int) -> Int","source_path":"stdlib/process.kn","line":99,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_process_stdout_read_text","qualified_name":"std::process::abi_process_stdout_read_text","kind":"extern_function","visibility":"private","signature":"fn abi_process_stdout_read_text(process_id: Int) -> String","source_path":"stdlib/process.kn","line":102,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_process_stdout_read_hex","qualified_name":"std::process::abi_process_stdout_read_hex","kind":"extern_function","visibility":"private","signature":"fn abi_process_stdout_read_hex(process_id: Int) -> String","source_path":"stdlib/process.kn","line":105,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_process_stderr_read_text","qualified_name":"std::process::abi_process_stderr_read_text","kind":"extern_function","visibility":"private","signature":"fn abi_process_stderr_read_text(process_id: Int) -> String","source_path":"stdlib/process.kn","line":108,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_process_stderr_read_hex","qualified_name":"std::process::abi_process_stderr_read_hex","kind":"extern_function","visibility":"private","signature":"fn abi_process_stderr_read_hex(process_id: Int) -> String","source_path":"stdlib/process.kn","line":111,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_process_stdout_capture_text","qualified_name":"std::process::abi_process_stdout_capture_text","kind":"extern_function","visibility":"private","signature":"fn abi_process_stdout_capture_text(process_id: Int) -> String","source_path":"stdlib/process.kn","line":114,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_process_stdout_capture_hex","qualified_name":"std::process::abi_process_stdout_capture_hex","kind":"extern_function","visibility":"private","signature":"fn abi_process_stdout_capture_hex(process_id: Int) -> String","source_path":"stdlib/process.kn","line":117,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_process_stderr_capture_text","qualified_name":"std::process::abi_process_stderr_capture_text","kind":"extern_function","visibility":"private","signature":"fn abi_process_stderr_capture_text(process_id: Int) -> String","source_path":"stdlib/process.kn","line":120,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_process_stderr_capture_hex","qualified_name":"std::process::abi_process_stderr_capture_hex","kind":"extern_function","visibility":"private","signature":"fn abi_process_stderr_capture_hex(process_id: Int) -> String","source_path":"stdlib/process.kn","line":123,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_process_pty_write_text","qualified_name":"std::process::abi_process_pty_write_text","kind":"extern_function","visibility":"private","signature":"fn abi_process_pty_write_text(process_id: Int, text: String) -> Int","source_path":"stdlib/process.kn","line":126,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_process_pty_write_hex","qualified_name":"std::process::abi_process_pty_write_hex","kind":"extern_function","visibility":"private","signature":"fn abi_process_pty_write_hex(process_id: Int, bytes_hex: String) -> Int","source_path":"stdlib/process.kn","line":129,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_process_pty_resize","qualified_name":"std::process::abi_process_pty_resize","kind":"extern_function","visibility":"private","signature":"fn abi_process_pty_resize(process_id: Int, columns: Int, rows: Int) -> Int","source_path":"stdlib/process.kn","line":132,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_process_pty_read_text","qualified_name":"std::process::abi_process_pty_read_text","kind":"extern_function","visibility":"private","signature":"fn abi_process_pty_read_text(process_id: Int) -> String","source_path":"stdlib/process.kn","line":135,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_process_pty_read_hex","qualified_name":"std::process::abi_process_pty_read_hex","kind":"extern_function","visibility":"private","signature":"fn abi_process_pty_read_hex(process_id: Int) -> String","source_path":"stdlib/process.kn","line":138,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_process_pty_capture_text","qualified_name":"std::process::abi_process_pty_capture_text","kind":"extern_function","visibility":"private","signature":"fn abi_process_pty_capture_text(process_id: Int) -> String","source_path":"stdlib/process.kn","line":141,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_process_pty_capture_hex","qualified_name":"std::process::abi_process_pty_capture_hex","kind":"extern_function","visibility":"private","signature":"fn abi_process_pty_capture_hex(process_id: Int) -> String","source_path":"stdlib/process.kn","line":144,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_process_output_text","qualified_name":"std::process::abi_process_output_text","kind":"extern_function","visibility":"private","signature":"fn abi_process_output_text(executable: String, arg0: String, arg1: String, arg2: String, timeout_ms: Int) -> String","source_path":"stdlib/process.kn","line":147,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_process_last_status","qualified_name":"std::process::abi_process_last_status","kind":"extern_function","visibility":"private","signature":"fn abi_process_last_status() -> Int","source_path":"stdlib/process.kn","line":150,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_process_last_error_kind","qualified_name":"std::process::abi_process_last_error_kind","kind":"extern_function","visibility":"private","signature":"fn abi_process_last_error_kind() -> String","source_path":"stdlib/process.kn","line":153,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_process_last_error_message","qualified_name":"std::process::abi_process_last_error_message","kind":"extern_function","visibility":"private","signature":"fn abi_process_last_error_message() -> String","source_path":"stdlib/process.kn","line":156,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"process_stdio_inherit","qualified_name":"std::process::process_stdio_inherit","kind":"function","visibility":"public","signature":"fn process_stdio_inherit() -> String","source_path":"stdlib/process.kn","line":158,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_stdio_pipe","qualified_name":"std::process::process_stdio_pipe","kind":"function","visibility":"public","signature":"fn process_stdio_pipe() -> String","source_path":"stdlib/process.kn","line":161,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_stdio_null","qualified_name":"std::process::process_stdio_null","kind":"function","visibility":"public","signature":"fn process_stdio_null() -> String","source_path":"stdlib/process.kn","line":164,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_reset","qualified_name":"std::process::process_reset","kind":"function","visibility":"public","signature":"fn process_reset() -> Int","source_path":"stdlib/process.kn","line":167,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_platform_available","qualified_name":"std::process::process_platform_available","kind":"function","visibility":"public","signature":"fn process_platform_available() -> Int","source_path":"stdlib/process.kn","line":170,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_args_include_executable","qualified_name":"std::process::process_args_include_executable","kind":"function","visibility":"private","signature":"fn process_args_include_executable(arguments: Array) -> Bool","source_path":"stdlib/process.kn","line":173,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_args","qualified_name":"std::process::process_args","kind":"function","visibility":"public","signature":"fn process_args() -> Array","source_path":"stdlib/process.kn","line":190,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_user_args","qualified_name":"std::process::process_user_args","kind":"function","visibility":"public","signature":"fn process_user_args() -> Array","source_path":"stdlib/process.kn","line":199,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_arg_count","qualified_name":"std::process::process_arg_count","kind":"function","visibility":"public","signature":"fn process_arg_count() -> Int","source_path":"stdlib/process.kn","line":213,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_arg","qualified_name":"std::process::process_arg","kind":"function","visibility":"public","signature":"fn process_arg(index: Int) -> String","source_path":"stdlib/process.kn","line":216,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_current_working_directory","qualified_name":"std::process::process_current_working_directory","kind":"function","visibility":"public","signature":"fn process_current_working_directory() -> String","source_path":"stdlib/process.kn","line":219,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_environment","qualified_name":"std::process::process_environment","kind":"function","visibility":"public","signature":"fn process_environment(key: String) -> String","source_path":"stdlib/process.kn","line":222,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_current_executable_path","qualified_name":"std::process::process_current_executable_path","kind":"function","visibility":"public","signature":"fn process_current_executable_path() -> String","source_path":"stdlib/process.kn","line":225,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_current_executable_name","qualified_name":"std::process::process_current_executable_name","kind":"function","visibility":"public","signature":"fn process_current_executable_name() -> String","source_path":"stdlib/process.kn","line":228,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_current_id","qualified_name":"std::process::process_current_id","kind":"function","visibility":"public","signature":"fn process_current_id() -> Int","source_path":"stdlib/process.kn","line":231,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_spec_create","qualified_name":"std::process::process_spec_create","kind":"function","visibility":"public","signature":"fn process_spec_create(executable: String) -> Int","source_path":"stdlib/process.kn","line":234,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_spec_destroy","qualified_name":"std::process::process_spec_destroy","kind":"function","visibility":"public","signature":"fn process_spec_destroy(spec_id: Int) -> Int","source_path":"stdlib/process.kn","line":237,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_spec_count","qualified_name":"std::process::process_spec_count","kind":"function","visibility":"public","signature":"fn process_spec_count() -> Int","source_path":"stdlib/process.kn","line":240,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_spec_add_arg","qualified_name":"std::process::process_spec_add_arg","kind":"function","visibility":"public","signature":"fn process_spec_add_arg(spec_id: Int, argument: String) -> Int","source_path":"stdlib/process.kn","line":243,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_spec_set_cwd","qualified_name":"std::process::process_spec_set_cwd","kind":"function","visibility":"public","signature":"fn process_spec_set_cwd(spec_id: Int, cwd_path: String) -> Int","source_path":"stdlib/process.kn","line":246,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_spec_set_env","qualified_name":"std::process::process_spec_set_env","kind":"function","visibility":"public","signature":"fn process_spec_set_env(spec_id: Int, key: String, value: String) -> Int","source_path":"stdlib/process.kn","line":249,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_spec_set_inherit_environment","qualified_name":"std::process::process_spec_set_inherit_environment","kind":"function","visibility":"public","signature":"fn process_spec_set_inherit_environment(spec_id: Int, enabled: Int) -> Int","source_path":"stdlib/process.kn","line":252,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_spec_set_stdio_modes","qualified_name":"std::process::process_spec_set_stdio_modes","kind":"function","visibility":"public","signature":"fn process_spec_set_stdio_modes(spec_id: Int, stdin_mode: String, stdout_mode: String, stderr_mode: String) -> Int","source_path":"stdlib/process.kn","line":255,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_spec_set_pipe_stdio","qualified_name":"std::process::process_spec_set_pipe_stdio","kind":"function","visibility":"public","signature":"fn process_spec_set_pipe_stdio(spec_id: Int) -> Int","source_path":"stdlib/process.kn","line":264,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_spec_create_piped","qualified_name":"std::process::process_spec_create_piped","kind":"function","visibility":"public","signature":"fn process_spec_create_piped(executable: String) -> Int","source_path":"stdlib/process.kn","line":267,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_spawn","qualified_name":"std::process::process_spawn","kind":"function","visibility":"public","signature":"fn process_spawn(spec_id: Int) -> Int","source_path":"stdlib/process.kn","line":272,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_spawn_pty","qualified_name":"std::process::process_spawn_pty","kind":"function","visibility":"public","signature":"fn process_spawn_pty(spec_id: Int, columns: Int, rows: Int) -> Int","source_path":"stdlib/process.kn","line":275,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_count","qualified_name":"std::process::process_count","kind":"function","visibility":"public","signature":"fn process_count() -> Int","source_path":"stdlib/process.kn","line":278,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_close","qualified_name":"std::process::process_close","kind":"function","visibility":"public","signature":"fn process_close(process_id: Int) -> Int","source_path":"stdlib/process.kn","line":281,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_poll","qualified_name":"std::process::process_poll","kind":"function","visibility":"public","signature":"fn process_poll(process_id: Int) -> Int","source_path":"stdlib/process.kn","line":284,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_wait","qualified_name":"std::process::process_wait","kind":"function","visibility":"public","signature":"fn process_wait(process_id: Int, timeout_ms: Int) -> Int","source_path":"stdlib/process.kn","line":287,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_is_running","qualified_name":"std::process::process_is_running","kind":"function","visibility":"public","signature":"fn process_is_running(process_id: Int) -> Int","source_path":"stdlib/process.kn","line":290,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_exit_code","qualified_name":"std::process::process_exit_code","kind":"function","visibility":"public","signature":"fn process_exit_code(process_id: Int) -> Int","source_path":"stdlib/process.kn","line":293,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_os_pid","qualified_name":"std::process::process_os_pid","kind":"function","visibility":"public","signature":"fn process_os_pid(process_id: Int) -> Int","source_path":"stdlib/process.kn","line":296,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_terminate","qualified_name":"std::process::process_terminate","kind":"function","visibility":"public","signature":"fn process_terminate(process_id: Int) -> Int","source_path":"stdlib/process.kn","line":299,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_kill","qualified_name":"std::process::process_kill","kind":"function","visibility":"public","signature":"fn process_kill(process_id: Int) -> Int","source_path":"stdlib/process.kn","line":302,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_stdin_write_text","qualified_name":"std::process::process_stdin_write_text","kind":"function","visibility":"public","signature":"fn process_stdin_write_text(process_id: Int, text: String) -> Int","source_path":"stdlib/process.kn","line":305,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_stdin_write_hex","qualified_name":"std::process::process_stdin_write_hex","kind":"function","visibility":"public","signature":"fn process_stdin_write_hex(process_id: Int, bytes_hex: String) -> Int","source_path":"stdlib/process.kn","line":308,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_stdin_close","qualified_name":"std::process::process_stdin_close","kind":"function","visibility":"public","signature":"fn process_stdin_close(process_id: Int) -> Int","source_path":"stdlib/process.kn","line":311,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_stdout_read_text","qualified_name":"std::process::process_stdout_read_text","kind":"function","visibility":"public","signature":"fn process_stdout_read_text(process_id: Int) -> String","source_path":"stdlib/process.kn","line":314,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_stdout_buffered_reader","qualified_name":"std::process::process_stdout_buffered_reader","kind":"function","visibility":"public","signature":"fn process_stdout_buffered_reader(process_id: Int, capacity: Int) -> BufferedReader","source_path":"stdlib/process.kn","line":317,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_stdout_read_hex","qualified_name":"std::process::process_stdout_read_hex","kind":"function","visibility":"public","signature":"fn process_stdout_read_hex(process_id: Int) -> String","source_path":"stdlib/process.kn","line":320,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_stderr_read_text","qualified_name":"std::process::process_stderr_read_text","kind":"function","visibility":"public","signature":"fn process_stderr_read_text(process_id: Int) -> String","source_path":"stdlib/process.kn","line":323,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_stderr_buffered_reader","qualified_name":"std::process::process_stderr_buffered_reader","kind":"function","visibility":"public","signature":"fn process_stderr_buffered_reader(process_id: Int, capacity: Int) -> BufferedReader","source_path":"stdlib/process.kn","line":326,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_stderr_read_hex","qualified_name":"std::process::process_stderr_read_hex","kind":"function","visibility":"public","signature":"fn process_stderr_read_hex(process_id: Int) -> String","source_path":"stdlib/process.kn","line":329,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_stdout_capture_text","qualified_name":"std::process::process_stdout_capture_text","kind":"function","visibility":"public","signature":"fn process_stdout_capture_text(process_id: Int) -> String","source_path":"stdlib/process.kn","line":332,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_stdout_capture_hex","qualified_name":"std::process::process_stdout_capture_hex","kind":"function","visibility":"public","signature":"fn process_stdout_capture_hex(process_id: Int) -> String","source_path":"stdlib/process.kn","line":335,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_stderr_capture_text","qualified_name":"std::process::process_stderr_capture_text","kind":"function","visibility":"public","signature":"fn process_stderr_capture_text(process_id: Int) -> String","source_path":"stdlib/process.kn","line":338,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_stderr_capture_hex","qualified_name":"std::process::process_stderr_capture_hex","kind":"function","visibility":"public","signature":"fn process_stderr_capture_hex(process_id: Int) -> String","source_path":"stdlib/process.kn","line":341,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_pty_write_text","qualified_name":"std::process::process_pty_write_text","kind":"function","visibility":"public","signature":"fn process_pty_write_text(process_id: Int, text: String) -> Int","source_path":"stdlib/process.kn","line":344,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_stdin_write_buffered_text","qualified_name":"std::process::process_stdin_write_buffered_text","kind":"function","visibility":"public","signature":"fn process_stdin_write_buffered_text(process_id: Int, writer: BufferedWriter) -> Int","source_path":"stdlib/process.kn","line":347,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_pty_write_hex","qualified_name":"std::process::process_pty_write_hex","kind":"function","visibility":"public","signature":"fn process_pty_write_hex(process_id: Int, bytes_hex: String) -> Int","source_path":"stdlib/process.kn","line":350,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_pty_write_buffered_text","qualified_name":"std::process::process_pty_write_buffered_text","kind":"function","visibility":"public","signature":"fn process_pty_write_buffered_text(process_id: Int, writer: BufferedWriter) -> Int","source_path":"stdlib/process.kn","line":353,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_pty_resize","qualified_name":"std::process::process_pty_resize","kind":"function","visibility":"public","signature":"fn process_pty_resize(process_id: Int, columns: Int, rows: Int) -> Int","source_path":"stdlib/process.kn","line":356,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_pty_read_text","qualified_name":"std::process::process_pty_read_text","kind":"function","visibility":"public","signature":"fn process_pty_read_text(process_id: Int) -> String","source_path":"stdlib/process.kn","line":359,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_pty_buffered_reader","qualified_name":"std::process::process_pty_buffered_reader","kind":"function","visibility":"public","signature":"fn process_pty_buffered_reader(process_id: Int, capacity: Int) -> BufferedReader","source_path":"stdlib/process.kn","line":362,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_pty_read_hex","qualified_name":"std::process::process_pty_read_hex","kind":"function","visibility":"public","signature":"fn process_pty_read_hex(process_id: Int) -> String","source_path":"stdlib/process.kn","line":365,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_pty_capture_text","qualified_name":"std::process::process_pty_capture_text","kind":"function","visibility":"public","signature":"fn process_pty_capture_text(process_id: Int) -> String","source_path":"stdlib/process.kn","line":368,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_pty_capture_hex","qualified_name":"std::process::process_pty_capture_hex","kind":"function","visibility":"public","signature":"fn process_pty_capture_hex(process_id: Int) -> String","source_path":"stdlib/process.kn","line":371,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_output_text","qualified_name":"std::process::process_output_text","kind":"function","visibility":"public","signature":"fn process_output_text(executable: String, arg0: String, arg1: String, arg2: String, timeout_ms: Int) -> String","source_path":"stdlib/process.kn","line":374,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_collect_output_until_exit","qualified_name":"std::process::process_collect_output_until_exit","kind":"function","visibility":"public","signature":"fn process_collect_output_until_exit(process_id: Int, timeout_ms: Int, poll_sleep_ms: Int) -> Int","source_path":"stdlib/process.kn","line":377,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_last_status","qualified_name":"std::process::process_last_status","kind":"function","visibility":"public","signature":"fn process_last_status() -> Int","source_path":"stdlib/process.kn","line":392,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_last_error_kind","qualified_name":"std::process::process_last_error_kind","kind":"function","visibility":"public","signature":"fn process_last_error_kind() -> String","source_path":"stdlib/process.kn","line":395,"attributes":[],"docs":[],"target_notes":[]},{"name":"process_last_error_message","qualified_name":"std::process::process_last_error_message","kind":"function","visibility":"public","signature":"fn process_last_error_message() -> String","source_path":"stdlib/process.kn","line":398,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"proof","import_path":"std::proof","source_path":"stdlib/proof.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"PROOF_STATUS_SKIP","qualified_name":"std::proof::PROOF_STATUS_SKIP","kind":"const","visibility":"public","signature":"const PROOF_STATUS_SKIP: Int","source_path":"stdlib/proof.kn","line":4,"attributes":[],"docs":[],"target_notes":[]},{"name":"PROOF_STATUS_PROVED","qualified_name":"std::proof::PROOF_STATUS_PROVED","kind":"const","visibility":"public","signature":"const PROOF_STATUS_PROVED: Int","source_path":"stdlib/proof.kn","line":5,"attributes":[],"docs":[],"target_notes":[]},{"name":"PROOF_STATUS_WITNESS","qualified_name":"std::proof::PROOF_STATUS_WITNESS","kind":"const","visibility":"public","signature":"const PROOF_STATUS_WITNESS: Int","source_path":"stdlib/proof.kn","line":6,"attributes":[],"docs":[],"target_notes":[]},{"name":"PROOF_STATUS_UNKNOWN","qualified_name":"std::proof::PROOF_STATUS_UNKNOWN","kind":"const","visibility":"public","signature":"const PROOF_STATUS_UNKNOWN: Int","source_path":"stdlib/proof.kn","line":7,"attributes":[],"docs":[],"target_notes":[]},{"name":"PROOF_EXPECT_ANY","qualified_name":"std::proof::PROOF_EXPECT_ANY","kind":"const","visibility":"public","signature":"const PROOF_EXPECT_ANY: Int","source_path":"stdlib/proof.kn","line":8,"attributes":[],"docs":[],"target_notes":[]},{"name":"PROOF_BACKEND_Z3","qualified_name":"std::proof::PROOF_BACKEND_Z3","kind":"const","visibility":"public","signature":"const PROOF_BACKEND_Z3: String","source_path":"stdlib/proof.kn","line":9,"attributes":[],"docs":[],"target_notes":[]},{"name":"ProofOutcome","qualified_name":"std::proof::ProofOutcome","kind":"struct","visibility":"public","signature":"struct ProofOutcome","source_path":"stdlib/proof.kn","line":11,"attributes":[],"docs":[],"target_notes":[]},{"name":"ProofExpectation","qualified_name":"std::proof::ProofExpectation","kind":"struct","visibility":"public","signature":"struct ProofExpectation","source_path":"stdlib/proof.kn","line":18,"attributes":[],"docs":[],"target_notes":[]},{"name":"ProofCase","qualified_name":"std::proof::ProofCase","kind":"struct","visibility":"public","signature":"struct ProofCase","source_path":"stdlib/proof.kn","line":23,"attributes":[],"docs":[],"target_notes":[]},{"name":"ProofAssessment","qualified_name":"std::proof::ProofAssessment","kind":"struct","visibility":"public","signature":"struct ProofAssessment","source_path":"stdlib/proof.kn","line":32,"attributes":[],"docs":[],"target_notes":[]},{"name":"ProofSuiteSummary","qualified_name":"std::proof::ProofSuiteSummary","kind":"struct","visibility":"public","signature":"struct ProofSuiteSummary","source_path":"stdlib/proof.kn","line":38,"attributes":[],"docs":[],"target_notes":[]},{"name":"proof_status_name","qualified_name":"std::proof::proof_status_name","kind":"function","visibility":"public","signature":"fn proof_status_name(status: Int) -> String","source_path":"stdlib/proof.kn","line":48,"attributes":[],"docs":[],"target_notes":[]},{"name":"proof_expectation","qualified_name":"std::proof::proof_expectation","kind":"function","visibility":"public","signature":"fn proof_expectation(expected_status: Int) -> ProofExpectation","source_path":"stdlib/proof.kn","line":61,"attributes":[],"docs":[],"target_notes":[]},{"name":"proof_expect_any","qualified_name":"std::proof::proof_expect_any","kind":"function","visibility":"public","signature":"fn proof_expect_any() -> ProofExpectation","source_path":"stdlib/proof.kn","line":68,"attributes":[],"docs":[],"target_notes":[]},{"name":"proof_expect_proved","qualified_name":"std::proof::proof_expect_proved","kind":"function","visibility":"public","signature":"fn proof_expect_proved() -> ProofExpectation","source_path":"stdlib/proof.kn","line":71,"attributes":[],"docs":[],"target_notes":[]},{"name":"proof_expect_witness","qualified_name":"std::proof::proof_expect_witness","kind":"function","visibility":"public","signature":"fn proof_expect_witness() -> ProofExpectation","source_path":"stdlib/proof.kn","line":74,"attributes":[],"docs":[],"target_notes":[]},{"name":"proof_expect_unknown","qualified_name":"std::proof::proof_expect_unknown","kind":"function","visibility":"public","signature":"fn proof_expect_unknown() -> ProofExpectation","source_path":"stdlib/proof.kn","line":77,"attributes":[],"docs":[],"target_notes":[]},{"name":"proof_expectation_allow_skip","qualified_name":"std::proof::proof_expectation_allow_skip","kind":"function","visibility":"public","signature":"fn proof_expectation_allow_skip(expectation: ProofExpectation) -> ProofExpectation","source_path":"stdlib/proof.kn","line":80,"attributes":[],"docs":[],"target_notes":[]},{"name":"named","qualified_name":"std::proof::ProofExpectation.named","kind":"impl_method","visibility":"private","signature":"fn named(_self: Self_, value: String) -> ProofExpectation","source_path":"stdlib/proof.kn","line":86,"attributes":[],"docs":[],"target_notes":[]},{"name":"allow_skip","qualified_name":"std::proof::ProofExpectation.allow_skip","kind":"impl_method","visibility":"private","signature":"fn allow_skip(_self: Self_) -> ProofExpectation","source_path":"stdlib/proof.kn","line":91,"attributes":[],"docs":[],"target_notes":[]},{"name":"proof_outcome","qualified_name":"std::proof::proof_outcome","kind":"function","visibility":"public","signature":"fn proof_outcome(status: Int, label: String, detail: String, evidence: String, model: String) -> ProofOutcome","source_path":"stdlib/proof.kn","line":94,"attributes":[],"docs":[],"target_notes":[]},{"name":"proof_skip","qualified_name":"std::proof::proof_skip","kind":"function","visibility":"public","signature":"fn proof_skip(label: String, reason: String) -> ProofOutcome","source_path":"stdlib/proof.kn","line":103,"attributes":[],"docs":[],"target_notes":[]},{"name":"proof_proved","qualified_name":"std::proof::proof_proved","kind":"function","visibility":"public","signature":"fn proof_proved(label: String, evidence: String) -> ProofOutcome","source_path":"stdlib/proof.kn","line":106,"attributes":[],"docs":[],"target_notes":[]},{"name":"proof_witness","qualified_name":"std::proof::proof_witness","kind":"function","visibility":"public","signature":"fn proof_witness(label: String, evidence: String, model: String) -> ProofOutcome","source_path":"stdlib/proof.kn","line":109,"attributes":[],"docs":[],"target_notes":[]},{"name":"proof_unknown","qualified_name":"std::proof::proof_unknown","kind":"function","visibility":"public","signature":"fn proof_unknown(label: String, detail: String, evidence: String) -> ProofOutcome","source_path":"stdlib/proof.kn","line":112,"attributes":[],"docs":[],"target_notes":[]},{"name":"proof_outcome_is_skip","qualified_name":"std::proof::proof_outcome_is_skip","kind":"function","visibility":"public","signature":"fn proof_outcome_is_skip(outcome: ProofOutcome) -> Bool","source_path":"stdlib/proof.kn","line":115,"attributes":[],"docs":[],"target_notes":[]},{"name":"proof_outcome_is_proved","qualified_name":"std::proof::proof_outcome_is_proved","kind":"function","visibility":"public","signature":"fn proof_outcome_is_proved(outcome: ProofOutcome) -> Bool","source_path":"stdlib/proof.kn","line":118,"attributes":[],"docs":[],"target_notes":[]},{"name":"proof_outcome_is_witness","qualified_name":"std::proof::proof_outcome_is_witness","kind":"function","visibility":"public","signature":"fn proof_outcome_is_witness(outcome: ProofOutcome) -> Bool","source_path":"stdlib/proof.kn","line":121,"attributes":[],"docs":[],"target_notes":[]},{"name":"proof_outcome_is_unknown","qualified_name":"std::proof::proof_outcome_is_unknown","kind":"function","visibility":"public","signature":"fn proof_outcome_is_unknown(outcome: ProofOutcome) -> Bool","source_path":"stdlib/proof.kn","line":124,"attributes":[],"docs":[],"target_notes":[]},{"name":"proof_outcome_summary","qualified_name":"std::proof::proof_outcome_summary","kind":"function","visibility":"public","signature":"fn proof_outcome_summary(outcome: ProofOutcome) -> String","source_path":"stdlib/proof.kn","line":127,"attributes":[],"docs":[],"target_notes":[]},{"name":"proof_case","qualified_name":"std::proof::proof_case","kind":"function","visibility":"public","signature":"fn proof_case(label: String) -> ProofCase","source_path":"stdlib/proof.kn","line":136,"attributes":[],"docs":[],"target_notes":[]},{"name":"proof_proved_case","qualified_name":"std::proof::proof_proved_case","kind":"function","visibility":"public","signature":"fn proof_proved_case(label: String) -> ProofCase","source_path":"stdlib/proof.kn","line":147,"attributes":[],"docs":[],"target_notes":[]},{"name":"proof_witness_case","qualified_name":"std::proof::proof_witness_case","kind":"function","visibility":"public","signature":"fn proof_witness_case(label: String) -> ProofCase","source_path":"stdlib/proof.kn","line":150,"attributes":[],"docs":[],"target_notes":[]},{"name":"description","qualified_name":"std::proof::ProofCase.description","kind":"impl_method","visibility":"private","signature":"fn description(_self: Self_, value: String) -> ProofCase","source_path":"stdlib/proof.kn","line":154,"attributes":[],"docs":[],"target_notes":[]},{"name":"suite","qualified_name":"std::proof::ProofCase.suite","kind":"impl_method","visibility":"private","signature":"fn suite(_self: Self_, value: String) -> ProofCase","source_path":"stdlib/proof.kn","line":159,"attributes":[],"docs":[],"target_notes":[]},{"name":"backend","qualified_name":"std::proof::ProofCase.backend","kind":"impl_method","visibility":"private","signature":"fn backend(_self: Self_, value: String) -> ProofCase","source_path":"stdlib/proof.kn","line":164,"attributes":[],"docs":[],"target_notes":[]},{"name":"evidence","qualified_name":"std::proof::ProofCase.evidence","kind":"impl_method","visibility":"private","signature":"fn evidence(_self: Self_, value: String) -> ProofCase","source_path":"stdlib/proof.kn","line":169,"attributes":[],"docs":[],"target_notes":[]},{"name":"tag","qualified_name":"std::proof::ProofCase.tag","kind":"impl_method","visibility":"private","signature":"fn tag(_self: Self_, value: String) -> ProofCase","source_path":"stdlib/proof.kn","line":174,"attributes":[],"docs":[],"target_notes":[]},{"name":"expect","qualified_name":"std::proof::ProofCase.expect","kind":"impl_method","visibility":"private","signature":"fn expect(_self: Self_, value: ProofExpectation) -> ProofCase","source_path":"stdlib/proof.kn","line":179,"attributes":[],"docs":[],"target_notes":[]},{"name":"expect_any","qualified_name":"std::proof::ProofCase.expect_any","kind":"impl_method","visibility":"private","signature":"fn expect_any(_self: Self_) -> ProofCase","source_path":"stdlib/proof.kn","line":184,"attributes":[],"docs":[],"target_notes":[]},{"name":"expect_proved","qualified_name":"std::proof::ProofCase.expect_proved","kind":"impl_method","visibility":"private","signature":"fn expect_proved(_self: Self_) -> ProofCase","source_path":"stdlib/proof.kn","line":187,"attributes":[],"docs":[],"target_notes":[]},{"name":"expect_witness","qualified_name":"std::proof::ProofCase.expect_witness","kind":"impl_method","visibility":"private","signature":"fn expect_witness(_self: Self_) -> ProofCase","source_path":"stdlib/proof.kn","line":190,"attributes":[],"docs":[],"target_notes":[]},{"name":"expect_unknown","qualified_name":"std::proof::ProofCase.expect_unknown","kind":"impl_method","visibility":"private","signature":"fn expect_unknown(_self: Self_) -> ProofCase","source_path":"stdlib/proof.kn","line":193,"attributes":[],"docs":[],"target_notes":[]},{"name":"allow_skip","qualified_name":"std::proof::ProofCase.allow_skip","kind":"impl_method","visibility":"private","signature":"fn allow_skip(_self: Self_) -> ProofCase","source_path":"stdlib/proof.kn","line":196,"attributes":[],"docs":[],"target_notes":[]},{"name":"proof_join_strings","qualified_name":"std::proof::proof_join_strings","kind":"function","visibility":"private","signature":"fn proof_join_strings(items: Array, separator: String) -> String","source_path":"stdlib/proof.kn","line":201,"attributes":[],"docs":[],"target_notes":[]},{"name":"proof_case_summary","qualified_name":"std::proof::proof_case_summary","kind":"function","visibility":"public","signature":"fn proof_case_summary(spec: ProofCase) -> String","source_path":"stdlib/proof.kn","line":213,"attributes":[],"docs":[],"target_notes":[]},{"name":"proof_case_accepts","qualified_name":"std::proof::proof_case_accepts","kind":"function","visibility":"public","signature":"fn proof_case_accepts(spec: ProofCase, outcome: ProofOutcome) -> Bool","source_path":"stdlib/proof.kn","line":223,"attributes":[],"docs":[],"target_notes":[]},{"name":"proof_case_outcome_from_result","qualified_name":"std::proof::proof_case_outcome_from_result","kind":"function","visibility":"public","signature":"fn proof_case_outcome_from_result(spec: ProofCase, backend_subject: Any, result: Any) -> ProofOutcome","source_path":"stdlib/proof.kn","line":230,"attributes":[],"docs":[],"target_notes":[]},{"name":"proof_case_outcome","qualified_name":"std::proof::proof_case_outcome","kind":"function","visibility":"public","signature":"fn proof_case_outcome(spec: ProofCase, backend_subject: Any) -> ProofOutcome","source_path":"stdlib/proof.kn","line":239,"attributes":[],"docs":[],"target_notes":[]},{"name":"proof_case_assess","qualified_name":"std::proof::proof_case_assess","kind":"function","visibility":"public","signature":"fn proof_case_assess(spec: ProofCase, outcome: ProofOutcome) -> ProofAssessment","source_path":"stdlib/proof.kn","line":246,"attributes":[],"docs":[],"target_notes":[]},{"name":"proof_case_check_result","qualified_name":"std::proof::proof_case_check_result","kind":"function","visibility":"public","signature":"fn proof_case_check_result(spec: ProofCase, backend_subject: Any, result: Any) -> ProofAssessment","source_path":"stdlib/proof.kn","line":264,"attributes":[],"docs":[],"target_notes":[]},{"name":"proof_case_check","qualified_name":"std::proof::proof_case_check","kind":"function","visibility":"public","signature":"fn proof_case_check(spec: ProofCase, backend_subject: Any) -> ProofAssessment","source_path":"stdlib/proof.kn","line":267,"attributes":[],"docs":[],"target_notes":[]},{"name":"proof_assessment_ok","qualified_name":"std::proof::proof_assessment_ok","kind":"function","visibility":"public","signature":"fn proof_assessment_ok(assessment: ProofAssessment) -> Bool","source_path":"stdlib/proof.kn","line":270,"attributes":[],"docs":[],"target_notes":[]},{"name":"proof_assessment_summary","qualified_name":"std::proof::proof_assessment_summary","kind":"function","visibility":"public","signature":"fn proof_assessment_summary(assessment: ProofAssessment) -> String","source_path":"stdlib/proof.kn","line":273,"attributes":[],"docs":[],"target_notes":[]},{"name":"proof_suite_summary","qualified_name":"std::proof::proof_suite_summary","kind":"function","visibility":"public","signature":"fn proof_suite_summary(label: String, assessments: Array) -> ProofSuiteSummary","source_path":"stdlib/proof.kn","line":276,"attributes":[],"docs":[],"target_notes":[]},{"name":"proof_suite_ok","qualified_name":"std::proof::proof_suite_ok","kind":"function","visibility":"public","signature":"fn proof_suite_ok(summary: ProofSuiteSummary) -> Bool","source_path":"stdlib/proof.kn","line":310,"attributes":[],"docs":[],"target_notes":[]},{"name":"proof_suite_summary_text","qualified_name":"std::proof::proof_suite_summary_text","kind":"function","visibility":"public","signature":"fn proof_suite_summary_text(summary: ProofSuiteSummary) -> String","source_path":"stdlib/proof.kn","line":313,"attributes":[],"docs":[],"target_notes":[]},{"name":"proof_check_result","qualified_name":"std::proof::proof_check_result","kind":"function","visibility":"public","signature":"fn proof_check_result(label: String, solver: Any, result: Any) -> ProofOutcome","source_path":"stdlib/proof.kn","line":322,"attributes":[],"docs":[],"target_notes":[]},{"name":"proof_check","qualified_name":"std::proof::proof_check","kind":"function","visibility":"public","signature":"fn proof_check(label: String, solver: Any) -> ProofOutcome","source_path":"stdlib/proof.kn","line":330,"attributes":[],"docs":[],"target_notes":[]},{"name":"proof_task","qualified_name":"std::proof::proof_task","kind":"function","visibility":"public","signature":"fn proof_task(id: String) -> BuildTaskSpec","source_path":"stdlib/proof.kn","line":333,"attributes":[],"docs":[],"target_notes":[]},{"name":"proof_obligation","qualified_name":"std::proof::proof_obligation","kind":"function","visibility":"public","signature":"fn proof_obligation(id: String) -> BuildTaskSpec","source_path":"stdlib/proof.kn","line":336,"attributes":[],"docs":[],"target_notes":[]},{"name":"z3_proof","qualified_name":"std::proof::z3_proof","kind":"function","visibility":"public","signature":"fn z3_proof(id: String) -> BuildTaskSpec","source_path":"stdlib/proof.kn","line":339,"attributes":[],"docs":[],"target_notes":[]},{"name":"proof_smt2","qualified_name":"std::proof::proof_smt2","kind":"function","visibility":"public","signature":"fn proof_smt2(id: String, entry: String) -> BuildTaskSpec","source_path":"stdlib/proof.kn","line":342,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"python","import_path":"std::python","source_path":"stdlib/python.kn","parse_status":{"status":"parsed"},"docs":["Root Python surface for Kain.","","This is the generic low-level lane for embedded Python interop.","","Package access should come through first-class `import ...` in authored Kain.","`use std::python` exists for explicit bridge calls, module checks, and","controlled materialization between live Python objects and Kain-owned data."],"symbols":[{"name":"py_call_async_args","qualified_name":"std::python::py_call_async_args","kind":"extern_function","visibility":"private","signature":"fn py_call_async_args(target: Any, args: Any) -> Any","source_path":"stdlib/python.kn","line":14,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"py_call_async_attr","qualified_name":"std::python::py_call_async_attr","kind":"extern_function","visibility":"private","signature":"fn py_call_async_attr(target: Any, attr: String, args: Any) -> Any","source_path":"stdlib/python.kn","line":17,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"py_awaitable_future","qualified_name":"std::python::py_awaitable_future","kind":"extern_function","visibility":"private","signature":"fn py_awaitable_future(awaitable: Any) -> Any","source_path":"stdlib/python.kn","line":20,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"py_future_state","qualified_name":"std::python::py_future_state","kind":"extern_function","visibility":"private","signature":"fn py_future_state(future: Any) -> Int","source_path":"stdlib/python.kn","line":23,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"py_future_done","qualified_name":"std::python::py_future_done","kind":"extern_function","visibility":"private","signature":"fn py_future_done(future: Any) -> Bool","source_path":"stdlib/python.kn","line":26,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"py_future_await","qualified_name":"std::python::py_future_await","kind":"extern_function","visibility":"private","signature":"fn py_future_await(future: Any) -> Any","source_path":"stdlib/python.kn","line":29,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"py_future_cancel","qualified_name":"std::python::py_future_cancel","kind":"extern_function","visibility":"private","signature":"fn py_future_cancel(future: Any) -> Int","source_path":"stdlib/python.kn","line":32,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"py_future_close","qualified_name":"std::python::py_future_close","kind":"extern_function","visibility":"private","signature":"fn py_future_close(future: Any) -> Int","source_path":"stdlib/python.kn","line":35,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"py_actor_callback_register","qualified_name":"std::python::py_actor_callback_register","kind":"extern_function","visibility":"private","signature":"fn py_actor_callback_register(actor_id: Int, message_name: String) -> Any","source_path":"stdlib/python.kn","line":38,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"py_actor_callback_function","qualified_name":"std::python::py_actor_callback_function","kind":"extern_function","visibility":"private","signature":"fn py_actor_callback_function(callback: Any) -> Any","source_path":"stdlib/python.kn","line":41,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"py_actor_callback_close","qualified_name":"std::python::py_actor_callback_close","kind":"extern_function","visibility":"private","signature":"fn py_actor_callback_close(callback: Any) -> Int","source_path":"stdlib/python.kn","line":44,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"py_actor_callback_delivered_count","qualified_name":"std::python::py_actor_callback_delivered_count","kind":"extern_function","visibility":"private","signature":"fn py_actor_callback_delivered_count(callback: Any) -> Int","source_path":"stdlib/python.kn","line":47,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"py_region_begin","qualified_name":"std::python::py_region_begin","kind":"extern_function","visibility":"private","signature":"fn py_region_begin() -> Any","source_path":"stdlib/python.kn","line":50,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"py_region_end","qualified_name":"std::python::py_region_end","kind":"extern_function","visibility":"private","signature":"fn py_region_end(region: Any) -> Int","source_path":"stdlib/python.kn","line":53,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"py_region_import","qualified_name":"std::python::py_region_import","kind":"extern_function","visibility":"private","signature":"fn py_region_import(region: Any, name: String) -> Any","source_path":"stdlib/python.kn","line":56,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"py_region_getattr_raw","qualified_name":"std::python::py_region_getattr_raw","kind":"extern_function","visibility":"private","signature":"fn py_region_getattr_raw(region: Any, target: Any, name: String) -> Any","source_path":"stdlib/python.kn","line":59,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"py_region_call_raw_args","qualified_name":"std::python::py_region_call_raw_args","kind":"extern_function","visibility":"private","signature":"fn py_region_call_raw_args(region: Any, target: Any, args: Any) -> Any","source_path":"stdlib/python.kn","line":62,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"py_region_call_raw_attr","qualified_name":"std::python::py_region_call_raw_attr","kind":"extern_function","visibility":"private","signature":"fn py_region_call_raw_attr(region: Any, target: Any, attr: String, args: Any) -> Any","source_path":"stdlib/python.kn","line":65,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"py_region_call_raw_f64_trunc_i64","qualified_name":"std::python::py_region_call_raw_f64_trunc_i64","kind":"extern_function","visibility":"private","signature":"fn py_region_call_raw_f64_trunc_i64(region: Any, target: Any, arg: Float) -> Int","source_path":"stdlib/python.kn","line":68,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"py_region_call_attr_raw_f64_trunc_i64","qualified_name":"std::python::py_region_call_attr_raw_f64_trunc_i64","kind":"extern_function","visibility":"private","signature":"fn py_region_call_attr_raw_f64_trunc_i64(region: Any, target: Any, attr: String, arg: Float) -> Int","source_path":"stdlib/python.kn","line":71,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"py_region_buffer_view","qualified_name":"std::python::py_region_buffer_view","kind":"extern_function","visibility":"private","signature":"fn py_region_buffer_view(region: Any, target: Any) -> Any","source_path":"stdlib/python.kn","line":74,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"py_region_buffer_view_checksum37","qualified_name":"std::python::py_region_buffer_view_checksum37","kind":"extern_function","visibility":"private","signature":"fn py_region_buffer_view_checksum37(region: Any, target: Any, iterations: Int, modulus: Int) -> Int","source_path":"stdlib/python.kn","line":77,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"py_region_import_cache_hits","qualified_name":"std::python::py_region_import_cache_hits","kind":"extern_function","visibility":"private","signature":"fn py_region_import_cache_hits(region: Any) -> Int","source_path":"stdlib/python.kn","line":80,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"py_region_import_cache_misses","qualified_name":"std::python::py_region_import_cache_misses","kind":"extern_function","visibility":"private","signature":"fn py_region_import_cache_misses(region: Any) -> Int","source_path":"stdlib/python.kn","line":83,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"py_region_attr_cache_hits","qualified_name":"std::python::py_region_attr_cache_hits","kind":"extern_function","visibility":"private","signature":"fn py_region_attr_cache_hits(region: Any) -> Int","source_path":"stdlib/python.kn","line":86,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"py_region_attr_cache_misses","qualified_name":"std::python::py_region_attr_cache_misses","kind":"extern_function","visibility":"private","signature":"fn py_region_attr_cache_misses(region: Any) -> Int","source_path":"stdlib/python.kn","line":89,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"py_region_views_opened","qualified_name":"std::python::py_region_views_opened","kind":"extern_function","visibility":"private","signature":"fn py_region_views_opened(region: Any) -> Int","source_path":"stdlib/python.kn","line":92,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"py_region_views_released","qualified_name":"std::python::py_region_views_released","kind":"extern_function","visibility":"private","signature":"fn py_region_views_released(region: Any) -> Int","source_path":"stdlib/python.kn","line":95,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"py_region_call_count","qualified_name":"std::python::py_region_call_count","kind":"extern_function","visibility":"private","signature":"fn py_region_call_count(region: Any) -> Int","source_path":"stdlib/python.kn","line":98,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"py_region_generic_call_count","qualified_name":"std::python::py_region_generic_call_count","kind":"extern_function","visibility":"private","signature":"fn py_region_generic_call_count(region: Any) -> Int","source_path":"stdlib/python.kn","line":101,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"py_region_fast_call_count","qualified_name":"std::python::py_region_fast_call_count","kind":"extern_function","visibility":"private","signature":"fn py_region_fast_call_count(region: Any) -> Int","source_path":"stdlib/python.kn","line":104,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"py_buffer_view","qualified_name":"std::python::py_buffer_view","kind":"extern_function","visibility":"private","signature":"fn py_buffer_view(target: Any) -> Any","source_path":"stdlib/python.kn","line":107,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"py_buffer_view_byte_length","qualified_name":"std::python::py_buffer_view_byte_length","kind":"extern_function","visibility":"private","signature":"fn py_buffer_view_byte_length(view: Any) -> Int","source_path":"stdlib/python.kn","line":110,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"py_buffer_view_element_count","qualified_name":"std::python::py_buffer_view_element_count","kind":"extern_function","visibility":"private","signature":"fn py_buffer_view_element_count(view: Any) -> Int","source_path":"stdlib/python.kn","line":113,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"py_buffer_view_element_size","qualified_name":"std::python::py_buffer_view_element_size","kind":"extern_function","visibility":"private","signature":"fn py_buffer_view_element_size(view: Any) -> Int","source_path":"stdlib/python.kn","line":116,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"py_buffer_view_c_contiguous","qualified_name":"std::python::py_buffer_view_c_contiguous","kind":"extern_function","visibility":"private","signature":"fn py_buffer_view_c_contiguous(view: Any) -> Int","source_path":"stdlib/python.kn","line":119,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"py_buffer_view_writable","qualified_name":"std::python::py_buffer_view_writable","kind":"extern_function","visibility":"private","signature":"fn py_buffer_view_writable(view: Any) -> Int","source_path":"stdlib/python.kn","line":122,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"py_buffer_view_release","qualified_name":"std::python::py_buffer_view_release","kind":"extern_function","visibility":"private","signature":"fn py_buffer_view_release(view: Any)","source_path":"stdlib/python.kn","line":125,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"python_bootstrap","qualified_name":"std::python::python_bootstrap","kind":"function","visibility":"public","signature":"fn python_bootstrap()","source_path":"stdlib/python.kn","line":127,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_exec","qualified_name":"std::python::python_exec","kind":"function","visibility":"public","signature":"fn python_exec(code: String)","source_path":"stdlib/python.kn","line":130,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_eval","qualified_name":"std::python::python_eval","kind":"function","visibility":"public","signature":"fn python_eval(code: String) -> Any","source_path":"stdlib/python.kn","line":133,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_eval_raw","qualified_name":"std::python::python_eval_raw","kind":"function","visibility":"public","signature":"fn python_eval_raw(code: String) -> Any","source_path":"stdlib/python.kn","line":136,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_import","qualified_name":"std::python::python_import","kind":"function","visibility":"public","signature":"fn python_import(name: String) -> Any","source_path":"stdlib/python.kn","line":139,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_module_available","qualified_name":"std::python::python_module_available","kind":"function","visibility":"public","signature":"fn python_module_available(name: String) -> Bool","source_path":"stdlib/python.kn","line":142,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_require_module","qualified_name":"std::python::python_require_module","kind":"function","visibility":"public","signature":"fn python_require_module(name: String) -> Any","source_path":"stdlib/python.kn","line":146,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_region_begin","qualified_name":"std::python::python_region_begin","kind":"function","visibility":"public","signature":"fn python_region_begin() -> Any","source_path":"stdlib/python.kn","line":150,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_region_end","qualified_name":"std::python::python_region_end","kind":"function","visibility":"public","signature":"fn python_region_end(region: Any) -> Int","source_path":"stdlib/python.kn","line":153,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_region_import","qualified_name":"std::python::python_region_import","kind":"function","visibility":"public","signature":"fn python_region_import(region: Any, name: String) -> Any","source_path":"stdlib/python.kn","line":156,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_region_getattr","qualified_name":"std::python::python_region_getattr","kind":"function","visibility":"public","signature":"fn python_region_getattr(region: Any, target: Any, name: String) -> Any","source_path":"stdlib/python.kn","line":159,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_region_getattr_raw","qualified_name":"std::python::python_region_getattr_raw","kind":"function","visibility":"public","signature":"fn python_region_getattr_raw(region: Any, target: Any, name: String) -> Any","source_path":"stdlib/python.kn","line":162,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_region_bind_attr","qualified_name":"std::python::python_region_bind_attr","kind":"function","visibility":"public","signature":"fn python_region_bind_attr(region: Any, target: Any, name: String) -> Any","source_path":"stdlib/python.kn","line":165,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_region_call_raw","qualified_name":"std::python::python_region_call_raw","kind":"function","visibility":"public","signature":"fn python_region_call_raw(region: Any, target: Any, args: Any) -> Any","source_path":"stdlib/python.kn","line":168,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_region_call_attr_raw","qualified_name":"std::python::python_region_call_attr_raw","kind":"function","visibility":"public","signature":"fn python_region_call_attr_raw(region: Any, target: Any, attr: String, args: Any) -> Any","source_path":"stdlib/python.kn","line":171,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_region_call_raw_f64_trunc_i64","qualified_name":"std::python::python_region_call_raw_f64_trunc_i64","kind":"function","visibility":"public","signature":"fn python_region_call_raw_f64_trunc_i64(region: Any, target: Any, arg: Float) -> Int","source_path":"stdlib/python.kn","line":174,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_region_call_attr_raw_f64_trunc_i64","qualified_name":"std::python::python_region_call_attr_raw_f64_trunc_i64","kind":"function","visibility":"public","signature":"fn python_region_call_attr_raw_f64_trunc_i64(region: Any, target: Any, attr: String, arg: Float) -> Int","source_path":"stdlib/python.kn","line":177,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_region_buffer_view","qualified_name":"std::python::python_region_buffer_view","kind":"function","visibility":"public","signature":"fn python_region_buffer_view(region: Any, target: Any) -> Any","source_path":"stdlib/python.kn","line":180,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_region_buffer_view_checksum37","qualified_name":"std::python::python_region_buffer_view_checksum37","kind":"function","visibility":"public","signature":"fn python_region_buffer_view_checksum37(region: Any, target: Any, iterations: Int, modulus: Int) -> Int","source_path":"stdlib/python.kn","line":183,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_region_import_cache_hits","qualified_name":"std::python::python_region_import_cache_hits","kind":"function","visibility":"public","signature":"fn python_region_import_cache_hits(region: Any) -> Int","source_path":"stdlib/python.kn","line":186,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_region_import_cache_misses","qualified_name":"std::python::python_region_import_cache_misses","kind":"function","visibility":"public","signature":"fn python_region_import_cache_misses(region: Any) -> Int","source_path":"stdlib/python.kn","line":189,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_region_attr_cache_hits","qualified_name":"std::python::python_region_attr_cache_hits","kind":"function","visibility":"public","signature":"fn python_region_attr_cache_hits(region: Any) -> Int","source_path":"stdlib/python.kn","line":192,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_region_attr_cache_misses","qualified_name":"std::python::python_region_attr_cache_misses","kind":"function","visibility":"public","signature":"fn python_region_attr_cache_misses(region: Any) -> Int","source_path":"stdlib/python.kn","line":195,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_region_views_opened","qualified_name":"std::python::python_region_views_opened","kind":"function","visibility":"public","signature":"fn python_region_views_opened(region: Any) -> Int","source_path":"stdlib/python.kn","line":198,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_region_views_released","qualified_name":"std::python::python_region_views_released","kind":"function","visibility":"public","signature":"fn python_region_views_released(region: Any) -> Int","source_path":"stdlib/python.kn","line":201,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_region_call_count","qualified_name":"std::python::python_region_call_count","kind":"function","visibility":"public","signature":"fn python_region_call_count(region: Any) -> Int","source_path":"stdlib/python.kn","line":204,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_region_generic_call_count","qualified_name":"std::python::python_region_generic_call_count","kind":"function","visibility":"public","signature":"fn python_region_generic_call_count(region: Any) -> Int","source_path":"stdlib/python.kn","line":207,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_region_fast_call_count","qualified_name":"std::python::python_region_fast_call_count","kind":"function","visibility":"public","signature":"fn python_region_fast_call_count(region: Any) -> Int","source_path":"stdlib/python.kn","line":210,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_buffer_view","qualified_name":"std::python::python_buffer_view","kind":"function","visibility":"public","signature":"fn python_buffer_view(target: Any) -> Any","source_path":"stdlib/python.kn","line":213,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_buffer_view_byte_length","qualified_name":"std::python::python_buffer_view_byte_length","kind":"function","visibility":"public","signature":"fn python_buffer_view_byte_length(view: Any) -> Int","source_path":"stdlib/python.kn","line":216,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_buffer_view_element_count","qualified_name":"std::python::python_buffer_view_element_count","kind":"function","visibility":"public","signature":"fn python_buffer_view_element_count(view: Any) -> Int","source_path":"stdlib/python.kn","line":219,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_buffer_view_element_size","qualified_name":"std::python::python_buffer_view_element_size","kind":"function","visibility":"public","signature":"fn python_buffer_view_element_size(view: Any) -> Int","source_path":"stdlib/python.kn","line":222,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_buffer_view_c_contiguous","qualified_name":"std::python::python_buffer_view_c_contiguous","kind":"function","visibility":"public","signature":"fn python_buffer_view_c_contiguous(view: Any) -> Int","source_path":"stdlib/python.kn","line":225,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_buffer_view_writable","qualified_name":"std::python::python_buffer_view_writable","kind":"function","visibility":"public","signature":"fn python_buffer_view_writable(view: Any) -> Int","source_path":"stdlib/python.kn","line":228,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_buffer_view_release","qualified_name":"std::python::python_buffer_view_release","kind":"function","visibility":"public","signature":"fn python_buffer_view_release(view: Any)","source_path":"stdlib/python.kn","line":231,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_call","qualified_name":"std::python::python_call","kind":"function","visibility":"public","signature":"fn python_call(target: Any, args: Any) -> Any","source_path":"stdlib/python.kn","line":234,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_call_kwargs","qualified_name":"std::python::python_call_kwargs","kind":"function","visibility":"public","signature":"fn python_call_kwargs(target: Any, args: Any, kwargs: Any) -> Any","source_path":"stdlib/python.kn","line":237,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_call_attr","qualified_name":"std::python::python_call_attr","kind":"function","visibility":"public","signature":"fn python_call_attr(target: Any, attr: String, args: Any) -> Any","source_path":"stdlib/python.kn","line":240,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_call_attr_kwargs","qualified_name":"std::python::python_call_attr_kwargs","kind":"function","visibility":"public","signature":"fn python_call_attr_kwargs(target: Any, attr: String, args: Any, kwargs: Any) -> Any","source_path":"stdlib/python.kn","line":243,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_call_raw","qualified_name":"std::python::python_call_raw","kind":"function","visibility":"public","signature":"fn python_call_raw(target: Any, args: Any) -> Any","source_path":"stdlib/python.kn","line":246,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_call_attr_raw","qualified_name":"std::python::python_call_attr_raw","kind":"function","visibility":"public","signature":"fn python_call_attr_raw(target: Any, attr: String, args: Any) -> Any","source_path":"stdlib/python.kn","line":249,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_getattr","qualified_name":"std::python::python_getattr","kind":"function","visibility":"public","signature":"fn python_getattr(target: Any, name: String) -> Any","source_path":"stdlib/python.kn","line":252,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_getattr_raw","qualified_name":"std::python::python_getattr_raw","kind":"function","visibility":"public","signature":"fn python_getattr_raw(target: Any, name: String) -> Any","source_path":"stdlib/python.kn","line":255,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_setattr","qualified_name":"std::python::python_setattr","kind":"function","visibility":"public","signature":"fn python_setattr(target: Any, name: String, value: Any)","source_path":"stdlib/python.kn","line":258,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_hasattr","qualified_name":"std::python::python_hasattr","kind":"function","visibility":"public","signature":"fn python_hasattr(target: Any, name: String) -> Bool","source_path":"stdlib/python.kn","line":261,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_call_async","qualified_name":"std::python::python_call_async","kind":"function","visibility":"public","signature":"fn python_call_async(target: Any, args: Any) -> Any","source_path":"stdlib/python.kn","line":264,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_call_attr_async","qualified_name":"std::python::python_call_attr_async","kind":"function","visibility":"public","signature":"fn python_call_attr_async(target: Any, attr: String, args: Any) -> Any","source_path":"stdlib/python.kn","line":267,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_future_from_awaitable","qualified_name":"std::python::python_future_from_awaitable","kind":"function","visibility":"public","signature":"fn python_future_from_awaitable(awaitable: Any) -> Any","source_path":"stdlib/python.kn","line":270,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_future_state","qualified_name":"std::python::python_future_state","kind":"function","visibility":"public","signature":"fn python_future_state(future: Any) -> Int","source_path":"stdlib/python.kn","line":273,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_future_done","qualified_name":"std::python::python_future_done","kind":"function","visibility":"public","signature":"fn python_future_done(future: Any) -> Bool","source_path":"stdlib/python.kn","line":276,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_future_await","qualified_name":"std::python::python_future_await","kind":"function","visibility":"public","signature":"fn python_future_await(future: Any) -> Any","source_path":"stdlib/python.kn","line":279,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_future_cancel","qualified_name":"std::python::python_future_cancel","kind":"function","visibility":"public","signature":"fn python_future_cancel(future: Any) -> Int","source_path":"stdlib/python.kn","line":282,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_future_close","qualified_name":"std::python::python_future_close","kind":"function","visibility":"public","signature":"fn python_future_close(future: Any) -> Int","source_path":"stdlib/python.kn","line":285,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_actor_callback","qualified_name":"std::python::python_actor_callback","kind":"function","visibility":"public","signature":"fn python_actor_callback(actor_id: Int, message_name: String) -> Any","source_path":"stdlib/python.kn","line":288,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_actor_callback_callable","qualified_name":"std::python::python_actor_callback_callable","kind":"function","visibility":"public","signature":"fn python_actor_callback_callable(callback: Any) -> Any","source_path":"stdlib/python.kn","line":291,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_actor_callback_close","qualified_name":"std::python::python_actor_callback_close","kind":"function","visibility":"public","signature":"fn python_actor_callback_close(callback: Any) -> Int","source_path":"stdlib/python.kn","line":294,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_actor_callback_delivered","qualified_name":"std::python::python_actor_callback_delivered","kind":"function","visibility":"public","signature":"fn python_actor_callback_delivered(callback: Any) -> Int","source_path":"stdlib/python.kn","line":297,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_shared_buffer","qualified_name":"std::python::python_shared_buffer","kind":"function","visibility":"public","signature":"fn python_shared_buffer(target: Any) -> Any","source_path":"stdlib/python.kn","line":300,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_shared_image","qualified_name":"std::python::python_shared_image","kind":"function","visibility":"public","signature":"fn python_shared_image(target: Any) -> Any","source_path":"stdlib/python.kn","line":303,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_image","qualified_name":"std::python::python_image","kind":"function","visibility":"public","signature":"fn python_image(target: Any) -> Any","source_path":"stdlib/python.kn","line":306,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_image_shared","qualified_name":"std::python::python_image_shared","kind":"function","visibility":"public","signature":"fn python_image_shared(target: Any) -> Any","source_path":"stdlib/python.kn","line":309,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_image_owned","qualified_name":"std::python::python_image_owned","kind":"function","visibility":"public","signature":"fn python_image_owned(target: Any) -> Any","source_path":"stdlib/python.kn","line":312,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_image_to","qualified_name":"std::python::python_image_to","kind":"function","visibility":"public","signature":"fn python_image_to(image: Any, backend: String) -> Any","source_path":"stdlib/python.kn","line":315,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_tensor","qualified_name":"std::python::python_tensor","kind":"function","visibility":"public","signature":"fn python_tensor(target: Any) -> Any","source_path":"stdlib/python.kn","line":318,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_tensor_shared","qualified_name":"std::python::python_tensor_shared","kind":"function","visibility":"public","signature":"fn python_tensor_shared(target: Any) -> Any","source_path":"stdlib/python.kn","line":321,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_tensor_owned","qualified_name":"std::python::python_tensor_owned","kind":"function","visibility":"public","signature":"fn python_tensor_owned(target: Any) -> Any","source_path":"stdlib/python.kn","line":324,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_tensor_to","qualified_name":"std::python::python_tensor_to","kind":"function","visibility":"public","signature":"fn python_tensor_to(tensor: Any, backend: String) -> Any","source_path":"stdlib/python.kn","line":327,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_tensor_interop_mime_type","qualified_name":"std::python::python_tensor_interop_mime_type","kind":"function","visibility":"private","signature":"fn python_tensor_interop_mime_type(device_kind: String, interop_lane: String) -> String","source_path":"stdlib/python.kn","line":330,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_tensor_interop_adoption_path","qualified_name":"std::python::python_tensor_interop_adoption_path","kind":"function","visibility":"private","signature":"fn python_tensor_interop_adoption_path(interop_lane: String) -> String","source_path":"stdlib/python.kn","line":339,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_tensor_attr_value","qualified_name":"std::python::python_tensor_attr_value","kind":"function","visibility":"private","signature":"fn python_tensor_attr_value(tensor: Any, name: String) -> Any","source_path":"stdlib/python.kn","line":344,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_tensor_attr_int","qualified_name":"std::python::python_tensor_attr_int","kind":"function","visibility":"private","signature":"fn python_tensor_attr_int(tensor: Any, name: String) -> Int","source_path":"stdlib/python.kn","line":347,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_tensor_attr_bool","qualified_name":"std::python::python_tensor_attr_bool","kind":"function","visibility":"private","signature":"fn python_tensor_attr_bool(tensor: Any, name: String) -> Bool","source_path":"stdlib/python.kn","line":350,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_tensor_attr_string","qualified_name":"std::python::python_tensor_attr_string","kind":"function","visibility":"private","signature":"fn python_tensor_attr_string(tensor: Any, name: String) -> String","source_path":"stdlib/python.kn","line":353,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_tensor_attr_optional_string","qualified_name":"std::python::python_tensor_attr_optional_string","kind":"function","visibility":"private","signature":"fn python_tensor_attr_optional_string(tensor: Any, name: String) -> String","source_path":"stdlib/python.kn","line":356,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_tensor_interop_labels","qualified_name":"std::python::python_tensor_interop_labels","kind":"function","visibility":"private","signature":"fn python_tensor_interop_labels(source_backend: Any, device_kind: String, interop_lane: String) -> Any","source_path":"stdlib/python.kn","line":362,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_tensor_interop_info_from_tensor","qualified_name":"std::python::python_tensor_interop_info_from_tensor","kind":"function","visibility":"private","signature":"fn python_tensor_interop_info_from_tensor(tensor: Any) -> KainSharedBufferInfo","source_path":"stdlib/python.kn","line":369,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_tensor_gpu_residency_flags","qualified_name":"std::python::python_tensor_gpu_residency_flags","kind":"function","visibility":"private","signature":"fn python_tensor_gpu_residency_flags(info: KainSharedBufferInfo) -> Int","source_path":"stdlib/python.kn","line":423,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_tensor_gpu_queue_flags","qualified_name":"std::python::python_tensor_gpu_queue_flags","kind":"function","visibility":"private","signature":"fn python_tensor_gpu_queue_flags(info: KainSharedBufferInfo) -> Int","source_path":"stdlib/python.kn","line":431,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_tensor_info_array_dim","qualified_name":"std::python::python_tensor_info_array_dim","kind":"function","visibility":"private","signature":"fn python_tensor_info_array_dim(value: Any, index: Int) -> Int","source_path":"stdlib/python.kn","line":437,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_gpu_buffer_from_tensor_info","qualified_name":"std::python::python_gpu_buffer_from_tensor_info","kind":"function","visibility":"private","signature":"fn python_gpu_buffer_from_tensor_info(tensor: Any, info: KainSharedBufferInfo, policy: GpuResourcePolicy) -> GpuBuffer","source_path":"stdlib/python.kn","line":444,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_tensor_interop_info","qualified_name":"std::python::python_tensor_interop_info","kind":"function","visibility":"public","signature":"fn python_tensor_interop_info(target: Any) -> KainSharedBufferInfo","source_path":"stdlib/python.kn","line":455,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_tensor_shape_dim","qualified_name":"std::python::python_tensor_shape_dim","kind":"function","visibility":"public","signature":"fn python_tensor_shape_dim(info: KainSharedBufferInfo, index: Int) -> Int","source_path":"stdlib/python.kn","line":459,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_tensor_stride_dim","qualified_name":"std::python::python_tensor_stride_dim","kind":"function","visibility":"public","signature":"fn python_tensor_stride_dim(info: KainSharedBufferInfo, index: Int) -> Int","source_path":"stdlib/python.kn","line":462,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_shared_buffer_gpu","qualified_name":"std::python::python_shared_buffer_gpu","kind":"function","visibility":"public","signature":"fn python_shared_buffer_gpu(target: Any, policy: GpuResourcePolicy) -> GpuBuffer","source_path":"stdlib/python.kn","line":465,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_gpu_buffer","qualified_name":"std::python::python_gpu_buffer","kind":"function","visibility":"public","signature":"fn python_gpu_buffer(target: Any, policy: GpuResourcePolicy) -> GpuBuffer","source_path":"stdlib/python.kn","line":468,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_gpu_storage_buffer","qualified_name":"std::python::python_gpu_storage_buffer","kind":"function","visibility":"public","signature":"fn python_gpu_storage_buffer(target: Any, debug_name: String) -> GpuBuffer","source_path":"stdlib/python.kn","line":473,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_gpu_uniform_buffer","qualified_name":"std::python::python_gpu_uniform_buffer","kind":"function","visibility":"public","signature":"fn python_gpu_uniform_buffer(target: Any, debug_name: String) -> GpuBuffer","source_path":"stdlib/python.kn","line":489,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_geometry","qualified_name":"std::python::python_geometry","kind":"function","visibility":"public","signature":"fn python_geometry(target: Any) -> Any","source_path":"stdlib/python.kn","line":505,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_geometry_shared","qualified_name":"std::python::python_geometry_shared","kind":"function","visibility":"public","signature":"fn python_geometry_shared(target: Any) -> Any","source_path":"stdlib/python.kn","line":508,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_geometry_owned","qualified_name":"std::python::python_geometry_owned","kind":"function","visibility":"public","signature":"fn python_geometry_owned(target: Any) -> Any","source_path":"stdlib/python.kn","line":511,"attributes":[],"docs":[],"target_notes":[]},{"name":"python_geometry_to","qualified_name":"std::python::python_geometry_to","kind":"function","visibility":"public","signature":"fn python_geometry_to(geometry: Any, backend: String) -> Any","source_path":"stdlib/python.kn","line":514,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"random","import_path":"std::random","source_path":"stdlib/random.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"Xoshiro128","qualified_name":"std::random::Xoshiro128","kind":"struct","visibility":"public","signature":"struct Xoshiro128","source_path":"stdlib/random.kn","line":3,"attributes":[],"docs":[],"target_notes":[]},{"name":"XoshiroNextResult","qualified_name":"std::random::XoshiroNextResult","kind":"struct","visibility":"public","signature":"struct XoshiroNextResult","source_path":"stdlib/random.kn","line":9,"attributes":[],"docs":[],"target_notes":[]},{"name":"IntResult","qualified_name":"std::random::IntResult","kind":"struct","visibility":"public","signature":"struct IntResult","source_path":"stdlib/random.kn","line":13,"attributes":[],"docs":[],"target_notes":[]},{"name":"FloatResult","qualified_name":"std::random::FloatResult","kind":"struct","visibility":"public","signature":"struct FloatResult","source_path":"stdlib/random.kn","line":17,"attributes":[],"docs":[],"target_notes":[]},{"name":"FloatNormResult","qualified_name":"std::random::FloatNormResult","kind":"struct","visibility":"public","signature":"struct FloatNormResult","source_path":"stdlib/random.kn","line":21,"attributes":[],"docs":[],"target_notes":[]},{"name":"rotl","qualified_name":"std::random::rotl","kind":"function","visibility":"public","signature":"fn rotl(x: Int, k: Int) -> Int","source_path":"stdlib/random.kn","line":25,"attributes":[],"docs":[],"target_notes":[]},{"name":"xoshiro_scramble_scalar","qualified_name":"std::random::xoshiro_scramble_scalar","kind":"function","visibility":"private","signature":"fn xoshiro_scramble_scalar(s1: Int) -> Int","source_path":"stdlib/random.kn","line":31,"attributes":[],"docs":[],"target_notes":[]},{"name":"xoshiro_scramble","qualified_name":"std::random::xoshiro_scramble","kind":"converge","visibility":"public","signature":"converge xoshiro_scramble(s1: Int) -> Int","source_path":"stdlib/random.kn","line":37,"attributes":[],"docs":[],"target_notes":["semantic selector with spec/fast lanes"]},{"name":"xoshiro128_new","qualified_name":"std::random::xoshiro128_new","kind":"function","visibility":"public","signature":"fn xoshiro128_new(seed: Int) -> Xoshiro128","source_path":"stdlib/random.kn","line":46,"attributes":[],"docs":[],"target_notes":[]},{"name":"xoshiro128_next","qualified_name":"std::random::xoshiro128_next","kind":"function","visibility":"public","signature":"fn xoshiro128_next(rng: Xoshiro128) -> XoshiroNextResult","source_path":"stdlib/random.kn","line":81,"attributes":[],"docs":[],"target_notes":[]},{"name":"random_int_in_range","qualified_name":"std::random::random_int_in_range","kind":"function","visibility":"public","signature":"fn random_int_in_range(rng: Xoshiro128, min: Int, max: Int) -> IntResult","source_path":"stdlib/random.kn","line":102,"attributes":[],"docs":[],"target_notes":[]},{"name":"random_float","qualified_name":"std::random::random_float","kind":"function","visibility":"public","signature":"fn random_float(rng: Xoshiro128) -> FloatResult","source_path":"stdlib/random.kn","line":129,"attributes":[],"docs":[],"target_notes":[]},{"name":"math_ln","qualified_name":"std::random::math_ln","kind":"function","visibility":"public","signature":"fn math_ln(x: Float) -> Float","source_path":"stdlib/random.kn","line":134,"attributes":[],"docs":[],"target_notes":[]},{"name":"random_float_norm","qualified_name":"std::random::random_float_norm","kind":"function","visibility":"public","signature":"fn random_float_norm(rng: Xoshiro128) -> FloatNormResult","source_path":"stdlib/random.kn","line":162,"attributes":[],"docs":[],"target_notes":[]},{"name":"ShatteredRngBuffer","qualified_name":"std::random::ShatteredRngBuffer","kind":"struct","visibility":"public","signature":"struct ShatteredRngBuffer","source_path":"stdlib/random.kn","line":175,"attributes":[],"docs":[],"target_notes":[]},{"name":"shattered_rng_buffer_new","qualified_name":"std::random::shattered_rng_buffer_new","kind":"function","visibility":"public","signature":"fn shattered_rng_buffer_new(seed: Int, lanes: Int) -> ShatteredRngBuffer","source_path":"stdlib/random.kn","line":179,"attributes":[],"docs":[],"target_notes":[]},{"name":"shattered_rng_buffer_destroy","qualified_name":"std::random::shattered_rng_buffer_destroy","kind":"function","visibility":"public","signature":"fn shattered_rng_buffer_destroy(rng: ShatteredRngBuffer) -> Int","source_path":"stdlib/random.kn","line":226,"attributes":[],"docs":[],"target_notes":[]},{"name":"shattered_rng_buffer_update","qualified_name":"std::random::shattered_rng_buffer_update","kind":"function","visibility":"public","signature":"fn shattered_rng_buffer_update(buf: ptr, output: ptr, lanes: Int) -> Int","source_path":"stdlib/random.kn","line":230,"attributes":[],"docs":[],"target_notes":[]},{"name":"shattered_rng_buffer_next_block","qualified_name":"std::random::shattered_rng_buffer_next_block","kind":"function","visibility":"public","signature":"fn shattered_rng_buffer_next_block(rng: ShatteredRngBuffer, output: ptr) -> Int","source_path":"stdlib/random.kn","line":259,"attributes":[],"docs":[],"target_notes":[]},{"name":"RandomDummyPanel","qualified_name":"std::random::RandomDummyPanel","kind":"component","visibility":"private","signature":"component RandomDummyPanel()","source_path":"stdlib/random.kn","line":264,"attributes":[],"docs":[],"target_notes":["UI/component authoring surface"]},{"name":"AmbientRandomWorld","qualified_name":"std::random::AmbientRandomWorld","kind":"world","visibility":"private","signature":"world AmbientRandomWorld","source_path":"stdlib/random.kn","line":267,"attributes":[],"docs":[],"target_notes":[]},{"name":"AmbientRandomMirrorWorld","qualified_name":"std::random::AmbientRandomMirrorWorld","kind":"world","visibility":"private","signature":"world AmbientRandomMirrorWorld","source_path":"stdlib/random.kn","line":274,"attributes":[],"docs":[],"target_notes":[]},{"name":"random_ambient_next","qualified_name":"std::random::random_ambient_next","kind":"function","visibility":"public","signature":"fn random_ambient_next() -> Int","source_path":"stdlib/random.kn","line":311,"attributes":[],"docs":[],"target_notes":[]},{"name":"random_ambient_float","qualified_name":"std::random::random_ambient_float","kind":"function","visibility":"public","signature":"fn random_ambient_float() -> Float","source_path":"stdlib/random.kn","line":314,"attributes":[],"docs":[],"target_notes":[]},{"name":"random_ambient_int_in_range","qualified_name":"std::random::random_ambient_int_in_range","kind":"function","visibility":"public","signature":"fn random_ambient_int_in_range(min: Int, max: Int) -> Int","source_path":"stdlib/random.kn","line":318,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"reflect","import_path":"std::reflect","source_path":"stdlib/reflect.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"TypeKind","qualified_name":"std::reflect::TypeKind","kind":"enum","visibility":"public","signature":"enum TypeKind","source_path":"stdlib/reflect.kn","line":3,"attributes":[],"docs":[],"target_notes":[]},{"name":"TypeDescriptor","qualified_name":"std::reflect::TypeDescriptor","kind":"struct","visibility":"public","signature":"struct TypeDescriptor","source_path":"stdlib/reflect.kn","line":15,"attributes":[],"docs":[],"target_notes":[]},{"name":"reflect_is_digit_code","qualified_name":"std::reflect::reflect_is_digit_code","kind":"function","visibility":"private","signature":"fn reflect_is_digit_code(code: Int) -> Bool","source_path":"stdlib/reflect.kn","line":21,"attributes":[],"docs":[],"target_notes":[]},{"name":"reflect_text_is_int_literal","qualified_name":"std::reflect::reflect_text_is_int_literal","kind":"function","visibility":"private","signature":"fn reflect_text_is_int_literal(text: String) -> Bool","source_path":"stdlib/reflect.kn","line":24,"attributes":[],"docs":[],"target_notes":[]},{"name":"reflect_text_is_float_literal","qualified_name":"std::reflect::reflect_text_is_float_literal","kind":"function","visibility":"private","signature":"fn reflect_text_is_float_literal(text: String) -> Bool","source_path":"stdlib/reflect.kn","line":43,"attributes":[],"docs":[],"target_notes":[]},{"name":"reflect_type_kind","qualified_name":"std::reflect::reflect_type_kind","kind":"function","visibility":"public","signature":"fn reflect_type_kind(val: Any) -> TypeKind","source_path":"stdlib/reflect.kn","line":71,"attributes":[],"docs":[],"target_notes":[]},{"name":"reflect_type_name","qualified_name":"std::reflect::reflect_type_name","kind":"function","visibility":"public","signature":"fn reflect_type_name(val: Any) -> String","source_path":"stdlib/reflect.kn","line":92,"attributes":[],"docs":[],"target_notes":[]},{"name":"reflect_descriptor","qualified_name":"std::reflect::reflect_descriptor","kind":"function","visibility":"public","signature":"fn reflect_descriptor(val: Any) -> TypeDescriptor","source_path":"stdlib/reflect.kn","line":95,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"reload","import_path":"std::reload","source_path":"stdlib/reload.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"ReloadGeneration","qualified_name":"std::reload::ReloadGeneration","kind":"struct","visibility":"public","signature":"struct ReloadGeneration","source_path":"stdlib/reload.kn","line":6,"attributes":[],"docs":[],"target_notes":[]},{"name":"ReloadSnapshotRecord","qualified_name":"std::reload::ReloadSnapshotRecord","kind":"struct","visibility":"public","signature":"struct ReloadSnapshotRecord","source_path":"stdlib/reload.kn","line":11,"attributes":[],"docs":[],"target_notes":[]},{"name":"ReloadMigrationPlan","qualified_name":"std::reload::ReloadMigrationPlan","kind":"struct","visibility":"public","signature":"struct ReloadMigrationPlan","source_path":"stdlib/reload.kn","line":21,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_reload_begin","qualified_name":"std::reload::native_reload_begin","kind":"function","visibility":"public","signature":"fn native_reload_begin(session_id: Int, revision_key: String) -> Int","source_path":"stdlib/reload.kn","line":36,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_reload_commit","qualified_name":"std::reload::native_reload_commit","kind":"function","visibility":"public","signature":"fn native_reload_commit(session_id: Int) -> Int","source_path":"stdlib/reload.kn","line":39,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_reload_generation","qualified_name":"std::reload::native_reload_generation","kind":"function","visibility":"public","signature":"fn native_reload_generation(session_id: Int) -> Int","source_path":"stdlib/reload.kn","line":42,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_reload_key","qualified_name":"std::reload::native_reload_key","kind":"function","visibility":"public","signature":"fn native_reload_key(session_id: Int) -> String","source_path":"stdlib/reload.kn","line":45,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_reload_snapshot","qualified_name":"std::reload::native_reload_snapshot","kind":"function","visibility":"public","signature":"fn native_reload_snapshot(session_id: Int) -> ReloadGeneration","source_path":"stdlib/reload.kn","line":48,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_reload_package_surface","qualified_name":"std::reload::native_reload_package_surface","kind":"function","visibility":"public","signature":"fn native_reload_package_surface() -> String","source_path":"stdlib/reload.kn","line":55,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_reload_default_state_migration","qualified_name":"std::reload::native_reload_default_state_migration","kind":"function","visibility":"public","signature":"fn native_reload_default_state_migration() -> String","source_path":"stdlib/reload.kn","line":58,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_reload_default_actor_quiesce","qualified_name":"std::reload::native_reload_default_actor_quiesce","kind":"function","visibility":"public","signature":"fn native_reload_default_actor_quiesce() -> String","source_path":"stdlib/reload.kn","line":61,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_reload_gpu_swap_boundary","qualified_name":"std::reload::native_reload_gpu_swap_boundary","kind":"function","visibility":"public","signature":"fn native_reload_gpu_swap_boundary() -> String","source_path":"stdlib/reload.kn","line":64,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_reload_default_restart_mode","qualified_name":"std::reload::native_reload_default_restart_mode","kind":"function","visibility":"public","signature":"fn native_reload_default_restart_mode() -> String","source_path":"stdlib/reload.kn","line":67,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_reload_lane_noop","qualified_name":"std::reload::native_reload_lane_noop","kind":"function","visibility":"public","signature":"fn native_reload_lane_noop() -> String","source_path":"stdlib/reload.kn","line":70,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_reload_lane_presentation","qualified_name":"std::reload::native_reload_lane_presentation","kind":"function","visibility":"public","signature":"fn native_reload_lane_presentation() -> String","source_path":"stdlib/reload.kn","line":73,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_reload_lane_structural","qualified_name":"std::reload::native_reload_lane_structural","kind":"function","visibility":"public","signature":"fn native_reload_lane_structural() -> String","source_path":"stdlib/reload.kn","line":76,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_reload_lane_actor","qualified_name":"std::reload::native_reload_lane_actor","kind":"function","visibility":"public","signature":"fn native_reload_lane_actor() -> String","source_path":"stdlib/reload.kn","line":79,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_reload_lane_gpu","qualified_name":"std::reload::native_reload_lane_gpu","kind":"function","visibility":"public","signature":"fn native_reload_lane_gpu() -> String","source_path":"stdlib/reload.kn","line":82,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_reload_snapshot_record","qualified_name":"std::reload::native_reload_snapshot_record","kind":"function","visibility":"public","signature":"fn native_reload_snapshot_record(session_id: Int) -> ReloadSnapshotRecord","source_path":"stdlib/reload.kn","line":85,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_reload_plan_for_lane","qualified_name":"std::reload::native_reload_plan_for_lane","kind":"function","visibility":"private","signature":"fn native_reload_plan_for_lane(session_id: Int, lane: String) -> ReloadMigrationPlan","source_path":"stdlib/reload.kn","line":98,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_reload_default_migration_plan","qualified_name":"std::reload::native_reload_default_migration_plan","kind":"function","visibility":"public","signature":"fn native_reload_default_migration_plan(session_id: Int) -> ReloadMigrationPlan","source_path":"stdlib/reload.kn","line":116,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_reload_structural_migration_plan","qualified_name":"std::reload::native_reload_structural_migration_plan","kind":"function","visibility":"public","signature":"fn native_reload_structural_migration_plan(session_id: Int) -> ReloadMigrationPlan","source_path":"stdlib/reload.kn","line":119,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_reload_actor_migration_plan","qualified_name":"std::reload::native_reload_actor_migration_plan","kind":"function","visibility":"public","signature":"fn native_reload_actor_migration_plan(session_id: Int) -> ReloadMigrationPlan","source_path":"stdlib/reload.kn","line":122,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_reload_gpu_migration_plan","qualified_name":"std::reload::native_reload_gpu_migration_plan","kind":"function","visibility":"public","signature":"fn native_reload_gpu_migration_plan(session_id: Int) -> ReloadMigrationPlan","source_path":"stdlib/reload.kn","line":125,"attributes":[],"docs":[],"target_notes":[]},{"name":"reload_begin","qualified_name":"std::reload::reload_begin","kind":"function","visibility":"public","signature":"fn reload_begin(session_id: Int, revision_key: String) -> Int","source_path":"stdlib/reload.kn","line":129,"attributes":[],"docs":[],"target_notes":[]},{"name":"reload_commit","qualified_name":"std::reload::reload_commit","kind":"function","visibility":"public","signature":"fn reload_commit(session_id: Int) -> Int","source_path":"stdlib/reload.kn","line":132,"attributes":[],"docs":[],"target_notes":[]},{"name":"reload_generation","qualified_name":"std::reload::reload_generation","kind":"function","visibility":"public","signature":"fn reload_generation(session_id: Int) -> Int","source_path":"stdlib/reload.kn","line":135,"attributes":[],"docs":[],"target_notes":[]},{"name":"reload_key","qualified_name":"std::reload::reload_key","kind":"function","visibility":"public","signature":"fn reload_key(session_id: Int) -> String","source_path":"stdlib/reload.kn","line":138,"attributes":[],"docs":[],"target_notes":[]},{"name":"reload_snapshot","qualified_name":"std::reload::reload_snapshot","kind":"function","visibility":"public","signature":"fn reload_snapshot(session_id: Int) -> ReloadGeneration","source_path":"stdlib/reload.kn","line":141,"attributes":[],"docs":[],"target_notes":[]},{"name":"reload_snapshot_record","qualified_name":"std::reload::reload_snapshot_record","kind":"function","visibility":"public","signature":"fn reload_snapshot_record(session_id: Int) -> ReloadSnapshotRecord","source_path":"stdlib/reload.kn","line":144,"attributes":[],"docs":[],"target_notes":[]},{"name":"reload_package_surface","qualified_name":"std::reload::reload_package_surface","kind":"function","visibility":"public","signature":"fn reload_package_surface() -> String","source_path":"stdlib/reload.kn","line":147,"attributes":[],"docs":[],"target_notes":[]},{"name":"reload_default_state_migration","qualified_name":"std::reload::reload_default_state_migration","kind":"function","visibility":"public","signature":"fn reload_default_state_migration() -> String","source_path":"stdlib/reload.kn","line":150,"attributes":[],"docs":[],"target_notes":[]},{"name":"reload_default_actor_quiesce","qualified_name":"std::reload::reload_default_actor_quiesce","kind":"function","visibility":"public","signature":"fn reload_default_actor_quiesce() -> String","source_path":"stdlib/reload.kn","line":153,"attributes":[],"docs":[],"target_notes":[]},{"name":"reload_gpu_swap_boundary","qualified_name":"std::reload::reload_gpu_swap_boundary","kind":"function","visibility":"public","signature":"fn reload_gpu_swap_boundary() -> String","source_path":"stdlib/reload.kn","line":156,"attributes":[],"docs":[],"target_notes":[]},{"name":"reload_default_restart_mode","qualified_name":"std::reload::reload_default_restart_mode","kind":"function","visibility":"public","signature":"fn reload_default_restart_mode() -> String","source_path":"stdlib/reload.kn","line":159,"attributes":[],"docs":[],"target_notes":[]},{"name":"reload_lane_noop","qualified_name":"std::reload::reload_lane_noop","kind":"function","visibility":"public","signature":"fn reload_lane_noop() -> String","source_path":"stdlib/reload.kn","line":162,"attributes":[],"docs":[],"target_notes":[]},{"name":"reload_lane_presentation","qualified_name":"std::reload::reload_lane_presentation","kind":"function","visibility":"public","signature":"fn reload_lane_presentation() -> String","source_path":"stdlib/reload.kn","line":165,"attributes":[],"docs":[],"target_notes":[]},{"name":"reload_lane_structural","qualified_name":"std::reload::reload_lane_structural","kind":"function","visibility":"public","signature":"fn reload_lane_structural() -> String","source_path":"stdlib/reload.kn","line":168,"attributes":[],"docs":[],"target_notes":[]},{"name":"reload_lane_actor","qualified_name":"std::reload::reload_lane_actor","kind":"function","visibility":"public","signature":"fn reload_lane_actor() -> String","source_path":"stdlib/reload.kn","line":171,"attributes":[],"docs":[],"target_notes":[]},{"name":"reload_lane_gpu","qualified_name":"std::reload::reload_lane_gpu","kind":"function","visibility":"public","signature":"fn reload_lane_gpu() -> String","source_path":"stdlib/reload.kn","line":174,"attributes":[],"docs":[],"target_notes":[]},{"name":"reload_default_migration_plan","qualified_name":"std::reload::reload_default_migration_plan","kind":"function","visibility":"public","signature":"fn reload_default_migration_plan(session_id: Int) -> ReloadMigrationPlan","source_path":"stdlib/reload.kn","line":177,"attributes":[],"docs":[],"target_notes":[]},{"name":"reload_structural_migration_plan","qualified_name":"std::reload::reload_structural_migration_plan","kind":"function","visibility":"public","signature":"fn reload_structural_migration_plan(session_id: Int) -> ReloadMigrationPlan","source_path":"stdlib/reload.kn","line":180,"attributes":[],"docs":[],"target_notes":[]},{"name":"reload_actor_migration_plan","qualified_name":"std::reload::reload_actor_migration_plan","kind":"function","visibility":"public","signature":"fn reload_actor_migration_plan(session_id: Int) -> ReloadMigrationPlan","source_path":"stdlib/reload.kn","line":183,"attributes":[],"docs":[],"target_notes":[]},{"name":"reload_gpu_migration_plan","qualified_name":"std::reload::reload_gpu_migration_plan","kind":"function","visibility":"public","signature":"fn reload_gpu_migration_plan(session_id: Int) -> ReloadMigrationPlan","source_path":"stdlib/reload.kn","line":186,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"result","import_path":"std::result","source_path":"stdlib/result.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"native_result_ok","qualified_name":"std::result::native_result_ok","kind":"function","visibility":"public","signature":"fn native_result_ok() -> Int","source_path":"stdlib/result.kn","line":1,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_result_cancelled","qualified_name":"std::result::native_result_cancelled","kind":"function","visibility":"public","signature":"fn native_result_cancelled() -> Int","source_path":"stdlib/result.kn","line":4,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_result_invalid_argument","qualified_name":"std::result::native_result_invalid_argument","kind":"function","visibility":"public","signature":"fn native_result_invalid_argument() -> Int","source_path":"stdlib/result.kn","line":7,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_result_not_found","qualified_name":"std::result::native_result_not_found","kind":"function","visibility":"public","signature":"fn native_result_not_found() -> Int","source_path":"stdlib/result.kn","line":10,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_result_capacity_exceeded","qualified_name":"std::result::native_result_capacity_exceeded","kind":"function","visibility":"public","signature":"fn native_result_capacity_exceeded() -> Int","source_path":"stdlib/result.kn","line":13,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_result_runtime_unavailable","qualified_name":"std::result::native_result_runtime_unavailable","kind":"function","visibility":"public","signature":"fn native_result_runtime_unavailable() -> Int","source_path":"stdlib/result.kn","line":16,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_result_is_ok","qualified_name":"std::result::native_result_is_ok","kind":"function","visibility":"public","signature":"fn native_result_is_ok(status: Int) -> Bool","source_path":"stdlib/result.kn","line":19,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_result_is_error","qualified_name":"std::result::native_result_is_error","kind":"function","visibility":"public","signature":"fn native_result_is_error(status: Int) -> Bool","source_path":"stdlib/result.kn","line":22,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_result_is_control","qualified_name":"std::result::native_result_is_control","kind":"function","visibility":"public","signature":"fn native_result_is_control(status: Int) -> Bool","source_path":"stdlib/result.kn","line":25,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_result_combine","qualified_name":"std::result::native_result_combine","kind":"function","visibility":"public","signature":"fn native_result_combine(left: Int, right: Int) -> Int","source_path":"stdlib/result.kn","line":28,"attributes":[],"docs":[],"target_notes":[]},{"name":"result_ok","qualified_name":"std::result::result_ok","kind":"function","visibility":"public","signature":"fn result_ok() -> Int","source_path":"stdlib/result.kn","line":34,"attributes":[],"docs":[],"target_notes":[]},{"name":"result_cancelled","qualified_name":"std::result::result_cancelled","kind":"function","visibility":"public","signature":"fn result_cancelled() -> Int","source_path":"stdlib/result.kn","line":37,"attributes":[],"docs":[],"target_notes":[]},{"name":"result_invalid_argument","qualified_name":"std::result::result_invalid_argument","kind":"function","visibility":"public","signature":"fn result_invalid_argument() -> Int","source_path":"stdlib/result.kn","line":40,"attributes":[],"docs":[],"target_notes":[]},{"name":"result_not_found","qualified_name":"std::result::result_not_found","kind":"function","visibility":"public","signature":"fn result_not_found() -> Int","source_path":"stdlib/result.kn","line":43,"attributes":[],"docs":[],"target_notes":[]},{"name":"result_capacity_exceeded","qualified_name":"std::result::result_capacity_exceeded","kind":"function","visibility":"public","signature":"fn result_capacity_exceeded() -> Int","source_path":"stdlib/result.kn","line":46,"attributes":[],"docs":[],"target_notes":[]},{"name":"result_runtime_unavailable","qualified_name":"std::result::result_runtime_unavailable","kind":"function","visibility":"public","signature":"fn result_runtime_unavailable() -> Int","source_path":"stdlib/result.kn","line":49,"attributes":[],"docs":[],"target_notes":[]},{"name":"result_is_ok","qualified_name":"std::result::result_is_ok","kind":"function","visibility":"public","signature":"fn result_is_ok(status: Int) -> Bool","source_path":"stdlib/result.kn","line":52,"attributes":[],"docs":[],"target_notes":[]},{"name":"result_is_error","qualified_name":"std::result::result_is_error","kind":"function","visibility":"public","signature":"fn result_is_error(status: Int) -> Bool","source_path":"stdlib/result.kn","line":55,"attributes":[],"docs":[],"target_notes":[]},{"name":"result_is_control","qualified_name":"std::result::result_is_control","kind":"function","visibility":"public","signature":"fn result_is_control(status: Int) -> Bool","source_path":"stdlib/result.kn","line":58,"attributes":[],"docs":[],"target_notes":[]},{"name":"result_combine","qualified_name":"std::result::result_combine","kind":"function","visibility":"public","signature":"fn result_combine(left: Int, right: Int) -> Int","source_path":"stdlib/result.kn","line":61,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"runtime","import_path":"std::runtime","source_path":"stdlib/runtime.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"abi_runtime_init","qualified_name":"std::runtime::abi_runtime_init","kind":"extern_function","visibility":"private","signature":"fn abi_runtime_init() -> Int","source_path":"stdlib/runtime.kn","line":2,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_runtime_shutdown","qualified_name":"std::runtime::abi_runtime_shutdown","kind":"extern_function","visibility":"private","signature":"fn abi_runtime_shutdown() -> Int","source_path":"stdlib/runtime.kn","line":5,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_runtime_heap_validate","qualified_name":"std::runtime::abi_runtime_heap_validate","kind":"extern_function","visibility":"private","signature":"fn abi_runtime_heap_validate() -> Int","source_path":"stdlib/runtime.kn","line":8,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_attrition_checkpoint","qualified_name":"std::runtime::abi_attrition_checkpoint","kind":"extern_function","visibility":"private","signature":"fn abi_attrition_checkpoint(label: String, subject_id: Int) -> Int","source_path":"stdlib/runtime.kn","line":11,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_attrition_note_progress","qualified_name":"std::runtime::abi_attrition_note_progress","kind":"extern_function","visibility":"private","signature":"fn abi_attrition_note_progress(iteration: Int, checksum: Int) -> Int","source_path":"stdlib/runtime.kn","line":14,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_attrition_result_set","qualified_name":"std::runtime::abi_attrition_result_set","kind":"extern_function","visibility":"private","signature":"fn abi_attrition_result_set(checksum: Int, run_status: Int, run_failure: String) -> Int","source_path":"stdlib/runtime.kn","line":17,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_cpu_feature_mask","qualified_name":"std::runtime::abi_cpu_feature_mask","kind":"extern_function","visibility":"private","signature":"fn abi_cpu_feature_mask() -> Int","source_path":"stdlib/runtime.kn","line":20,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_cpu_feature_fingerprint","qualified_name":"std::runtime::abi_cpu_feature_fingerprint","kind":"extern_function","visibility":"private","signature":"fn abi_cpu_feature_fingerprint() -> Int","source_path":"stdlib/runtime.kn","line":23,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_cpu_capability_mask_for_key","qualified_name":"std::runtime::abi_cpu_capability_mask_for_key","kind":"extern_function","visibility":"private","signature":"fn abi_cpu_capability_mask_for_key(capability_key: String) -> Int","source_path":"stdlib/runtime.kn","line":26,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_cpu_has_capability","qualified_name":"std::runtime::abi_cpu_has_capability","kind":"extern_function","visibility":"private","signature":"fn abi_cpu_has_capability(capability_key: String) -> Int","source_path":"stdlib/runtime.kn","line":29,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_simd_i64_dot_i32_domain_scalar_mod","qualified_name":"std::runtime::abi_simd_i64_dot_i32_domain_scalar_mod","kind":"extern_function","visibility":"private","signature":"fn abi_simd_i64_dot_i32_domain_scalar_mod(left: ptr, right: ptr, cells: Int, lane_bias: Int, modulus: Int) -> Int","source_path":"stdlib/runtime.kn","line":32,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_simd_i64_dot_i32_domain_avx2_mod","qualified_name":"std::runtime::abi_simd_i64_dot_i32_domain_avx2_mod","kind":"extern_function","visibility":"private","signature":"fn abi_simd_i64_dot_i32_domain_avx2_mod(left: ptr, right: ptr, cells: Int, lane_bias: Int, modulus: Int) -> Int","source_path":"stdlib/runtime.kn","line":35,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_simd_i64_dot_i32_domain_avx512_mod","qualified_name":"std::runtime::abi_simd_i64_dot_i32_domain_avx512_mod","kind":"extern_function","visibility":"private","signature":"fn abi_simd_i64_dot_i32_domain_avx512_mod(left: ptr, right: ptr, cells: Int, lane_bias: Int, modulus: Int) -> Int","source_path":"stdlib/runtime.kn","line":38,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_simd_i64_dot_i32_domain_affine_accumulate_scalar_mod","qualified_name":"std::runtime::abi_simd_i64_dot_i32_domain_affine_accumulate_scalar_mod","kind":"extern_function","visibility":"private","signature":"fn abi_simd_i64_dot_i32_domain_affine_accumulate_scalar_mod(left: ptr, right: ptr, cells: Int, passes: Int, bias_mod: Int, phase_mod: Int, modulus: Int) -> Int","source_path":"stdlib/runtime.kn","line":41,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_simd_i64_dot_i32_domain_affine_accumulate_avx2_mod","qualified_name":"std::runtime::abi_simd_i64_dot_i32_domain_affine_accumulate_avx2_mod","kind":"extern_function","visibility":"private","signature":"fn abi_simd_i64_dot_i32_domain_affine_accumulate_avx2_mod(left: ptr, right: ptr, cells: Int, passes: Int, bias_mod: Int, phase_mod: Int, modulus: Int) -> Int","source_path":"stdlib/runtime.kn","line":44,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_simd_i64_dot_i32_domain_affine_accumulate_avx512_mod","qualified_name":"std::runtime::abi_simd_i64_dot_i32_domain_affine_accumulate_avx512_mod","kind":"extern_function","visibility":"private","signature":"fn abi_simd_i64_dot_i32_domain_affine_accumulate_avx512_mod(left: ptr, right: ptr, cells: Int, passes: Int, bias_mod: Int, phase_mod: Int, modulus: Int) -> Int","source_path":"stdlib/runtime.kn","line":47,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_simd_i64_affine_pow2_fill_pair_accumulate_mod","qualified_name":"std::runtime::abi_simd_i64_affine_pow2_fill_pair_accumulate_mod","kind":"extern_function","visibility":"private","signature":"fn abi_simd_i64_affine_pow2_fill_pair_accumulate_mod(left: ptr, right: ptr, cells: Int, left_mul: Int, left_add: Int, left_mask: Int, right_mul: Int, right_add: Int, right_mask: Int, passes: Int, bias_mod: Int, phase_mod: Int, modulus: Int) -> Int","source_path":"stdlib/runtime.kn","line":50,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_converge_select_lane_for_key","qualified_name":"std::runtime::abi_converge_select_lane_for_key","kind":"extern_function","visibility":"private","signature":"fn abi_converge_select_lane_for_key(converge_key: Int, shape_key: Int, eligible_mask: Int, fallback_lane: Int) -> Int","source_path":"stdlib/runtime.kn","line":53,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_converge_commit_winner","qualified_name":"std::runtime::abi_converge_commit_winner","kind":"extern_function","visibility":"private","signature":"fn abi_converge_commit_winner(converge_key: Int, shape_key: Int, winner_lane: Int) -> Int","source_path":"stdlib/runtime.kn","line":56,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_converge_record_telemetry","qualified_name":"std::runtime::abi_converge_record_telemetry","kind":"extern_function","visibility":"private","signature":"fn abi_converge_record_telemetry(converge_key: Int, lane_index: Int, elapsed_ns: Int, ok: Int, mismatch: Int) -> Int","source_path":"stdlib/runtime.kn","line":59,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_converge_telemetry_count","qualified_name":"std::runtime::abi_converge_telemetry_count","kind":"extern_function","visibility":"private","signature":"fn abi_converge_telemetry_count() -> Int","source_path":"stdlib/runtime.kn","line":62,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_converge_cache_probe_count","qualified_name":"std::runtime::abi_converge_cache_probe_count","kind":"extern_function","visibility":"private","signature":"fn abi_converge_cache_probe_count() -> Int","source_path":"stdlib/runtime.kn","line":65,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_converge_cache_hit_count","qualified_name":"std::runtime::abi_converge_cache_hit_count","kind":"extern_function","visibility":"private","signature":"fn abi_converge_cache_hit_count() -> Int","source_path":"stdlib/runtime.kn","line":68,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"kain_machine_teleport_count","qualified_name":"std::runtime::kain_machine_teleport_count","kind":"extern_function","visibility":"private","signature":"fn kain_machine_teleport_count() -> Int","source_path":"stdlib/runtime.kn","line":71,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"kain_machine_teleport_last_token","qualified_name":"std::runtime::kain_machine_teleport_last_token","kind":"extern_function","visibility":"private","signature":"fn kain_machine_teleport_last_token() -> Int","source_path":"stdlib/runtime.kn","line":74,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"kain_machine_pulse_total_fire_count","qualified_name":"std::runtime::kain_machine_pulse_total_fire_count","kind":"extern_function","visibility":"private","signature":"fn kain_machine_pulse_total_fire_count() -> Int","source_path":"stdlib/runtime.kn","line":77,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"native_runtime_init","qualified_name":"std::runtime::native_runtime_init","kind":"function","visibility":"public","signature":"fn native_runtime_init() -> Int","source_path":"stdlib/runtime.kn","line":79,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_runtime_shutdown","qualified_name":"std::runtime::native_runtime_shutdown","kind":"function","visibility":"public","signature":"fn native_runtime_shutdown() -> Int","source_path":"stdlib/runtime.kn","line":82,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_runtime_heap_validate","qualified_name":"std::runtime::native_runtime_heap_validate","kind":"function","visibility":"public","signature":"fn native_runtime_heap_validate() -> Int","source_path":"stdlib/runtime.kn","line":85,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_runtime_attrition_checkpoint","qualified_name":"std::runtime::native_runtime_attrition_checkpoint","kind":"function","visibility":"public","signature":"fn native_runtime_attrition_checkpoint(label: String, subject_id: Int) -> Int","source_path":"stdlib/runtime.kn","line":88,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_runtime_attrition_note_progress","qualified_name":"std::runtime::native_runtime_attrition_note_progress","kind":"function","visibility":"public","signature":"fn native_runtime_attrition_note_progress(iteration: Int, checksum: Int) -> Int","source_path":"stdlib/runtime.kn","line":91,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_runtime_attrition_result_set","qualified_name":"std::runtime::native_runtime_attrition_result_set","kind":"function","visibility":"public","signature":"fn native_runtime_attrition_result_set(checksum: Int, run_status: Int, run_failure: String) -> Int","source_path":"stdlib/runtime.kn","line":94,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_cpu_feature_mask","qualified_name":"std::runtime::native_cpu_feature_mask","kind":"function","visibility":"public","signature":"fn native_cpu_feature_mask() -> Int","source_path":"stdlib/runtime.kn","line":97,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_cpu_feature_fingerprint","qualified_name":"std::runtime::native_cpu_feature_fingerprint","kind":"function","visibility":"public","signature":"fn native_cpu_feature_fingerprint() -> Int","source_path":"stdlib/runtime.kn","line":100,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_cpu_capability_mask","qualified_name":"std::runtime::native_cpu_capability_mask","kind":"function","visibility":"public","signature":"fn native_cpu_capability_mask(capability_key: String) -> Int","source_path":"stdlib/runtime.kn","line":103,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_cpu_has_capability","qualified_name":"std::runtime::native_cpu_has_capability","kind":"function","visibility":"public","signature":"fn native_cpu_has_capability(capability_key: String) -> Int","source_path":"stdlib/runtime.kn","line":106,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_simd_i32_domain_dot_scalar_mod","qualified_name":"std::runtime::native_simd_i32_domain_dot_scalar_mod","kind":"function","visibility":"public","signature":"fn native_simd_i32_domain_dot_scalar_mod(left: ptr, right: ptr, cells: Int, lane_bias: Int, modulus: Int) -> Int","source_path":"stdlib/runtime.kn","line":109,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_simd_i32_domain_dot_avx2_mod","qualified_name":"std::runtime::native_simd_i32_domain_dot_avx2_mod","kind":"function","visibility":"public","signature":"fn native_simd_i32_domain_dot_avx2_mod(left: ptr, right: ptr, cells: Int, lane_bias: Int, modulus: Int) -> Int","source_path":"stdlib/runtime.kn","line":112,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_simd_i32_domain_dot_avx512_mod","qualified_name":"std::runtime::native_simd_i32_domain_dot_avx512_mod","kind":"function","visibility":"public","signature":"fn native_simd_i32_domain_dot_avx512_mod(left: ptr, right: ptr, cells: Int, lane_bias: Int, modulus: Int) -> Int","source_path":"stdlib/runtime.kn","line":115,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_simd_i32_domain_affine_accumulate_scalar_mod","qualified_name":"std::runtime::native_simd_i32_domain_affine_accumulate_scalar_mod","kind":"function","visibility":"public","signature":"fn native_simd_i32_domain_affine_accumulate_scalar_mod(left: ptr, right: ptr, cells: Int, passes: Int, bias_mod: Int, phase_mod: Int, modulus: Int) -> Int","source_path":"stdlib/runtime.kn","line":118,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_simd_i32_domain_affine_accumulate_avx2_mod","qualified_name":"std::runtime::native_simd_i32_domain_affine_accumulate_avx2_mod","kind":"function","visibility":"public","signature":"fn native_simd_i32_domain_affine_accumulate_avx2_mod(left: ptr, right: ptr, cells: Int, passes: Int, bias_mod: Int, phase_mod: Int, modulus: Int) -> Int","source_path":"stdlib/runtime.kn","line":121,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_simd_i32_domain_affine_accumulate_avx512_mod","qualified_name":"std::runtime::native_simd_i32_domain_affine_accumulate_avx512_mod","kind":"function","visibility":"public","signature":"fn native_simd_i32_domain_affine_accumulate_avx512_mod(left: ptr, right: ptr, cells: Int, passes: Int, bias_mod: Int, phase_mod: Int, modulus: Int) -> Int","source_path":"stdlib/runtime.kn","line":124,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_simd_i32_domain_affine_pow2_fill_pair_accumulate_mod","qualified_name":"std::runtime::native_simd_i32_domain_affine_pow2_fill_pair_accumulate_mod","kind":"function","visibility":"public","signature":"fn native_simd_i32_domain_affine_pow2_fill_pair_accumulate_mod(left: ptr, right: ptr, cells: Int, left_mul: Int, left_add: Int, left_mask: Int, right_mul: Int, right_add: Int, right_mask: Int, passes: Int, bias_mod: Int, phase_mod: Int, modulus: Int) -> Int","source_path":"stdlib/runtime.kn","line":127,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_converge_select_lane","qualified_name":"std::runtime::native_converge_select_lane","kind":"function","visibility":"public","signature":"fn native_converge_select_lane(converge_key: Int, shape_key: Int, eligible_mask: Int, fallback_lane: Int) -> Int","source_path":"stdlib/runtime.kn","line":130,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_converge_commit_winner","qualified_name":"std::runtime::native_converge_commit_winner","kind":"function","visibility":"public","signature":"fn native_converge_commit_winner(converge_key: Int, shape_key: Int, winner_lane: Int) -> Int","source_path":"stdlib/runtime.kn","line":133,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_converge_record_telemetry","qualified_name":"std::runtime::native_converge_record_telemetry","kind":"function","visibility":"public","signature":"fn native_converge_record_telemetry(converge_key: Int, lane_index: Int, elapsed_ns: Int, ok: Int, mismatch: Int) -> Int","source_path":"stdlib/runtime.kn","line":136,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_converge_telemetry_count","qualified_name":"std::runtime::native_converge_telemetry_count","kind":"function","visibility":"public","signature":"fn native_converge_telemetry_count() -> Int","source_path":"stdlib/runtime.kn","line":139,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_converge_cache_probe_count","qualified_name":"std::runtime::native_converge_cache_probe_count","kind":"function","visibility":"public","signature":"fn native_converge_cache_probe_count() -> Int","source_path":"stdlib/runtime.kn","line":142,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_converge_cache_hit_count","qualified_name":"std::runtime::native_converge_cache_hit_count","kind":"function","visibility":"public","signature":"fn native_converge_cache_hit_count() -> Int","source_path":"stdlib/runtime.kn","line":145,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_machine_teleport_count","qualified_name":"std::runtime::native_machine_teleport_count","kind":"function","visibility":"public","signature":"fn native_machine_teleport_count() -> Int","source_path":"stdlib/runtime.kn","line":148,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_machine_teleport_last_token","qualified_name":"std::runtime::native_machine_teleport_last_token","kind":"function","visibility":"public","signature":"fn native_machine_teleport_last_token() -> Int","source_path":"stdlib/runtime.kn","line":151,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_machine_pulse_total_fire_count","qualified_name":"std::runtime::native_machine_pulse_total_fire_count","kind":"function","visibility":"public","signature":"fn native_machine_pulse_total_fire_count() -> Int","source_path":"stdlib/runtime.kn","line":154,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_runtime_with_status","qualified_name":"std::runtime::native_runtime_with_status","kind":"function","visibility":"public","signature":"fn native_runtime_with_status(status: Int) -> Int","source_path":"stdlib/runtime.kn","line":157,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_runtime_cleanup_status","qualified_name":"std::runtime::native_runtime_cleanup_status","kind":"function","visibility":"public","signature":"fn native_runtime_cleanup_status(status: Int) -> Int","source_path":"stdlib/runtime.kn","line":162,"attributes":[],"docs":[],"target_notes":[]},{"name":"runtime_init","qualified_name":"std::runtime::runtime_init","kind":"function","visibility":"public","signature":"fn runtime_init() -> Int","source_path":"stdlib/runtime.kn","line":169,"attributes":[],"docs":[],"target_notes":[]},{"name":"runtime_shutdown","qualified_name":"std::runtime::runtime_shutdown","kind":"function","visibility":"public","signature":"fn runtime_shutdown() -> Int","source_path":"stdlib/runtime.kn","line":172,"attributes":[],"docs":[],"target_notes":[]},{"name":"runtime_heap_validate","qualified_name":"std::runtime::runtime_heap_validate","kind":"function","visibility":"public","signature":"fn runtime_heap_validate() -> Int","source_path":"stdlib/runtime.kn","line":175,"attributes":[],"docs":[],"target_notes":[]},{"name":"runtime_attrition_checkpoint","qualified_name":"std::runtime::runtime_attrition_checkpoint","kind":"function","visibility":"public","signature":"fn runtime_attrition_checkpoint(label: String, subject_id: Int) -> Int","source_path":"stdlib/runtime.kn","line":178,"attributes":[],"docs":[],"target_notes":[]},{"name":"runtime_attrition_note_progress","qualified_name":"std::runtime::runtime_attrition_note_progress","kind":"function","visibility":"public","signature":"fn runtime_attrition_note_progress(iteration: Int, checksum: Int) -> Int","source_path":"stdlib/runtime.kn","line":181,"attributes":[],"docs":[],"target_notes":[]},{"name":"runtime_attrition_result_set","qualified_name":"std::runtime::runtime_attrition_result_set","kind":"function","visibility":"public","signature":"fn runtime_attrition_result_set(checksum: Int, run_status: Int, run_failure: String) -> Int","source_path":"stdlib/runtime.kn","line":184,"attributes":[],"docs":[],"target_notes":[]},{"name":"runtime_cpu_feature_mask","qualified_name":"std::runtime::runtime_cpu_feature_mask","kind":"function","visibility":"public","signature":"fn runtime_cpu_feature_mask() -> Int","source_path":"stdlib/runtime.kn","line":187,"attributes":[],"docs":[],"target_notes":[]},{"name":"runtime_cpu_feature_fingerprint","qualified_name":"std::runtime::runtime_cpu_feature_fingerprint","kind":"function","visibility":"public","signature":"fn runtime_cpu_feature_fingerprint() -> Int","source_path":"stdlib/runtime.kn","line":190,"attributes":[],"docs":[],"target_notes":[]},{"name":"runtime_cpu_capability_mask","qualified_name":"std::runtime::runtime_cpu_capability_mask","kind":"function","visibility":"public","signature":"fn runtime_cpu_capability_mask(capability_key: String) -> Int","source_path":"stdlib/runtime.kn","line":193,"attributes":[],"docs":[],"target_notes":[]},{"name":"runtime_cpu_has_capability","qualified_name":"std::runtime::runtime_cpu_has_capability","kind":"function","visibility":"public","signature":"fn runtime_cpu_has_capability(capability_key: String) -> Int","source_path":"stdlib/runtime.kn","line":196,"attributes":[],"docs":[],"target_notes":[]},{"name":"runtime_simd_i32_domain_dot_scalar_mod","qualified_name":"std::runtime::runtime_simd_i32_domain_dot_scalar_mod","kind":"function","visibility":"public","signature":"fn runtime_simd_i32_domain_dot_scalar_mod(left: ptr, right: ptr, cells: Int, lane_bias: Int, modulus: Int) -> Int","source_path":"stdlib/runtime.kn","line":199,"attributes":[],"docs":[],"target_notes":[]},{"name":"runtime_simd_i32_domain_dot_avx2_mod","qualified_name":"std::runtime::runtime_simd_i32_domain_dot_avx2_mod","kind":"function","visibility":"public","signature":"fn runtime_simd_i32_domain_dot_avx2_mod(left: ptr, right: ptr, cells: Int, lane_bias: Int, modulus: Int) -> Int","source_path":"stdlib/runtime.kn","line":202,"attributes":[],"docs":[],"target_notes":[]},{"name":"runtime_simd_i32_domain_dot_avx512_mod","qualified_name":"std::runtime::runtime_simd_i32_domain_dot_avx512_mod","kind":"function","visibility":"public","signature":"fn runtime_simd_i32_domain_dot_avx512_mod(left: ptr, right: ptr, cells: Int, lane_bias: Int, modulus: Int) -> Int","source_path":"stdlib/runtime.kn","line":205,"attributes":[],"docs":[],"target_notes":[]},{"name":"runtime_simd_i32_domain_affine_accumulate_scalar_mod","qualified_name":"std::runtime::runtime_simd_i32_domain_affine_accumulate_scalar_mod","kind":"function","visibility":"public","signature":"fn runtime_simd_i32_domain_affine_accumulate_scalar_mod(left: ptr, right: ptr, cells: Int, passes: Int, bias_mod: Int, phase_mod: Int, modulus: Int) -> Int","source_path":"stdlib/runtime.kn","line":208,"attributes":[],"docs":[],"target_notes":[]},{"name":"runtime_simd_i32_domain_affine_accumulate_avx2_mod","qualified_name":"std::runtime::runtime_simd_i32_domain_affine_accumulate_avx2_mod","kind":"function","visibility":"public","signature":"fn runtime_simd_i32_domain_affine_accumulate_avx2_mod(left: ptr, right: ptr, cells: Int, passes: Int, bias_mod: Int, phase_mod: Int, modulus: Int) -> Int","source_path":"stdlib/runtime.kn","line":211,"attributes":[],"docs":[],"target_notes":[]},{"name":"runtime_simd_i32_domain_affine_accumulate_avx512_mod","qualified_name":"std::runtime::runtime_simd_i32_domain_affine_accumulate_avx512_mod","kind":"function","visibility":"public","signature":"fn runtime_simd_i32_domain_affine_accumulate_avx512_mod(left: ptr, right: ptr, cells: Int, passes: Int, bias_mod: Int, phase_mod: Int, modulus: Int) -> Int","source_path":"stdlib/runtime.kn","line":214,"attributes":[],"docs":[],"target_notes":[]},{"name":"runtime_simd_i32_domain_affine_pow2_fill_pair_accumulate_mod","qualified_name":"std::runtime::runtime_simd_i32_domain_affine_pow2_fill_pair_accumulate_mod","kind":"function","visibility":"public","signature":"fn runtime_simd_i32_domain_affine_pow2_fill_pair_accumulate_mod(left: ptr, right: ptr, cells: Int, left_mul: Int, left_add: Int, left_mask: Int, right_mul: Int, right_add: Int, right_mask: Int, passes: Int, bias_mod: Int, phase_mod: Int, modulus: Int) -> Int","source_path":"stdlib/runtime.kn","line":217,"attributes":[],"docs":[],"target_notes":[]},{"name":"runtime_converge_select_lane","qualified_name":"std::runtime::runtime_converge_select_lane","kind":"function","visibility":"public","signature":"fn runtime_converge_select_lane(converge_key: Int, shape_key: Int, eligible_mask: Int, fallback_lane: Int) -> Int","source_path":"stdlib/runtime.kn","line":220,"attributes":[],"docs":[],"target_notes":[]},{"name":"runtime_converge_commit_winner","qualified_name":"std::runtime::runtime_converge_commit_winner","kind":"function","visibility":"public","signature":"fn runtime_converge_commit_winner(converge_key: Int, shape_key: Int, winner_lane: Int) -> Int","source_path":"stdlib/runtime.kn","line":223,"attributes":[],"docs":[],"target_notes":[]},{"name":"runtime_converge_record_telemetry","qualified_name":"std::runtime::runtime_converge_record_telemetry","kind":"function","visibility":"public","signature":"fn runtime_converge_record_telemetry(converge_key: Int, lane_index: Int, elapsed_ns: Int, ok: Int, mismatch: Int) -> Int","source_path":"stdlib/runtime.kn","line":226,"attributes":[],"docs":[],"target_notes":[]},{"name":"runtime_converge_telemetry_count","qualified_name":"std::runtime::runtime_converge_telemetry_count","kind":"function","visibility":"public","signature":"fn runtime_converge_telemetry_count() -> Int","source_path":"stdlib/runtime.kn","line":229,"attributes":[],"docs":[],"target_notes":[]},{"name":"runtime_converge_cache_probe_count","qualified_name":"std::runtime::runtime_converge_cache_probe_count","kind":"function","visibility":"public","signature":"fn runtime_converge_cache_probe_count() -> Int","source_path":"stdlib/runtime.kn","line":232,"attributes":[],"docs":[],"target_notes":[]},{"name":"runtime_converge_cache_hit_count","qualified_name":"std::runtime::runtime_converge_cache_hit_count","kind":"function","visibility":"public","signature":"fn runtime_converge_cache_hit_count() -> Int","source_path":"stdlib/runtime.kn","line":235,"attributes":[],"docs":[],"target_notes":[]},{"name":"runtime_machine_teleport_count","qualified_name":"std::runtime::runtime_machine_teleport_count","kind":"function","visibility":"public","signature":"fn runtime_machine_teleport_count() -> Int","source_path":"stdlib/runtime.kn","line":238,"attributes":[],"docs":[],"target_notes":[]},{"name":"runtime_machine_teleport_last_token","qualified_name":"std::runtime::runtime_machine_teleport_last_token","kind":"function","visibility":"public","signature":"fn runtime_machine_teleport_last_token() -> Int","source_path":"stdlib/runtime.kn","line":241,"attributes":[],"docs":[],"target_notes":[]},{"name":"runtime_machine_pulse_total_fire_count","qualified_name":"std::runtime::runtime_machine_pulse_total_fire_count","kind":"function","visibility":"public","signature":"fn runtime_machine_pulse_total_fire_count() -> Int","source_path":"stdlib/runtime.kn","line":244,"attributes":[],"docs":[],"target_notes":[]},{"name":"runtime_with_status","qualified_name":"std::runtime::runtime_with_status","kind":"function","visibility":"public","signature":"fn runtime_with_status(status: Int) -> Int","source_path":"stdlib/runtime.kn","line":247,"attributes":[],"docs":[],"target_notes":[]},{"name":"runtime_cleanup_status","qualified_name":"std::runtime::runtime_cleanup_status","kind":"function","visibility":"public","signature":"fn runtime_cleanup_status(status: Int) -> Int","source_path":"stdlib/runtime.kn","line":250,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"semver","import_path":"std::semver","source_path":"stdlib/semver.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"SEMVER_ORDER_LT","qualified_name":"std::semver::SEMVER_ORDER_LT","kind":"const","visibility":"public","signature":"const SEMVER_ORDER_LT: Int","source_path":"stdlib/semver.kn","line":3,"attributes":[],"docs":[],"target_notes":[]},{"name":"SEMVER_ORDER_EQ","qualified_name":"std::semver::SEMVER_ORDER_EQ","kind":"const","visibility":"public","signature":"const SEMVER_ORDER_EQ: Int","source_path":"stdlib/semver.kn","line":4,"attributes":[],"docs":[],"target_notes":[]},{"name":"SEMVER_ORDER_GT","qualified_name":"std::semver::SEMVER_ORDER_GT","kind":"const","visibility":"public","signature":"const SEMVER_ORDER_GT: Int","source_path":"stdlib/semver.kn","line":5,"attributes":[],"docs":[],"target_notes":[]},{"name":"SEMVER_OP_EQ","qualified_name":"std::semver::SEMVER_OP_EQ","kind":"const","visibility":"public","signature":"const SEMVER_OP_EQ: String","source_path":"stdlib/semver.kn","line":7,"attributes":[],"docs":[],"target_notes":[]},{"name":"SEMVER_OP_GT","qualified_name":"std::semver::SEMVER_OP_GT","kind":"const","visibility":"public","signature":"const SEMVER_OP_GT: String","source_path":"stdlib/semver.kn","line":8,"attributes":[],"docs":[],"target_notes":[]},{"name":"SEMVER_OP_GTE","qualified_name":"std::semver::SEMVER_OP_GTE","kind":"const","visibility":"public","signature":"const SEMVER_OP_GTE: String","source_path":"stdlib/semver.kn","line":9,"attributes":[],"docs":[],"target_notes":[]},{"name":"SEMVER_OP_LT","qualified_name":"std::semver::SEMVER_OP_LT","kind":"const","visibility":"public","signature":"const SEMVER_OP_LT: String","source_path":"stdlib/semver.kn","line":10,"attributes":[],"docs":[],"target_notes":[]},{"name":"SEMVER_OP_LTE","qualified_name":"std::semver::SEMVER_OP_LTE","kind":"const","visibility":"public","signature":"const SEMVER_OP_LTE: String","source_path":"stdlib/semver.kn","line":11,"attributes":[],"docs":[],"target_notes":[]},{"name":"SemVer","qualified_name":"std::semver::SemVer","kind":"struct","visibility":"public","signature":"struct SemVer","source_path":"stdlib/semver.kn","line":13,"attributes":[],"docs":[],"target_notes":[]},{"name":"SemVerParseResult","qualified_name":"std::semver::SemVerParseResult","kind":"struct","visibility":"public","signature":"struct SemVerParseResult","source_path":"stdlib/semver.kn","line":20,"attributes":[],"docs":[],"target_notes":[]},{"name":"SemVerComparator","qualified_name":"std::semver::SemVerComparator","kind":"struct","visibility":"public","signature":"struct SemVerComparator","source_path":"stdlib/semver.kn","line":25,"attributes":[],"docs":[],"target_notes":[]},{"name":"SemVerRangeClause","qualified_name":"std::semver::SemVerRangeClause","kind":"struct","visibility":"public","signature":"struct SemVerRangeClause","source_path":"stdlib/semver.kn","line":29,"attributes":[],"docs":[],"target_notes":[]},{"name":"SemVerRange","qualified_name":"std::semver::SemVerRange","kind":"struct","visibility":"public","signature":"struct SemVerRange","source_path":"stdlib/semver.kn","line":33,"attributes":[],"docs":[],"target_notes":[]},{"name":"SemVerRangeParseResult","qualified_name":"std::semver::SemVerRangeParseResult","kind":"struct","visibility":"public","signature":"struct SemVerRangeParseResult","source_path":"stdlib/semver.kn","line":36,"attributes":[],"docs":[],"target_notes":[]},{"name":"SemVerIdentifierParseResult","qualified_name":"std::semver::SemVerIdentifierParseResult","kind":"struct","visibility":"private","signature":"struct SemVerIdentifierParseResult","source_path":"stdlib/semver.kn","line":41,"attributes":[],"docs":[],"target_notes":[]},{"name":"SemVerPattern","qualified_name":"std::semver::SemVerPattern","kind":"struct","visibility":"private","signature":"struct SemVerPattern","source_path":"stdlib/semver.kn","line":46,"attributes":[],"docs":[],"target_notes":[]},{"name":"SemVerClauseParseResult","qualified_name":"std::semver::SemVerClauseParseResult","kind":"struct","visibility":"private","signature":"struct SemVerClauseParseResult","source_path":"stdlib/semver.kn","line":55,"attributes":[],"docs":[],"target_notes":[]},{"name":"SemVerTokenExpandResult","qualified_name":"std::semver::SemVerTokenExpandResult","kind":"struct","visibility":"private","signature":"struct SemVerTokenExpandResult","source_path":"stdlib/semver.kn","line":60,"attributes":[],"docs":[],"target_notes":[]},{"name":"semver_empty_strings","qualified_name":"std::semver::semver_empty_strings","kind":"function","visibility":"private","signature":"fn semver_empty_strings() -> Array","source_path":"stdlib/semver.kn","line":66,"attributes":[],"docs":[],"target_notes":[]},{"name":"semver_empty_comparators","qualified_name":"std::semver::semver_empty_comparators","kind":"function","visibility":"private","signature":"fn semver_empty_comparators() -> Array","source_path":"stdlib/semver.kn","line":70,"attributes":[],"docs":[],"target_notes":[]},{"name":"semver_empty_clauses","qualified_name":"std::semver::semver_empty_clauses","kind":"function","visibility":"private","signature":"fn semver_empty_clauses() -> Array","source_path":"stdlib/semver.kn","line":74,"attributes":[],"docs":[],"target_notes":[]},{"name":"semver_empty_version","qualified_name":"std::semver::semver_empty_version","kind":"function","visibility":"private","signature":"fn semver_empty_version() -> SemVer","source_path":"stdlib/semver.kn","line":78,"attributes":[],"docs":[],"target_notes":[]},{"name":"semver_empty_range","qualified_name":"std::semver::semver_empty_range","kind":"function","visibility":"private","signature":"fn semver_empty_range() -> SemVerRange","source_path":"stdlib/semver.kn","line":87,"attributes":[],"docs":[],"target_notes":[]},{"name":"semver_parse_error","qualified_name":"std::semver::semver_parse_error","kind":"function","visibility":"private","signature":"fn semver_parse_error(message: String) -> SemVerParseResult","source_path":"stdlib/semver.kn","line":90,"attributes":[],"docs":[],"target_notes":[]},{"name":"semver_range_parse_error","qualified_name":"std::semver::semver_range_parse_error","kind":"function","visibility":"private","signature":"fn semver_range_parse_error(message: String) -> SemVerRangeParseResult","source_path":"stdlib/semver.kn","line":97,"attributes":[],"docs":[],"target_notes":[]},{"name":"semver_clause_error","qualified_name":"std::semver::semver_clause_error","kind":"function","visibility":"private","signature":"fn semver_clause_error(message: String) -> SemVerClauseParseResult","source_path":"stdlib/semver.kn","line":104,"attributes":[],"docs":[],"target_notes":[]},{"name":"semver_token_expand_error","qualified_name":"std::semver::semver_token_expand_error","kind":"function","visibility":"private","signature":"fn semver_token_expand_error(message: String) -> SemVerTokenExpandResult","source_path":"stdlib/semver.kn","line":114,"attributes":[],"docs":[],"target_notes":[]},{"name":"semver_trim","qualified_name":"std::semver::semver_trim","kind":"function","visibility":"private","signature":"fn semver_trim(text: String) -> String","source_path":"stdlib/semver.kn","line":122,"attributes":[],"docs":[],"target_notes":[]},{"name":"semver_index_of_char","qualified_name":"std::semver::semver_index_of_char","kind":"function","visibility":"private","signature":"fn semver_index_of_char(text: String, marker: String, start: Int) -> Int","source_path":"stdlib/semver.kn","line":131,"attributes":[],"docs":[],"target_notes":[]},{"name":"semver_starts_with","qualified_name":"std::semver::semver_starts_with","kind":"function","visibility":"private","signature":"fn semver_starts_with(text: String, prefix: String) -> Bool","source_path":"stdlib/semver.kn","line":139,"attributes":[],"docs":[],"target_notes":[]},{"name":"semver_split_string","qualified_name":"std::semver::semver_split_string","kind":"function","visibility":"private","signature":"fn semver_split_string(source: String, separator: String) -> Array","source_path":"stdlib/semver.kn","line":149,"attributes":[],"docs":[],"target_notes":[]},{"name":"semver_join_strings","qualified_name":"std::semver::semver_join_strings","kind":"function","visibility":"private","signature":"fn semver_join_strings(items: Array, separator: String) -> String","source_path":"stdlib/semver.kn","line":164,"attributes":[],"docs":[],"target_notes":[]},{"name":"semver_string_array_equal","qualified_name":"std::semver::semver_string_array_equal","kind":"function","visibility":"private","signature":"fn semver_string_array_equal(left: Array, right: Array) -> Bool","source_path":"stdlib/semver.kn","line":174,"attributes":[],"docs":[],"target_notes":[]},{"name":"semver_is_wildcard_token","qualified_name":"std::semver::semver_is_wildcard_token","kind":"function","visibility":"private","signature":"fn semver_is_wildcard_token(text: String) -> Bool","source_path":"stdlib/semver.kn","line":184,"attributes":[],"docs":[],"target_notes":[]},{"name":"semver_is_operator_only_token","qualified_name":"std::semver::semver_is_operator_only_token","kind":"function","visibility":"private","signature":"fn semver_is_operator_only_token(text: String) -> Bool","source_path":"stdlib/semver.kn","line":189,"attributes":[],"docs":[],"target_notes":[]},{"name":"semver_parse_number_strict","qualified_name":"std::semver::semver_parse_number_strict","kind":"function","visibility":"private","signature":"fn semver_parse_number_strict(text: String) -> Int","source_path":"stdlib/semver.kn","line":204,"attributes":[],"docs":[],"target_notes":[]},{"name":"semver_identifier_is_valid","qualified_name":"std::semver::semver_identifier_is_valid","kind":"function","visibility":"private","signature":"fn semver_identifier_is_valid(text: String, forbid_numeric_leading_zero: Bool) -> Bool","source_path":"stdlib/semver.kn","line":219,"attributes":[],"docs":[],"target_notes":[]},{"name":"semver_parse_identifiers","qualified_name":"std::semver::semver_parse_identifiers","kind":"function","visibility":"private","signature":"fn semver_parse_identifiers(text: String, forbid_numeric_leading_zero: Bool, lane: String) -> SemVerIdentifierParseResult","source_path":"stdlib/semver.kn","line":235,"attributes":[],"docs":[],"target_notes":[]},{"name":"semver_pattern_error","qualified_name":"std::semver::semver_pattern_error","kind":"function","visibility":"private","signature":"fn semver_pattern_error(message: String) -> SemVerPattern","source_path":"stdlib/semver.kn","line":262,"attributes":[],"docs":[],"target_notes":[]},{"name":"semver_parse_pattern","qualified_name":"std::semver::semver_parse_pattern","kind":"function","visibility":"private","signature":"fn semver_parse_pattern(text: String) -> SemVerPattern","source_path":"stdlib/semver.kn","line":273,"attributes":[],"docs":[],"target_notes":[]},{"name":"semver_compare_text_lexical","qualified_name":"std::semver::semver_compare_text_lexical","kind":"function","visibility":"private","signature":"fn semver_compare_text_lexical(left: String, right: String) -> Int","source_path":"stdlib/semver.kn","line":377,"attributes":[],"docs":[],"target_notes":[]},{"name":"semver_compare_pre_release_identifiers","qualified_name":"std::semver::semver_compare_pre_release_identifiers","kind":"function","visibility":"private","signature":"fn semver_compare_pre_release_identifiers(left: String, right: String) -> Int","source_path":"stdlib/semver.kn","line":393,"attributes":[],"docs":[],"target_notes":[]},{"name":"semver_compare_pre_release","qualified_name":"std::semver::semver_compare_pre_release","kind":"function","visibility":"private","signature":"fn semver_compare_pre_release(left: Array, right: Array) -> Int","source_path":"stdlib/semver.kn","line":408,"attributes":[],"docs":[],"target_notes":[]},{"name":"semver_pattern_partial_upper","qualified_name":"std::semver::semver_pattern_partial_upper","kind":"function","visibility":"private","signature":"fn semver_pattern_partial_upper(pattern: SemVerPattern) -> SemVer","source_path":"stdlib/semver.kn","line":421,"attributes":[],"docs":[],"target_notes":[]},{"name":"semver_pattern_caret_upper","qualified_name":"std::semver::semver_pattern_caret_upper","kind":"function","visibility":"private","signature":"fn semver_pattern_caret_upper(pattern: SemVerPattern) -> SemVer","source_path":"stdlib/semver.kn","line":426,"attributes":[],"docs":[],"target_notes":[]},{"name":"semver_pattern_tilde_upper","qualified_name":"std::semver::semver_pattern_tilde_upper","kind":"function","visibility":"private","signature":"fn semver_pattern_tilde_upper(pattern: SemVerPattern) -> SemVer","source_path":"stdlib/semver.kn","line":437,"attributes":[],"docs":[],"target_notes":[]},{"name":"semver_append_comparator","qualified_name":"std::semver::semver_append_comparator","kind":"function","visibility":"private","signature":"fn semver_append_comparator(items: Array, relation: String, version: SemVer) -> Array","source_path":"stdlib/semver.kn","line":442,"attributes":[],"docs":[],"target_notes":[]},{"name":"semver_expand_plain_pattern","qualified_name":"std::semver::semver_expand_plain_pattern","kind":"function","visibility":"private","signature":"fn semver_expand_plain_pattern(pattern: SemVerPattern) -> Array","source_path":"stdlib/semver.kn","line":446,"attributes":[],"docs":[],"target_notes":[]},{"name":"semver_parse_range_token","qualified_name":"std::semver::semver_parse_range_token","kind":"function","visibility":"private","signature":"fn semver_parse_range_token(token: String) -> SemVerTokenExpandResult","source_path":"stdlib/semver.kn","line":454,"attributes":[],"docs":[],"target_notes":[]},{"name":"semver_clause_tokens","qualified_name":"std::semver::semver_clause_tokens","kind":"function","visibility":"private","signature":"fn semver_clause_tokens(text: String) -> Array","source_path":"stdlib/semver.kn","line":554,"attributes":[],"docs":[],"target_notes":[]},{"name":"semver_parse_hyphen_clause","qualified_name":"std::semver::semver_parse_hyphen_clause","kind":"function","visibility":"private","signature":"fn semver_parse_hyphen_clause(left_text: String, right_text: String) -> SemVerClauseParseResult","source_path":"stdlib/semver.kn","line":572,"attributes":[],"docs":[],"target_notes":[]},{"name":"semver_parse_clause","qualified_name":"std::semver::semver_parse_clause","kind":"function","visibility":"private","signature":"fn semver_parse_clause(text: String) -> SemVerClauseParseResult","source_path":"stdlib/semver.kn","line":591,"attributes":[],"docs":[],"target_notes":[]},{"name":"semver_new","qualified_name":"std::semver::semver_new","kind":"function","visibility":"public","signature":"fn semver_new(major: Int, minor: Int, patch_value: Int) -> SemVer","source_path":"stdlib/semver.kn","line":643,"attributes":[],"docs":[],"target_notes":[]},{"name":"semver_with","qualified_name":"std::semver::semver_with","kind":"function","visibility":"public","signature":"fn semver_with(major: Int, minor: Int, patch_value: Int, pre_release: Array, build_metadata: Array) -> SemVer","source_path":"stdlib/semver.kn","line":652,"attributes":[],"docs":[],"target_notes":[]},{"name":"semver_parse","qualified_name":"std::semver::semver_parse","kind":"function","visibility":"public","signature":"fn semver_parse(text: String) -> SemVerParseResult","source_path":"stdlib/semver.kn","line":661,"attributes":[],"docs":[],"target_notes":[]},{"name":"semver_try_parse","qualified_name":"std::semver::semver_try_parse","kind":"function","visibility":"public","signature":"fn semver_try_parse(text: String) -> Option","source_path":"stdlib/semver.kn","line":675,"attributes":[],"docs":[],"target_notes":[]},{"name":"semver_format","qualified_name":"std::semver::semver_format","kind":"function","visibility":"public","signature":"fn semver_format(version: SemVer) -> String","source_path":"stdlib/semver.kn","line":681,"attributes":[],"docs":[],"target_notes":[]},{"name":"semver_normalize","qualified_name":"std::semver::semver_normalize","kind":"function","visibility":"public","signature":"fn semver_normalize(text: String) -> String","source_path":"stdlib/semver.kn","line":689,"attributes":[],"docs":[],"target_notes":[]},{"name":"semver_is_prerelease","qualified_name":"std::semver::semver_is_prerelease","kind":"function","visibility":"public","signature":"fn semver_is_prerelease(version: SemVer) -> Bool","source_path":"stdlib/semver.kn","line":695,"attributes":[],"docs":[],"target_notes":[]},{"name":"semver_compare","qualified_name":"std::semver::semver_compare","kind":"function","visibility":"public","signature":"fn semver_compare(left: SemVer, right: SemVer) -> Int","source_path":"stdlib/semver.kn","line":698,"attributes":[],"docs":[],"target_notes":[]},{"name":"semver_compare_text","qualified_name":"std::semver::semver_compare_text","kind":"function","visibility":"public","signature":"fn semver_compare_text(left_text: String, right_text: String) -> Int","source_path":"stdlib/semver.kn","line":719,"attributes":[],"docs":[],"target_notes":[]},{"name":"semver_equal","qualified_name":"std::semver::semver_equal","kind":"function","visibility":"public","signature":"fn semver_equal(left: SemVer, right: SemVer) -> Bool","source_path":"stdlib/semver.kn","line":730,"attributes":[],"docs":[],"target_notes":[]},{"name":"semver_range_parse","qualified_name":"std::semver::semver_range_parse","kind":"function","visibility":"public","signature":"fn semver_range_parse(text: String) -> SemVerRangeParseResult","source_path":"stdlib/semver.kn","line":737,"attributes":[],"docs":[],"target_notes":[]},{"name":"semver_comparator_matches","qualified_name":"std::semver::semver_comparator_matches","kind":"function","visibility":"private","signature":"fn semver_comparator_matches(comparator: SemVerComparator, version: SemVer) -> Bool","source_path":"stdlib/semver.kn","line":757,"attributes":[],"docs":[],"target_notes":[]},{"name":"semver_clause_matches","qualified_name":"std::semver::semver_clause_matches","kind":"function","visibility":"private","signature":"fn semver_clause_matches(clause: SemVerRangeClause, version: SemVer) -> Bool","source_path":"stdlib/semver.kn","line":771,"attributes":[],"docs":[],"target_notes":[]},{"name":"semver_range_matches","qualified_name":"std::semver::semver_range_matches","kind":"function","visibility":"public","signature":"fn semver_range_matches(range: SemVerRange, version: SemVer) -> Bool","source_path":"stdlib/semver.kn","line":781,"attributes":[],"docs":[],"target_notes":[]},{"name":"semver_satisfies","qualified_name":"std::semver::semver_satisfies","kind":"function","visibility":"public","signature":"fn semver_satisfies(version: SemVer, range_text: String) -> Bool","source_path":"stdlib/semver.kn","line":789,"attributes":[],"docs":[],"target_notes":[]},{"name":"semver_satisfies_text","qualified_name":"std::semver::semver_satisfies_text","kind":"function","visibility":"public","signature":"fn semver_satisfies_text(version_text: String, range_text: String) -> Bool","source_path":"stdlib/semver.kn","line":795,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"simd","import_path":"std::simd","source_path":"stdlib/simd.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"I64x4","qualified_name":"std::simd::I64x4","kind":"struct","visibility":"public","signature":"struct I64x4","source_path":"stdlib/simd.kn","line":3,"attributes":[],"docs":[],"target_notes":[]},{"name":"i64x4","qualified_name":"std::simd::i64x4","kind":"function","visibility":"public","signature":"fn i64x4(a: Int, b: Int, c: Int, d: Int) -> I64x4","source_path":"stdlib/simd.kn","line":9,"attributes":[],"docs":[],"target_notes":[]},{"name":"i64x4_splat","qualified_name":"std::simd::i64x4_splat","kind":"function","visibility":"public","signature":"fn i64x4_splat(value: Int) -> I64x4","source_path":"stdlib/simd.kn","line":12,"attributes":[],"docs":[],"target_notes":[]},{"name":"i64x4_lane","qualified_name":"std::simd::i64x4_lane","kind":"function","visibility":"public","signature":"fn i64x4_lane(value: I64x4, lane: Int) -> Int","source_path":"stdlib/simd.kn","line":15,"attributes":[],"docs":[],"target_notes":[]},{"name":"i64x4_replace","qualified_name":"std::simd::i64x4_replace","kind":"function","visibility":"public","signature":"fn i64x4_replace(value: I64x4, lane: Int, next: Int) -> I64x4","source_path":"stdlib/simd.kn","line":24,"attributes":[],"docs":[],"target_notes":[]},{"name":"i64x4_add","qualified_name":"std::simd::i64x4_add","kind":"function","visibility":"public","signature":"fn i64x4_add(left: I64x4, right: I64x4) -> I64x4","source_path":"stdlib/simd.kn","line":33,"attributes":[],"docs":[],"target_notes":[]},{"name":"i64x4_sub","qualified_name":"std::simd::i64x4_sub","kind":"function","visibility":"public","signature":"fn i64x4_sub(left: I64x4, right: I64x4) -> I64x4","source_path":"stdlib/simd.kn","line":36,"attributes":[],"docs":[],"target_notes":[]},{"name":"i64x4_mul","qualified_name":"std::simd::i64x4_mul","kind":"function","visibility":"public","signature":"fn i64x4_mul(left: I64x4, right: I64x4) -> I64x4","source_path":"stdlib/simd.kn","line":39,"attributes":[],"docs":[],"target_notes":[]},{"name":"i64x4_and","qualified_name":"std::simd::i64x4_and","kind":"function","visibility":"public","signature":"fn i64x4_and(left: I64x4, right: I64x4) -> I64x4","source_path":"stdlib/simd.kn","line":42,"attributes":[],"docs":[],"target_notes":[]},{"name":"i64x4_or","qualified_name":"std::simd::i64x4_or","kind":"function","visibility":"public","signature":"fn i64x4_or(left: I64x4, right: I64x4) -> I64x4","source_path":"stdlib/simd.kn","line":45,"attributes":[],"docs":[],"target_notes":[]},{"name":"i64x4_xor","qualified_name":"std::simd::i64x4_xor","kind":"function","visibility":"public","signature":"fn i64x4_xor(left: I64x4, right: I64x4) -> I64x4","source_path":"stdlib/simd.kn","line":48,"attributes":[],"docs":[],"target_notes":[]},{"name":"i64x4_select_lane","qualified_name":"std::simd::i64x4_select_lane","kind":"function","visibility":"private","signature":"fn i64x4_select_lane(mask: Int, bit: Int, hot: Int, cold: Int) -> Int","source_path":"stdlib/simd.kn","line":51,"attributes":[],"docs":[],"target_notes":[]},{"name":"i64x4_blend","qualified_name":"std::simd::i64x4_blend","kind":"function","visibility":"public","signature":"fn i64x4_blend(mask: Int, hot: I64x4, cold: I64x4) -> I64x4","source_path":"stdlib/simd.kn","line":56,"attributes":[],"docs":[],"target_notes":[]},{"name":"i64x4_dot","qualified_name":"std::simd::i64x4_dot","kind":"function","visibility":"public","signature":"fn i64x4_dot(left: I64x4, right: I64x4) -> Int","source_path":"stdlib/simd.kn","line":64,"attributes":[],"docs":[],"target_notes":[]},{"name":"i64x4_horizontal_sum","qualified_name":"std::simd::i64x4_horizontal_sum","kind":"function","visibility":"public","signature":"fn i64x4_horizontal_sum(value: I64x4) -> Int","source_path":"stdlib/simd.kn","line":68,"attributes":[],"docs":[],"target_notes":[]},{"name":"i64x4_gather","qualified_name":"std::simd::i64x4_gather","kind":"function","visibility":"public","signature":"fn i64x4_gather(base: ptr, indexes: I64x4) -> I64x4","source_path":"stdlib/simd.kn","line":71,"attributes":[],"docs":[],"target_notes":[]},{"name":"i64x4_scatter","qualified_name":"std::simd::i64x4_scatter","kind":"function","visibility":"public","signature":"fn i64x4_scatter(base: ptr, indexes: I64x4, values: I64x4) -> Int","source_path":"stdlib/simd.kn","line":79,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"sync","import_path":"std::sync","source_path":"stdlib/sync.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"SYNC_OK","qualified_name":"std::sync::SYNC_OK","kind":"const","visibility":"public","signature":"const SYNC_OK: Int","source_path":"stdlib/sync.kn","line":4,"attributes":[],"docs":[],"target_notes":[]},{"name":"SYNC_ERR_NEGATIVE_COUNT","qualified_name":"std::sync::SYNC_ERR_NEGATIVE_COUNT","kind":"const","visibility":"public","signature":"const SYNC_ERR_NEGATIVE_COUNT: Int","source_path":"stdlib/sync.kn","line":5,"attributes":[],"docs":[],"target_notes":[]},{"name":"SYNC_ERR_COUNT_OVERFLOW","qualified_name":"std::sync::SYNC_ERR_COUNT_OVERFLOW","kind":"const","visibility":"public","signature":"const SYNC_ERR_COUNT_OVERFLOW: Int","source_path":"stdlib/sync.kn","line":6,"attributes":[],"docs":[],"target_notes":[]},{"name":"SYNC_ERR_INVALID_ONCE_STATE","qualified_name":"std::sync::SYNC_ERR_INVALID_ONCE_STATE","kind":"const","visibility":"public","signature":"const SYNC_ERR_INVALID_ONCE_STATE: Int","source_path":"stdlib/sync.kn","line":7,"attributes":[],"docs":[],"target_notes":[]},{"name":"SYNC_ERR_BUSY","qualified_name":"std::sync::SYNC_ERR_BUSY","kind":"const","visibility":"public","signature":"const SYNC_ERR_BUSY: Int","source_path":"stdlib/sync.kn","line":8,"attributes":[],"docs":[],"target_notes":[]},{"name":"SYNC_ERR_TIMEOUT","qualified_name":"std::sync::SYNC_ERR_TIMEOUT","kind":"const","visibility":"public","signature":"const SYNC_ERR_TIMEOUT: Int","source_path":"stdlib/sync.kn","line":9,"attributes":[],"docs":[],"target_notes":[]},{"name":"SYNC_ERR_INVALID_STATE","qualified_name":"std::sync::SYNC_ERR_INVALID_STATE","kind":"const","visibility":"public","signature":"const SYNC_ERR_INVALID_STATE: Int","source_path":"stdlib/sync.kn","line":10,"attributes":[],"docs":[],"target_notes":[]},{"name":"SYNC_INT_MAX","qualified_name":"std::sync::SYNC_INT_MAX","kind":"const","visibility":"private","signature":"const SYNC_INT_MAX: Int","source_path":"stdlib/sync.kn","line":12,"attributes":[],"docs":[],"target_notes":[]},{"name":"SYNC_PARK_SLICE_MS","qualified_name":"std::sync::SYNC_PARK_SLICE_MS","kind":"const","visibility":"private","signature":"const SYNC_PARK_SLICE_MS: Int","source_path":"stdlib/sync.kn","line":13,"attributes":[],"docs":[],"target_notes":[]},{"name":"MCS_NODE_WORDS","qualified_name":"std::sync::MCS_NODE_WORDS","kind":"const","visibility":"private","signature":"const MCS_NODE_WORDS: Int","source_path":"stdlib/sync.kn","line":14,"attributes":[],"docs":[],"target_notes":[]},{"name":"MCS_NODE_NEXT_SLOT","qualified_name":"std::sync::MCS_NODE_NEXT_SLOT","kind":"const","visibility":"private","signature":"const MCS_NODE_NEXT_SLOT: Int","source_path":"stdlib/sync.kn","line":15,"attributes":[],"docs":[],"target_notes":[]},{"name":"MCS_NODE_WAITING_SLOT","qualified_name":"std::sync::MCS_NODE_WAITING_SLOT","kind":"const","visibility":"private","signature":"const MCS_NODE_WAITING_SLOT: Int","source_path":"stdlib/sync.kn","line":16,"attributes":[],"docs":[],"target_notes":[]},{"name":"TELEPORT_CHANNEL_MIN_REQUESTED_CAPACITY","qualified_name":"std::sync::TELEPORT_CHANNEL_MIN_REQUESTED_CAPACITY","kind":"const","visibility":"private","signature":"const TELEPORT_CHANNEL_MIN_REQUESTED_CAPACITY: Int","source_path":"stdlib/sync.kn","line":17,"attributes":[],"docs":[],"target_notes":[]},{"name":"TELEPORT_CHANNEL_MAX_REQUESTED_CAPACITY","qualified_name":"std::sync::TELEPORT_CHANNEL_MAX_REQUESTED_CAPACITY","kind":"const","visibility":"private","signature":"const TELEPORT_CHANNEL_MAX_REQUESTED_CAPACITY: Int","source_path":"stdlib/sync.kn","line":18,"attributes":[],"docs":[],"target_notes":[]},{"name":"TELEPORT_CHANNEL_PADDING_SLOTS","qualified_name":"std::sync::TELEPORT_CHANNEL_PADDING_SLOTS","kind":"const","visibility":"private","signature":"const TELEPORT_CHANNEL_PADDING_SLOTS: Int","source_path":"stdlib/sync.kn","line":19,"attributes":[],"docs":[],"target_notes":[]},{"name":"TELEPORT_CHANNEL_CONTROL_WORDS","qualified_name":"std::sync::TELEPORT_CHANNEL_CONTROL_WORDS","kind":"const","visibility":"private","signature":"const TELEPORT_CHANNEL_CONTROL_WORDS: Int","source_path":"stdlib/sync.kn","line":20,"attributes":[],"docs":[],"target_notes":[]},{"name":"TELEPORT_CHANNEL_BUFFER_SLOT","qualified_name":"std::sync::TELEPORT_CHANNEL_BUFFER_SLOT","kind":"const","visibility":"private","signature":"const TELEPORT_CHANNEL_BUFFER_SLOT: Int","source_path":"stdlib/sync.kn","line":21,"attributes":[],"docs":[],"target_notes":[]},{"name":"TELEPORT_CHANNEL_CAPACITY_SLOT","qualified_name":"std::sync::TELEPORT_CHANNEL_CAPACITY_SLOT","kind":"const","visibility":"private","signature":"const TELEPORT_CHANNEL_CAPACITY_SLOT: Int","source_path":"stdlib/sync.kn","line":22,"attributes":[],"docs":[],"target_notes":[]},{"name":"TELEPORT_CHANNEL_WRITE_IDX_SLOT","qualified_name":"std::sync::TELEPORT_CHANNEL_WRITE_IDX_SLOT","kind":"const","visibility":"private","signature":"const TELEPORT_CHANNEL_WRITE_IDX_SLOT: Int","source_path":"stdlib/sync.kn","line":23,"attributes":[],"docs":[],"target_notes":[]},{"name":"TELEPORT_CHANNEL_READ_IDX_SLOT","qualified_name":"std::sync::TELEPORT_CHANNEL_READ_IDX_SLOT","kind":"const","visibility":"private","signature":"const TELEPORT_CHANNEL_READ_IDX_SLOT: Int","source_path":"stdlib/sync.kn","line":24,"attributes":[],"docs":[],"target_notes":[]},{"name":"ONCE_STATE_UNINITIALIZED","qualified_name":"std::sync::ONCE_STATE_UNINITIALIZED","kind":"const","visibility":"private","signature":"const ONCE_STATE_UNINITIALIZED: Int","source_path":"stdlib/sync.kn","line":25,"attributes":[],"docs":[],"target_notes":[]},{"name":"ONCE_STATE_INITIALIZING","qualified_name":"std::sync::ONCE_STATE_INITIALIZING","kind":"const","visibility":"private","signature":"const ONCE_STATE_INITIALIZING: Int","source_path":"stdlib/sync.kn","line":26,"attributes":[],"docs":[],"target_notes":[]},{"name":"ONCE_STATE_DONE","qualified_name":"std::sync::ONCE_STATE_DONE","kind":"const","visibility":"private","signature":"const ONCE_STATE_DONE: Int","source_path":"stdlib/sync.kn","line":27,"attributes":[],"docs":[],"target_notes":[]},{"name":"RWLOCK_WRITER_HELD","qualified_name":"std::sync::RWLOCK_WRITER_HELD","kind":"const","visibility":"private","signature":"const RWLOCK_WRITER_HELD: Int","source_path":"stdlib/sync.kn","line":28,"attributes":[],"docs":[],"target_notes":[]},{"name":"McsNode","qualified_name":"std::sync::McsNode","kind":"struct","visibility":"public","signature":"struct McsNode","source_path":"stdlib/sync.kn","line":32,"attributes":[],"docs":[],"target_notes":[]},{"name":"McsMutex","qualified_name":"std::sync::McsMutex","kind":"struct","visibility":"public","signature":"struct McsMutex","source_path":"stdlib/sync.kn","line":36,"attributes":[],"docs":[],"target_notes":[]},{"name":"mcs_node_words","qualified_name":"std::sync::mcs_node_words","kind":"function","visibility":"public","signature":"fn mcs_node_words() -> Int","source_path":"stdlib/sync.kn","line":39,"attributes":[],"docs":[],"target_notes":[]},{"name":"mcs_node_new","qualified_name":"std::sync::mcs_node_new","kind":"function","visibility":"public","signature":"fn mcs_node_new() -> ptr","source_path":"stdlib/sync.kn","line":42,"attributes":[],"docs":[],"target_notes":[]},{"name":"mcs_node_destroy","qualified_name":"std::sync::mcs_node_destroy","kind":"function","visibility":"public","signature":"fn mcs_node_destroy(node: ptr) -> Int","source_path":"stdlib/sync.kn","line":45,"attributes":[],"docs":[],"target_notes":[]},{"name":"mcs_node_waiting_ptr","qualified_name":"std::sync::mcs_node_waiting_ptr","kind":"function","visibility":"private","signature":"fn mcs_node_waiting_ptr(node: ptr) -> ptr","source_path":"stdlib/sync.kn","line":49,"attributes":[],"docs":[],"target_notes":[]},{"name":"sync_atomic_load","qualified_name":"std::sync::sync_atomic_load","kind":"function","visibility":"private","signature":"fn sync_atomic_load(address: ptr, order: Ordering) -> Int","source_path":"stdlib/sync.kn","line":52,"attributes":[],"docs":[],"target_notes":[]},{"name":"sync_atomic_store","qualified_name":"std::sync::sync_atomic_store","kind":"function","visibility":"private","signature":"fn sync_atomic_store(address: ptr, value: Int, order: Ordering) -> Int","source_path":"stdlib/sync.kn","line":55,"attributes":[],"docs":[],"target_notes":[]},{"name":"sync_atomic_exchange","qualified_name":"std::sync::sync_atomic_exchange","kind":"function","visibility":"private","signature":"fn sync_atomic_exchange(address: ptr, value: Int) -> Int","source_path":"stdlib/sync.kn","line":58,"attributes":[],"docs":[],"target_notes":[]},{"name":"sync_atomic_compare_exchange","qualified_name":"std::sync::sync_atomic_compare_exchange","kind":"function","visibility":"private","signature":"fn sync_atomic_compare_exchange(address: ptr, expected: Int, desired: Int) -> Bool","source_path":"stdlib/sync.kn","line":61,"attributes":[],"docs":[],"target_notes":[]},{"name":"sync_atomic_wait_changed","qualified_name":"std::sync::sync_atomic_wait_changed","kind":"function","visibility":"private","signature":"fn sync_atomic_wait_changed(address: ptr, expected: Int, timeout_ms: Int) -> Int","source_path":"stdlib/sync.kn","line":64,"attributes":[],"docs":[],"target_notes":[]},{"name":"sync_atomic_notify_one","qualified_name":"std::sync::sync_atomic_notify_one","kind":"function","visibility":"private","signature":"fn sync_atomic_notify_one(address: ptr) -> Int","source_path":"stdlib/sync.kn","line":67,"attributes":[],"docs":[],"target_notes":[]},{"name":"sync_atomic_notify_all","qualified_name":"std::sync::sync_atomic_notify_all","kind":"function","visibility":"private","signature":"fn sync_atomic_notify_all(address: ptr) -> Int","source_path":"stdlib/sync.kn","line":70,"attributes":[],"docs":[],"target_notes":[]},{"name":"mcs_mutex_new","qualified_name":"std::sync::mcs_mutex_new","kind":"function","visibility":"public","signature":"fn mcs_mutex_new() -> McsMutex","source_path":"stdlib/sync.kn","line":73,"attributes":[],"docs":[],"target_notes":[]},{"name":"mcs_mutex_destroy","qualified_name":"std::sync::mcs_mutex_destroy","kind":"function","visibility":"public","signature":"fn mcs_mutex_destroy(lock: McsMutex) -> Int","source_path":"stdlib/sync.kn","line":77,"attributes":[],"docs":[],"target_notes":[]},{"name":"mcs_mutex_lock","qualified_name":"std::sync::mcs_mutex_lock","kind":"function","visibility":"public","signature":"fn mcs_mutex_lock(lock: McsMutex, node: ptr) -> Int","source_path":"stdlib/sync.kn","line":81,"attributes":[],"docs":[],"target_notes":[]},{"name":"mcs_mutex_unlock","qualified_name":"std::sync::mcs_mutex_unlock","kind":"function","visibility":"public","signature":"fn mcs_mutex_unlock(lock: McsMutex, node: ptr) -> Int","source_path":"stdlib/sync.kn","line":96,"attributes":[],"docs":[],"target_notes":[]},{"name":"TeleportChannel","qualified_name":"std::sync::TeleportChannel","kind":"struct","visibility":"public","signature":"struct TeleportChannel","source_path":"stdlib/sync.kn","line":111,"attributes":[],"docs":[],"target_notes":[]},{"name":"teleport_channel_buffer_ptr","qualified_name":"std::sync::teleport_channel_buffer_ptr","kind":"function","visibility":"private","signature":"fn teleport_channel_buffer_ptr(chan: TeleportChannel) -> ptr","source_path":"stdlib/sync.kn","line":114,"attributes":[],"docs":[],"target_notes":[]},{"name":"teleport_channel_capacity","qualified_name":"std::sync::teleport_channel_capacity","kind":"function","visibility":"private","signature":"fn teleport_channel_capacity(chan: TeleportChannel) -> Int","source_path":"stdlib/sync.kn","line":118,"attributes":[],"docs":[],"target_notes":[]},{"name":"teleport_channel_write_idx_ptr","qualified_name":"std::sync::teleport_channel_write_idx_ptr","kind":"function","visibility":"private","signature":"fn teleport_channel_write_idx_ptr(chan: TeleportChannel) -> ptr","source_path":"stdlib/sync.kn","line":121,"attributes":[],"docs":[],"target_notes":[]},{"name":"teleport_channel_read_idx_ptr","qualified_name":"std::sync::teleport_channel_read_idx_ptr","kind":"function","visibility":"private","signature":"fn teleport_channel_read_idx_ptr(chan: TeleportChannel) -> ptr","source_path":"stdlib/sync.kn","line":124,"attributes":[],"docs":[],"target_notes":[]},{"name":"sync_clamp_channel_capacity","qualified_name":"std::sync::sync_clamp_channel_capacity","kind":"function","visibility":"private","signature":"fn sync_clamp_channel_capacity(capacity: Int) -> Int","source_path":"stdlib/sync.kn","line":127,"attributes":[],"docs":[],"target_notes":[]},{"name":"teleport_channel_new","qualified_name":"std::sync::teleport_channel_new","kind":"function","visibility":"public","signature":"fn teleport_channel_new(capacity: Int) -> TeleportChannel","source_path":"stdlib/sync.kn","line":134,"attributes":[],"docs":[],"target_notes":[]},{"name":"teleport_channel_destroy","qualified_name":"std::sync::teleport_channel_destroy","kind":"function","visibility":"public","signature":"fn teleport_channel_destroy(chan: TeleportChannel) -> Int","source_path":"stdlib/sync.kn","line":144,"attributes":[],"docs":[],"target_notes":[]},{"name":"teleport_channel_send","qualified_name":"std::sync::teleport_channel_send","kind":"function","visibility":"public","signature":"fn teleport_channel_send(chan: TeleportChannel, item_ptr: Int) -> Bool","source_path":"stdlib/sync.kn","line":150,"attributes":[],"docs":[],"target_notes":[]},{"name":"teleport_channel_recv","qualified_name":"std::sync::teleport_channel_recv","kind":"function","visibility":"public","signature":"fn teleport_channel_recv(chan: TeleportChannel) -> Int","source_path":"stdlib/sync.kn","line":165,"attributes":[],"docs":[],"target_notes":[]},{"name":"Once","qualified_name":"std::sync::Once","kind":"struct","visibility":"public","signature":"struct Once","source_path":"stdlib/sync.kn","line":182,"attributes":[],"docs":[],"target_notes":[]},{"name":"once_new","qualified_name":"std::sync::once_new","kind":"function","visibility":"public","signature":"fn once_new() -> Once","source_path":"stdlib/sync.kn","line":185,"attributes":[],"docs":[],"target_notes":[]},{"name":"once_destroy","qualified_name":"std::sync::once_destroy","kind":"function","visibility":"public","signature":"fn once_destroy(o: Once) -> Int","source_path":"stdlib/sync.kn","line":189,"attributes":[],"docs":[],"target_notes":[]},{"name":"once_do","qualified_name":"std::sync::once_do","kind":"function","visibility":"public","signature":"fn once_do(o: Once) -> Int","source_path":"stdlib/sync.kn","line":193,"attributes":[],"docs":[],"target_notes":[]},{"name":"once_do_sleep","qualified_name":"std::sync::once_do_sleep","kind":"function","visibility":"public","signature":"fn once_do_sleep(o: Once) -> Int","source_path":"stdlib/sync.kn","line":206,"attributes":[],"docs":[],"target_notes":[]},{"name":"once_complete","qualified_name":"std::sync::once_complete","kind":"function","visibility":"public","signature":"fn once_complete(o: Once) -> Int","source_path":"stdlib/sync.kn","line":209,"attributes":[],"docs":[],"target_notes":[]},{"name":"once_reset","qualified_name":"std::sync::once_reset","kind":"function","visibility":"public","signature":"fn once_reset(o: Once) -> Int","source_path":"stdlib/sync.kn","line":221,"attributes":[],"docs":[],"target_notes":[]},{"name":"WaitGroup","qualified_name":"std::sync::WaitGroup","kind":"struct","visibility":"public","signature":"struct WaitGroup","source_path":"stdlib/sync.kn","line":236,"attributes":[],"docs":[],"target_notes":[]},{"name":"wait_group_delta_status","qualified_name":"std::sync::wait_group_delta_status","kind":"function","visibility":"private","signature":"fn wait_group_delta_status(current: Int, delta: Int) -> Int","source_path":"stdlib/sync.kn","line":239,"attributes":[],"docs":[],"target_notes":[]},{"name":"wait_group_new","qualified_name":"std::sync::wait_group_new","kind":"function","visibility":"public","signature":"fn wait_group_new() -> WaitGroup","source_path":"stdlib/sync.kn","line":246,"attributes":[],"docs":[],"target_notes":[]},{"name":"wait_group_destroy","qualified_name":"std::sync::wait_group_destroy","kind":"function","visibility":"public","signature":"fn wait_group_destroy(wg: WaitGroup) -> Int","source_path":"stdlib/sync.kn","line":250,"attributes":[],"docs":[],"target_notes":[]},{"name":"wait_group_count","qualified_name":"std::sync::wait_group_count","kind":"function","visibility":"public","signature":"fn wait_group_count(wg: WaitGroup) -> Int","source_path":"stdlib/sync.kn","line":254,"attributes":[],"docs":[],"target_notes":[]},{"name":"wait_group_add","qualified_name":"std::sync::wait_group_add","kind":"function","visibility":"public","signature":"fn wait_group_add(wg: WaitGroup, delta: Int) -> Int","source_path":"stdlib/sync.kn","line":257,"attributes":[],"docs":[],"target_notes":[]},{"name":"wait_group_done","qualified_name":"std::sync::wait_group_done","kind":"function","visibility":"public","signature":"fn wait_group_done(wg: WaitGroup) -> Int","source_path":"stdlib/sync.kn","line":271,"attributes":[],"docs":[],"target_notes":[]},{"name":"wait_group_wait","qualified_name":"std::sync::wait_group_wait","kind":"function","visibility":"public","signature":"fn wait_group_wait(wg: WaitGroup) -> Int","source_path":"stdlib/sync.kn","line":274,"attributes":[],"docs":[],"target_notes":[]},{"name":"wait_group_wait_sleep","qualified_name":"std::sync::wait_group_wait_sleep","kind":"function","visibility":"public","signature":"fn wait_group_wait_sleep(wg: WaitGroup) -> Int","source_path":"stdlib/sync.kn","line":283,"attributes":[],"docs":[],"target_notes":[]},{"name":"RwLock","qualified_name":"std::sync::RwLock","kind":"struct","visibility":"public","signature":"struct RwLock","source_path":"stdlib/sync.kn","line":289,"attributes":[],"docs":[],"target_notes":[]},{"name":"rwlock_new","qualified_name":"std::sync::rwlock_new","kind":"function","visibility":"public","signature":"fn rwlock_new() -> RwLock","source_path":"stdlib/sync.kn","line":292,"attributes":[],"docs":[],"target_notes":[]},{"name":"rwlock_destroy","qualified_name":"std::sync::rwlock_destroy","kind":"function","visibility":"public","signature":"fn rwlock_destroy(lock: RwLock) -> Int","source_path":"stdlib/sync.kn","line":296,"attributes":[],"docs":[],"target_notes":[]},{"name":"rwlock_read_lock","qualified_name":"std::sync::rwlock_read_lock","kind":"function","visibility":"public","signature":"fn rwlock_read_lock(lock: RwLock) -> Int","source_path":"stdlib/sync.kn","line":300,"attributes":[],"docs":[],"target_notes":[]},{"name":"rwlock_try_read_lock","qualified_name":"std::sync::rwlock_try_read_lock","kind":"function","visibility":"public","signature":"fn rwlock_try_read_lock(lock: RwLock) -> Int","source_path":"stdlib/sync.kn","line":311,"attributes":[],"docs":[],"target_notes":[]},{"name":"rwlock_read_unlock","qualified_name":"std::sync::rwlock_read_unlock","kind":"function","visibility":"public","signature":"fn rwlock_read_unlock(lock: RwLock) -> Int","source_path":"stdlib/sync.kn","line":321,"attributes":[],"docs":[],"target_notes":[]},{"name":"rwlock_write_lock","qualified_name":"std::sync::rwlock_write_lock","kind":"function","visibility":"public","signature":"fn rwlock_write_lock(lock: RwLock) -> Int","source_path":"stdlib/sync.kn","line":333,"attributes":[],"docs":[],"target_notes":[]},{"name":"rwlock_try_write_lock","qualified_name":"std::sync::rwlock_try_write_lock","kind":"function","visibility":"public","signature":"fn rwlock_try_write_lock(lock: RwLock) -> Int","source_path":"stdlib/sync.kn","line":342,"attributes":[],"docs":[],"target_notes":[]},{"name":"rwlock_write_unlock","qualified_name":"std::sync::rwlock_write_unlock","kind":"function","visibility":"public","signature":"fn rwlock_write_unlock(lock: RwLock) -> Int","source_path":"stdlib/sync.kn","line":347,"attributes":[],"docs":[],"target_notes":[]},{"name":"rwlock_reader_count","qualified_name":"std::sync::rwlock_reader_count","kind":"function","visibility":"public","signature":"fn rwlock_reader_count(lock: RwLock) -> Int","source_path":"stdlib/sync.kn","line":353,"attributes":[],"docs":[],"target_notes":[]},{"name":"rwlock_writer_held","qualified_name":"std::sync::rwlock_writer_held","kind":"function","visibility":"public","signature":"fn rwlock_writer_held(lock: RwLock) -> Bool","source_path":"stdlib/sync.kn","line":359,"attributes":[],"docs":[],"target_notes":[]},{"name":"Semaphore","qualified_name":"std::sync::Semaphore","kind":"struct","visibility":"public","signature":"struct Semaphore","source_path":"stdlib/sync.kn","line":365,"attributes":[],"docs":[],"target_notes":[]},{"name":"semaphore_new","qualified_name":"std::sync::semaphore_new","kind":"function","visibility":"public","signature":"fn semaphore_new(initial: Int) -> Semaphore","source_path":"stdlib/sync.kn","line":368,"attributes":[],"docs":[],"target_notes":[]},{"name":"semaphore_destroy","qualified_name":"std::sync::semaphore_destroy","kind":"function","visibility":"public","signature":"fn semaphore_destroy(sema: Semaphore) -> Int","source_path":"stdlib/sync.kn","line":374,"attributes":[],"docs":[],"target_notes":[]},{"name":"semaphore_available","qualified_name":"std::sync::semaphore_available","kind":"function","visibility":"public","signature":"fn semaphore_available(sema: Semaphore) -> Int","source_path":"stdlib/sync.kn","line":378,"attributes":[],"docs":[],"target_notes":[]},{"name":"semaphore_try_acquire","qualified_name":"std::sync::semaphore_try_acquire","kind":"function","visibility":"public","signature":"fn semaphore_try_acquire(sema: Semaphore) -> Int","source_path":"stdlib/sync.kn","line":381,"attributes":[],"docs":[],"target_notes":[]},{"name":"semaphore_acquire","qualified_name":"std::sync::semaphore_acquire","kind":"function","visibility":"public","signature":"fn semaphore_acquire(sema: Semaphore) -> Int","source_path":"stdlib/sync.kn","line":390,"attributes":[],"docs":[],"target_notes":[]},{"name":"semaphore_release","qualified_name":"std::sync::semaphore_release","kind":"function","visibility":"public","signature":"fn semaphore_release(sema: Semaphore, permits: Int) -> Int","source_path":"stdlib/sync.kn","line":399,"attributes":[],"docs":[],"target_notes":[]},{"name":"CondVar","qualified_name":"std::sync::CondVar","kind":"struct","visibility":"public","signature":"struct CondVar","source_path":"stdlib/sync.kn","line":414,"attributes":[],"docs":[],"target_notes":[]},{"name":"condvar_new","qualified_name":"std::sync::condvar_new","kind":"function","visibility":"public","signature":"fn condvar_new() -> CondVar","source_path":"stdlib/sync.kn","line":417,"attributes":[],"docs":[],"target_notes":[]},{"name":"condvar_destroy","qualified_name":"std::sync::condvar_destroy","kind":"function","visibility":"public","signature":"fn condvar_destroy(cv: CondVar) -> Int","source_path":"stdlib/sync.kn","line":421,"attributes":[],"docs":[],"target_notes":[]},{"name":"condvar_epoch","qualified_name":"std::sync::condvar_epoch","kind":"function","visibility":"public","signature":"fn condvar_epoch(cv: CondVar) -> Int","source_path":"stdlib/sync.kn","line":425,"attributes":[],"docs":[],"target_notes":[]},{"name":"condvar_wait_timeout","qualified_name":"std::sync::condvar_wait_timeout","kind":"function","visibility":"public","signature":"fn condvar_wait_timeout(cv: CondVar, observed_epoch: Int, timeout_ms: Int) -> Int","source_path":"stdlib/sync.kn","line":428,"attributes":[],"docs":[],"target_notes":[]},{"name":"condvar_wait_mcs_timeout","qualified_name":"std::sync::condvar_wait_mcs_timeout","kind":"function","visibility":"public","signature":"fn condvar_wait_mcs_timeout(cv: CondVar, lock: McsMutex, node: ptr, timeout_ms: Int) -> Int","source_path":"stdlib/sync.kn","line":436,"attributes":[],"docs":[],"target_notes":[]},{"name":"condvar_notify_one","qualified_name":"std::sync::condvar_notify_one","kind":"function","visibility":"public","signature":"fn condvar_notify_one(cv: CondVar) -> Int","source_path":"stdlib/sync.kn","line":447,"attributes":[],"docs":[],"target_notes":[]},{"name":"condvar_notify_all","qualified_name":"std::sync::condvar_notify_all","kind":"function","visibility":"public","signature":"fn condvar_notify_all(cv: CondVar) -> Int","source_path":"stdlib/sync.kn","line":451,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"tar","import_path":"std::tar","source_path":"stdlib/tar.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"TarEntry","qualified_name":"std::tar::TarEntry","kind":"struct","visibility":"public","signature":"struct TarEntry","source_path":"stdlib/tar.kn","line":6,"attributes":[],"docs":[],"target_notes":[]},{"name":"TarWriter","qualified_name":"std::tar::TarWriter","kind":"struct","visibility":"public","signature":"struct TarWriter","source_path":"stdlib/tar.kn","line":13,"attributes":[],"docs":[],"target_notes":[]},{"name":"tar_writer_new","qualified_name":"std::tar::tar_writer_new","kind":"function","visibility":"public","signature":"fn tar_writer_new(dest: ptr) -> TarWriter","source_path":"stdlib/tar.kn","line":16,"attributes":[],"docs":[],"target_notes":[]},{"name":"tar_write_header","qualified_name":"std::tar::tar_write_header","kind":"function","visibility":"public","signature":"fn tar_write_header(w: TarWriter, name: String, size_bytes: Int, flush_target: ptr) -> Int","source_path":"stdlib/tar.kn","line":21,"attributes":[],"docs":[],"target_notes":[]},{"name":"tar_write_file_data","qualified_name":"std::tar::tar_write_file_data","kind":"function","visibility":"public","signature":"fn tar_write_file_data(w: TarWriter, src: ptr, count_words: Int, flush_target: ptr) -> Int","source_path":"stdlib/tar.kn","line":50,"attributes":[],"docs":[],"target_notes":[]},{"name":"TarReader","qualified_name":"std::tar::TarReader","kind":"struct","visibility":"public","signature":"struct TarReader","source_path":"stdlib/tar.kn","line":67,"attributes":[],"docs":[],"target_notes":[]},{"name":"tar_reader_new","qualified_name":"std::tar::tar_reader_new","kind":"function","visibility":"public","signature":"fn tar_reader_new(src: ptr) -> TarReader","source_path":"stdlib/tar.kn","line":70,"attributes":[],"docs":[],"target_notes":[]},{"name":"tar_read_entry","qualified_name":"std::tar::tar_read_entry","kind":"function","visibility":"public","signature":"fn tar_read_entry(r: TarReader) -> TarEntry","source_path":"stdlib/tar.kn","line":75,"attributes":[],"docs":[],"target_notes":[]},{"name":"tar_skip_data","qualified_name":"std::tar::tar_skip_data","kind":"function","visibility":"public","signature":"fn tar_skip_data(r: TarReader, size_words: Int) -> Int","source_path":"stdlib/tar.kn","line":107,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"target","import_path":"std::target","source_path":"stdlib/target.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"Arch","qualified_name":"std::target::Arch","kind":"enum","visibility":"public","signature":"enum Arch","source_path":"stdlib/target.kn","line":4,"attributes":[],"docs":[],"target_notes":[]},{"name":"OS","qualified_name":"std::target::OS","kind":"enum","visibility":"public","signature":"enum OS","source_path":"stdlib/target.kn","line":10,"attributes":[],"docs":[],"target_notes":[]},{"name":"Env","qualified_name":"std::target::Env","kind":"enum","visibility":"public","signature":"enum Env","source_path":"stdlib/target.kn","line":17,"attributes":[],"docs":[],"target_notes":[]},{"name":"Target","qualified_name":"std::target::Target","kind":"struct","visibility":"public","signature":"struct Target","source_path":"stdlib/target.kn","line":23,"attributes":[],"docs":[],"target_notes":[]},{"name":"target_current","qualified_name":"std::target::target_current","kind":"function","visibility":"public","signature":"fn target_current() -> Target","source_path":"stdlib/target.kn","line":30,"attributes":[],"docs":[],"target_notes":[]},{"name":"target_has_feature","qualified_name":"std::target::target_has_feature","kind":"function","visibility":"public","signature":"fn target_has_feature(feature_key: String) -> Bool","source_path":"stdlib/target.kn","line":56,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"test","import_path":"std::test","source_path":"stdlib/test.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"TEST_STATUS_PASS","qualified_name":"std::test::TEST_STATUS_PASS","kind":"const","visibility":"public","signature":"const TEST_STATUS_PASS: Int","source_path":"stdlib/test.kn","line":4,"attributes":[],"docs":[],"target_notes":[]},{"name":"TEST_STATUS_FAIL","qualified_name":"std::test::TEST_STATUS_FAIL","kind":"const","visibility":"public","signature":"const TEST_STATUS_FAIL: Int","source_path":"stdlib/test.kn","line":5,"attributes":[],"docs":[],"target_notes":[]},{"name":"TEST_STATUS_SKIP","qualified_name":"std::test::TEST_STATUS_SKIP","kind":"const","visibility":"public","signature":"const TEST_STATUS_SKIP: Int","source_path":"stdlib/test.kn","line":6,"attributes":[],"docs":[],"target_notes":[]},{"name":"TEST_STATUS_PROVED","qualified_name":"std::test::TEST_STATUS_PROVED","kind":"const","visibility":"public","signature":"const TEST_STATUS_PROVED: Int","source_path":"stdlib/test.kn","line":7,"attributes":[],"docs":[],"target_notes":[]},{"name":"TEST_STATUS_WITNESS","qualified_name":"std::test::TEST_STATUS_WITNESS","kind":"const","visibility":"public","signature":"const TEST_STATUS_WITNESS: Int","source_path":"stdlib/test.kn","line":8,"attributes":[],"docs":[],"target_notes":[]},{"name":"TestOutcome","qualified_name":"std::test::TestOutcome","kind":"struct","visibility":"public","signature":"struct TestOutcome","source_path":"stdlib/test.kn","line":10,"attributes":[],"docs":[],"target_notes":[]},{"name":"test_outcome","qualified_name":"std::test::test_outcome","kind":"function","visibility":"public","signature":"fn test_outcome(status: Int, label: String, detail: String, evidence: String) -> TestOutcome","source_path":"stdlib/test.kn","line":16,"attributes":[],"docs":[],"target_notes":[]},{"name":"test_pass","qualified_name":"std::test::test_pass","kind":"function","visibility":"public","signature":"fn test_pass(label: String) -> TestOutcome","source_path":"stdlib/test.kn","line":19,"attributes":[],"docs":[],"target_notes":[]},{"name":"test_fail","qualified_name":"std::test::test_fail","kind":"function","visibility":"public","signature":"fn test_fail(label: String, detail: String) -> TestOutcome","source_path":"stdlib/test.kn","line":22,"attributes":[],"docs":[],"target_notes":[]},{"name":"test_skip","qualified_name":"std::test::test_skip","kind":"function","visibility":"public","signature":"fn test_skip(label: String, reason: String) -> TestOutcome","source_path":"stdlib/test.kn","line":25,"attributes":[],"docs":[],"target_notes":[]},{"name":"test_proved","qualified_name":"std::test::test_proved","kind":"function","visibility":"public","signature":"fn test_proved(label: String, evidence: String) -> TestOutcome","source_path":"stdlib/test.kn","line":28,"attributes":[],"docs":[],"target_notes":[]},{"name":"test_witness","qualified_name":"std::test::test_witness","kind":"function","visibility":"public","signature":"fn test_witness(label: String, evidence: String) -> TestOutcome","source_path":"stdlib/test.kn","line":31,"attributes":[],"docs":[],"target_notes":[]},{"name":"test_outcome_ok","qualified_name":"std::test::test_outcome_ok","kind":"function","visibility":"public","signature":"fn test_outcome_ok(outcome: TestOutcome) -> Bool","source_path":"stdlib/test.kn","line":34,"attributes":[],"docs":[],"target_notes":[]},{"name":"test_bool","qualified_name":"std::test::test_bool","kind":"function","visibility":"public","signature":"fn test_bool(label: String, condition: Bool) -> TestOutcome","source_path":"stdlib/test.kn","line":37,"attributes":[],"docs":[],"target_notes":[]},{"name":"test_status","qualified_name":"std::test::test_status","kind":"function","visibility":"public","signature":"fn test_status(label: String, status: Int) -> TestOutcome","source_path":"stdlib/test.kn","line":42,"attributes":[],"docs":[],"target_notes":[]},{"name":"test_combine","qualified_name":"std::test::test_combine","kind":"function","visibility":"public","signature":"fn test_combine(left: TestOutcome, right: TestOutcome) -> TestOutcome","source_path":"stdlib/test.kn","line":47,"attributes":[],"docs":[],"target_notes":[]},{"name":"test_count_failure","qualified_name":"std::test::test_count_failure","kind":"function","visibility":"public","signature":"fn test_count_failure(outcome: TestOutcome, count: Int) -> Int","source_path":"stdlib/test.kn","line":52,"attributes":[],"docs":[],"target_notes":[]},{"name":"test_expect_proof_assessment","qualified_name":"std::test::test_expect_proof_assessment","kind":"function","visibility":"public","signature":"fn test_expect_proof_assessment(assessment: ProofAssessment) -> TestOutcome","source_path":"stdlib/test.kn","line":57,"attributes":[],"docs":[],"target_notes":[]},{"name":"test_expect_proof_suite","qualified_name":"std::test::test_expect_proof_suite","kind":"function","visibility":"public","signature":"fn test_expect_proof_suite(summary: ProofSuiteSummary) -> TestOutcome","source_path":"stdlib/test.kn","line":86,"attributes":[],"docs":[],"target_notes":[]},{"name":"test_expect_case","qualified_name":"std::test::test_expect_case","kind":"function","visibility":"public","signature":"fn test_expect_case(spec: ProofCase, outcome: ProofOutcome) -> TestOutcome","source_path":"stdlib/test.kn","line":91,"attributes":[],"docs":[],"target_notes":[]},{"name":"test_expect_proved","qualified_name":"std::test::test_expect_proved","kind":"function","visibility":"public","signature":"fn test_expect_proved(outcome: ProofOutcome) -> TestOutcome","source_path":"stdlib/test.kn","line":94,"attributes":[],"docs":[],"target_notes":[]},{"name":"test_expect_witness","qualified_name":"std::test::test_expect_witness","kind":"function","visibility":"public","signature":"fn test_expect_witness(outcome: ProofOutcome) -> TestOutcome","source_path":"stdlib/test.kn","line":97,"attributes":[],"docs":[],"target_notes":[]},{"name":"test_assert_case","qualified_name":"std::test::test_assert_case","kind":"function","visibility":"public","signature":"fn test_assert_case(spec: ProofCase, backend_subject: Any) -> TestOutcome","source_path":"stdlib/test.kn","line":100,"attributes":[],"docs":[],"target_notes":[]},{"name":"test_assert_unsat","qualified_name":"std::test::test_assert_unsat","kind":"function","visibility":"public","signature":"fn test_assert_unsat(label: String, solver: Any) -> TestOutcome","source_path":"stdlib/test.kn","line":103,"attributes":[],"docs":[],"target_notes":[]},{"name":"test_assert_sat","qualified_name":"std::test::test_assert_sat","kind":"function","visibility":"public","signature":"fn test_assert_sat(label: String, solver: Any) -> TestOutcome","source_path":"stdlib/test.kn","line":106,"attributes":[],"docs":[],"target_notes":[]},{"name":"test_task","qualified_name":"std::test::test_task","kind":"function","visibility":"public","signature":"fn test_task(id: String) -> BuildTaskSpec","source_path":"stdlib/test.kn","line":109,"attributes":[],"docs":[],"target_notes":[]},{"name":"test_suite","qualified_name":"std::test::test_suite","kind":"function","visibility":"public","signature":"fn test_suite(id: String) -> BuildTaskSpec","source_path":"stdlib/test.kn","line":112,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"text","import_path":"std::text","source_path":"stdlib/text.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"TextSlice","qualified_name":"std::text::TextSlice","kind":"struct","visibility":"public","signature":"struct TextSlice","source_path":"stdlib/text.kn","line":4,"attributes":[],"docs":[],"target_notes":[]},{"name":"StringView","qualified_name":"std::text::StringView","kind":"struct","visibility":"public","signature":"struct StringView","source_path":"stdlib/text.kn","line":9,"attributes":[],"docs":[],"target_notes":[]},{"name":"TextUnescapeResult","qualified_name":"std::text::TextUnescapeResult","kind":"struct","visibility":"public","signature":"struct TextUnescapeResult","source_path":"stdlib/text.kn","line":14,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_unescape_error","qualified_name":"std::text::text_unescape_error","kind":"function","visibility":"private","signature":"fn text_unescape_error(message: String) -> TextUnescapeResult","source_path":"stdlib/text.kn","line":19,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_int_clamp","qualified_name":"std::text::text_int_clamp","kind":"function","visibility":"private","signature":"fn text_int_clamp(value: Int, low: Int, high: Int) -> Int","source_path":"stdlib/text.kn","line":26,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_escape_hex_byte","qualified_name":"std::text::text_escape_hex_byte","kind":"function","visibility":"private","signature":"fn text_escape_hex_byte(value: Int) -> String","source_path":"stdlib/text.kn","line":33,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_slice","qualified_name":"std::text::text_slice","kind":"function","visibility":"public","signature":"fn text_slice(source: String, start: Int, length: Int) -> TextSlice","source_path":"stdlib/text.kn","line":36,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_from","qualified_name":"std::text::text_from","kind":"function","visibility":"public","signature":"fn text_from(source: String) -> TextSlice","source_path":"stdlib/text.kn","line":42,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_view","qualified_name":"std::text::text_view","kind":"function","visibility":"public","signature":"fn text_view(source: String, start: Int, length: Int) -> TextSlice","source_path":"stdlib/text.kn","line":45,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_len","qualified_name":"std::text::text_len","kind":"function","visibility":"public","signature":"fn text_len(view: TextSlice) -> Int","source_path":"stdlib/text.kn","line":48,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_start","qualified_name":"std::text::text_start","kind":"function","visibility":"public","signature":"fn text_start(view: TextSlice) -> Int","source_path":"stdlib/text.kn","line":51,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_end","qualified_name":"std::text::text_end","kind":"function","visibility":"public","signature":"fn text_end(view: TextSlice) -> Int","source_path":"stdlib/text.kn","line":54,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_is_empty","qualified_name":"std::text::text_is_empty","kind":"function","visibility":"public","signature":"fn text_is_empty(view: TextSlice) -> Bool","source_path":"stdlib/text.kn","line":57,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_byte_at","qualified_name":"std::text::text_byte_at","kind":"function","visibility":"public","signature":"fn text_byte_at(view: TextSlice, index: Int) -> Int","source_path":"stdlib/text.kn","line":60,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_char_at","qualified_name":"std::text::text_char_at","kind":"function","visibility":"public","signature":"fn text_char_at(view: TextSlice, index: Int) -> String","source_path":"stdlib/text.kn","line":67,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_find_from","qualified_name":"std::text::text_find_from","kind":"function","visibility":"public","signature":"fn text_find_from(view: TextSlice, needle: String, start: Int) -> Int","source_path":"stdlib/text.kn","line":74,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_find","qualified_name":"std::text::text_find","kind":"function","visibility":"public","signature":"fn text_find(view: TextSlice, needle: String) -> Int","source_path":"stdlib/text.kn","line":87,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_contains","qualified_name":"std::text::text_contains","kind":"function","visibility":"public","signature":"fn text_contains(view: TextSlice, needle: String) -> Bool","source_path":"stdlib/text.kn","line":90,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_starts_with","qualified_name":"std::text::text_starts_with","kind":"function","visibility":"public","signature":"fn text_starts_with(view: TextSlice, needle: String) -> Bool","source_path":"stdlib/text.kn","line":93,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_ends_with","qualified_name":"std::text::text_ends_with","kind":"function","visibility":"public","signature":"fn text_ends_with(view: TextSlice, needle: String) -> Bool","source_path":"stdlib/text.kn","line":98,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_equals_string","qualified_name":"std::text::text_equals_string","kind":"function","visibility":"public","signature":"fn text_equals_string(view: TextSlice, other: String) -> Bool","source_path":"stdlib/text.kn","line":104,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_equals","qualified_name":"std::text::text_equals","kind":"function","visibility":"public","signature":"fn text_equals(left: TextSlice, right: TextSlice) -> Bool","source_path":"stdlib/text.kn","line":114,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_count","qualified_name":"std::text::text_count","kind":"function","visibility":"public","signature":"fn text_count(view: TextSlice, needle: String) -> Int","source_path":"stdlib/text.kn","line":124,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_subslice","qualified_name":"std::text::text_subslice","kind":"function","visibility":"public","signature":"fn text_subslice(view: TextSlice, start: Int, length: Int) -> TextSlice","source_path":"stdlib/text.kn","line":138,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_trim_left","qualified_name":"std::text::text_trim_left","kind":"function","visibility":"public","signature":"fn text_trim_left(view: TextSlice) -> TextSlice","source_path":"stdlib/text.kn","line":143,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_trim_right","qualified_name":"std::text::text_trim_right","kind":"function","visibility":"public","signature":"fn text_trim_right(view: TextSlice) -> TextSlice","source_path":"stdlib/text.kn","line":151,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_trim","qualified_name":"std::text::text_trim","kind":"function","visibility":"public","signature":"fn text_trim(view: TextSlice) -> TextSlice","source_path":"stdlib/text.kn","line":159,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_materialize","qualified_name":"std::text::text_materialize","kind":"function","visibility":"public","signature":"fn text_materialize(view: TextSlice) -> String","source_path":"stdlib/text.kn","line":162,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_as_bytes","qualified_name":"std::text::text_as_bytes","kind":"function","visibility":"public","signature":"fn text_as_bytes(view: TextSlice) -> ByteSlice","source_path":"stdlib/text.kn","line":165,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_from_bytes","qualified_name":"std::text::text_from_bytes","kind":"function","visibility":"public","signature":"fn text_from_bytes(view: ByteSlice) -> TextSlice","source_path":"stdlib/text.kn","line":168,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_bytes_array","qualified_name":"std::text::text_bytes_array","kind":"function","visibility":"public","signature":"fn text_bytes_array(view: TextSlice) -> Array","source_path":"stdlib/text.kn","line":171,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_from_byte_array","qualified_name":"std::text::text_from_byte_array","kind":"function","visibility":"public","signature":"fn text_from_byte_array(values: Array) -> String","source_path":"stdlib/text.kn","line":174,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_escape_basic","qualified_name":"std::text::text_escape_basic","kind":"function","visibility":"public","signature":"fn text_escape_basic(source: String) -> String","source_path":"stdlib/text.kn","line":177,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_unescape_basic","qualified_name":"std::text::text_unescape_basic","kind":"function","visibility":"public","signature":"fn text_unescape_basic(source: String) -> TextUnescapeResult","source_path":"stdlib/text.kn","line":211,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_lines","qualified_name":"std::text::text_lines","kind":"function","visibility":"public","signature":"fn text_lines(view: TextSlice) -> Array","source_path":"stdlib/text.kn","line":264,"attributes":[],"docs":[],"target_notes":[]},{"name":"string_view","qualified_name":"std::text::string_view","kind":"function","visibility":"public","signature":"fn string_view(source: String, start: Int, length: Int) -> StringView","source_path":"stdlib/text.kn","line":267,"attributes":[],"docs":[],"target_notes":[]},{"name":"string_view_from","qualified_name":"std::text::string_view_from","kind":"function","visibility":"public","signature":"fn string_view_from(source: String) -> StringView","source_path":"stdlib/text.kn","line":273,"attributes":[],"docs":[],"target_notes":[]},{"name":"string_view_len","qualified_name":"std::text::string_view_len","kind":"function","visibility":"public","signature":"fn string_view_len(view: StringView) -> Int","source_path":"stdlib/text.kn","line":276,"attributes":[],"docs":[],"target_notes":[]},{"name":"string_view_to_text","qualified_name":"std::text::string_view_to_text","kind":"function","visibility":"public","signature":"fn string_view_to_text(view: StringView) -> TextSlice","source_path":"stdlib/text.kn","line":279,"attributes":[],"docs":[],"target_notes":[]},{"name":"string_view_materialize","qualified_name":"std::text::string_view_materialize","kind":"function","visibility":"public","signature":"fn string_view_materialize(view: StringView) -> String","source_path":"stdlib/text.kn","line":282,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_builder_new","qualified_name":"std::text::text_builder_new","kind":"function","visibility":"public","signature":"fn text_builder_new() -> BytesBuilder","source_path":"stdlib/text.kn","line":285,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_builder_len","qualified_name":"std::text::text_builder_len","kind":"function","visibility":"public","signature":"fn text_builder_len(builder: BytesBuilder) -> Int","source_path":"stdlib/text.kn","line":288,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_builder_push","qualified_name":"std::text::text_builder_push","kind":"function","visibility":"public","signature":"fn text_builder_push(builder: BytesBuilder, value: String) -> BytesBuilder","source_path":"stdlib/text.kn","line":291,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_builder_push_view","qualified_name":"std::text::text_builder_push_view","kind":"function","visibility":"public","signature":"fn text_builder_push_view(builder: BytesBuilder, view: TextSlice) -> BytesBuilder","source_path":"stdlib/text.kn","line":294,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_builder_push_char_code","qualified_name":"std::text::text_builder_push_char_code","kind":"function","visibility":"public","signature":"fn text_builder_push_char_code(builder: BytesBuilder, codepoint: Int) -> BytesBuilder","source_path":"stdlib/text.kn","line":297,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_builder_build","qualified_name":"std::text::text_builder_build","kind":"function","visibility":"public","signature":"fn text_builder_build(builder: BytesBuilder) -> String","source_path":"stdlib/text.kn","line":300,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_trim_string","qualified_name":"std::text::text_trim_string","kind":"function","visibility":"public","signature":"fn text_trim_string(source: String) -> String","source_path":"stdlib/text.kn","line":303,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_contains_string","qualified_name":"std::text::text_contains_string","kind":"function","visibility":"public","signature":"fn text_contains_string(source: String, needle: String) -> Bool","source_path":"stdlib/text.kn","line":306,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_starts_with_string","qualified_name":"std::text::text_starts_with_string","kind":"function","visibility":"public","signature":"fn text_starts_with_string(source: String, needle: String) -> Bool","source_path":"stdlib/text.kn","line":309,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_ends_with_string","qualified_name":"std::text::text_ends_with_string","kind":"function","visibility":"public","signature":"fn text_ends_with_string(source: String, needle: String) -> Bool","source_path":"stdlib/text.kn","line":312,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_substring_string","qualified_name":"std::text::text_substring_string","kind":"function","visibility":"public","signature":"fn text_substring_string(source: String, start: Int, length: Int) -> String","source_path":"stdlib/text.kn","line":315,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_upper","qualified_name":"std::text::text_upper","kind":"function","visibility":"public","signature":"fn text_upper(source: String) -> String","source_path":"stdlib/text.kn","line":321,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_lower","qualified_name":"std::text::text_lower","kind":"function","visibility":"public","signature":"fn text_lower(source: String) -> String","source_path":"stdlib/text.kn","line":324,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_replace_string","qualified_name":"std::text::text_replace_string","kind":"function","visibility":"public","signature":"fn text_replace_string(source: String, from: String, to: String) -> String","source_path":"stdlib/text.kn","line":327,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_repeat","qualified_name":"std::text::text_repeat","kind":"function","visibility":"public","signature":"fn text_repeat(source: String, count: Int) -> String","source_path":"stdlib/text.kn","line":332,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_split_string","qualified_name":"std::text::text_split_string","kind":"function","visibility":"public","signature":"fn text_split_string(source: String, separator: String) -> Array","source_path":"stdlib/text.kn","line":342,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_join_strings","qualified_name":"std::text::text_join_strings","kind":"function","visibility":"public","signature":"fn text_join_strings(items: Array, separator: String) -> String","source_path":"stdlib/text.kn","line":366,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_split_lines","qualified_name":"std::text::text_split_lines","kind":"function","visibility":"public","signature":"fn text_split_lines(source: String) -> Array","source_path":"stdlib/text.kn","line":376,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_tokenize_whitespace","qualified_name":"std::text::text_tokenize_whitespace","kind":"function","visibility":"public","signature":"fn text_tokenize_whitespace(source: String) -> Array","source_path":"stdlib/text.kn","line":398,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_ord","qualified_name":"std::text::text_ord","kind":"function","visibility":"public","signature":"fn text_ord(source: String) -> Int","source_path":"stdlib/text.kn","line":415,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_chr","qualified_name":"std::text::text_chr","kind":"function","visibility":"public","signature":"fn text_chr(codepoint: Int) -> String","source_path":"stdlib/text.kn","line":418,"attributes":[],"docs":[],"target_notes":[]},{"name":"text_to_string","qualified_name":"std::text::text_to_string","kind":"function","visibility":"public","signature":"fn text_to_string(value: Any) -> String","source_path":"stdlib/text.kn","line":421,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"thread","import_path":"std::thread","source_path":"stdlib/thread.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"abi_thread_spawn","qualified_name":"std::thread::abi_thread_spawn","kind":"extern_function","visibility":"public","signature":"fn abi_thread_spawn(func: ptr, arg: ptr, thread_id_out: ptr, done_flag: ptr) -> ptr","source_path":"stdlib/thread.kn","line":5,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_thread_join","qualified_name":"std::thread::abi_thread_join","kind":"extern_function","visibility":"public","signature":"fn abi_thread_join(thread_handle: ptr) -> Int","source_path":"stdlib/thread.kn","line":8,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_thread_set_name","qualified_name":"std::thread::abi_thread_set_name","kind":"extern_function","visibility":"public","signature":"fn abi_thread_set_name(name: String) -> Int","source_path":"stdlib/thread.kn","line":11,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_thread_yield","qualified_name":"std::thread::abi_thread_yield","kind":"extern_function","visibility":"public","signature":"fn abi_thread_yield() -> Int","source_path":"stdlib/thread.kn","line":14,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"ThreadEntry","qualified_name":"std::thread::ThreadEntry","kind":"struct","visibility":"public","signature":"struct ThreadEntry","source_path":"stdlib/thread.kn","line":16,"attributes":[],"docs":[],"target_notes":[]},{"name":"Thread","qualified_name":"std::thread::Thread","kind":"struct","visibility":"public","signature":"struct Thread","source_path":"stdlib/thread.kn","line":19,"attributes":[],"docs":[],"target_notes":[]},{"name":"thread_entry","qualified_name":"std::thread::thread_entry","kind":"function","visibility":"public","signature":"fn thread_entry(func: ptr) -> ThreadEntry","source_path":"stdlib/thread.kn","line":24,"attributes":[],"docs":[],"target_notes":[]},{"name":"thread_spawn","qualified_name":"std::thread::thread_spawn","kind":"function","visibility":"public","signature":"fn thread_spawn(func: ptr, arg: ptr) -> Thread","source_path":"stdlib/thread.kn","line":27,"attributes":[],"docs":[],"target_notes":[]},{"name":"thread_spawn_entry","qualified_name":"std::thread::thread_spawn_entry","kind":"function","visibility":"public","signature":"fn thread_spawn_entry(entry: ThreadEntry, arg: ptr) -> Thread","source_path":"stdlib/thread.kn","line":33,"attributes":[],"docs":[],"target_notes":[]},{"name":"thread_join","qualified_name":"std::thread::thread_join","kind":"function","visibility":"public","signature":"fn thread_join(thread: Thread) -> Int","source_path":"stdlib/thread.kn","line":36,"attributes":[],"docs":[],"target_notes":[]},{"name":"thread_set_name","qualified_name":"std::thread::thread_set_name","kind":"function","visibility":"public","signature":"fn thread_set_name(name: String) -> Int","source_path":"stdlib/thread.kn","line":44,"attributes":[],"docs":[],"target_notes":[]},{"name":"thread_yield","qualified_name":"std::thread::thread_yield","kind":"function","visibility":"public","signature":"fn thread_yield() -> Int","source_path":"stdlib/thread.kn","line":47,"attributes":[],"docs":[],"target_notes":[]},{"name":"thread_current_id","qualified_name":"std::thread::thread_current_id","kind":"function","visibility":"public","signature":"fn thread_current_id() -> Int","source_path":"stdlib/thread.kn","line":50,"attributes":[],"docs":[],"target_notes":[]},{"name":"thread_affinity_mask","qualified_name":"std::thread::thread_affinity_mask","kind":"function","visibility":"public","signature":"fn thread_affinity_mask() -> Int","source_path":"stdlib/thread.kn","line":53,"attributes":[],"docs":[],"target_notes":[]},{"name":"thread_set_affinity","qualified_name":"std::thread::thread_set_affinity","kind":"function","visibility":"public","signature":"fn thread_set_affinity(core_index: Int) -> Int","source_path":"stdlib/thread.kn","line":56,"attributes":[],"docs":[],"target_notes":[]},{"name":"thread_logical_count","qualified_name":"std::thread::thread_logical_count","kind":"function","visibility":"public","signature":"fn thread_logical_count() -> Int","source_path":"stdlib/thread.kn","line":59,"attributes":[],"docs":[],"target_notes":[]},{"name":"thread_core_count","qualified_name":"std::thread::thread_core_count","kind":"function","visibility":"public","signature":"fn thread_core_count() -> Int","source_path":"stdlib/thread.kn","line":62,"attributes":[],"docs":[],"target_notes":[]},{"name":"thread_is_done","qualified_name":"std::thread::thread_is_done","kind":"function","visibility":"public","signature":"fn thread_is_done(thread: Thread) -> Bool","source_path":"stdlib/thread.kn","line":65,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"time","import_path":"std::time","source_path":"stdlib/time.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"abi_now_millis","qualified_name":"std::time::abi_now_millis","kind":"extern_function","visibility":"private","signature":"fn abi_now_millis() -> Int","source_path":"stdlib/time.kn","line":2,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_sleep_millis","qualified_name":"std::time::abi_sleep_millis","kind":"extern_function","visibility":"private","signature":"fn abi_sleep_millis(milliseconds: Int) -> Int","source_path":"stdlib/time.kn","line":5,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"native_now_millis","qualified_name":"std::time::native_now_millis","kind":"function","visibility":"public","signature":"fn native_now_millis() -> Int","source_path":"stdlib/time.kn","line":7,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_sleep_millis","qualified_name":"std::time::native_sleep_millis","kind":"function","visibility":"public","signature":"fn native_sleep_millis(milliseconds: Int) -> Int","source_path":"stdlib/time.kn","line":10,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_deadline_millis","qualified_name":"std::time::native_deadline_millis","kind":"function","visibility":"public","signature":"fn native_deadline_millis(duration_millis: Int) -> Int","source_path":"stdlib/time.kn","line":13,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_deadline_elapsed","qualified_name":"std::time::native_deadline_elapsed","kind":"function","visibility":"public","signature":"fn native_deadline_elapsed(deadline_millis: Int) -> Bool","source_path":"stdlib/time.kn","line":16,"attributes":[],"docs":[],"target_notes":[]},{"name":"now_millis","qualified_name":"std::time::now_millis","kind":"function","visibility":"public","signature":"fn now_millis() -> Int","source_path":"stdlib/time.kn","line":20,"attributes":[],"docs":[],"target_notes":[]},{"name":"sleep_millis","qualified_name":"std::time::sleep_millis","kind":"function","visibility":"public","signature":"fn sleep_millis(milliseconds: Int) -> Int","source_path":"stdlib/time.kn","line":23,"attributes":[],"docs":[],"target_notes":[]},{"name":"deadline_millis","qualified_name":"std::time::deadline_millis","kind":"function","visibility":"public","signature":"fn deadline_millis(duration_millis: Int) -> Int","source_path":"stdlib/time.kn","line":26,"attributes":[],"docs":[],"target_notes":[]},{"name":"deadline_elapsed","qualified_name":"std::time::deadline_elapsed","kind":"function","visibility":"public","signature":"fn deadline_elapsed(deadline_millis: Int) -> Bool","source_path":"stdlib/time.kn","line":29,"attributes":[],"docs":[],"target_notes":[]},{"name":"Duration","qualified_name":"std::time::Duration","kind":"struct","visibility":"public","signature":"struct Duration","source_path":"stdlib/time.kn","line":35,"attributes":[],"docs":[],"target_notes":[]},{"name":"duration_from_millis","qualified_name":"std::time::duration_from_millis","kind":"function","visibility":"public","signature":"fn duration_from_millis(ms: Int) -> Duration","source_path":"stdlib/time.kn","line":38,"attributes":[],"docs":[],"target_notes":[]},{"name":"duration_from_secs","qualified_name":"std::time::duration_from_secs","kind":"function","visibility":"public","signature":"fn duration_from_secs(secs: Int) -> Duration","source_path":"stdlib/time.kn","line":41,"attributes":[],"docs":[],"target_notes":[]},{"name":"duration_from_mins","qualified_name":"std::time::duration_from_mins","kind":"function","visibility":"public","signature":"fn duration_from_mins(mins: Int) -> Duration","source_path":"stdlib/time.kn","line":44,"attributes":[],"docs":[],"target_notes":[]},{"name":"duration_from_hours","qualified_name":"std::time::duration_from_hours","kind":"function","visibility":"public","signature":"fn duration_from_hours(hours: Int) -> Duration","source_path":"stdlib/time.kn","line":47,"attributes":[],"docs":[],"target_notes":[]},{"name":"duration_to_millis","qualified_name":"std::time::duration_to_millis","kind":"function","visibility":"public","signature":"fn duration_to_millis(self: Duration) -> Int","source_path":"stdlib/time.kn","line":50,"attributes":[],"docs":[],"target_notes":[]},{"name":"duration_to_secs","qualified_name":"std::time::duration_to_secs","kind":"function","visibility":"public","signature":"fn duration_to_secs(self: Duration) -> Int","source_path":"stdlib/time.kn","line":53,"attributes":[],"docs":[],"target_notes":[]},{"name":"duration_add","qualified_name":"std::time::duration_add","kind":"function","visibility":"public","signature":"fn duration_add(a: Duration, b: Duration) -> Duration","source_path":"stdlib/time.kn","line":56,"attributes":[],"docs":[],"target_notes":[]},{"name":"duration_sub","qualified_name":"std::time::duration_sub","kind":"function","visibility":"public","signature":"fn duration_sub(a: Duration, b: Duration) -> Duration","source_path":"stdlib/time.kn","line":59,"attributes":[],"docs":[],"target_notes":[]},{"name":"duration_compare","qualified_name":"std::time::duration_compare","kind":"function","visibility":"public","signature":"fn duration_compare(a: Duration, b: Duration) -> Int","source_path":"stdlib/time.kn","line":65,"attributes":[],"docs":[],"target_notes":[]},{"name":"Instant","qualified_name":"std::time::Instant","kind":"struct","visibility":"public","signature":"struct Instant","source_path":"stdlib/time.kn","line":73,"attributes":[],"docs":[],"target_notes":[]},{"name":"instant_now","qualified_name":"std::time::instant_now","kind":"function","visibility":"public","signature":"fn instant_now() -> Instant","source_path":"stdlib/time.kn","line":76,"attributes":[],"docs":[],"target_notes":[]},{"name":"instant_elapsed","qualified_name":"std::time::instant_elapsed","kind":"function","visibility":"public","signature":"fn instant_elapsed(self: Instant) -> Duration","source_path":"stdlib/time.kn","line":79,"attributes":[],"docs":[],"target_notes":[]},{"name":"instant_add_duration","qualified_name":"std::time::instant_add_duration","kind":"function","visibility":"public","signature":"fn instant_add_duration(self: Instant, dur: Duration) -> Instant","source_path":"stdlib/time.kn","line":86,"attributes":[],"docs":[],"target_notes":[]},{"name":"instant_sub_instant","qualified_name":"std::time::instant_sub_instant","kind":"function","visibility":"public","signature":"fn instant_sub_instant(self: Instant, other: Instant) -> Duration","source_path":"stdlib/time.kn","line":89,"attributes":[],"docs":[],"target_notes":[]},{"name":"instant_compare","qualified_name":"std::time::instant_compare","kind":"function","visibility":"public","signature":"fn instant_compare(a: Instant, b: Instant) -> Int","source_path":"stdlib/time.kn","line":95,"attributes":[],"docs":[],"target_notes":[]},{"name":"Deadline","qualified_name":"std::time::Deadline","kind":"struct","visibility":"public","signature":"struct Deadline","source_path":"stdlib/time.kn","line":103,"attributes":[],"docs":[],"target_notes":[]},{"name":"deadline_from_duration","qualified_name":"std::time::deadline_from_duration","kind":"function","visibility":"public","signature":"fn deadline_from_duration(dur: Duration) -> Deadline","source_path":"stdlib/time.kn","line":106,"attributes":[],"docs":[],"target_notes":[]},{"name":"deadline_is_elapsed","qualified_name":"std::time::deadline_is_elapsed","kind":"function","visibility":"public","signature":"fn deadline_is_elapsed(self: Deadline) -> Bool","source_path":"stdlib/time.kn","line":110,"attributes":[],"docs":[],"target_notes":[]},{"name":"deadline_remaining","qualified_name":"std::time::deadline_remaining","kind":"function","visibility":"public","signature":"fn deadline_remaining(self: Deadline) -> Duration","source_path":"stdlib/time.kn","line":113,"attributes":[],"docs":[],"target_notes":[]},{"name":"Ticker","qualified_name":"std::time::Ticker","kind":"struct","visibility":"public","signature":"struct Ticker","source_path":"stdlib/time.kn","line":121,"attributes":[],"docs":[],"target_notes":[]},{"name":"ticker_new","qualified_name":"std::time::ticker_new","kind":"function","visibility":"public","signature":"fn ticker_new(interval: Duration) -> Ticker","source_path":"stdlib/time.kn","line":125,"attributes":[],"docs":[],"target_notes":[]},{"name":"ticker_next","qualified_name":"std::time::ticker_next","kind":"function","visibility":"public","signature":"fn ticker_next(t: Ticker) -> Ticker","source_path":"stdlib/time.kn","line":129,"attributes":[],"docs":[],"target_notes":[]},{"name":"DateTime","qualified_name":"std::time::DateTime","kind":"struct","visibility":"public","signature":"struct DateTime","source_path":"stdlib/time.kn","line":139,"attributes":[],"docs":[],"target_notes":[]},{"name":"datetime_from_epoch_millis","qualified_name":"std::time::datetime_from_epoch_millis","kind":"function","visibility":"public","signature":"fn datetime_from_epoch_millis(epoch_ms: Int) -> DateTime","source_path":"stdlib/time.kn","line":148,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"tls","import_path":"std::tls","source_path":"stdlib/tls.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"tls_client_state","qualified_name":"std::tls::tls_client_state","kind":"function","visibility":"public","signature":"fn tls_client_state() -> Int","source_path":"stdlib/tls.kn","line":4,"attributes":[],"docs":[],"target_notes":[]},{"name":"tls_client_supported","qualified_name":"std::tls::tls_client_supported","kind":"function","visibility":"public","signature":"fn tls_client_supported() -> Bool","source_path":"stdlib/tls.kn","line":7,"attributes":[],"docs":[],"target_notes":[]},{"name":"tls_client_available","qualified_name":"std::tls::tls_client_available","kind":"function","visibility":"public","signature":"fn tls_client_available() -> Bool","source_path":"stdlib/tls.kn","line":10,"attributes":[],"docs":[],"target_notes":[]},{"name":"tls_platform_name","qualified_name":"std::tls::tls_platform_name","kind":"function","visibility":"public","signature":"fn tls_platform_name() -> String","source_path":"stdlib/tls.kn","line":13,"attributes":[],"docs":[],"target_notes":[]},{"name":"tls_https_request_create","qualified_name":"std::tls::tls_https_request_create","kind":"function","visibility":"public","signature":"fn tls_https_request_create(method: String, url: String) -> Int","source_path":"stdlib/tls.kn","line":16,"attributes":[],"docs":[],"target_notes":[]},{"name":"tls_https_request_set_header","qualified_name":"std::tls::tls_https_request_set_header","kind":"function","visibility":"public","signature":"fn tls_https_request_set_header(request_id: Int, key: String, value: String) -> Int","source_path":"stdlib/tls.kn","line":19,"attributes":[],"docs":[],"target_notes":[]},{"name":"tls_https_request_set_body_text","qualified_name":"std::tls::tls_https_request_set_body_text","kind":"function","visibility":"public","signature":"fn tls_https_request_set_body_text(request_id: Int, payload: String) -> Int","source_path":"stdlib/tls.kn","line":22,"attributes":[],"docs":[],"target_notes":[]},{"name":"tls_https_request_set_timeout","qualified_name":"std::tls::tls_https_request_set_timeout","kind":"function","visibility":"public","signature":"fn tls_https_request_set_timeout(request_id: Int, timeout_ms: Int) -> Int","source_path":"stdlib/tls.kn","line":25,"attributes":[],"docs":[],"target_notes":[]},{"name":"tls_https_client_send","qualified_name":"std::tls::tls_https_client_send","kind":"function","visibility":"public","signature":"fn tls_https_client_send(request_id: Int) -> Int","source_path":"stdlib/tls.kn","line":28,"attributes":[],"docs":[],"target_notes":[]},{"name":"tls_https_response_protocol","qualified_name":"std::tls::tls_https_response_protocol","kind":"function","visibility":"public","signature":"fn tls_https_response_protocol(response_id: Int) -> String","source_path":"stdlib/tls.kn","line":31,"attributes":[],"docs":[],"target_notes":[]},{"name":"tls_https_get_text","qualified_name":"std::tls::tls_https_get_text","kind":"function","visibility":"public","signature":"fn tls_https_get_text(url: String) -> String","source_path":"stdlib/tls.kn","line":34,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"ui","import_path":"std::ui","source_path":"stdlib/ui.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"abi_ui_reset","qualified_name":"std::ui::abi_ui_reset","kind":"extern_function","visibility":"private","signature":"fn abi_ui_reset() -> Int","source_path":"stdlib/ui.kn","line":5,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_session_create","qualified_name":"std::ui::abi_ui_session_create","kind":"extern_function","visibility":"private","signature":"fn abi_ui_session_create(app_name: String, width: Int, height: Int) -> Int","source_path":"stdlib/ui.kn","line":8,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_session_destroy","qualified_name":"std::ui::abi_ui_session_destroy","kind":"extern_function","visibility":"private","signature":"fn abi_ui_session_destroy(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":11,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_session_count","qualified_name":"std::ui::abi_ui_session_count","kind":"extern_function","visibility":"private","signature":"fn abi_ui_session_count() -> Int","source_path":"stdlib/ui.kn","line":14,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_window_open","qualified_name":"std::ui::abi_ui_window_open","kind":"extern_function","visibility":"private","signature":"fn abi_ui_window_open(session_id: Int, title: String, width: Int, height: Int) -> Int","source_path":"stdlib/ui.kn","line":17,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_window_close","qualified_name":"std::ui::abi_ui_window_close","kind":"extern_function","visibility":"private","signature":"fn abi_ui_window_close(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":20,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_begin_frame","qualified_name":"std::ui::abi_ui_begin_frame","kind":"extern_function","visibility":"private","signature":"fn abi_ui_begin_frame(session_id: Int, delta_ms: Float) -> Int","source_path":"stdlib/ui.kn","line":23,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_end_frame","qualified_name":"std::ui::abi_ui_end_frame","kind":"extern_function","visibility":"private","signature":"fn abi_ui_end_frame(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":26,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_present","qualified_name":"std::ui::abi_ui_present","kind":"extern_function","visibility":"private","signature":"fn abi_ui_present(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":29,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_frame_index","qualified_name":"std::ui::abi_ui_frame_index","kind":"extern_function","visibility":"private","signature":"fn abi_ui_frame_index(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":32,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_last_presented_frame","qualified_name":"std::ui::abi_ui_last_presented_frame","kind":"extern_function","visibility":"private","signature":"fn abi_ui_last_presented_frame(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":35,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_node_create","qualified_name":"std::ui::abi_ui_node_create","kind":"extern_function","visibility":"private","signature":"fn abi_ui_node_create(session_id: Int, kind: String) -> Int","source_path":"stdlib/ui.kn","line":38,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_node_destroy","qualified_name":"std::ui::abi_ui_node_destroy","kind":"extern_function","visibility":"private","signature":"fn abi_ui_node_destroy(session_id: Int, node_id: Int) -> Int","source_path":"stdlib/ui.kn","line":41,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_node_count","qualified_name":"std::ui::abi_ui_node_count","kind":"extern_function","visibility":"private","signature":"fn abi_ui_node_count(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":44,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_node_exists","qualified_name":"std::ui::abi_ui_node_exists","kind":"extern_function","visibility":"private","signature":"fn abi_ui_node_exists(session_id: Int, node_id: Int) -> Int","source_path":"stdlib/ui.kn","line":47,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_node_set_parent","qualified_name":"std::ui::abi_ui_node_set_parent","kind":"extern_function","visibility":"private","signature":"fn abi_ui_node_set_parent(session_id: Int, node_id: Int, parent_id: Int) -> Int","source_path":"stdlib/ui.kn","line":50,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_node_parent","qualified_name":"std::ui::abi_ui_node_parent","kind":"extern_function","visibility":"private","signature":"fn abi_ui_node_parent(session_id: Int, node_id: Int) -> Int","source_path":"stdlib/ui.kn","line":53,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_node_child_count","qualified_name":"std::ui::abi_ui_node_child_count","kind":"extern_function","visibility":"private","signature":"fn abi_ui_node_child_count(session_id: Int, node_id: Int) -> Int","source_path":"stdlib/ui.kn","line":56,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_node_set_rect","qualified_name":"std::ui::abi_ui_node_set_rect","kind":"extern_function","visibility":"private","signature":"fn abi_ui_node_set_rect(session_id: Int, node_id: Int, x: Float, y: Float, width: Float, height: Float) -> Int","source_path":"stdlib/ui.kn","line":59,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_node_x","qualified_name":"std::ui::abi_ui_node_x","kind":"extern_function","visibility":"private","signature":"fn abi_ui_node_x(session_id: Int, node_id: Int) -> Float","source_path":"stdlib/ui.kn","line":62,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_node_y","qualified_name":"std::ui::abi_ui_node_y","kind":"extern_function","visibility":"private","signature":"fn abi_ui_node_y(session_id: Int, node_id: Int) -> Float","source_path":"stdlib/ui.kn","line":65,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_node_width","qualified_name":"std::ui::abi_ui_node_width","kind":"extern_function","visibility":"private","signature":"fn abi_ui_node_width(session_id: Int, node_id: Int) -> Float","source_path":"stdlib/ui.kn","line":68,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_node_height","qualified_name":"std::ui::abi_ui_node_height","kind":"extern_function","visibility":"private","signature":"fn abi_ui_node_height(session_id: Int, node_id: Int) -> Float","source_path":"stdlib/ui.kn","line":71,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_node_set_text","qualified_name":"std::ui::abi_ui_node_set_text","kind":"extern_function","visibility":"private","signature":"fn abi_ui_node_set_text(session_id: Int, node_id: Int, text: String) -> Int","source_path":"stdlib/ui.kn","line":74,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_node_text","qualified_name":"std::ui::abi_ui_node_text","kind":"extern_function","visibility":"private","signature":"fn abi_ui_node_text(session_id: Int, node_id: Int) -> String","source_path":"stdlib/ui.kn","line":77,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_node_kind","qualified_name":"std::ui::abi_ui_node_kind","kind":"extern_function","visibility":"private","signature":"fn abi_ui_node_kind(session_id: Int, node_id: Int) -> String","source_path":"stdlib/ui.kn","line":80,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_node_set_flag","qualified_name":"std::ui::abi_ui_node_set_flag","kind":"extern_function","visibility":"private","signature":"fn abi_ui_node_set_flag(session_id: Int, node_id: Int, flag: String, enabled: Int) -> Int","source_path":"stdlib/ui.kn","line":83,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_node_has_flag","qualified_name":"std::ui::abi_ui_node_has_flag","kind":"extern_function","visibility":"private","signature":"fn abi_ui_node_has_flag(session_id: Int, node_id: Int, flag: String) -> Int","source_path":"stdlib/ui.kn","line":86,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_node_set_style_i64","qualified_name":"std::ui::abi_ui_node_set_style_i64","kind":"extern_function","visibility":"private","signature":"fn abi_ui_node_set_style_i64(session_id: Int, node_id: Int, key: String, value: Int) -> Int","source_path":"stdlib/ui.kn","line":89,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_node_set_style_f64","qualified_name":"std::ui::abi_ui_node_set_style_f64","kind":"extern_function","visibility":"private","signature":"fn abi_ui_node_set_style_f64(session_id: Int, node_id: Int, key: String, value: Float) -> Int","source_path":"stdlib/ui.kn","line":92,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_node_set_style_string","qualified_name":"std::ui::abi_ui_node_set_style_string","kind":"extern_function","visibility":"private","signature":"fn abi_ui_node_set_style_string(session_id: Int, node_id: Int, key: String, value: String) -> Int","source_path":"stdlib/ui.kn","line":95,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_node_style_i64","qualified_name":"std::ui::abi_ui_node_style_i64","kind":"extern_function","visibility":"private","signature":"fn abi_ui_node_style_i64(session_id: Int, node_id: Int, key: String, fallback: Int) -> Int","source_path":"stdlib/ui.kn","line":98,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_node_style_f64","qualified_name":"std::ui::abi_ui_node_style_f64","kind":"extern_function","visibility":"private","signature":"fn abi_ui_node_style_f64(session_id: Int, node_id: Int, key: String, fallback: Float) -> Float","source_path":"stdlib/ui.kn","line":101,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_node_style_string","qualified_name":"std::ui::abi_ui_node_style_string","kind":"extern_function","visibility":"private","signature":"fn abi_ui_node_style_string(session_id: Int, node_id: Int, key: String, fallback: String) -> String","source_path":"stdlib/ui.kn","line":104,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_node_set_state_i64","qualified_name":"std::ui::abi_ui_node_set_state_i64","kind":"extern_function","visibility":"private","signature":"fn abi_ui_node_set_state_i64(session_id: Int, node_id: Int, key: String, value: Int) -> Int","source_path":"stdlib/ui.kn","line":107,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_node_set_state_f64","qualified_name":"std::ui::abi_ui_node_set_state_f64","kind":"extern_function","visibility":"private","signature":"fn abi_ui_node_set_state_f64(session_id: Int, node_id: Int, key: String, value: Float) -> Int","source_path":"stdlib/ui.kn","line":110,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_node_set_state_string","qualified_name":"std::ui::abi_ui_node_set_state_string","kind":"extern_function","visibility":"private","signature":"fn abi_ui_node_set_state_string(session_id: Int, node_id: Int, key: String, value: String) -> Int","source_path":"stdlib/ui.kn","line":113,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_node_state_i64","qualified_name":"std::ui::abi_ui_node_state_i64","kind":"extern_function","visibility":"private","signature":"fn abi_ui_node_state_i64(session_id: Int, node_id: Int, key: String, fallback: Int) -> Int","source_path":"stdlib/ui.kn","line":116,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_node_state_f64","qualified_name":"std::ui::abi_ui_node_state_f64","kind":"extern_function","visibility":"private","signature":"fn abi_ui_node_state_f64(session_id: Int, node_id: Int, key: String, fallback: Float) -> Float","source_path":"stdlib/ui.kn","line":119,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_node_state_string","qualified_name":"std::ui::abi_ui_node_state_string","kind":"extern_function","visibility":"private","signature":"fn abi_ui_node_state_string(session_id: Int, node_id: Int, key: String, fallback: String) -> String","source_path":"stdlib/ui.kn","line":122,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_state_count","qualified_name":"std::ui::abi_ui_state_count","kind":"extern_function","visibility":"private","signature":"fn abi_ui_state_count(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":125,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_focus","qualified_name":"std::ui::abi_ui_focus","kind":"extern_function","visibility":"private","signature":"fn abi_ui_focus(session_id: Int, node_id: Int) -> Int","source_path":"stdlib/ui.kn","line":128,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_focused_node","qualified_name":"std::ui::abi_ui_focused_node","kind":"extern_function","visibility":"private","signature":"fn abi_ui_focused_node(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":131,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_hit_test","qualified_name":"std::ui::abi_ui_hit_test","kind":"extern_function","visibility":"private","signature":"fn abi_ui_hit_test(session_id: Int, x: Float, y: Float) -> Int","source_path":"stdlib/ui.kn","line":134,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_mark_dirty","qualified_name":"std::ui::abi_ui_mark_dirty","kind":"extern_function","visibility":"private","signature":"fn abi_ui_mark_dirty(session_id: Int, node_id: Int, reason: Int) -> Int","source_path":"stdlib/ui.kn","line":137,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_dirty_count","qualified_name":"std::ui::abi_ui_dirty_count","kind":"extern_function","visibility":"private","signature":"fn abi_ui_dirty_count(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":140,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_push_event","qualified_name":"std::ui::abi_ui_push_event","kind":"extern_function","visibility":"private","signature":"fn abi_ui_push_event(session_id: Int, kind: String, target_node_id: Int, x: Float, y: Float, key_code: Int, text: String) -> Int","source_path":"stdlib/ui.kn","line":143,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_poll_event","qualified_name":"std::ui::abi_ui_poll_event","kind":"extern_function","visibility":"private","signature":"fn abi_ui_poll_event(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":146,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_event_kind","qualified_name":"std::ui::abi_ui_event_kind","kind":"extern_function","visibility":"private","signature":"fn abi_ui_event_kind(session_id: Int) -> String","source_path":"stdlib/ui.kn","line":149,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_event_target","qualified_name":"std::ui::abi_ui_event_target","kind":"extern_function","visibility":"private","signature":"fn abi_ui_event_target(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":152,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_event_x","qualified_name":"std::ui::abi_ui_event_x","kind":"extern_function","visibility":"private","signature":"fn abi_ui_event_x(session_id: Int) -> Float","source_path":"stdlib/ui.kn","line":155,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_event_y","qualified_name":"std::ui::abi_ui_event_y","kind":"extern_function","visibility":"private","signature":"fn abi_ui_event_y(session_id: Int) -> Float","source_path":"stdlib/ui.kn","line":158,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_event_key_code","qualified_name":"std::ui::abi_ui_event_key_code","kind":"extern_function","visibility":"private","signature":"fn abi_ui_event_key_code(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":161,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_event_text","qualified_name":"std::ui::abi_ui_event_text","kind":"extern_function","visibility":"private","signature":"fn abi_ui_event_text(session_id: Int) -> String","source_path":"stdlib/ui.kn","line":164,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_draw_rect","qualified_name":"std::ui::abi_ui_draw_rect","kind":"extern_function","visibility":"private","signature":"fn abi_ui_draw_rect(session_id: Int, node_id: Int, x: Float, y: Float, width: Float, height: Float, style_key: String) -> Int","source_path":"stdlib/ui.kn","line":167,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_draw_text","qualified_name":"std::ui::abi_ui_draw_text","kind":"extern_function","visibility":"private","signature":"fn abi_ui_draw_text(session_id: Int, node_id: Int, font_resource_id: Int, x: Float, y: Float, text: String, style_key: String) -> Int","source_path":"stdlib/ui.kn","line":170,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_draw_command_count","qualified_name":"std::ui::abi_ui_draw_command_count","kind":"extern_function","visibility":"private","signature":"fn abi_ui_draw_command_count(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":173,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_draw_command_kind","qualified_name":"std::ui::abi_ui_draw_command_kind","kind":"extern_function","visibility":"private","signature":"fn abi_ui_draw_command_kind(session_id: Int, command_index: Int) -> String","source_path":"stdlib/ui.kn","line":176,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_draw_command_node","qualified_name":"std::ui::abi_ui_draw_command_node","kind":"extern_function","visibility":"private","signature":"fn abi_ui_draw_command_node(session_id: Int, command_index: Int) -> Int","source_path":"stdlib/ui.kn","line":179,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_host_attach","qualified_name":"std::ui::abi_ui_host_attach","kind":"extern_function","visibility":"private","signature":"fn abi_ui_host_attach(session_id: Int, backend_id: String) -> Int","source_path":"stdlib/ui.kn","line":182,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_host_pump","qualified_name":"std::ui::abi_ui_host_pump","kind":"extern_function","visibility":"private","signature":"fn abi_ui_host_pump(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":185,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_host_present","qualified_name":"std::ui::abi_ui_host_present","kind":"extern_function","visibility":"private","signature":"fn abi_ui_host_present(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":188,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_host_presented_draw_count","qualified_name":"std::ui::abi_ui_host_presented_draw_count","kind":"extern_function","visibility":"private","signature":"fn abi_ui_host_presented_draw_count(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":191,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_host_frame_hash","qualified_name":"std::ui::abi_ui_host_frame_hash","kind":"extern_function","visibility":"private","signature":"fn abi_ui_host_frame_hash(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":194,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_host_should_close","qualified_name":"std::ui::abi_ui_host_should_close","kind":"extern_function","visibility":"private","signature":"fn abi_ui_host_should_close(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":197,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_host_backend","qualified_name":"std::ui::abi_ui_host_backend","kind":"extern_function","visibility":"private","signature":"fn abi_ui_host_backend(session_id: Int) -> String","source_path":"stdlib/ui.kn","line":200,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_node_set_stable_key","qualified_name":"std::ui::abi_ui_node_set_stable_key","kind":"extern_function","visibility":"private","signature":"fn abi_ui_node_set_stable_key(session_id: Int, node_id: Int, stable_key: String) -> Int","source_path":"stdlib/ui.kn","line":203,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_node_stable_key","qualified_name":"std::ui::abi_ui_node_stable_key","kind":"extern_function","visibility":"private","signature":"fn abi_ui_node_stable_key(session_id: Int, node_id: Int) -> String","source_path":"stdlib/ui.kn","line":206,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_node_find_by_stable_key","qualified_name":"std::ui::abi_ui_node_find_by_stable_key","kind":"extern_function","visibility":"private","signature":"fn abi_ui_node_find_by_stable_key(session_id: Int, stable_key: String) -> Int","source_path":"stdlib/ui.kn","line":209,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_accessibility_set_role","qualified_name":"std::ui::abi_ui_accessibility_set_role","kind":"extern_function","visibility":"private","signature":"fn abi_ui_accessibility_set_role(session_id: Int, node_id: Int, role: String) -> Int","source_path":"stdlib/ui.kn","line":212,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_accessibility_set_label","qualified_name":"std::ui::abi_ui_accessibility_set_label","kind":"extern_function","visibility":"private","signature":"fn abi_ui_accessibility_set_label(session_id: Int, node_id: Int, label: String) -> Int","source_path":"stdlib/ui.kn","line":215,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_accessibility_role","qualified_name":"std::ui::abi_ui_accessibility_role","kind":"extern_function","visibility":"private","signature":"fn abi_ui_accessibility_role(session_id: Int, node_id: Int) -> String","source_path":"stdlib/ui.kn","line":218,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_accessibility_label","qualified_name":"std::ui::abi_ui_accessibility_label","kind":"extern_function","visibility":"private","signature":"fn abi_ui_accessibility_label(session_id: Int, node_id: Int) -> String","source_path":"stdlib/ui.kn","line":221,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_draw_command_resource","qualified_name":"std::ui::abi_ui_draw_command_resource","kind":"extern_function","visibility":"private","signature":"fn abi_ui_draw_command_resource(session_id: Int, command_index: Int) -> Int","source_path":"stdlib/ui.kn","line":224,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_draw_command_x","qualified_name":"std::ui::abi_ui_draw_command_x","kind":"extern_function","visibility":"private","signature":"fn abi_ui_draw_command_x(session_id: Int, command_index: Int) -> Float","source_path":"stdlib/ui.kn","line":227,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_draw_command_y","qualified_name":"std::ui::abi_ui_draw_command_y","kind":"extern_function","visibility":"private","signature":"fn abi_ui_draw_command_y(session_id: Int, command_index: Int) -> Float","source_path":"stdlib/ui.kn","line":230,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_draw_command_width","qualified_name":"std::ui::abi_ui_draw_command_width","kind":"extern_function","visibility":"private","signature":"fn abi_ui_draw_command_width(session_id: Int, command_index: Int) -> Float","source_path":"stdlib/ui.kn","line":233,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_draw_command_height","qualified_name":"std::ui::abi_ui_draw_command_height","kind":"extern_function","visibility":"private","signature":"fn abi_ui_draw_command_height(session_id: Int, command_index: Int) -> Float","source_path":"stdlib/ui.kn","line":236,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_draw_command_text","qualified_name":"std::ui::abi_ui_draw_command_text","kind":"extern_function","visibility":"private","signature":"fn abi_ui_draw_command_text(session_id: Int, command_index: Int) -> String","source_path":"stdlib/ui.kn","line":239,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_draw_command_style","qualified_name":"std::ui::abi_ui_draw_command_style","kind":"extern_function","visibility":"private","signature":"fn abi_ui_draw_command_style(session_id: Int, command_index: Int) -> String","source_path":"stdlib/ui.kn","line":242,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_draw_command_font","qualified_name":"std::ui::abi_ui_draw_command_font","kind":"extern_function","visibility":"private","signature":"fn abi_ui_draw_command_font(session_id: Int, command_index: Int) -> Int","source_path":"stdlib/ui.kn","line":245,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_resource_create","qualified_name":"std::ui::abi_ui_resource_create","kind":"extern_function","visibility":"private","signature":"fn abi_ui_resource_create(session_id: Int, resource_type: String, key: String, width: Int, height: Int, byte_length: Int) -> Int","source_path":"stdlib/ui.kn","line":248,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_font_create","qualified_name":"std::ui::abi_ui_font_create","kind":"extern_function","visibility":"private","signature":"fn abi_ui_font_create(session_id: Int, key: String, family: String, size: Float) -> Int","source_path":"stdlib/ui.kn","line":251,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_texture_create","qualified_name":"std::ui::abi_ui_texture_create","kind":"extern_function","visibility":"private","signature":"fn abi_ui_texture_create(session_id: Int, key: String, width: Int, height: Int, format: String, byte_length: Int) -> Int","source_path":"stdlib/ui.kn","line":254,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_canvas_create","qualified_name":"std::ui::abi_ui_canvas_create","kind":"extern_function","visibility":"private","signature":"fn abi_ui_canvas_create(session_id: Int, key: String, width: Int, height: Int) -> Int","source_path":"stdlib/ui.kn","line":257,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_shader_create","qualified_name":"std::ui::abi_ui_shader_create","kind":"extern_function","visibility":"private","signature":"fn abi_ui_shader_create(session_id: Int, key: String, stage: String, byte_length: Int) -> Int","source_path":"stdlib/ui.kn","line":260,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_resource_set_bytes_hex","qualified_name":"std::ui::abi_ui_resource_set_bytes_hex","kind":"extern_function","visibility":"private","signature":"fn abi_ui_resource_set_bytes_hex(session_id: Int, resource_id: Int, bytes_hex: String) -> Int","source_path":"stdlib/ui.kn","line":263,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_resource_count","qualified_name":"std::ui::abi_ui_resource_count","kind":"extern_function","visibility":"private","signature":"fn abi_ui_resource_count(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":266,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_resource_exists","qualified_name":"std::ui::abi_ui_resource_exists","kind":"extern_function","visibility":"private","signature":"fn abi_ui_resource_exists(session_id: Int, resource_id: Int) -> Int","source_path":"stdlib/ui.kn","line":269,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_resource_type","qualified_name":"std::ui::abi_ui_resource_type","kind":"extern_function","visibility":"private","signature":"fn abi_ui_resource_type(session_id: Int, resource_id: Int) -> String","source_path":"stdlib/ui.kn","line":272,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_resource_key","qualified_name":"std::ui::abi_ui_resource_key","kind":"extern_function","visibility":"private","signature":"fn abi_ui_resource_key(session_id: Int, resource_id: Int) -> String","source_path":"stdlib/ui.kn","line":275,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_resource_width","qualified_name":"std::ui::abi_ui_resource_width","kind":"extern_function","visibility":"private","signature":"fn abi_ui_resource_width(session_id: Int, resource_id: Int) -> Int","source_path":"stdlib/ui.kn","line":278,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_resource_height","qualified_name":"std::ui::abi_ui_resource_height","kind":"extern_function","visibility":"private","signature":"fn abi_ui_resource_height(session_id: Int, resource_id: Int) -> Int","source_path":"stdlib/ui.kn","line":281,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_resource_byte_length","qualified_name":"std::ui::abi_ui_resource_byte_length","kind":"extern_function","visibility":"private","signature":"fn abi_ui_resource_byte_length(session_id: Int, resource_id: Int) -> Int","source_path":"stdlib/ui.kn","line":284,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_text_measure_width","qualified_name":"std::ui::abi_ui_text_measure_width","kind":"extern_function","visibility":"private","signature":"fn abi_ui_text_measure_width(session_id: Int, font_resource_id: Int, text: String) -> Float","source_path":"stdlib/ui.kn","line":287,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_text_measure_height","qualified_name":"std::ui::abi_ui_text_measure_height","kind":"extern_function","visibility":"private","signature":"fn abi_ui_text_measure_height(session_id: Int, font_resource_id: Int, text: String) -> Float","source_path":"stdlib/ui.kn","line":290,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_draw_resource","qualified_name":"std::ui::abi_ui_draw_resource","kind":"extern_function","visibility":"private","signature":"fn abi_ui_draw_resource(session_id: Int, node_id: Int, resource_id: Int, x: Float, y: Float, width: Float, height: Float, style_key: String) -> Int","source_path":"stdlib/ui.kn","line":293,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_clipboard_set_text","qualified_name":"std::ui::abi_ui_clipboard_set_text","kind":"extern_function","visibility":"private","signature":"fn abi_ui_clipboard_set_text(session_id: Int, text: String) -> Int","source_path":"stdlib/ui.kn","line":296,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_clipboard_text","qualified_name":"std::ui::abi_ui_clipboard_text","kind":"extern_function","visibility":"private","signature":"fn abi_ui_clipboard_text(session_id: Int) -> String","source_path":"stdlib/ui.kn","line":299,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_ime_begin","qualified_name":"std::ui::abi_ui_ime_begin","kind":"extern_function","visibility":"private","signature":"fn abi_ui_ime_begin(session_id: Int, node_id: Int) -> Int","source_path":"stdlib/ui.kn","line":302,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_ime_commit_text","qualified_name":"std::ui::abi_ui_ime_commit_text","kind":"extern_function","visibility":"private","signature":"fn abi_ui_ime_commit_text(session_id: Int, text: String) -> Int","source_path":"stdlib/ui.kn","line":305,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_ime_end","qualified_name":"std::ui::abi_ui_ime_end","kind":"extern_function","visibility":"private","signature":"fn abi_ui_ime_end(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":308,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_ime_active_node","qualified_name":"std::ui::abi_ui_ime_active_node","kind":"extern_function","visibility":"private","signature":"fn abi_ui_ime_active_node(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":311,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_ime_text","qualified_name":"std::ui::abi_ui_ime_text","kind":"extern_function","visibility":"private","signature":"fn abi_ui_ime_text(session_id: Int) -> String","source_path":"stdlib/ui.kn","line":314,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_drag_begin","qualified_name":"std::ui::abi_ui_drag_begin","kind":"extern_function","visibility":"private","signature":"fn abi_ui_drag_begin(session_id: Int, node_id: Int, payload: String, x: Float, y: Float) -> Int","source_path":"stdlib/ui.kn","line":317,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_drag_update","qualified_name":"std::ui::abi_ui_drag_update","kind":"extern_function","visibility":"private","signature":"fn abi_ui_drag_update(session_id: Int, x: Float, y: Float, drop_target_node_id: Int) -> Int","source_path":"stdlib/ui.kn","line":320,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_drag_drop","qualified_name":"std::ui::abi_ui_drag_drop","kind":"extern_function","visibility":"private","signature":"fn abi_ui_drag_drop(session_id: Int, drop_target_node_id: Int) -> Int","source_path":"stdlib/ui.kn","line":323,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_drag_active_node","qualified_name":"std::ui::abi_ui_drag_active_node","kind":"extern_function","visibility":"private","signature":"fn abi_ui_drag_active_node(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":326,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_drag_drop_target","qualified_name":"std::ui::abi_ui_drag_drop_target","kind":"extern_function","visibility":"private","signature":"fn abi_ui_drag_drop_target(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":329,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_drag_x","qualified_name":"std::ui::abi_ui_drag_x","kind":"extern_function","visibility":"private","signature":"fn abi_ui_drag_x(session_id: Int) -> Float","source_path":"stdlib/ui.kn","line":332,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_drag_y","qualified_name":"std::ui::abi_ui_drag_y","kind":"extern_function","visibility":"private","signature":"fn abi_ui_drag_y(session_id: Int) -> Float","source_path":"stdlib/ui.kn","line":335,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_drag_payload","qualified_name":"std::ui::abi_ui_drag_payload","kind":"extern_function","visibility":"private","signature":"fn abi_ui_drag_payload(session_id: Int) -> String","source_path":"stdlib/ui.kn","line":338,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_menu_create","qualified_name":"std::ui::abi_ui_menu_create","kind":"extern_function","visibility":"private","signature":"fn abi_ui_menu_create(session_id: Int, key: String) -> Int","source_path":"stdlib/ui.kn","line":341,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_menu_add_item","qualified_name":"std::ui::abi_ui_menu_add_item","kind":"extern_function","visibility":"private","signature":"fn abi_ui_menu_add_item(session_id: Int, menu_id: Int, key: String, label: String, command_id: Int) -> Int","source_path":"stdlib/ui.kn","line":344,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_menu_open","qualified_name":"std::ui::abi_ui_menu_open","kind":"extern_function","visibility":"private","signature":"fn abi_ui_menu_open(session_id: Int, menu_id: Int, x: Float, y: Float) -> Int","source_path":"stdlib/ui.kn","line":347,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_menu_active","qualified_name":"std::ui::abi_ui_menu_active","kind":"extern_function","visibility":"private","signature":"fn abi_ui_menu_active(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":350,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_menu_item_count","qualified_name":"std::ui::abi_ui_menu_item_count","kind":"extern_function","visibility":"private","signature":"fn abi_ui_menu_item_count(session_id: Int, menu_id: Int) -> Int","source_path":"stdlib/ui.kn","line":353,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_menu_item_label","qualified_name":"std::ui::abi_ui_menu_item_label","kind":"extern_function","visibility":"private","signature":"fn abi_ui_menu_item_label(session_id: Int, menu_id: Int, item_index: Int) -> String","source_path":"stdlib/ui.kn","line":356,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_menu_item_command","qualified_name":"std::ui::abi_ui_menu_item_command","kind":"extern_function","visibility":"private","signature":"fn abi_ui_menu_item_command(session_id: Int, menu_id: Int, item_index: Int) -> Int","source_path":"stdlib/ui.kn","line":359,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_dialog_request","qualified_name":"std::ui::abi_ui_dialog_request","kind":"extern_function","visibility":"private","signature":"fn abi_ui_dialog_request(session_id: Int, kind: String, title: String, message: String) -> Int","source_path":"stdlib/ui.kn","line":362,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_dialog_active","qualified_name":"std::ui::abi_ui_dialog_active","kind":"extern_function","visibility":"private","signature":"fn abi_ui_dialog_active(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":365,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_dialog_kind","qualified_name":"std::ui::abi_ui_dialog_kind","kind":"extern_function","visibility":"private","signature":"fn abi_ui_dialog_kind(session_id: Int, dialog_id: Int) -> String","source_path":"stdlib/ui.kn","line":368,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_dialog_title","qualified_name":"std::ui::abi_ui_dialog_title","kind":"extern_function","visibility":"private","signature":"fn abi_ui_dialog_title(session_id: Int, dialog_id: Int) -> String","source_path":"stdlib/ui.kn","line":371,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_dialog_message","qualified_name":"std::ui::abi_ui_dialog_message","kind":"extern_function","visibility":"private","signature":"fn abi_ui_dialog_message(session_id: Int, dialog_id: Int) -> String","source_path":"stdlib/ui.kn","line":374,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_dialog_respond","qualified_name":"std::ui::abi_ui_dialog_respond","kind":"extern_function","visibility":"private","signature":"fn abi_ui_dialog_respond(session_id: Int, dialog_id: Int, result: Int, response_text: String) -> Int","source_path":"stdlib/ui.kn","line":377,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_dialog_poll_response","qualified_name":"std::ui::abi_ui_dialog_poll_response","kind":"extern_function","visibility":"private","signature":"fn abi_ui_dialog_poll_response(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":380,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_dialog_response_text","qualified_name":"std::ui::abi_ui_dialog_response_text","kind":"extern_function","visibility":"private","signature":"fn abi_ui_dialog_response_text(session_id: Int) -> String","source_path":"stdlib/ui.kn","line":383,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_hot_reload_begin","qualified_name":"std::ui::abi_ui_hot_reload_begin","kind":"extern_function","visibility":"private","signature":"fn abi_ui_hot_reload_begin(session_id: Int, revision_key: String) -> Int","source_path":"stdlib/ui.kn","line":386,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_hot_reload_commit","qualified_name":"std::ui::abi_ui_hot_reload_commit","kind":"extern_function","visibility":"private","signature":"fn abi_ui_hot_reload_commit(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":389,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_hot_reload_generation","qualified_name":"std::ui::abi_ui_hot_reload_generation","kind":"extern_function","visibility":"private","signature":"fn abi_ui_hot_reload_generation(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":392,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"abi_ui_hot_reload_key","qualified_name":"std::ui::abi_ui_hot_reload_key","kind":"extern_function","visibility":"private","signature":"fn abi_ui_hot_reload_key(session_id: Int) -> String","source_path":"stdlib/ui.kn","line":395,"attributes":["extern"],"docs":[],"target_notes":["native/runtime/import-backed declaration"]},{"name":"native_ui_reset","qualified_name":"std::ui::native_ui_reset","kind":"function","visibility":"public","signature":"fn native_ui_reset() -> Int","source_path":"stdlib/ui.kn","line":397,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_session_create","qualified_name":"std::ui::native_ui_session_create","kind":"function","visibility":"public","signature":"fn native_ui_session_create(app_name: String, width: Int, height: Int) -> Int","source_path":"stdlib/ui.kn","line":400,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_session_destroy","qualified_name":"std::ui::native_ui_session_destroy","kind":"function","visibility":"public","signature":"fn native_ui_session_destroy(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":403,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_session_count","qualified_name":"std::ui::native_ui_session_count","kind":"function","visibility":"public","signature":"fn native_ui_session_count() -> Int","source_path":"stdlib/ui.kn","line":406,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_window_open","qualified_name":"std::ui::native_ui_window_open","kind":"function","visibility":"public","signature":"fn native_ui_window_open(session_id: Int, title: String, width: Int, height: Int) -> Int","source_path":"stdlib/ui.kn","line":409,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_window_close","qualified_name":"std::ui::native_ui_window_close","kind":"function","visibility":"public","signature":"fn native_ui_window_close(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":412,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_begin_frame","qualified_name":"std::ui::native_ui_begin_frame","kind":"function","visibility":"public","signature":"fn native_ui_begin_frame(session_id: Int, delta_ms: Float) -> Int","source_path":"stdlib/ui.kn","line":415,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_end_frame","qualified_name":"std::ui::native_ui_end_frame","kind":"function","visibility":"public","signature":"fn native_ui_end_frame(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":418,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_present","qualified_name":"std::ui::native_ui_present","kind":"function","visibility":"public","signature":"fn native_ui_present(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":421,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_frame_index","qualified_name":"std::ui::native_ui_frame_index","kind":"function","visibility":"public","signature":"fn native_ui_frame_index(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":424,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_last_presented_frame","qualified_name":"std::ui::native_ui_last_presented_frame","kind":"function","visibility":"public","signature":"fn native_ui_last_presented_frame(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":427,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_node_create","qualified_name":"std::ui::native_ui_node_create","kind":"function","visibility":"public","signature":"fn native_ui_node_create(session_id: Int, kind: String) -> Int","source_path":"stdlib/ui.kn","line":430,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_node_destroy","qualified_name":"std::ui::native_ui_node_destroy","kind":"function","visibility":"public","signature":"fn native_ui_node_destroy(session_id: Int, node_id: Int) -> Int","source_path":"stdlib/ui.kn","line":433,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_node_count","qualified_name":"std::ui::native_ui_node_count","kind":"function","visibility":"public","signature":"fn native_ui_node_count(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":436,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_node_exists","qualified_name":"std::ui::native_ui_node_exists","kind":"function","visibility":"public","signature":"fn native_ui_node_exists(session_id: Int, node_id: Int) -> Int","source_path":"stdlib/ui.kn","line":439,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_node_set_parent","qualified_name":"std::ui::native_ui_node_set_parent","kind":"function","visibility":"public","signature":"fn native_ui_node_set_parent(session_id: Int, node_id: Int, parent_id: Int) -> Int","source_path":"stdlib/ui.kn","line":442,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_node_parent","qualified_name":"std::ui::native_ui_node_parent","kind":"function","visibility":"public","signature":"fn native_ui_node_parent(session_id: Int, node_id: Int) -> Int","source_path":"stdlib/ui.kn","line":445,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_node_child_count","qualified_name":"std::ui::native_ui_node_child_count","kind":"function","visibility":"public","signature":"fn native_ui_node_child_count(session_id: Int, node_id: Int) -> Int","source_path":"stdlib/ui.kn","line":448,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_node_set_rect","qualified_name":"std::ui::native_ui_node_set_rect","kind":"function","visibility":"public","signature":"fn native_ui_node_set_rect(session_id: Int, node_id: Int, x: Float, y: Float, width: Float, height: Float) -> Int","source_path":"stdlib/ui.kn","line":451,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_node_x","qualified_name":"std::ui::native_ui_node_x","kind":"function","visibility":"public","signature":"fn native_ui_node_x(session_id: Int, node_id: Int) -> Float","source_path":"stdlib/ui.kn","line":454,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_node_y","qualified_name":"std::ui::native_ui_node_y","kind":"function","visibility":"public","signature":"fn native_ui_node_y(session_id: Int, node_id: Int) -> Float","source_path":"stdlib/ui.kn","line":457,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_node_width","qualified_name":"std::ui::native_ui_node_width","kind":"function","visibility":"public","signature":"fn native_ui_node_width(session_id: Int, node_id: Int) -> Float","source_path":"stdlib/ui.kn","line":460,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_node_height","qualified_name":"std::ui::native_ui_node_height","kind":"function","visibility":"public","signature":"fn native_ui_node_height(session_id: Int, node_id: Int) -> Float","source_path":"stdlib/ui.kn","line":463,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_node_set_text","qualified_name":"std::ui::native_ui_node_set_text","kind":"function","visibility":"public","signature":"fn native_ui_node_set_text(session_id: Int, node_id: Int, text: String) -> Int","source_path":"stdlib/ui.kn","line":466,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_node_text","qualified_name":"std::ui::native_ui_node_text","kind":"function","visibility":"public","signature":"fn native_ui_node_text(session_id: Int, node_id: Int) -> String","source_path":"stdlib/ui.kn","line":469,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_node_kind","qualified_name":"std::ui::native_ui_node_kind","kind":"function","visibility":"public","signature":"fn native_ui_node_kind(session_id: Int, node_id: Int) -> String","source_path":"stdlib/ui.kn","line":472,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_node_set_flag","qualified_name":"std::ui::native_ui_node_set_flag","kind":"function","visibility":"public","signature":"fn native_ui_node_set_flag(session_id: Int, node_id: Int, flag: String, enabled: Int) -> Int","source_path":"stdlib/ui.kn","line":475,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_node_has_flag","qualified_name":"std::ui::native_ui_node_has_flag","kind":"function","visibility":"public","signature":"fn native_ui_node_has_flag(session_id: Int, node_id: Int, flag: String) -> Int","source_path":"stdlib/ui.kn","line":478,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_node_set_style_i64","qualified_name":"std::ui::native_ui_node_set_style_i64","kind":"function","visibility":"public","signature":"fn native_ui_node_set_style_i64(session_id: Int, node_id: Int, key: String, value: Int) -> Int","source_path":"stdlib/ui.kn","line":481,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_node_set_style_f64","qualified_name":"std::ui::native_ui_node_set_style_f64","kind":"function","visibility":"public","signature":"fn native_ui_node_set_style_f64(session_id: Int, node_id: Int, key: String, value: Float) -> Int","source_path":"stdlib/ui.kn","line":484,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_node_set_style_string","qualified_name":"std::ui::native_ui_node_set_style_string","kind":"function","visibility":"public","signature":"fn native_ui_node_set_style_string(session_id: Int, node_id: Int, key: String, value: String) -> Int","source_path":"stdlib/ui.kn","line":487,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_node_style_i64","qualified_name":"std::ui::native_ui_node_style_i64","kind":"function","visibility":"public","signature":"fn native_ui_node_style_i64(session_id: Int, node_id: Int, key: String, fallback: Int) -> Int","source_path":"stdlib/ui.kn","line":490,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_node_style_f64","qualified_name":"std::ui::native_ui_node_style_f64","kind":"function","visibility":"public","signature":"fn native_ui_node_style_f64(session_id: Int, node_id: Int, key: String, fallback: Float) -> Float","source_path":"stdlib/ui.kn","line":493,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_node_style_string","qualified_name":"std::ui::native_ui_node_style_string","kind":"function","visibility":"public","signature":"fn native_ui_node_style_string(session_id: Int, node_id: Int, key: String, fallback: String) -> String","source_path":"stdlib/ui.kn","line":496,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_node_set_state_i64","qualified_name":"std::ui::native_ui_node_set_state_i64","kind":"function","visibility":"public","signature":"fn native_ui_node_set_state_i64(session_id: Int, node_id: Int, key: String, value: Int) -> Int","source_path":"stdlib/ui.kn","line":499,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_node_set_state_f64","qualified_name":"std::ui::native_ui_node_set_state_f64","kind":"function","visibility":"public","signature":"fn native_ui_node_set_state_f64(session_id: Int, node_id: Int, key: String, value: Float) -> Int","source_path":"stdlib/ui.kn","line":502,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_node_set_state_string","qualified_name":"std::ui::native_ui_node_set_state_string","kind":"function","visibility":"public","signature":"fn native_ui_node_set_state_string(session_id: Int, node_id: Int, key: String, value: String) -> Int","source_path":"stdlib/ui.kn","line":505,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_node_state_i64","qualified_name":"std::ui::native_ui_node_state_i64","kind":"function","visibility":"public","signature":"fn native_ui_node_state_i64(session_id: Int, node_id: Int, key: String, fallback: Int) -> Int","source_path":"stdlib/ui.kn","line":508,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_node_state_f64","qualified_name":"std::ui::native_ui_node_state_f64","kind":"function","visibility":"public","signature":"fn native_ui_node_state_f64(session_id: Int, node_id: Int, key: String, fallback: Float) -> Float","source_path":"stdlib/ui.kn","line":511,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_node_state_string","qualified_name":"std::ui::native_ui_node_state_string","kind":"function","visibility":"public","signature":"fn native_ui_node_state_string(session_id: Int, node_id: Int, key: String, fallback: String) -> String","source_path":"stdlib/ui.kn","line":514,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_state_count","qualified_name":"std::ui::native_ui_state_count","kind":"function","visibility":"public","signature":"fn native_ui_state_count(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":517,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_focus","qualified_name":"std::ui::native_ui_focus","kind":"function","visibility":"public","signature":"fn native_ui_focus(session_id: Int, node_id: Int) -> Int","source_path":"stdlib/ui.kn","line":520,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_focused_node","qualified_name":"std::ui::native_ui_focused_node","kind":"function","visibility":"public","signature":"fn native_ui_focused_node(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":523,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_hit_test","qualified_name":"std::ui::native_ui_hit_test","kind":"function","visibility":"public","signature":"fn native_ui_hit_test(session_id: Int, x: Float, y: Float) -> Int","source_path":"stdlib/ui.kn","line":526,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_mark_dirty","qualified_name":"std::ui::native_ui_mark_dirty","kind":"function","visibility":"public","signature":"fn native_ui_mark_dirty(session_id: Int, node_id: Int, reason: Int) -> Int","source_path":"stdlib/ui.kn","line":529,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_dirty_count","qualified_name":"std::ui::native_ui_dirty_count","kind":"function","visibility":"public","signature":"fn native_ui_dirty_count(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":532,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_push_event","qualified_name":"std::ui::native_ui_push_event","kind":"function","visibility":"public","signature":"fn native_ui_push_event(session_id: Int, kind: String, target_node_id: Int, x: Float, y: Float, key_code: Int, text: String) -> Int","source_path":"stdlib/ui.kn","line":535,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_poll_event","qualified_name":"std::ui::native_ui_poll_event","kind":"function","visibility":"public","signature":"fn native_ui_poll_event(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":538,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_event_kind","qualified_name":"std::ui::native_ui_event_kind","kind":"function","visibility":"public","signature":"fn native_ui_event_kind(session_id: Int) -> String","source_path":"stdlib/ui.kn","line":541,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_event_target","qualified_name":"std::ui::native_ui_event_target","kind":"function","visibility":"public","signature":"fn native_ui_event_target(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":544,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_event_x","qualified_name":"std::ui::native_ui_event_x","kind":"function","visibility":"public","signature":"fn native_ui_event_x(session_id: Int) -> Float","source_path":"stdlib/ui.kn","line":547,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_event_y","qualified_name":"std::ui::native_ui_event_y","kind":"function","visibility":"public","signature":"fn native_ui_event_y(session_id: Int) -> Float","source_path":"stdlib/ui.kn","line":550,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_event_key_code","qualified_name":"std::ui::native_ui_event_key_code","kind":"function","visibility":"public","signature":"fn native_ui_event_key_code(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":553,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_event_text","qualified_name":"std::ui::native_ui_event_text","kind":"function","visibility":"public","signature":"fn native_ui_event_text(session_id: Int) -> String","source_path":"stdlib/ui.kn","line":556,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_draw_rect","qualified_name":"std::ui::native_ui_draw_rect","kind":"function","visibility":"public","signature":"fn native_ui_draw_rect(session_id: Int, node_id: Int, x: Float, y: Float, width: Float, height: Float, style_key: String) -> Int","source_path":"stdlib/ui.kn","line":559,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_draw_text","qualified_name":"std::ui::native_ui_draw_text","kind":"function","visibility":"public","signature":"fn native_ui_draw_text(session_id: Int, node_id: Int, font_resource_id: Int, x: Float, y: Float, text: String, style_key: String) -> Int","source_path":"stdlib/ui.kn","line":562,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_draw_command_count","qualified_name":"std::ui::native_ui_draw_command_count","kind":"function","visibility":"public","signature":"fn native_ui_draw_command_count(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":565,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_draw_command_kind","qualified_name":"std::ui::native_ui_draw_command_kind","kind":"function","visibility":"public","signature":"fn native_ui_draw_command_kind(session_id: Int, command_index: Int) -> String","source_path":"stdlib/ui.kn","line":568,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_draw_command_node","qualified_name":"std::ui::native_ui_draw_command_node","kind":"function","visibility":"public","signature":"fn native_ui_draw_command_node(session_id: Int, command_index: Int) -> Int","source_path":"stdlib/ui.kn","line":571,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_host_attach","qualified_name":"std::ui::native_ui_host_attach","kind":"function","visibility":"public","signature":"fn native_ui_host_attach(session_id: Int, backend_id: String) -> Int","source_path":"stdlib/ui.kn","line":574,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_host_pump","qualified_name":"std::ui::native_ui_host_pump","kind":"function","visibility":"public","signature":"fn native_ui_host_pump(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":577,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_host_present","qualified_name":"std::ui::native_ui_host_present","kind":"function","visibility":"public","signature":"fn native_ui_host_present(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":580,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_host_presented_draw_count","qualified_name":"std::ui::native_ui_host_presented_draw_count","kind":"function","visibility":"public","signature":"fn native_ui_host_presented_draw_count(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":583,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_host_frame_hash","qualified_name":"std::ui::native_ui_host_frame_hash","kind":"function","visibility":"public","signature":"fn native_ui_host_frame_hash(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":586,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_host_should_close","qualified_name":"std::ui::native_ui_host_should_close","kind":"function","visibility":"public","signature":"fn native_ui_host_should_close(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":589,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_host_backend","qualified_name":"std::ui::native_ui_host_backend","kind":"function","visibility":"public","signature":"fn native_ui_host_backend(session_id: Int) -> String","source_path":"stdlib/ui.kn","line":592,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_node_set_stable_key","qualified_name":"std::ui::native_ui_node_set_stable_key","kind":"function","visibility":"public","signature":"fn native_ui_node_set_stable_key(session_id: Int, node_id: Int, stable_key: String) -> Int","source_path":"stdlib/ui.kn","line":595,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_node_stable_key","qualified_name":"std::ui::native_ui_node_stable_key","kind":"function","visibility":"public","signature":"fn native_ui_node_stable_key(session_id: Int, node_id: Int) -> String","source_path":"stdlib/ui.kn","line":598,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_node_find_by_stable_key","qualified_name":"std::ui::native_ui_node_find_by_stable_key","kind":"function","visibility":"public","signature":"fn native_ui_node_find_by_stable_key(session_id: Int, stable_key: String) -> Int","source_path":"stdlib/ui.kn","line":601,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_accessibility_set_role","qualified_name":"std::ui::native_ui_accessibility_set_role","kind":"function","visibility":"public","signature":"fn native_ui_accessibility_set_role(session_id: Int, node_id: Int, role: String) -> Int","source_path":"stdlib/ui.kn","line":604,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_accessibility_set_label","qualified_name":"std::ui::native_ui_accessibility_set_label","kind":"function","visibility":"public","signature":"fn native_ui_accessibility_set_label(session_id: Int, node_id: Int, label: String) -> Int","source_path":"stdlib/ui.kn","line":607,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_accessibility_role","qualified_name":"std::ui::native_ui_accessibility_role","kind":"function","visibility":"public","signature":"fn native_ui_accessibility_role(session_id: Int, node_id: Int) -> String","source_path":"stdlib/ui.kn","line":610,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_accessibility_label","qualified_name":"std::ui::native_ui_accessibility_label","kind":"function","visibility":"public","signature":"fn native_ui_accessibility_label(session_id: Int, node_id: Int) -> String","source_path":"stdlib/ui.kn","line":613,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_draw_command_resource","qualified_name":"std::ui::native_ui_draw_command_resource","kind":"function","visibility":"public","signature":"fn native_ui_draw_command_resource(session_id: Int, command_index: Int) -> Int","source_path":"stdlib/ui.kn","line":616,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_draw_command_x","qualified_name":"std::ui::native_ui_draw_command_x","kind":"function","visibility":"public","signature":"fn native_ui_draw_command_x(session_id: Int, command_index: Int) -> Float","source_path":"stdlib/ui.kn","line":619,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_draw_command_y","qualified_name":"std::ui::native_ui_draw_command_y","kind":"function","visibility":"public","signature":"fn native_ui_draw_command_y(session_id: Int, command_index: Int) -> Float","source_path":"stdlib/ui.kn","line":622,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_draw_command_width","qualified_name":"std::ui::native_ui_draw_command_width","kind":"function","visibility":"public","signature":"fn native_ui_draw_command_width(session_id: Int, command_index: Int) -> Float","source_path":"stdlib/ui.kn","line":625,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_draw_command_height","qualified_name":"std::ui::native_ui_draw_command_height","kind":"function","visibility":"public","signature":"fn native_ui_draw_command_height(session_id: Int, command_index: Int) -> Float","source_path":"stdlib/ui.kn","line":628,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_draw_command_text","qualified_name":"std::ui::native_ui_draw_command_text","kind":"function","visibility":"public","signature":"fn native_ui_draw_command_text(session_id: Int, command_index: Int) -> String","source_path":"stdlib/ui.kn","line":631,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_draw_command_style","qualified_name":"std::ui::native_ui_draw_command_style","kind":"function","visibility":"public","signature":"fn native_ui_draw_command_style(session_id: Int, command_index: Int) -> String","source_path":"stdlib/ui.kn","line":634,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_draw_command_font","qualified_name":"std::ui::native_ui_draw_command_font","kind":"function","visibility":"public","signature":"fn native_ui_draw_command_font(session_id: Int, command_index: Int) -> Int","source_path":"stdlib/ui.kn","line":637,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_resource_create","qualified_name":"std::ui::native_ui_resource_create","kind":"function","visibility":"public","signature":"fn native_ui_resource_create(session_id: Int, resource_type: String, key: String, width: Int, height: Int, byte_length: Int) -> Int","source_path":"stdlib/ui.kn","line":640,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_font_create","qualified_name":"std::ui::native_ui_font_create","kind":"function","visibility":"public","signature":"fn native_ui_font_create(session_id: Int, key: String, family: String, size: Float) -> Int","source_path":"stdlib/ui.kn","line":643,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_texture_create","qualified_name":"std::ui::native_ui_texture_create","kind":"function","visibility":"public","signature":"fn native_ui_texture_create(session_id: Int, key: String, width: Int, height: Int, format: String, byte_length: Int) -> Int","source_path":"stdlib/ui.kn","line":646,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_canvas_create","qualified_name":"std::ui::native_ui_canvas_create","kind":"function","visibility":"public","signature":"fn native_ui_canvas_create(session_id: Int, key: String, width: Int, height: Int) -> Int","source_path":"stdlib/ui.kn","line":649,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_shader_create","qualified_name":"std::ui::native_ui_shader_create","kind":"function","visibility":"public","signature":"fn native_ui_shader_create(session_id: Int, key: String, stage: String, byte_length: Int) -> Int","source_path":"stdlib/ui.kn","line":652,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_resource_set_bytes_hex","qualified_name":"std::ui::native_ui_resource_set_bytes_hex","kind":"function","visibility":"public","signature":"fn native_ui_resource_set_bytes_hex(session_id: Int, resource_id: Int, bytes_hex: String) -> Int","source_path":"stdlib/ui.kn","line":655,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_resource_count","qualified_name":"std::ui::native_ui_resource_count","kind":"function","visibility":"public","signature":"fn native_ui_resource_count(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":658,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_resource_exists","qualified_name":"std::ui::native_ui_resource_exists","kind":"function","visibility":"public","signature":"fn native_ui_resource_exists(session_id: Int, resource_id: Int) -> Int","source_path":"stdlib/ui.kn","line":661,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_resource_type","qualified_name":"std::ui::native_ui_resource_type","kind":"function","visibility":"public","signature":"fn native_ui_resource_type(session_id: Int, resource_id: Int) -> String","source_path":"stdlib/ui.kn","line":664,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_resource_key","qualified_name":"std::ui::native_ui_resource_key","kind":"function","visibility":"public","signature":"fn native_ui_resource_key(session_id: Int, resource_id: Int) -> String","source_path":"stdlib/ui.kn","line":667,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_resource_width","qualified_name":"std::ui::native_ui_resource_width","kind":"function","visibility":"public","signature":"fn native_ui_resource_width(session_id: Int, resource_id: Int) -> Int","source_path":"stdlib/ui.kn","line":670,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_resource_height","qualified_name":"std::ui::native_ui_resource_height","kind":"function","visibility":"public","signature":"fn native_ui_resource_height(session_id: Int, resource_id: Int) -> Int","source_path":"stdlib/ui.kn","line":673,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_resource_byte_length","qualified_name":"std::ui::native_ui_resource_byte_length","kind":"function","visibility":"public","signature":"fn native_ui_resource_byte_length(session_id: Int, resource_id: Int) -> Int","source_path":"stdlib/ui.kn","line":676,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_text_measure_width","qualified_name":"std::ui::native_ui_text_measure_width","kind":"function","visibility":"public","signature":"fn native_ui_text_measure_width(session_id: Int, font_resource_id: Int, text: String) -> Float","source_path":"stdlib/ui.kn","line":679,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_text_measure_height","qualified_name":"std::ui::native_ui_text_measure_height","kind":"function","visibility":"public","signature":"fn native_ui_text_measure_height(session_id: Int, font_resource_id: Int, text: String) -> Float","source_path":"stdlib/ui.kn","line":682,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_draw_resource","qualified_name":"std::ui::native_ui_draw_resource","kind":"function","visibility":"public","signature":"fn native_ui_draw_resource(session_id: Int, node_id: Int, resource_id: Int, x: Float, y: Float, width: Float, height: Float, style_key: String) -> Int","source_path":"stdlib/ui.kn","line":685,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_clipboard_set_text","qualified_name":"std::ui::native_ui_clipboard_set_text","kind":"function","visibility":"public","signature":"fn native_ui_clipboard_set_text(session_id: Int, text: String) -> Int","source_path":"stdlib/ui.kn","line":688,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_clipboard_text","qualified_name":"std::ui::native_ui_clipboard_text","kind":"function","visibility":"public","signature":"fn native_ui_clipboard_text(session_id: Int) -> String","source_path":"stdlib/ui.kn","line":691,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_ime_begin","qualified_name":"std::ui::native_ui_ime_begin","kind":"function","visibility":"public","signature":"fn native_ui_ime_begin(session_id: Int, node_id: Int) -> Int","source_path":"stdlib/ui.kn","line":694,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_ime_commit_text","qualified_name":"std::ui::native_ui_ime_commit_text","kind":"function","visibility":"public","signature":"fn native_ui_ime_commit_text(session_id: Int, text: String) -> Int","source_path":"stdlib/ui.kn","line":697,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_ime_end","qualified_name":"std::ui::native_ui_ime_end","kind":"function","visibility":"public","signature":"fn native_ui_ime_end(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":700,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_ime_active_node","qualified_name":"std::ui::native_ui_ime_active_node","kind":"function","visibility":"public","signature":"fn native_ui_ime_active_node(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":703,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_ime_text","qualified_name":"std::ui::native_ui_ime_text","kind":"function","visibility":"public","signature":"fn native_ui_ime_text(session_id: Int) -> String","source_path":"stdlib/ui.kn","line":706,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_drag_begin","qualified_name":"std::ui::native_ui_drag_begin","kind":"function","visibility":"public","signature":"fn native_ui_drag_begin(session_id: Int, node_id: Int, payload: String, x: Float, y: Float) -> Int","source_path":"stdlib/ui.kn","line":709,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_drag_update","qualified_name":"std::ui::native_ui_drag_update","kind":"function","visibility":"public","signature":"fn native_ui_drag_update(session_id: Int, x: Float, y: Float, drop_target_node_id: Int) -> Int","source_path":"stdlib/ui.kn","line":712,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_drag_drop","qualified_name":"std::ui::native_ui_drag_drop","kind":"function","visibility":"public","signature":"fn native_ui_drag_drop(session_id: Int, drop_target_node_id: Int) -> Int","source_path":"stdlib/ui.kn","line":715,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_drag_active_node","qualified_name":"std::ui::native_ui_drag_active_node","kind":"function","visibility":"public","signature":"fn native_ui_drag_active_node(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":718,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_drag_drop_target","qualified_name":"std::ui::native_ui_drag_drop_target","kind":"function","visibility":"public","signature":"fn native_ui_drag_drop_target(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":721,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_drag_x","qualified_name":"std::ui::native_ui_drag_x","kind":"function","visibility":"public","signature":"fn native_ui_drag_x(session_id: Int) -> Float","source_path":"stdlib/ui.kn","line":724,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_drag_y","qualified_name":"std::ui::native_ui_drag_y","kind":"function","visibility":"public","signature":"fn native_ui_drag_y(session_id: Int) -> Float","source_path":"stdlib/ui.kn","line":727,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_drag_payload","qualified_name":"std::ui::native_ui_drag_payload","kind":"function","visibility":"public","signature":"fn native_ui_drag_payload(session_id: Int) -> String","source_path":"stdlib/ui.kn","line":730,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_menu_create","qualified_name":"std::ui::native_ui_menu_create","kind":"function","visibility":"public","signature":"fn native_ui_menu_create(session_id: Int, key: String) -> Int","source_path":"stdlib/ui.kn","line":733,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_menu_add_item","qualified_name":"std::ui::native_ui_menu_add_item","kind":"function","visibility":"public","signature":"fn native_ui_menu_add_item(session_id: Int, menu_id: Int, key: String, label: String, command_id: Int) -> Int","source_path":"stdlib/ui.kn","line":736,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_menu_open","qualified_name":"std::ui::native_ui_menu_open","kind":"function","visibility":"public","signature":"fn native_ui_menu_open(session_id: Int, menu_id: Int, x: Float, y: Float) -> Int","source_path":"stdlib/ui.kn","line":739,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_menu_active","qualified_name":"std::ui::native_ui_menu_active","kind":"function","visibility":"public","signature":"fn native_ui_menu_active(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":742,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_menu_item_count","qualified_name":"std::ui::native_ui_menu_item_count","kind":"function","visibility":"public","signature":"fn native_ui_menu_item_count(session_id: Int, menu_id: Int) -> Int","source_path":"stdlib/ui.kn","line":745,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_menu_item_label","qualified_name":"std::ui::native_ui_menu_item_label","kind":"function","visibility":"public","signature":"fn native_ui_menu_item_label(session_id: Int, menu_id: Int, item_index: Int) -> String","source_path":"stdlib/ui.kn","line":748,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_menu_item_command","qualified_name":"std::ui::native_ui_menu_item_command","kind":"function","visibility":"public","signature":"fn native_ui_menu_item_command(session_id: Int, menu_id: Int, item_index: Int) -> Int","source_path":"stdlib/ui.kn","line":751,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_dialog_request","qualified_name":"std::ui::native_ui_dialog_request","kind":"function","visibility":"public","signature":"fn native_ui_dialog_request(session_id: Int, kind: String, title: String, message: String) -> Int","source_path":"stdlib/ui.kn","line":754,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_dialog_active","qualified_name":"std::ui::native_ui_dialog_active","kind":"function","visibility":"public","signature":"fn native_ui_dialog_active(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":757,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_dialog_kind","qualified_name":"std::ui::native_ui_dialog_kind","kind":"function","visibility":"public","signature":"fn native_ui_dialog_kind(session_id: Int, dialog_id: Int) -> String","source_path":"stdlib/ui.kn","line":760,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_dialog_title","qualified_name":"std::ui::native_ui_dialog_title","kind":"function","visibility":"public","signature":"fn native_ui_dialog_title(session_id: Int, dialog_id: Int) -> String","source_path":"stdlib/ui.kn","line":763,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_dialog_message","qualified_name":"std::ui::native_ui_dialog_message","kind":"function","visibility":"public","signature":"fn native_ui_dialog_message(session_id: Int, dialog_id: Int) -> String","source_path":"stdlib/ui.kn","line":766,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_dialog_respond","qualified_name":"std::ui::native_ui_dialog_respond","kind":"function","visibility":"public","signature":"fn native_ui_dialog_respond(session_id: Int, dialog_id: Int, result: Int, response_text: String) -> Int","source_path":"stdlib/ui.kn","line":769,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_dialog_poll_response","qualified_name":"std::ui::native_ui_dialog_poll_response","kind":"function","visibility":"public","signature":"fn native_ui_dialog_poll_response(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":772,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_dialog_response_text","qualified_name":"std::ui::native_ui_dialog_response_text","kind":"function","visibility":"public","signature":"fn native_ui_dialog_response_text(session_id: Int) -> String","source_path":"stdlib/ui.kn","line":775,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_hot_reload_begin","qualified_name":"std::ui::native_ui_hot_reload_begin","kind":"function","visibility":"public","signature":"fn native_ui_hot_reload_begin(session_id: Int, revision_key: String) -> Int","source_path":"stdlib/ui.kn","line":778,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_hot_reload_commit","qualified_name":"std::ui::native_ui_hot_reload_commit","kind":"function","visibility":"public","signature":"fn native_ui_hot_reload_commit(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":781,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_hot_reload_generation","qualified_name":"std::ui::native_ui_hot_reload_generation","kind":"function","visibility":"public","signature":"fn native_ui_hot_reload_generation(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":784,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_hot_reload_key","qualified_name":"std::ui::native_ui_hot_reload_key","kind":"function","visibility":"public","signature":"fn native_ui_hot_reload_key(session_id: Int) -> String","source_path":"stdlib/ui.kn","line":787,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_layout_column_y","qualified_name":"std::ui::ui_layout_column_y","kind":"function","visibility":"public","signature":"fn ui_layout_column_y(index_offset: Float, start_y: Float, item_height: Float, gap: Float) -> Float","source_path":"stdlib/ui.kn","line":790,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_layout_row_x","qualified_name":"std::ui::ui_layout_row_x","kind":"function","visibility":"public","signature":"fn ui_layout_row_x(index_offset: Float, start_x: Float, item_width: Float, gap: Float) -> Float","source_path":"stdlib/ui.kn","line":793,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_float_min","qualified_name":"std::ui::ui_float_min","kind":"function","visibility":"public","signature":"fn ui_float_min(left: Float, right: Float) -> Float","source_path":"stdlib/ui.kn","line":796,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_float_max","qualified_name":"std::ui::ui_float_max","kind":"function","visibility":"public","signature":"fn ui_float_max(left: Float, right: Float) -> Float","source_path":"stdlib/ui.kn","line":801,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_float_clamp","qualified_name":"std::ui::ui_float_clamp","kind":"function","visibility":"public","signature":"fn ui_float_clamp(value: Float, low: Float, high: Float) -> Float","source_path":"stdlib/ui.kn","line":806,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_rect_right","qualified_name":"std::ui::ui_rect_right","kind":"function","visibility":"public","signature":"fn ui_rect_right(x: Float, width: Float) -> Float","source_path":"stdlib/ui.kn","line":813,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_rect_bottom","qualified_name":"std::ui::ui_rect_bottom","kind":"function","visibility":"public","signature":"fn ui_rect_bottom(y: Float, height: Float) -> Float","source_path":"stdlib/ui.kn","line":816,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_rect_contains","qualified_name":"std::ui::ui_rect_contains","kind":"function","visibility":"public","signature":"fn ui_rect_contains(px: Float, py: Float, x: Float, y: Float, width: Float, height: Float) -> Int","source_path":"stdlib/ui.kn","line":819,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_layout_inset_x","qualified_name":"std::ui::ui_layout_inset_x","kind":"function","visibility":"public","signature":"fn ui_layout_inset_x(x: Float, inset: Float) -> Float","source_path":"stdlib/ui.kn","line":824,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_layout_inset_y","qualified_name":"std::ui::ui_layout_inset_y","kind":"function","visibility":"public","signature":"fn ui_layout_inset_y(y: Float, inset: Float) -> Float","source_path":"stdlib/ui.kn","line":827,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_layout_inset_width","qualified_name":"std::ui::ui_layout_inset_width","kind":"function","visibility":"public","signature":"fn ui_layout_inset_width(width: Float, left: Float, right: Float) -> Float","source_path":"stdlib/ui.kn","line":830,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_layout_inset_height","qualified_name":"std::ui::ui_layout_inset_height","kind":"function","visibility":"public","signature":"fn ui_layout_inset_height(height: Float, top: Float, bottom: Float) -> Float","source_path":"stdlib/ui.kn","line":833,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_layout_center_x","qualified_name":"std::ui::ui_layout_center_x","kind":"function","visibility":"public","signature":"fn ui_layout_center_x(x: Float, width: Float, child_width: Float) -> Float","source_path":"stdlib/ui.kn","line":836,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_layout_center_y","qualified_name":"std::ui::ui_layout_center_y","kind":"function","visibility":"public","signature":"fn ui_layout_center_y(y: Float, height: Float, child_height: Float) -> Float","source_path":"stdlib/ui.kn","line":839,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_layout_column_height","qualified_name":"std::ui::ui_layout_column_height","kind":"function","visibility":"public","signature":"fn ui_layout_column_height(item_count: Float, item_height: Float, gap: Float) -> Float","source_path":"stdlib/ui.kn","line":842,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_layout_row_width","qualified_name":"std::ui::ui_layout_row_width","kind":"function","visibility":"public","signature":"fn ui_layout_row_width(item_count: Float, item_width: Float, gap: Float) -> Float","source_path":"stdlib/ui.kn","line":847,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_layout_split_left_width","qualified_name":"std::ui::ui_layout_split_left_width","kind":"function","visibility":"public","signature":"fn ui_layout_split_left_width(width: Float, fraction: Float, gap: Float) -> Float","source_path":"stdlib/ui.kn","line":852,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_layout_split_right_x","qualified_name":"std::ui::ui_layout_split_right_x","kind":"function","visibility":"public","signature":"fn ui_layout_split_right_x(x: Float, width: Float, fraction: Float, gap: Float) -> Float","source_path":"stdlib/ui.kn","line":855,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_layout_split_right_width","qualified_name":"std::ui::ui_layout_split_right_width","kind":"function","visibility":"public","signature":"fn ui_layout_split_right_width(width: Float, fraction: Float, gap: Float) -> Float","source_path":"stdlib/ui.kn","line":858,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_host_session_create","qualified_name":"std::ui::ui_host_session_create","kind":"function","visibility":"public","signature":"fn ui_host_session_create(app_name: String, window_title: String, width: Int, height: Int, backend_id: String) -> Int","source_path":"stdlib/ui.kn","line":861,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_frame_begin","qualified_name":"std::ui::ui_frame_begin","kind":"function","visibility":"public","signature":"fn ui_frame_begin(session_id: Int, delta_ms: Float) -> Int","source_path":"stdlib/ui.kn","line":867,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_frame_submit","qualified_name":"std::ui::ui_frame_submit","kind":"function","visibility":"public","signature":"fn ui_frame_submit(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":870,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_node_from_stable_key","qualified_name":"std::ui::ui_node_from_stable_key","kind":"function","visibility":"public","signature":"fn ui_node_from_stable_key(session_id: Int, parent_id: Int, kind: String, stable_key: String, text: String, x: Float, y: Float, width: Float, height: Float) -> Int","source_path":"stdlib/ui.kn","line":873,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_reconcile_node","qualified_name":"std::ui::ui_reconcile_node","kind":"function","visibility":"public","signature":"fn ui_reconcile_node(session_id: Int, parent_id: Int, kind: String, stable_key: String, x: Float, y: Float, width: Float, height: Float) -> Int","source_path":"stdlib/ui.kn","line":888,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_reconcile_text_node","qualified_name":"std::ui::ui_reconcile_text_node","kind":"function","visibility":"public","signature":"fn ui_reconcile_text_node(session_id: Int, parent_id: Int, kind: String, stable_key: String, text: String, x: Float, y: Float, width: Float, height: Float) -> Int","source_path":"stdlib/ui.kn","line":891,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_reconcile_labeled_node","qualified_name":"std::ui::ui_reconcile_labeled_node","kind":"function","visibility":"public","signature":"fn ui_reconcile_labeled_node(session_id: Int, parent_id: Int, kind: String, stable_key: String, text: String, role: String, label: String, x: Float, y: Float, width: Float, height: Float) -> Int","source_path":"stdlib/ui.kn","line":894,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_reconcile_focusable_node","qualified_name":"std::ui::ui_reconcile_focusable_node","kind":"function","visibility":"public","signature":"fn ui_reconcile_focusable_node(session_id: Int, parent_id: Int, kind: String, stable_key: String, text: String, role: String, label: String, x: Float, y: Float, width: Float, height: Float) -> Int","source_path":"stdlib/ui.kn","line":900,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_node_style_color_rgba","qualified_name":"std::ui::ui_node_style_color_rgba","kind":"function","visibility":"public","signature":"fn ui_node_style_color_rgba(session_id: Int, node_id: Int, style_key: String, r: Float, g: Float, b: Float, a: Float) -> Int","source_path":"stdlib/ui.kn","line":905,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_style_color_rgba","qualified_name":"std::ui::ui_style_color_rgba","kind":"function","visibility":"public","signature":"fn ui_style_color_rgba(session_id: Int, node_id: Int, style_key: String, r: Float, g: Float, b: Float, a: Float) -> Int","source_path":"stdlib/ui.kn","line":911,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_style_metric","qualified_name":"std::ui::ui_style_metric","kind":"function","visibility":"public","signature":"fn ui_style_metric(session_id: Int, node_id: Int, style_key: String, metric: String, value: Float) -> Int","source_path":"stdlib/ui.kn","line":914,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_style_metric_value","qualified_name":"std::ui::ui_style_metric_value","kind":"function","visibility":"public","signature":"fn ui_style_metric_value(session_id: Int, node_id: Int, style_key: String, metric: String, fallback: Float) -> Float","source_path":"stdlib/ui.kn","line":917,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_style_padding","qualified_name":"std::ui::ui_style_padding","kind":"function","visibility":"public","signature":"fn ui_style_padding(session_id: Int, node_id: Int, style_key: String, left: Float, top: Float, right: Float, bottom: Float) -> Int","source_path":"stdlib/ui.kn","line":920,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_style_spacing","qualified_name":"std::ui::ui_style_spacing","kind":"function","visibility":"public","signature":"fn ui_style_spacing(session_id: Int, node_id: Int, style_key: String, gap: Float) -> Int","source_path":"stdlib/ui.kn","line":926,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_style_inherit_color_rgba","qualified_name":"std::ui::ui_style_inherit_color_rgba","kind":"function","visibility":"public","signature":"fn ui_style_inherit_color_rgba(session_id: Int, parent_id: Int, node_id: Int, parent_style_key: String, style_key: String, r: Float, g: Float, b: Float, a: Float) -> Int","source_path":"stdlib/ui.kn","line":929,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_style_copy_color_rgba","qualified_name":"std::ui::ui_style_copy_color_rgba","kind":"function","visibility":"public","signature":"fn ui_style_copy_color_rgba(session_id: Int, source_node_id: Int, target_node_id: Int, source_style_key: String, target_style_key: String) -> Int","source_path":"stdlib/ui.kn","line":940,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_state_set_i64","qualified_name":"std::ui::ui_state_set_i64","kind":"function","visibility":"public","signature":"fn ui_state_set_i64(session_id: Int, node_id: Int, key: String, value: Int) -> Int","source_path":"stdlib/ui.kn","line":947,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_state_set_f64","qualified_name":"std::ui::ui_state_set_f64","kind":"function","visibility":"public","signature":"fn ui_state_set_f64(session_id: Int, node_id: Int, key: String, value: Float) -> Int","source_path":"stdlib/ui.kn","line":950,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_state_set_string","qualified_name":"std::ui::ui_state_set_string","kind":"function","visibility":"public","signature":"fn ui_state_set_string(session_id: Int, node_id: Int, key: String, value: String) -> Int","source_path":"stdlib/ui.kn","line":953,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_state_i64","qualified_name":"std::ui::ui_state_i64","kind":"function","visibility":"public","signature":"fn ui_state_i64(session_id: Int, node_id: Int, key: String, fallback: Int) -> Int","source_path":"stdlib/ui.kn","line":956,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_state_f64","qualified_name":"std::ui::ui_state_f64","kind":"function","visibility":"public","signature":"fn ui_state_f64(session_id: Int, node_id: Int, key: String, fallback: Float) -> Float","source_path":"stdlib/ui.kn","line":959,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_state_string","qualified_name":"std::ui::ui_state_string","kind":"function","visibility":"public","signature":"fn ui_state_string(session_id: Int, node_id: Int, key: String, fallback: String) -> String","source_path":"stdlib/ui.kn","line":962,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_state_bool","qualified_name":"std::ui::ui_state_bool","kind":"function","visibility":"public","signature":"fn ui_state_bool(session_id: Int, node_id: Int, key: String, fallback: Int) -> Int","source_path":"stdlib/ui.kn","line":965,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_state_set_bool","qualified_name":"std::ui::ui_state_set_bool","kind":"function","visibility":"public","signature":"fn ui_state_set_bool(session_id: Int, node_id: Int, key: String, enabled: Int) -> Int","source_path":"stdlib/ui.kn","line":970,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_state_toggle","qualified_name":"std::ui::ui_state_toggle","kind":"function","visibility":"public","signature":"fn ui_state_toggle(session_id: Int, node_id: Int, key: String) -> Int","source_path":"stdlib/ui.kn","line":975,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_state_counter","qualified_name":"std::ui::ui_state_counter","kind":"function","visibility":"public","signature":"fn ui_state_counter(session_id: Int, node_id: Int, key: String, delta: Int) -> Int","source_path":"stdlib/ui.kn","line":983,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_state_reference","qualified_name":"std::ui::ui_state_reference","kind":"function","visibility":"public","signature":"fn ui_state_reference(session_id: Int, node_id: Int, key: String, referenced_id: Int) -> Int","source_path":"stdlib/ui.kn","line":988,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_state_shape","qualified_name":"std::ui::ui_state_shape","kind":"function","visibility":"public","signature":"fn ui_state_shape(session_id: Int, node_id: Int, shape_kind: String, shape_payload: String) -> Int","source_path":"stdlib/ui.kn","line":991,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_state_hit","qualified_name":"std::ui::ui_state_hit","kind":"function","visibility":"public","signature":"fn ui_state_hit(session_id: Int, node_id: Int, hit_kind: String, hit_payload: String) -> Int","source_path":"stdlib/ui.kn","line":995,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_state_draw","qualified_name":"std::ui::ui_state_draw","kind":"function","visibility":"public","signature":"fn ui_state_draw(session_id: Int, node_id: Int, draw_kind: String, draw_payload: String) -> Int","source_path":"stdlib/ui.kn","line":999,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_state_resource","qualified_name":"std::ui::ui_state_resource","kind":"function","visibility":"public","signature":"fn ui_state_resource(session_id: Int, node_id: Int, resource_kind: String, resource_payload: String, resource_id: Int) -> Int","source_path":"stdlib/ui.kn","line":1003,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_code_is_numeric","qualified_name":"std::ui::ui_code_is_numeric","kind":"function","visibility":"private","signature":"fn ui_code_is_numeric(code: String) -> Bool","source_path":"stdlib/ui.kn","line":1008,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_input_key_code_or_zero","qualified_name":"std::ui::ui_input_key_code_or_zero","kind":"function","visibility":"private","signature":"fn ui_input_key_code_or_zero(code: String) -> Int","source_path":"stdlib/ui.kn","line":1019,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_state_shared_buffer_resource","qualified_name":"std::ui::ui_state_shared_buffer_resource","kind":"function","visibility":"public","signature":"fn ui_state_shared_buffer_resource(session_id: Int, node_id: Int, resource_view: GraphicsSharedBuffer, resource_id: Int) -> Int","source_path":"stdlib/ui.kn","line":1024,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_state_shared_image_resource","qualified_name":"std::ui::ui_state_shared_image_resource","kind":"function","visibility":"public","signature":"fn ui_state_shared_image_resource(session_id: Int, node_id: Int, resource_view: GraphicsSharedImage, resource_id: Int) -> Int","source_path":"stdlib/ui.kn","line":1033,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_reconcile_stateful_node","qualified_name":"std::ui::ui_reconcile_stateful_node","kind":"function","visibility":"public","signature":"fn ui_reconcile_stateful_node(session_id: Int, parent_id: Int, kind: String, stable_key: String, state_kind: String, state_payload: String, x: Float, y: Float, width: Float, height: Float) -> Int","source_path":"stdlib/ui.kn","line":1042,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_custom_hit_contains","qualified_name":"std::ui::ui_custom_hit_contains","kind":"function","visibility":"public","signature":"fn ui_custom_hit_contains(session_id: Int, node_id: Int, x: Float, y: Float) -> Int","source_path":"stdlib/ui.kn","line":1048,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_custom_hit_targets","qualified_name":"std::ui::ui_custom_hit_targets","kind":"function","visibility":"public","signature":"fn ui_custom_hit_targets(session_id: Int, node_id: Int, x: Float, y: Float) -> Int","source_path":"stdlib/ui.kn","line":1054,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_text_width","qualified_name":"std::ui::ui_text_width","kind":"function","visibility":"public","signature":"fn ui_text_width(session_id: Int, font_resource_id: Int, text: String) -> Float","source_path":"stdlib/ui.kn","line":1059,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_text_height","qualified_name":"std::ui::ui_text_height","kind":"function","visibility":"public","signature":"fn ui_text_height(session_id: Int, font_resource_id: Int, text: String) -> Float","source_path":"stdlib/ui.kn","line":1062,"attributes":[],"docs":[],"target_notes":[]},{"name":"native_ui_texture_create_from_hex","qualified_name":"std::ui::native_ui_texture_create_from_hex","kind":"function","visibility":"public","signature":"fn native_ui_texture_create_from_hex(session_id: Int, key: String, width: Int, height: Int, format: String, bytes_hex: String) -> Int","source_path":"stdlib/ui.kn","line":1065,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_texture_rgba8_from_hex","qualified_name":"std::ui::ui_texture_rgba8_from_hex","kind":"function","visibility":"public","signature":"fn ui_texture_rgba8_from_hex(session_id: Int, key: String, width: Int, height: Int, bytes_hex: String) -> Int","source_path":"stdlib/ui.kn","line":1070,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_render_box","qualified_name":"std::ui::ui_render_box","kind":"function","visibility":"public","signature":"fn ui_render_box(session_id: Int, node_id: Int, style_key: String) -> Int","source_path":"stdlib/ui.kn","line":1073,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_render_box_at","qualified_name":"std::ui::ui_render_box_at","kind":"function","visibility":"public","signature":"fn ui_render_box_at(session_id: Int, node_id: Int, x: Float, y: Float, width: Float, height: Float, style_key: String) -> Int","source_path":"stdlib/ui.kn","line":1076,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_render_text","qualified_name":"std::ui::ui_render_text","kind":"function","visibility":"public","signature":"fn ui_render_text(session_id: Int, node_id: Int, font_resource_id: Int, x: Float, y: Float, style_key: String) -> Int","source_path":"stdlib/ui.kn","line":1079,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_render_text_value","qualified_name":"std::ui::ui_render_text_value","kind":"function","visibility":"public","signature":"fn ui_render_text_value(session_id: Int, node_id: Int, font_resource_id: Int, text: String, x: Float, y: Float, style_key: String) -> Int","source_path":"stdlib/ui.kn","line":1082,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_render_resource","qualified_name":"std::ui::ui_render_resource","kind":"function","visibility":"public","signature":"fn ui_render_resource(session_id: Int, node_id: Int, resource_id: Int, x: Float, y: Float, width: Float, height: Float, style_key: String) -> Int","source_path":"stdlib/ui.kn","line":1085,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_render_resource_in_node","qualified_name":"std::ui::ui_render_resource_in_node","kind":"function","visibility":"public","signature":"fn ui_render_resource_in_node(session_id: Int, node_id: Int, resource_id: Int, style_key: String) -> Int","source_path":"stdlib/ui.kn","line":1088,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_render_text_in_box","qualified_name":"std::ui::ui_render_text_in_box","kind":"function","visibility":"public","signature":"fn ui_render_text_in_box(session_id: Int, node_id: Int, font_resource_id: Int, inset_x: Float, baseline_y: Float, style_key: String) -> Int","source_path":"stdlib/ui.kn","line":1091,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_event_kind_is","qualified_name":"std::ui::ui_event_kind_is","kind":"function","visibility":"public","signature":"fn ui_event_kind_is(session_id: Int, expected_kind: String) -> Int","source_path":"stdlib/ui.kn","line":1094,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_event_targets","qualified_name":"std::ui::ui_event_targets","kind":"function","visibility":"public","signature":"fn ui_event_targets(session_id: Int, node_id: Int) -> Int","source_path":"stdlib/ui.kn","line":1105,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_focus_if_event_targets","qualified_name":"std::ui::ui_focus_if_event_targets","kind":"function","visibility":"public","signature":"fn ui_focus_if_event_targets(session_id: Int, node_id: Int) -> Int","source_path":"stdlib/ui.kn","line":1110,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_node_contains_point","qualified_name":"std::ui::ui_node_contains_point","kind":"function","visibility":"public","signature":"fn ui_node_contains_point(session_id: Int, node_id: Int, x: Float, y: Float) -> Int","source_path":"stdlib/ui.kn","line":1115,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_node_is_hit","qualified_name":"std::ui::ui_node_is_hit","kind":"function","visibility":"public","signature":"fn ui_node_is_hit(session_id: Int, node_id: Int, x: Float, y: Float) -> Int","source_path":"stdlib/ui.kn","line":1118,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_apply_hover_flag","qualified_name":"std::ui::ui_apply_hover_flag","kind":"function","visibility":"public","signature":"fn ui_apply_hover_flag(session_id: Int, node_id: Int, x: Float, y: Float) -> Int","source_path":"stdlib/ui.kn","line":1123,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_apply_pressed_flag_from_event","qualified_name":"std::ui::ui_apply_pressed_flag_from_event","kind":"function","visibility":"public","signature":"fn ui_apply_pressed_flag_from_event(session_id: Int, node_id: Int) -> Int","source_path":"stdlib/ui.kn","line":1128,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_drain_events_for_node","qualified_name":"std::ui::ui_drain_events_for_node","kind":"function","visibility":"public","signature":"fn ui_drain_events_for_node(session_id: Int, node_id: Int) -> Int","source_path":"stdlib/ui.kn","line":1138,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_present_to_attached_host","qualified_name":"std::ui::ui_present_to_attached_host","kind":"function","visibility":"public","signature":"fn ui_present_to_attached_host(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":1147,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_reset","qualified_name":"std::ui::ui_reset","kind":"function","visibility":"public","signature":"fn ui_reset() -> Int","source_path":"stdlib/ui.kn","line":1153,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_session_create","qualified_name":"std::ui::ui_session_create","kind":"function","visibility":"public","signature":"fn ui_session_create(app_name: String, width: Int, height: Int) -> Int","source_path":"stdlib/ui.kn","line":1156,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_session_destroy","qualified_name":"std::ui::ui_session_destroy","kind":"function","visibility":"public","signature":"fn ui_session_destroy(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":1159,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_session_count","qualified_name":"std::ui::ui_session_count","kind":"function","visibility":"public","signature":"fn ui_session_count() -> Int","source_path":"stdlib/ui.kn","line":1162,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_window_open","qualified_name":"std::ui::ui_window_open","kind":"function","visibility":"public","signature":"fn ui_window_open(session_id: Int, title: String, width: Int, height: Int) -> Int","source_path":"stdlib/ui.kn","line":1165,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_window_close","qualified_name":"std::ui::ui_window_close","kind":"function","visibility":"public","signature":"fn ui_window_close(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":1168,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_begin_frame","qualified_name":"std::ui::ui_begin_frame","kind":"function","visibility":"public","signature":"fn ui_begin_frame(session_id: Int, delta_ms: Float) -> Int","source_path":"stdlib/ui.kn","line":1171,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_end_frame","qualified_name":"std::ui::ui_end_frame","kind":"function","visibility":"public","signature":"fn ui_end_frame(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":1174,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_present","qualified_name":"std::ui::ui_present","kind":"function","visibility":"public","signature":"fn ui_present(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":1177,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_frame_index","qualified_name":"std::ui::ui_frame_index","kind":"function","visibility":"public","signature":"fn ui_frame_index(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":1180,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_last_presented_frame","qualified_name":"std::ui::ui_last_presented_frame","kind":"function","visibility":"public","signature":"fn ui_last_presented_frame(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":1183,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_node_create","qualified_name":"std::ui::ui_node_create","kind":"function","visibility":"public","signature":"fn ui_node_create(session_id: Int, kind: String) -> Int","source_path":"stdlib/ui.kn","line":1186,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_node_destroy","qualified_name":"std::ui::ui_node_destroy","kind":"function","visibility":"public","signature":"fn ui_node_destroy(session_id: Int, node_id: Int) -> Int","source_path":"stdlib/ui.kn","line":1189,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_node_count","qualified_name":"std::ui::ui_node_count","kind":"function","visibility":"public","signature":"fn ui_node_count(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":1192,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_node_exists","qualified_name":"std::ui::ui_node_exists","kind":"function","visibility":"public","signature":"fn ui_node_exists(session_id: Int, node_id: Int) -> Int","source_path":"stdlib/ui.kn","line":1195,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_node_set_parent","qualified_name":"std::ui::ui_node_set_parent","kind":"function","visibility":"public","signature":"fn ui_node_set_parent(session_id: Int, node_id: Int, parent_id: Int) -> Int","source_path":"stdlib/ui.kn","line":1198,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_node_parent","qualified_name":"std::ui::ui_node_parent","kind":"function","visibility":"public","signature":"fn ui_node_parent(session_id: Int, node_id: Int) -> Int","source_path":"stdlib/ui.kn","line":1201,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_node_child_count","qualified_name":"std::ui::ui_node_child_count","kind":"function","visibility":"public","signature":"fn ui_node_child_count(session_id: Int, node_id: Int) -> Int","source_path":"stdlib/ui.kn","line":1204,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_node_set_rect","qualified_name":"std::ui::ui_node_set_rect","kind":"function","visibility":"public","signature":"fn ui_node_set_rect(session_id: Int, node_id: Int, x: Float, y: Float, width: Float, height: Float) -> Int","source_path":"stdlib/ui.kn","line":1207,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_node_x","qualified_name":"std::ui::ui_node_x","kind":"function","visibility":"public","signature":"fn ui_node_x(session_id: Int, node_id: Int) -> Float","source_path":"stdlib/ui.kn","line":1210,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_node_y","qualified_name":"std::ui::ui_node_y","kind":"function","visibility":"public","signature":"fn ui_node_y(session_id: Int, node_id: Int) -> Float","source_path":"stdlib/ui.kn","line":1213,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_node_width","qualified_name":"std::ui::ui_node_width","kind":"function","visibility":"public","signature":"fn ui_node_width(session_id: Int, node_id: Int) -> Float","source_path":"stdlib/ui.kn","line":1216,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_node_height","qualified_name":"std::ui::ui_node_height","kind":"function","visibility":"public","signature":"fn ui_node_height(session_id: Int, node_id: Int) -> Float","source_path":"stdlib/ui.kn","line":1219,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_node_set_text","qualified_name":"std::ui::ui_node_set_text","kind":"function","visibility":"public","signature":"fn ui_node_set_text(session_id: Int, node_id: Int, text: String) -> Int","source_path":"stdlib/ui.kn","line":1222,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_node_text","qualified_name":"std::ui::ui_node_text","kind":"function","visibility":"public","signature":"fn ui_node_text(session_id: Int, node_id: Int) -> String","source_path":"stdlib/ui.kn","line":1225,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_node_kind","qualified_name":"std::ui::ui_node_kind","kind":"function","visibility":"public","signature":"fn ui_node_kind(session_id: Int, node_id: Int) -> String","source_path":"stdlib/ui.kn","line":1228,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_node_set_flag","qualified_name":"std::ui::ui_node_set_flag","kind":"function","visibility":"public","signature":"fn ui_node_set_flag(session_id: Int, node_id: Int, flag: String, enabled: Int) -> Int","source_path":"stdlib/ui.kn","line":1231,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_node_has_flag","qualified_name":"std::ui::ui_node_has_flag","kind":"function","visibility":"public","signature":"fn ui_node_has_flag(session_id: Int, node_id: Int, flag: String) -> Int","source_path":"stdlib/ui.kn","line":1234,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_node_set_style_i64","qualified_name":"std::ui::ui_node_set_style_i64","kind":"function","visibility":"public","signature":"fn ui_node_set_style_i64(session_id: Int, node_id: Int, key: String, value: Int) -> Int","source_path":"stdlib/ui.kn","line":1237,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_node_set_style_f64","qualified_name":"std::ui::ui_node_set_style_f64","kind":"function","visibility":"public","signature":"fn ui_node_set_style_f64(session_id: Int, node_id: Int, key: String, value: Float) -> Int","source_path":"stdlib/ui.kn","line":1240,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_node_set_style_string","qualified_name":"std::ui::ui_node_set_style_string","kind":"function","visibility":"public","signature":"fn ui_node_set_style_string(session_id: Int, node_id: Int, key: String, value: String) -> Int","source_path":"stdlib/ui.kn","line":1243,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_node_style_i64","qualified_name":"std::ui::ui_node_style_i64","kind":"function","visibility":"public","signature":"fn ui_node_style_i64(session_id: Int, node_id: Int, key: String, fallback: Int) -> Int","source_path":"stdlib/ui.kn","line":1246,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_node_style_f64","qualified_name":"std::ui::ui_node_style_f64","kind":"function","visibility":"public","signature":"fn ui_node_style_f64(session_id: Int, node_id: Int, key: String, fallback: Float) -> Float","source_path":"stdlib/ui.kn","line":1249,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_node_style_string","qualified_name":"std::ui::ui_node_style_string","kind":"function","visibility":"public","signature":"fn ui_node_style_string(session_id: Int, node_id: Int, key: String, fallback: String) -> String","source_path":"stdlib/ui.kn","line":1252,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_node_set_state_i64","qualified_name":"std::ui::ui_node_set_state_i64","kind":"function","visibility":"public","signature":"fn ui_node_set_state_i64(session_id: Int, node_id: Int, key: String, value: Int) -> Int","source_path":"stdlib/ui.kn","line":1255,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_node_set_state_f64","qualified_name":"std::ui::ui_node_set_state_f64","kind":"function","visibility":"public","signature":"fn ui_node_set_state_f64(session_id: Int, node_id: Int, key: String, value: Float) -> Int","source_path":"stdlib/ui.kn","line":1258,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_node_set_state_string","qualified_name":"std::ui::ui_node_set_state_string","kind":"function","visibility":"public","signature":"fn ui_node_set_state_string(session_id: Int, node_id: Int, key: String, value: String) -> Int","source_path":"stdlib/ui.kn","line":1261,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_node_state_i64","qualified_name":"std::ui::ui_node_state_i64","kind":"function","visibility":"public","signature":"fn ui_node_state_i64(session_id: Int, node_id: Int, key: String, fallback: Int) -> Int","source_path":"stdlib/ui.kn","line":1264,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_node_state_f64","qualified_name":"std::ui::ui_node_state_f64","kind":"function","visibility":"public","signature":"fn ui_node_state_f64(session_id: Int, node_id: Int, key: String, fallback: Float) -> Float","source_path":"stdlib/ui.kn","line":1267,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_node_state_string","qualified_name":"std::ui::ui_node_state_string","kind":"function","visibility":"public","signature":"fn ui_node_state_string(session_id: Int, node_id: Int, key: String, fallback: String) -> String","source_path":"stdlib/ui.kn","line":1270,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_state_count","qualified_name":"std::ui::ui_state_count","kind":"function","visibility":"public","signature":"fn ui_state_count(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":1273,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_focus","qualified_name":"std::ui::ui_focus","kind":"function","visibility":"public","signature":"fn ui_focus(session_id: Int, node_id: Int) -> Int","source_path":"stdlib/ui.kn","line":1276,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_focused_node","qualified_name":"std::ui::ui_focused_node","kind":"function","visibility":"public","signature":"fn ui_focused_node(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":1279,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_hit_test","qualified_name":"std::ui::ui_hit_test","kind":"function","visibility":"public","signature":"fn ui_hit_test(session_id: Int, x: Float, y: Float) -> Int","source_path":"stdlib/ui.kn","line":1282,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_mark_dirty","qualified_name":"std::ui::ui_mark_dirty","kind":"function","visibility":"public","signature":"fn ui_mark_dirty(session_id: Int, node_id: Int, reason: Int) -> Int","source_path":"stdlib/ui.kn","line":1285,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_dirty_count","qualified_name":"std::ui::ui_dirty_count","kind":"function","visibility":"public","signature":"fn ui_dirty_count(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":1288,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_push_event","qualified_name":"std::ui::ui_push_event","kind":"function","visibility":"public","signature":"fn ui_push_event(session_id: Int, kind: String, target_node_id: Int, x: Float, y: Float, key_code: Int, text: String) -> Int","source_path":"stdlib/ui.kn","line":1291,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_poll_event","qualified_name":"std::ui::ui_poll_event","kind":"function","visibility":"public","signature":"fn ui_poll_event(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":1294,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_event_kind","qualified_name":"std::ui::ui_event_kind","kind":"function","visibility":"public","signature":"fn ui_event_kind(session_id: Int) -> String","source_path":"stdlib/ui.kn","line":1297,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_event_target","qualified_name":"std::ui::ui_event_target","kind":"function","visibility":"public","signature":"fn ui_event_target(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":1300,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_event_x","qualified_name":"std::ui::ui_event_x","kind":"function","visibility":"public","signature":"fn ui_event_x(session_id: Int) -> Float","source_path":"stdlib/ui.kn","line":1303,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_event_y","qualified_name":"std::ui::ui_event_y","kind":"function","visibility":"public","signature":"fn ui_event_y(session_id: Int) -> Float","source_path":"stdlib/ui.kn","line":1306,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_event_key_code","qualified_name":"std::ui::ui_event_key_code","kind":"function","visibility":"public","signature":"fn ui_event_key_code(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":1309,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_event_text","qualified_name":"std::ui::ui_event_text","kind":"function","visibility":"public","signature":"fn ui_event_text(session_id: Int) -> String","source_path":"stdlib/ui.kn","line":1312,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_event_record","qualified_name":"std::ui::ui_event_record","kind":"function","visibility":"public","signature":"fn ui_event_record(session_id: Int) -> InputEventRecord","source_path":"stdlib/ui.kn","line":1315,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_push_input_event","qualified_name":"std::ui::ui_push_input_event","kind":"function","visibility":"public","signature":"fn ui_push_input_event(session_id: Int, target_node_id: Int, event: InputEventRecord) -> Int","source_path":"stdlib/ui.kn","line":1325,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_draw_rect","qualified_name":"std::ui::ui_draw_rect","kind":"function","visibility":"public","signature":"fn ui_draw_rect(session_id: Int, node_id: Int, x: Float, y: Float, width: Float, height: Float, style_key: String) -> Int","source_path":"stdlib/ui.kn","line":1336,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_draw_text","qualified_name":"std::ui::ui_draw_text","kind":"function","visibility":"public","signature":"fn ui_draw_text(session_id: Int, node_id: Int, font_resource_id: Int, x: Float, y: Float, text: String, style_key: String) -> Int","source_path":"stdlib/ui.kn","line":1339,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_draw_command_count","qualified_name":"std::ui::ui_draw_command_count","kind":"function","visibility":"public","signature":"fn ui_draw_command_count(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":1342,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_draw_command_kind","qualified_name":"std::ui::ui_draw_command_kind","kind":"function","visibility":"public","signature":"fn ui_draw_command_kind(session_id: Int, command_index: Int) -> String","source_path":"stdlib/ui.kn","line":1345,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_draw_command_node","qualified_name":"std::ui::ui_draw_command_node","kind":"function","visibility":"public","signature":"fn ui_draw_command_node(session_id: Int, command_index: Int) -> Int","source_path":"stdlib/ui.kn","line":1348,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_host_attach","qualified_name":"std::ui::ui_host_attach","kind":"function","visibility":"public","signature":"fn ui_host_attach(session_id: Int, backend_id: String) -> Int","source_path":"stdlib/ui.kn","line":1351,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_host_pump","qualified_name":"std::ui::ui_host_pump","kind":"function","visibility":"public","signature":"fn ui_host_pump(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":1354,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_host_present","qualified_name":"std::ui::ui_host_present","kind":"function","visibility":"public","signature":"fn ui_host_present(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":1357,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_host_presented_draw_count","qualified_name":"std::ui::ui_host_presented_draw_count","kind":"function","visibility":"public","signature":"fn ui_host_presented_draw_count(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":1360,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_host_frame_hash","qualified_name":"std::ui::ui_host_frame_hash","kind":"function","visibility":"public","signature":"fn ui_host_frame_hash(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":1363,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_host_should_close","qualified_name":"std::ui::ui_host_should_close","kind":"function","visibility":"public","signature":"fn ui_host_should_close(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":1366,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_host_backend","qualified_name":"std::ui::ui_host_backend","kind":"function","visibility":"public","signature":"fn ui_host_backend(session_id: Int) -> String","source_path":"stdlib/ui.kn","line":1369,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_node_set_stable_key","qualified_name":"std::ui::ui_node_set_stable_key","kind":"function","visibility":"public","signature":"fn ui_node_set_stable_key(session_id: Int, node_id: Int, stable_key: String) -> Int","source_path":"stdlib/ui.kn","line":1372,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_node_stable_key","qualified_name":"std::ui::ui_node_stable_key","kind":"function","visibility":"public","signature":"fn ui_node_stable_key(session_id: Int, node_id: Int) -> String","source_path":"stdlib/ui.kn","line":1375,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_node_find_by_stable_key","qualified_name":"std::ui::ui_node_find_by_stable_key","kind":"function","visibility":"public","signature":"fn ui_node_find_by_stable_key(session_id: Int, stable_key: String) -> Int","source_path":"stdlib/ui.kn","line":1378,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_accessibility_set_role","qualified_name":"std::ui::ui_accessibility_set_role","kind":"function","visibility":"public","signature":"fn ui_accessibility_set_role(session_id: Int, node_id: Int, role: String) -> Int","source_path":"stdlib/ui.kn","line":1381,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_accessibility_set_label","qualified_name":"std::ui::ui_accessibility_set_label","kind":"function","visibility":"public","signature":"fn ui_accessibility_set_label(session_id: Int, node_id: Int, label: String) -> Int","source_path":"stdlib/ui.kn","line":1384,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_accessibility_role","qualified_name":"std::ui::ui_accessibility_role","kind":"function","visibility":"public","signature":"fn ui_accessibility_role(session_id: Int, node_id: Int) -> String","source_path":"stdlib/ui.kn","line":1387,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_accessibility_label","qualified_name":"std::ui::ui_accessibility_label","kind":"function","visibility":"public","signature":"fn ui_accessibility_label(session_id: Int, node_id: Int) -> String","source_path":"stdlib/ui.kn","line":1390,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_draw_command_resource","qualified_name":"std::ui::ui_draw_command_resource","kind":"function","visibility":"public","signature":"fn ui_draw_command_resource(session_id: Int, command_index: Int) -> Int","source_path":"stdlib/ui.kn","line":1393,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_draw_command_x","qualified_name":"std::ui::ui_draw_command_x","kind":"function","visibility":"public","signature":"fn ui_draw_command_x(session_id: Int, command_index: Int) -> Float","source_path":"stdlib/ui.kn","line":1396,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_draw_command_y","qualified_name":"std::ui::ui_draw_command_y","kind":"function","visibility":"public","signature":"fn ui_draw_command_y(session_id: Int, command_index: Int) -> Float","source_path":"stdlib/ui.kn","line":1399,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_draw_command_width","qualified_name":"std::ui::ui_draw_command_width","kind":"function","visibility":"public","signature":"fn ui_draw_command_width(session_id: Int, command_index: Int) -> Float","source_path":"stdlib/ui.kn","line":1402,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_draw_command_height","qualified_name":"std::ui::ui_draw_command_height","kind":"function","visibility":"public","signature":"fn ui_draw_command_height(session_id: Int, command_index: Int) -> Float","source_path":"stdlib/ui.kn","line":1405,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_draw_command_text","qualified_name":"std::ui::ui_draw_command_text","kind":"function","visibility":"public","signature":"fn ui_draw_command_text(session_id: Int, command_index: Int) -> String","source_path":"stdlib/ui.kn","line":1408,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_draw_command_style","qualified_name":"std::ui::ui_draw_command_style","kind":"function","visibility":"public","signature":"fn ui_draw_command_style(session_id: Int, command_index: Int) -> String","source_path":"stdlib/ui.kn","line":1411,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_draw_command_font","qualified_name":"std::ui::ui_draw_command_font","kind":"function","visibility":"public","signature":"fn ui_draw_command_font(session_id: Int, command_index: Int) -> Int","source_path":"stdlib/ui.kn","line":1414,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_resource_create","qualified_name":"std::ui::ui_resource_create","kind":"function","visibility":"public","signature":"fn ui_resource_create(session_id: Int, resource_type: String, key: String, width: Int, height: Int, byte_length: Int) -> Int","source_path":"stdlib/ui.kn","line":1417,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_font_create","qualified_name":"std::ui::ui_font_create","kind":"function","visibility":"public","signature":"fn ui_font_create(session_id: Int, key: String, family: String, size: Float) -> Int","source_path":"stdlib/ui.kn","line":1420,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_texture_create","qualified_name":"std::ui::ui_texture_create","kind":"function","visibility":"public","signature":"fn ui_texture_create(session_id: Int, key: String, width: Int, height: Int, format: String, byte_length: Int) -> Int","source_path":"stdlib/ui.kn","line":1423,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_canvas_create","qualified_name":"std::ui::ui_canvas_create","kind":"function","visibility":"public","signature":"fn ui_canvas_create(session_id: Int, key: String, width: Int, height: Int) -> Int","source_path":"stdlib/ui.kn","line":1426,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_shader_create","qualified_name":"std::ui::ui_shader_create","kind":"function","visibility":"public","signature":"fn ui_shader_create(session_id: Int, key: String, stage: String, byte_length: Int) -> Int","source_path":"stdlib/ui.kn","line":1429,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_resource_set_bytes_hex","qualified_name":"std::ui::ui_resource_set_bytes_hex","kind":"function","visibility":"public","signature":"fn ui_resource_set_bytes_hex(session_id: Int, resource_id: Int, bytes_hex: String) -> Int","source_path":"stdlib/ui.kn","line":1432,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_resource_count","qualified_name":"std::ui::ui_resource_count","kind":"function","visibility":"public","signature":"fn ui_resource_count(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":1435,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_resource_exists","qualified_name":"std::ui::ui_resource_exists","kind":"function","visibility":"public","signature":"fn ui_resource_exists(session_id: Int, resource_id: Int) -> Int","source_path":"stdlib/ui.kn","line":1438,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_resource_type","qualified_name":"std::ui::ui_resource_type","kind":"function","visibility":"public","signature":"fn ui_resource_type(session_id: Int, resource_id: Int) -> String","source_path":"stdlib/ui.kn","line":1441,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_resource_key","qualified_name":"std::ui::ui_resource_key","kind":"function","visibility":"public","signature":"fn ui_resource_key(session_id: Int, resource_id: Int) -> String","source_path":"stdlib/ui.kn","line":1444,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_resource_width","qualified_name":"std::ui::ui_resource_width","kind":"function","visibility":"public","signature":"fn ui_resource_width(session_id: Int, resource_id: Int) -> Int","source_path":"stdlib/ui.kn","line":1447,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_resource_height","qualified_name":"std::ui::ui_resource_height","kind":"function","visibility":"public","signature":"fn ui_resource_height(session_id: Int, resource_id: Int) -> Int","source_path":"stdlib/ui.kn","line":1450,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_resource_byte_length","qualified_name":"std::ui::ui_resource_byte_length","kind":"function","visibility":"public","signature":"fn ui_resource_byte_length(session_id: Int, resource_id: Int) -> Int","source_path":"stdlib/ui.kn","line":1453,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_text_measure_width","qualified_name":"std::ui::ui_text_measure_width","kind":"function","visibility":"public","signature":"fn ui_text_measure_width(session_id: Int, font_resource_id: Int, text: String) -> Float","source_path":"stdlib/ui.kn","line":1456,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_text_measure_height","qualified_name":"std::ui::ui_text_measure_height","kind":"function","visibility":"public","signature":"fn ui_text_measure_height(session_id: Int, font_resource_id: Int, text: String) -> Float","source_path":"stdlib/ui.kn","line":1459,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_draw_resource","qualified_name":"std::ui::ui_draw_resource","kind":"function","visibility":"public","signature":"fn ui_draw_resource(session_id: Int, node_id: Int, resource_id: Int, x: Float, y: Float, width: Float, height: Float, style_key: String) -> Int","source_path":"stdlib/ui.kn","line":1462,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_clipboard_set_text","qualified_name":"std::ui::ui_clipboard_set_text","kind":"function","visibility":"public","signature":"fn ui_clipboard_set_text(session_id: Int, text: String) -> Int","source_path":"stdlib/ui.kn","line":1465,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_clipboard_text","qualified_name":"std::ui::ui_clipboard_text","kind":"function","visibility":"public","signature":"fn ui_clipboard_text(session_id: Int) -> String","source_path":"stdlib/ui.kn","line":1468,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_ime_begin","qualified_name":"std::ui::ui_ime_begin","kind":"function","visibility":"public","signature":"fn ui_ime_begin(session_id: Int, node_id: Int) -> Int","source_path":"stdlib/ui.kn","line":1471,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_ime_commit_text","qualified_name":"std::ui::ui_ime_commit_text","kind":"function","visibility":"public","signature":"fn ui_ime_commit_text(session_id: Int, text: String) -> Int","source_path":"stdlib/ui.kn","line":1474,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_ime_end","qualified_name":"std::ui::ui_ime_end","kind":"function","visibility":"public","signature":"fn ui_ime_end(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":1477,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_ime_active_node","qualified_name":"std::ui::ui_ime_active_node","kind":"function","visibility":"public","signature":"fn ui_ime_active_node(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":1480,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_ime_text","qualified_name":"std::ui::ui_ime_text","kind":"function","visibility":"public","signature":"fn ui_ime_text(session_id: Int) -> String","source_path":"stdlib/ui.kn","line":1483,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_drag_begin","qualified_name":"std::ui::ui_drag_begin","kind":"function","visibility":"public","signature":"fn ui_drag_begin(session_id: Int, node_id: Int, payload: String, x: Float, y: Float) -> Int","source_path":"stdlib/ui.kn","line":1486,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_drag_update","qualified_name":"std::ui::ui_drag_update","kind":"function","visibility":"public","signature":"fn ui_drag_update(session_id: Int, x: Float, y: Float, drop_target_node_id: Int) -> Int","source_path":"stdlib/ui.kn","line":1489,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_drag_drop","qualified_name":"std::ui::ui_drag_drop","kind":"function","visibility":"public","signature":"fn ui_drag_drop(session_id: Int, drop_target_node_id: Int) -> Int","source_path":"stdlib/ui.kn","line":1492,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_drag_active_node","qualified_name":"std::ui::ui_drag_active_node","kind":"function","visibility":"public","signature":"fn ui_drag_active_node(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":1495,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_drag_drop_target","qualified_name":"std::ui::ui_drag_drop_target","kind":"function","visibility":"public","signature":"fn ui_drag_drop_target(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":1498,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_drag_x","qualified_name":"std::ui::ui_drag_x","kind":"function","visibility":"public","signature":"fn ui_drag_x(session_id: Int) -> Float","source_path":"stdlib/ui.kn","line":1501,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_drag_y","qualified_name":"std::ui::ui_drag_y","kind":"function","visibility":"public","signature":"fn ui_drag_y(session_id: Int) -> Float","source_path":"stdlib/ui.kn","line":1504,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_drag_payload","qualified_name":"std::ui::ui_drag_payload","kind":"function","visibility":"public","signature":"fn ui_drag_payload(session_id: Int) -> String","source_path":"stdlib/ui.kn","line":1507,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_menu_create","qualified_name":"std::ui::ui_menu_create","kind":"function","visibility":"public","signature":"fn ui_menu_create(session_id: Int, key: String) -> Int","source_path":"stdlib/ui.kn","line":1510,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_menu_add_item","qualified_name":"std::ui::ui_menu_add_item","kind":"function","visibility":"public","signature":"fn ui_menu_add_item(session_id: Int, menu_id: Int, key: String, label: String, command_id: Int) -> Int","source_path":"stdlib/ui.kn","line":1513,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_menu_open","qualified_name":"std::ui::ui_menu_open","kind":"function","visibility":"public","signature":"fn ui_menu_open(session_id: Int, menu_id: Int, x: Float, y: Float) -> Int","source_path":"stdlib/ui.kn","line":1516,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_menu_active","qualified_name":"std::ui::ui_menu_active","kind":"function","visibility":"public","signature":"fn ui_menu_active(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":1519,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_menu_item_count","qualified_name":"std::ui::ui_menu_item_count","kind":"function","visibility":"public","signature":"fn ui_menu_item_count(session_id: Int, menu_id: Int) -> Int","source_path":"stdlib/ui.kn","line":1522,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_menu_item_label","qualified_name":"std::ui::ui_menu_item_label","kind":"function","visibility":"public","signature":"fn ui_menu_item_label(session_id: Int, menu_id: Int, item_index: Int) -> String","source_path":"stdlib/ui.kn","line":1525,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_menu_item_command","qualified_name":"std::ui::ui_menu_item_command","kind":"function","visibility":"public","signature":"fn ui_menu_item_command(session_id: Int, menu_id: Int, item_index: Int) -> Int","source_path":"stdlib/ui.kn","line":1528,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_dialog_request","qualified_name":"std::ui::ui_dialog_request","kind":"function","visibility":"public","signature":"fn ui_dialog_request(session_id: Int, kind: String, title: String, message: String) -> Int","source_path":"stdlib/ui.kn","line":1531,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_dialog_active","qualified_name":"std::ui::ui_dialog_active","kind":"function","visibility":"public","signature":"fn ui_dialog_active(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":1534,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_dialog_kind","qualified_name":"std::ui::ui_dialog_kind","kind":"function","visibility":"public","signature":"fn ui_dialog_kind(session_id: Int, dialog_id: Int) -> String","source_path":"stdlib/ui.kn","line":1537,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_dialog_title","qualified_name":"std::ui::ui_dialog_title","kind":"function","visibility":"public","signature":"fn ui_dialog_title(session_id: Int, dialog_id: Int) -> String","source_path":"stdlib/ui.kn","line":1540,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_dialog_message","qualified_name":"std::ui::ui_dialog_message","kind":"function","visibility":"public","signature":"fn ui_dialog_message(session_id: Int, dialog_id: Int) -> String","source_path":"stdlib/ui.kn","line":1543,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_dialog_respond","qualified_name":"std::ui::ui_dialog_respond","kind":"function","visibility":"public","signature":"fn ui_dialog_respond(session_id: Int, dialog_id: Int, result: Int, response_text: String) -> Int","source_path":"stdlib/ui.kn","line":1546,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_dialog_poll_response","qualified_name":"std::ui::ui_dialog_poll_response","kind":"function","visibility":"public","signature":"fn ui_dialog_poll_response(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":1549,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_dialog_response_text","qualified_name":"std::ui::ui_dialog_response_text","kind":"function","visibility":"public","signature":"fn ui_dialog_response_text(session_id: Int) -> String","source_path":"stdlib/ui.kn","line":1552,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_hot_reload_begin","qualified_name":"std::ui::ui_hot_reload_begin","kind":"function","visibility":"public","signature":"fn ui_hot_reload_begin(session_id: Int, revision_key: String) -> Int","source_path":"stdlib/ui.kn","line":1555,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_hot_reload_commit","qualified_name":"std::ui::ui_hot_reload_commit","kind":"function","visibility":"public","signature":"fn ui_hot_reload_commit(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":1558,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_hot_reload_generation","qualified_name":"std::ui::ui_hot_reload_generation","kind":"function","visibility":"public","signature":"fn ui_hot_reload_generation(session_id: Int) -> Int","source_path":"stdlib/ui.kn","line":1561,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_hot_reload_key","qualified_name":"std::ui::ui_hot_reload_key","kind":"function","visibility":"public","signature":"fn ui_hot_reload_key(session_id: Int) -> String","source_path":"stdlib/ui.kn","line":1564,"attributes":[],"docs":[],"target_notes":[]},{"name":"ui_texture_create_from_hex","qualified_name":"std::ui::ui_texture_create_from_hex","kind":"function","visibility":"public","signature":"fn ui_texture_create_from_hex(session_id: Int, key: String, width: Int, height: Int, format: String, bytes_hex: String) -> Int","source_path":"stdlib/ui.kn","line":1567,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"unicode","import_path":"std::unicode","source_path":"stdlib/unicode.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"UnicodeDecodeResult","qualified_name":"std::unicode::UnicodeDecodeResult","kind":"struct","visibility":"public","signature":"struct UnicodeDecodeResult","source_path":"stdlib/unicode.kn","line":1,"attributes":[],"docs":[],"target_notes":[]},{"name":"UnicodeCursor","qualified_name":"std::unicode::UnicodeCursor","kind":"struct","visibility":"public","signature":"struct UnicodeCursor","source_path":"stdlib/unicode.kn","line":6,"attributes":[],"docs":[],"target_notes":[]},{"name":"UnicodeCursorNextResult","qualified_name":"std::unicode::UnicodeCursorNextResult","kind":"struct","visibility":"public","signature":"struct UnicodeCursorNextResult","source_path":"stdlib/unicode.kn","line":10,"attributes":[],"docs":[],"target_notes":[]},{"name":"UnicodeNormalizationForm","qualified_name":"std::unicode::UnicodeNormalizationForm","kind":"enum","visibility":"private","signature":"enum UnicodeNormalizationForm","source_path":"stdlib/unicode.kn","line":15,"attributes":[],"docs":[],"target_notes":[]},{"name":"unicode_utf8_char_length","qualified_name":"std::unicode::unicode_utf8_char_length","kind":"function","visibility":"public","signature":"fn unicode_utf8_char_length(first_byte: Int) -> Int","source_path":"stdlib/unicode.kn","line":21,"attributes":[],"docs":[],"target_notes":[]},{"name":"unicode_utf8_decode_at","qualified_name":"std::unicode::unicode_utf8_decode_at","kind":"function","visibility":"public","signature":"fn unicode_utf8_decode_at(value: String, start_index: Int) -> UnicodeDecodeResult","source_path":"stdlib/unicode.kn","line":34,"attributes":[],"docs":[],"target_notes":[]},{"name":"unicode_utf8_encode","qualified_name":"std::unicode::unicode_utf8_encode","kind":"function","visibility":"public","signature":"fn unicode_utf8_encode(codepoint: Int) -> String","source_path":"stdlib/unicode.kn","line":97,"attributes":[],"docs":[],"target_notes":[]},{"name":"unicode_utf8_is_valid","qualified_name":"std::unicode::unicode_utf8_is_valid","kind":"function","visibility":"public","signature":"fn unicode_utf8_is_valid(value: String) -> Bool","source_path":"stdlib/unicode.kn","line":123,"attributes":[],"docs":[],"target_notes":[]},{"name":"unicode_utf8_codepoint_count","qualified_name":"std::unicode::unicode_utf8_codepoint_count","kind":"function","visibility":"public","signature":"fn unicode_utf8_codepoint_count(value: String) -> Int","source_path":"stdlib/unicode.kn","line":133,"attributes":[],"docs":[],"target_notes":[]},{"name":"unicode_utf8_codepoint_at","qualified_name":"std::unicode::unicode_utf8_codepoint_at","kind":"function","visibility":"public","signature":"fn unicode_utf8_codepoint_at(value: String, codepoint_index: Int) -> Int","source_path":"stdlib/unicode.kn","line":146,"attributes":[],"docs":[],"target_notes":[]},{"name":"unicode_cursor_new","qualified_name":"std::unicode::unicode_cursor_new","kind":"function","visibility":"public","signature":"fn unicode_cursor_new(source: String) -> UnicodeCursor","source_path":"stdlib/unicode.kn","line":161,"attributes":[],"docs":[],"target_notes":[]},{"name":"unicode_cursor_has_next","qualified_name":"std::unicode::unicode_cursor_has_next","kind":"function","visibility":"public","signature":"fn unicode_cursor_has_next(cursor: UnicodeCursor) -> Bool","source_path":"stdlib/unicode.kn","line":164,"attributes":[],"docs":[],"target_notes":[]},{"name":"unicode_cursor_next","qualified_name":"std::unicode::unicode_cursor_next","kind":"function","visibility":"public","signature":"fn unicode_cursor_next(cursor: UnicodeCursor) -> UnicodeCursorNextResult","source_path":"stdlib/unicode.kn","line":167,"attributes":[],"docs":[],"target_notes":[]},{"name":"unicode_normalize","qualified_name":"std::unicode::unicode_normalize","kind":"function","visibility":"public","signature":"fn unicode_normalize(value: String, form: UnicodeNormalizationForm) -> String","source_path":"stdlib/unicode.kn","line":174,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"uri","import_path":"std::uri","source_path":"stdlib/uri.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"Uri","qualified_name":"std::uri::Uri","kind":"struct","visibility":"public","signature":"struct Uri","source_path":"stdlib/uri.kn","line":5,"attributes":[],"docs":[],"target_notes":[]},{"name":"UriQueryParam","qualified_name":"std::uri::UriQueryParam","kind":"struct","visibility":"public","signature":"struct UriQueryParam","source_path":"stdlib/uri.kn","line":16,"attributes":[],"docs":[],"target_notes":[]},{"name":"UriQueryParamIterator","qualified_name":"std::uri::UriQueryParamIterator","kind":"struct","visibility":"public","signature":"struct UriQueryParamIterator","source_path":"stdlib/uri.kn","line":21,"attributes":[],"docs":[],"target_notes":[]},{"name":"UriQueryParamNext","qualified_name":"std::uri::UriQueryParamNext","kind":"struct","visibility":"public","signature":"struct UriQueryParamNext","source_path":"stdlib/uri.kn","line":26,"attributes":[],"docs":[],"target_notes":[]},{"name":"uri_parse","qualified_name":"std::uri::uri_parse","kind":"function","visibility":"public","signature":"fn uri_parse(url: String) -> Uri","source_path":"stdlib/uri.kn","line":31,"attributes":[],"docs":[],"target_notes":[]},{"name":"uri_decode","qualified_name":"std::uri::uri_decode","kind":"function","visibility":"public","signature":"fn uri_decode(value: String) -> String","source_path":"stdlib/uri.kn","line":254,"attributes":[],"docs":[],"target_notes":[]},{"name":"ascii_hex_digit_to_int","qualified_name":"std::uri::ascii_hex_digit_to_int","kind":"function","visibility":"private","signature":"fn ascii_hex_digit_to_int(b: Int) -> Int","source_path":"stdlib/uri.kn","line":284,"attributes":[],"docs":[],"target_notes":[]},{"name":"uri_encode","qualified_name":"std::uri::uri_encode","kind":"function","visibility":"public","signature":"fn uri_encode(value: String) -> String","source_path":"stdlib/uri.kn","line":293,"attributes":[],"docs":[],"target_notes":[]},{"name":"int_to_hex_digit","qualified_name":"std::uri::int_to_hex_digit","kind":"function","visibility":"private","signature":"fn int_to_hex_digit(val: Int) -> String","source_path":"stdlib/uri.kn","line":307,"attributes":[],"docs":[],"target_notes":[]},{"name":"uri_query_param_iterator","qualified_name":"std::uri::uri_query_param_iterator","kind":"function","visibility":"public","signature":"fn uri_query_param_iterator(uri: Uri) -> UriQueryParamIterator","source_path":"stdlib/uri.kn","line":313,"attributes":[],"docs":[],"target_notes":[]},{"name":"uri_query_param_has_next","qualified_name":"std::uri::uri_query_param_has_next","kind":"function","visibility":"public","signature":"fn uri_query_param_has_next(it: UriQueryParamIterator) -> Bool","source_path":"stdlib/uri.kn","line":320,"attributes":[],"docs":[],"target_notes":[]},{"name":"uri_query_param_next","qualified_name":"std::uri::uri_query_param_next","kind":"function","visibility":"public","signature":"fn uri_query_param_next(it: UriQueryParamIterator) -> UriQueryParamNext","source_path":"stdlib/uri.kn","line":323,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"wasm","import_path":"std::wasm","source_path":"stdlib/wasm.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"WASM_MAGIC","qualified_name":"std::wasm::WASM_MAGIC","kind":"const","visibility":"public","signature":"const WASM_MAGIC: Int","source_path":"stdlib/wasm.kn","line":4,"attributes":[],"docs":[],"target_notes":[]},{"name":"WASM_VERSION","qualified_name":"std::wasm::WASM_VERSION","kind":"const","visibility":"public","signature":"const WASM_VERSION: Int","source_path":"stdlib/wasm.kn","line":5,"attributes":[],"docs":[],"target_notes":[]},{"name":"WASM_SECTION_CUSTOM","qualified_name":"std::wasm::WASM_SECTION_CUSTOM","kind":"const","visibility":"public","signature":"const WASM_SECTION_CUSTOM: Int","source_path":"stdlib/wasm.kn","line":7,"attributes":[],"docs":[],"target_notes":[]},{"name":"WASM_SECTION_TYPE","qualified_name":"std::wasm::WASM_SECTION_TYPE","kind":"const","visibility":"public","signature":"const WASM_SECTION_TYPE: Int","source_path":"stdlib/wasm.kn","line":8,"attributes":[],"docs":[],"target_notes":[]},{"name":"WASM_SECTION_IMPORT","qualified_name":"std::wasm::WASM_SECTION_IMPORT","kind":"const","visibility":"public","signature":"const WASM_SECTION_IMPORT: Int","source_path":"stdlib/wasm.kn","line":9,"attributes":[],"docs":[],"target_notes":[]},{"name":"WASM_SECTION_FUNC","qualified_name":"std::wasm::WASM_SECTION_FUNC","kind":"const","visibility":"public","signature":"const WASM_SECTION_FUNC: Int","source_path":"stdlib/wasm.kn","line":10,"attributes":[],"docs":[],"target_notes":[]},{"name":"WASM_SECTION_TABLE","qualified_name":"std::wasm::WASM_SECTION_TABLE","kind":"const","visibility":"public","signature":"const WASM_SECTION_TABLE: Int","source_path":"stdlib/wasm.kn","line":11,"attributes":[],"docs":[],"target_notes":[]},{"name":"WASM_SECTION_MEMORY","qualified_name":"std::wasm::WASM_SECTION_MEMORY","kind":"const","visibility":"public","signature":"const WASM_SECTION_MEMORY: Int","source_path":"stdlib/wasm.kn","line":12,"attributes":[],"docs":[],"target_notes":[]},{"name":"WASM_SECTION_GLOBAL","qualified_name":"std::wasm::WASM_SECTION_GLOBAL","kind":"const","visibility":"public","signature":"const WASM_SECTION_GLOBAL: Int","source_path":"stdlib/wasm.kn","line":13,"attributes":[],"docs":[],"target_notes":[]},{"name":"WASM_SECTION_EXPORT","qualified_name":"std::wasm::WASM_SECTION_EXPORT","kind":"const","visibility":"public","signature":"const WASM_SECTION_EXPORT: Int","source_path":"stdlib/wasm.kn","line":14,"attributes":[],"docs":[],"target_notes":[]},{"name":"WASM_SECTION_START","qualified_name":"std::wasm::WASM_SECTION_START","kind":"const","visibility":"public","signature":"const WASM_SECTION_START: Int","source_path":"stdlib/wasm.kn","line":15,"attributes":[],"docs":[],"target_notes":[]},{"name":"WASM_SECTION_ELEMENT","qualified_name":"std::wasm::WASM_SECTION_ELEMENT","kind":"const","visibility":"public","signature":"const WASM_SECTION_ELEMENT: Int","source_path":"stdlib/wasm.kn","line":16,"attributes":[],"docs":[],"target_notes":[]},{"name":"WASM_SECTION_CODE","qualified_name":"std::wasm::WASM_SECTION_CODE","kind":"const","visibility":"public","signature":"const WASM_SECTION_CODE: Int","source_path":"stdlib/wasm.kn","line":17,"attributes":[],"docs":[],"target_notes":[]},{"name":"WASM_SECTION_DATA","qualified_name":"std::wasm::WASM_SECTION_DATA","kind":"const","visibility":"public","signature":"const WASM_SECTION_DATA: Int","source_path":"stdlib/wasm.kn","line":18,"attributes":[],"docs":[],"target_notes":[]},{"name":"WasmHeader","qualified_name":"std::wasm::WasmHeader","kind":"struct","visibility":"public","signature":"struct WasmHeader","source_path":"stdlib/wasm.kn","line":20,"attributes":[],"docs":[],"target_notes":[]},{"name":"WasmSection","qualified_name":"std::wasm::WasmSection","kind":"struct","visibility":"public","signature":"struct WasmSection","source_path":"stdlib/wasm.kn","line":24,"attributes":[],"docs":[],"target_notes":[]},{"name":"wasm_validate_header","qualified_name":"std::wasm::wasm_validate_header","kind":"function","visibility":"public","signature":"fn wasm_validate_header(buffer: ptr) -> Bool","source_path":"stdlib/wasm.kn","line":30,"attributes":[],"docs":[],"target_notes":[]},{"name":"wasm_read_section_header","qualified_name":"std::wasm::wasm_read_section_header","kind":"function","visibility":"public","signature":"fn wasm_read_section_header(buffer: ptr, offset: Int) -> WasmSection","source_path":"stdlib/wasm.kn","line":37,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"z3","import_path":"std::z3","source_path":"stdlib/z3.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"z3_operator_module","qualified_name":"std::z3::z3_operator_module","kind":"function","visibility":"private","signature":"fn z3_operator_module() -> Any","source_path":"stdlib/z3.kn","line":10,"attributes":[],"docs":["Root Z3 surface for Kain.","","This is intentionally an optional host-backed solver lane. Authored Kain","owns the proof shape and orchestration; the active Python environment owns","the actual `z3-solver` package. Call `z3_available()` before requiring it if","your flow needs to stay soft when the module is missing."],"target_notes":[]},{"name":"z3_string_builtin","qualified_name":"std::z3::z3_string_builtin","kind":"function","visibility":"private","signature":"fn z3_string_builtin() -> Any","source_path":"stdlib/z3.kn","line":13,"attributes":[],"docs":[],"target_notes":[]},{"name":"z3_repr_builtin","qualified_name":"std::z3::z3_repr_builtin","kind":"function","visibility":"private","signature":"fn z3_repr_builtin() -> Any","source_path":"stdlib/z3.kn","line":16,"attributes":[],"docs":[],"target_notes":[]},{"name":"z3_available","qualified_name":"std::z3::z3_available","kind":"function","visibility":"public","signature":"fn z3_available() -> Bool","source_path":"stdlib/z3.kn","line":19,"attributes":[],"docs":[],"target_notes":[]},{"name":"z3_require","qualified_name":"std::z3::z3_require","kind":"function","visibility":"public","signature":"fn z3_require() -> Any","source_path":"stdlib/z3.kn","line":22,"attributes":[],"docs":[],"target_notes":[]},{"name":"z3_version","qualified_name":"std::z3::z3_version","kind":"function","visibility":"public","signature":"fn z3_version() -> String","source_path":"stdlib/z3.kn","line":25,"attributes":[],"docs":[],"target_notes":[]},{"name":"z3_solver","qualified_name":"std::z3::z3_solver","kind":"function","visibility":"public","signature":"fn z3_solver() -> Any","source_path":"stdlib/z3.kn","line":28,"attributes":[],"docs":[],"target_notes":[]},{"name":"z3_optimize","qualified_name":"std::z3::z3_optimize","kind":"function","visibility":"public","signature":"fn z3_optimize() -> Any","source_path":"stdlib/z3.kn","line":31,"attributes":[],"docs":[],"target_notes":[]},{"name":"z3_int","qualified_name":"std::z3::z3_int","kind":"function","visibility":"public","signature":"fn z3_int(name: String) -> Any","source_path":"stdlib/z3.kn","line":34,"attributes":[],"docs":[],"target_notes":[]},{"name":"z3_real","qualified_name":"std::z3::z3_real","kind":"function","visibility":"public","signature":"fn z3_real(name: String) -> Any","source_path":"stdlib/z3.kn","line":37,"attributes":[],"docs":[],"target_notes":[]},{"name":"z3_bool","qualified_name":"std::z3::z3_bool","kind":"function","visibility":"public","signature":"fn z3_bool(name: String) -> Any","source_path":"stdlib/z3.kn","line":40,"attributes":[],"docs":[],"target_notes":[]},{"name":"z3_bitvec","qualified_name":"std::z3::z3_bitvec","kind":"function","visibility":"public","signature":"fn z3_bitvec(name: String, bits: Int) -> Any","source_path":"stdlib/z3.kn","line":43,"attributes":[],"docs":[],"target_notes":[]},{"name":"z3_int_val","qualified_name":"std::z3::z3_int_val","kind":"function","visibility":"public","signature":"fn z3_int_val(value: Int) -> Any","source_path":"stdlib/z3.kn","line":46,"attributes":[],"docs":[],"target_notes":[]},{"name":"z3_bool_val","qualified_name":"std::z3::z3_bool_val","kind":"function","visibility":"public","signature":"fn z3_bool_val(value: Bool) -> Any","source_path":"stdlib/z3.kn","line":49,"attributes":[],"docs":[],"target_notes":[]},{"name":"z3_bitvec_val","qualified_name":"std::z3::z3_bitvec_val","kind":"function","visibility":"public","signature":"fn z3_bitvec_val(value: Int, bits: Int) -> Any","source_path":"stdlib/z3.kn","line":52,"attributes":[],"docs":[],"target_notes":[]},{"name":"z3_expr_add","qualified_name":"std::z3::z3_expr_add","kind":"function","visibility":"public","signature":"fn z3_expr_add(left: Any, right: Any) -> Any","source_path":"stdlib/z3.kn","line":55,"attributes":[],"docs":[],"target_notes":[]},{"name":"z3_expr_sub","qualified_name":"std::z3::z3_expr_sub","kind":"function","visibility":"public","signature":"fn z3_expr_sub(left: Any, right: Any) -> Any","source_path":"stdlib/z3.kn","line":58,"attributes":[],"docs":[],"target_notes":[]},{"name":"z3_expr_mul","qualified_name":"std::z3::z3_expr_mul","kind":"function","visibility":"public","signature":"fn z3_expr_mul(left: Any, right: Any) -> Any","source_path":"stdlib/z3.kn","line":61,"attributes":[],"docs":[],"target_notes":[]},{"name":"z3_expr_eq","qualified_name":"std::z3::z3_expr_eq","kind":"function","visibility":"public","signature":"fn z3_expr_eq(left: Any, right: Any) -> Any","source_path":"stdlib/z3.kn","line":64,"attributes":[],"docs":[],"target_notes":[]},{"name":"z3_expr_ne","qualified_name":"std::z3::z3_expr_ne","kind":"function","visibility":"public","signature":"fn z3_expr_ne(left: Any, right: Any) -> Any","source_path":"stdlib/z3.kn","line":67,"attributes":[],"docs":[],"target_notes":[]},{"name":"z3_expr_lt","qualified_name":"std::z3::z3_expr_lt","kind":"function","visibility":"public","signature":"fn z3_expr_lt(left: Any, right: Any) -> Any","source_path":"stdlib/z3.kn","line":70,"attributes":[],"docs":[],"target_notes":[]},{"name":"z3_expr_le","qualified_name":"std::z3::z3_expr_le","kind":"function","visibility":"public","signature":"fn z3_expr_le(left: Any, right: Any) -> Any","source_path":"stdlib/z3.kn","line":73,"attributes":[],"docs":[],"target_notes":[]},{"name":"z3_expr_gt","qualified_name":"std::z3::z3_expr_gt","kind":"function","visibility":"public","signature":"fn z3_expr_gt(left: Any, right: Any) -> Any","source_path":"stdlib/z3.kn","line":76,"attributes":[],"docs":[],"target_notes":[]},{"name":"z3_expr_ge","qualified_name":"std::z3::z3_expr_ge","kind":"function","visibility":"public","signature":"fn z3_expr_ge(left: Any, right: Any) -> Any","source_path":"stdlib/z3.kn","line":79,"attributes":[],"docs":[],"target_notes":[]},{"name":"z3_and","qualified_name":"std::z3::z3_and","kind":"function","visibility":"public","signature":"fn z3_and(clauses: Any) -> Any","source_path":"stdlib/z3.kn","line":82,"attributes":[],"docs":[],"target_notes":[]},{"name":"z3_or","qualified_name":"std::z3::z3_or","kind":"function","visibility":"public","signature":"fn z3_or(clauses: Any) -> Any","source_path":"stdlib/z3.kn","line":85,"attributes":[],"docs":[],"target_notes":[]},{"name":"z3_not","qualified_name":"std::z3::z3_not","kind":"function","visibility":"public","signature":"fn z3_not(clause: Any) -> Any","source_path":"stdlib/z3.kn","line":88,"attributes":[],"docs":[],"target_notes":[]},{"name":"z3_distinct","qualified_name":"std::z3::z3_distinct","kind":"function","visibility":"public","signature":"fn z3_distinct(values: Any) -> Any","source_path":"stdlib/z3.kn","line":91,"attributes":[],"docs":[],"target_notes":[]},{"name":"z3_sum","qualified_name":"std::z3::z3_sum","kind":"function","visibility":"public","signature":"fn z3_sum(values: Any) -> Any","source_path":"stdlib/z3.kn","line":94,"attributes":[],"docs":[],"target_notes":[]},{"name":"z3_solver_add","qualified_name":"std::z3::z3_solver_add","kind":"function","visibility":"public","signature":"fn z3_solver_add(solver: Any, constraints: Any)","source_path":"stdlib/z3.kn","line":97,"attributes":[],"docs":[],"target_notes":[]},{"name":"z3_solver_push","qualified_name":"std::z3::z3_solver_push","kind":"function","visibility":"public","signature":"fn z3_solver_push(solver: Any)","source_path":"stdlib/z3.kn","line":100,"attributes":[],"docs":[],"target_notes":[]},{"name":"z3_solver_pop","qualified_name":"std::z3::z3_solver_pop","kind":"function","visibility":"public","signature":"fn z3_solver_pop(solver: Any, depth: Int)","source_path":"stdlib/z3.kn","line":103,"attributes":[],"docs":[],"target_notes":[]},{"name":"z3_solver_check","qualified_name":"std::z3::z3_solver_check","kind":"function","visibility":"public","signature":"fn z3_solver_check(solver: Any) -> Any","source_path":"stdlib/z3.kn","line":106,"attributes":[],"docs":[],"target_notes":[]},{"name":"z3_result_name","qualified_name":"std::z3::z3_result_name","kind":"function","visibility":"public","signature":"fn z3_result_name(result: Any) -> String","source_path":"stdlib/z3.kn","line":109,"attributes":[],"docs":[],"target_notes":[]},{"name":"z3_solver_check_name","qualified_name":"std::z3::z3_solver_check_name","kind":"function","visibility":"public","signature":"fn z3_solver_check_name(solver: Any) -> String","source_path":"stdlib/z3.kn","line":112,"attributes":[],"docs":[],"target_notes":[]},{"name":"z3_is_sat","qualified_name":"std::z3::z3_is_sat","kind":"function","visibility":"public","signature":"fn z3_is_sat(result: Any) -> Bool","source_path":"stdlib/z3.kn","line":115,"attributes":[],"docs":[],"target_notes":[]},{"name":"z3_is_unsat","qualified_name":"std::z3::z3_is_unsat","kind":"function","visibility":"public","signature":"fn z3_is_unsat(result: Any) -> Bool","source_path":"stdlib/z3.kn","line":118,"attributes":[],"docs":[],"target_notes":[]},{"name":"z3_is_unknown","qualified_name":"std::z3::z3_is_unknown","kind":"function","visibility":"public","signature":"fn z3_is_unknown(result: Any) -> Bool","source_path":"stdlib/z3.kn","line":121,"attributes":[],"docs":[],"target_notes":[]},{"name":"z3_solver_model","qualified_name":"std::z3::z3_solver_model","kind":"function","visibility":"public","signature":"fn z3_solver_model(solver: Any) -> Any","source_path":"stdlib/z3.kn","line":124,"attributes":[],"docs":[],"target_notes":[]},{"name":"z3_model_eval","qualified_name":"std::z3::z3_model_eval","kind":"function","visibility":"public","signature":"fn z3_model_eval(model: Any, expr: Any) -> Any","source_path":"stdlib/z3.kn","line":127,"attributes":[],"docs":[],"target_notes":[]},{"name":"z3_as_long","qualified_name":"std::z3::z3_as_long","kind":"function","visibility":"public","signature":"fn z3_as_long(value: Any) -> Int","source_path":"stdlib/z3.kn","line":130,"attributes":[],"docs":[],"target_notes":[]},{"name":"z3_as_string","qualified_name":"std::z3::z3_as_string","kind":"function","visibility":"public","signature":"fn z3_as_string(value: Any) -> String","source_path":"stdlib/z3.kn","line":133,"attributes":[],"docs":[],"target_notes":[]},{"name":"z3_repr","qualified_name":"std::z3::z3_repr","kind":"function","visibility":"public","signature":"fn z3_repr(value: Any) -> String","source_path":"stdlib/z3.kn","line":136,"attributes":[],"docs":[],"target_notes":[]}]},{"name":"zip","import_path":"std::zip","source_path":"stdlib/zip.kn","parse_status":{"status":"parsed"},"docs":[],"symbols":[{"name":"ZIP_LOCAL_HEADER_SIG","qualified_name":"std::zip::ZIP_LOCAL_HEADER_SIG","kind":"const","visibility":"public","signature":"const ZIP_LOCAL_HEADER_SIG: Int","source_path":"stdlib/zip.kn","line":4,"attributes":[],"docs":[],"target_notes":[]},{"name":"ZIP_CENTRAL_HEADER_SIG","qualified_name":"std::zip::ZIP_CENTRAL_HEADER_SIG","kind":"const","visibility":"public","signature":"const ZIP_CENTRAL_HEADER_SIG: Int","source_path":"stdlib/zip.kn","line":5,"attributes":[],"docs":[],"target_notes":[]},{"name":"ZIP_EOCD_SIG","qualified_name":"std::zip::ZIP_EOCD_SIG","kind":"const","visibility":"public","signature":"const ZIP_EOCD_SIG: Int","source_path":"stdlib/zip.kn","line":6,"attributes":[],"docs":[],"target_notes":[]},{"name":"ZipLocalHeader","qualified_name":"std::zip::ZipLocalHeader","kind":"struct","visibility":"public","signature":"struct ZipLocalHeader","source_path":"stdlib/zip.kn","line":8,"attributes":[],"docs":[],"target_notes":[]},{"name":"ZipCentralHeader","qualified_name":"std::zip::ZipCentralHeader","kind":"struct","visibility":"public","signature":"struct ZipCentralHeader","source_path":"stdlib/zip.kn","line":20,"attributes":[],"docs":[],"target_notes":[]},{"name":"ZipEocd","qualified_name":"std::zip::ZipEocd","kind":"struct","visibility":"public","signature":"struct ZipEocd","source_path":"stdlib/zip.kn","line":38,"attributes":[],"docs":[],"target_notes":[]},{"name":"zip_write_local_header","qualified_name":"std::zip::zip_write_local_header","kind":"function","visibility":"public","signature":"fn zip_write_local_header(buffer: ptr, header: ZipLocalHeader) -> Int","source_path":"stdlib/zip.kn","line":49,"attributes":[],"docs":[],"target_notes":[]},{"name":"zip_read_local_header","qualified_name":"std::zip::zip_read_local_header","kind":"function","visibility":"public","signature":"fn zip_read_local_header(buffer: ptr) -> ZipLocalHeader","source_path":"stdlib/zip.kn","line":61,"attributes":[],"docs":[],"target_notes":[]},{"name":"zip_write_eocd","qualified_name":"std::zip::zip_write_eocd","kind":"function","visibility":"public","signature":"fn zip_write_eocd(buffer: ptr, eocd: ZipEocd) -> Int","source_path":"stdlib/zip.kn","line":88,"attributes":[],"docs":[],"target_notes":[]}]}],"builtins":[{"name":"abs","signature":"fn abs(x: Int) -> Int","params":[{"name":"x","ty":"Int"}],"return_type":"Int","doc":"Absolute value","origin":"crates/core/src/stdlib.rs"},{"name":"args","signature":"fn args() -> Array","params":[],"return_type":"Array","doc":"Return the current process command-line arguments","origin":"crates/core/src/stdlib.rs"},{"name":"ask","signature":"fn ask(actor: ActorRef, message: String, request: Any) -> Any","params":[{"name":"actor","ty":"ActorRef"},{"name":"message","ty":"String"},{"name":"request","ty":"Any"}],"return_type":"Any","doc":"Send a message to an actor and wait for the first reply","origin":"crates/core/src/stdlib.rs"},{"name":"ask_timeout","signature":"fn ask_timeout(actor: ActorRef, message: String, request: Any, timeout_ms: Int) -> Any","params":[{"name":"actor","ty":"ActorRef"},{"name":"message","ty":"String"},{"name":"request","ty":"Any"},{"name":"timeout_ms","ty":"Int"}],"return_type":"Any","doc":"Send a message to an actor and wait for the first reply with a custom timeout","origin":"crates/core/src/stdlib.rs"},{"name":"assert","signature":"fn assert(condition: Bool, message: String) -> Unit","params":[{"name":"condition","ty":"Bool"},{"name":"message","ty":"String"}],"return_type":"Unit","doc":"Assert condition","origin":"crates/core/src/stdlib.rs"},{"name":"byte_at","signature":"fn byte_at(s: String, index: Int) -> Int","params":[{"name":"s","ty":"String"},{"name":"index","ty":"Int"}],"return_type":"Int","doc":"Read a raw byte value at a string index, or -1 when out of range","origin":"crates/core/src/stdlib.rs"},{"name":"ceil","signature":"fn ceil(x: Float) -> Int","params":[{"name":"x","ty":"Float"}],"return_type":"Int","doc":"Ceiling","origin":"crates/core/src/stdlib.rs"},{"name":"char_at","signature":"fn char_at(s: String, index: Int) -> String","params":[{"name":"s","ty":"String"},{"name":"index","ty":"Int"}],"return_type":"String","doc":"Read a single character at an index as a string","origin":"crates/core/src/stdlib.rs"},{"name":"chr","signature":"fn chr(codepoint: Int) -> String","params":[{"name":"codepoint","ty":"Int"}],"return_type":"String","doc":"Create a single-character string from a Unicode scalar value","origin":"crates/core/src/stdlib.rs"},{"name":"clamp","signature":"fn clamp(x: Int, lo: Int, hi: Int) -> Int","params":[{"name":"x","ty":"Int"},{"name":"lo","ty":"Int"},{"name":"hi","ty":"Int"}],"return_type":"Int","doc":"Clamp between bounds","origin":"crates/core/src/stdlib.rs"},{"name":"command_run","signature":"fn command_run(program: String, args: Array, workdir: String) -> CommandRunResult","params":[{"name":"program","ty":"String"},{"name":"args","ty":"Array"},{"name":"workdir","ty":"String"}],"return_type":"CommandRunResult","doc":"Run a subprocess, capture stdout/stderr, and return the exit status","origin":"crates/core/src/stdlib.rs"},{"name":"contains","signature":"fn contains(s: String, sub: String) -> Bool","params":[{"name":"s","ty":"String"},{"name":"sub","ty":"String"}],"return_type":"Bool","doc":"Check contains","origin":"crates/core/src/stdlib.rs"},{"name":"copy_file","signature":"fn copy_file(src: String, dest: String) -> Unit","params":[{"name":"src","ty":"String"},{"name":"dest","ty":"String"}],"return_type":"Unit","doc":"Copy one file to another path","origin":"crates/core/src/stdlib.rs"},{"name":"cos","signature":"fn cos(x: Float) -> Float","params":[{"name":"x","ty":"Float"}],"return_type":"Float","doc":"Cosine","origin":"crates/core/src/stdlib.rs"},{"name":"create_dir_all","signature":"fn create_dir_all(path: String) -> Unit","params":[{"name":"path","ty":"String"}],"return_type":"Unit","doc":"Create a directory and any missing parents","origin":"crates/core/src/stdlib.rs"},{"name":"cross","signature":"fn cross(a: Vec3, b: Vec3) -> Vec3","params":[{"name":"a","ty":"Vec3"},{"name":"b","ty":"Vec3"}],"return_type":"Vec3","doc":"Cross product","origin":"crates/core/src/stdlib.rs"},{"name":"cwd","signature":"fn cwd() -> String","params":[],"return_type":"String","doc":"Return the current working directory","origin":"crates/core/src/stdlib.rs"},{"name":"dbg","signature":"fn dbg(value: Any) -> Any","params":[{"name":"value","ty":"Any"}],"return_type":"Any","doc":"Debug print and return","origin":"crates/core/src/stdlib.rs"},{"name":"distance","signature":"fn distance(a: Vec3, b: Vec3) -> Float","params":[{"name":"a","ty":"Vec3"},{"name":"b","ty":"Vec3"}],"return_type":"Float","doc":"Distance between points","origin":"crates/core/src/stdlib.rs"},{"name":"dot","signature":"fn dot(a: Vec3, b: Vec3) -> Float","params":[{"name":"a","ty":"Vec3"},{"name":"b","ty":"Vec3"}],"return_type":"Float","doc":"Dot product","origin":"crates/core/src/stdlib.rs"},{"name":"ends_with","signature":"fn ends_with(s: String, suffix: String) -> Bool","params":[{"name":"s","ty":"String"},{"name":"suffix","ty":"String"}],"return_type":"Bool","doc":"Check whether a string ends with a suffix","origin":"crates/core/src/stdlib.rs"},{"name":"env","signature":"fn env(name: String) -> String","params":[{"name":"name","ty":"String"}],"return_type":"String","doc":"Read an environment variable, returning an empty string if missing","origin":"crates/core/src/stdlib.rs"},{"name":"file_exists","signature":"fn file_exists(path: String) -> Bool","params":[{"name":"path","ty":"String"}],"return_type":"Bool","doc":"Check whether a path exists","origin":"crates/core/src/stdlib.rs"},{"name":"filter","signature":"fn filter(array: Array, fn: Function) -> Array","params":[{"name":"array","ty":"Array"},{"name":"fn","ty":"Function"}],"return_type":"Array","doc":"Filter array","origin":"crates/core/src/stdlib.rs"},{"name":"find_substring_from","signature":"fn find_substring_from(s: String, needle: String, start: Int) -> Int","params":[{"name":"s","ty":"String"},{"name":"needle","ty":"String"},{"name":"start","ty":"Int"}],"return_type":"Int","doc":"Find the first substring occurrence at or after a byte offset","origin":"crates/core/src/stdlib.rs"},{"name":"floor","signature":"fn floor(x: Float) -> Int","params":[{"name":"x","ty":"Float"}],"return_type":"Int","doc":"Floor","origin":"crates/core/src/stdlib.rs"},{"name":"fs_append_bytes","signature":"fn fs_append_bytes(path: String, bytes: Array) -> Unit","params":[{"name":"path","ty":"String"},{"name":"bytes","ty":"Array"}],"return_type":"Unit","doc":"Append raw bytes to a file","origin":"crates/core/src/stdlib.rs"},{"name":"fs_append_text","signature":"fn fs_append_text(path: String, content: String) -> Unit","params":[{"name":"path","ty":"String"},{"name":"content","ty":"String"}],"return_type":"Unit","doc":"Append UTF-8 text to a file","origin":"crates/core/src/stdlib.rs"},{"name":"fs_atomic_write_bytes","signature":"fn fs_atomic_write_bytes(path: String, bytes: Array) -> Unit","params":[{"name":"path","ty":"String"},{"name":"bytes","ty":"Array"}],"return_type":"Unit","doc":"Write raw bytes through an atomic sibling temp path","origin":"crates/core/src/stdlib.rs"},{"name":"fs_atomic_write_text","signature":"fn fs_atomic_write_text(path: String, content: String) -> Unit","params":[{"name":"path","ty":"String"},{"name":"content","ty":"String"}],"return_type":"Unit","doc":"Write UTF-8 text through an atomic sibling temp path","origin":"crates/core/src/stdlib.rs"},{"name":"fs_capability_describe","signature":"fn fs_capability_describe() -> String","params":[],"return_type":"String","doc":"Describe current filesystem sandbox mounts and grants","origin":"crates/core/src/stdlib.rs"},{"name":"fs_capability_grant","signature":"fn fs_capability_grant(capability: String) -> Unit","params":[{"name":"capability","ty":"String"}],"return_type":"Unit","doc":"Mutate the current filesystem capability set","origin":"crates/core/src/stdlib.rs"},{"name":"fs_capability_has","signature":"fn fs_capability_has(capability: String) -> Bool","params":[{"name":"capability","ty":"String"}],"return_type":"Bool","doc":"Check whether a filesystem capability is granted","origin":"crates/core/src/stdlib.rs"},{"name":"fs_capability_revoke","signature":"fn fs_capability_revoke(capability: String) -> Unit","params":[{"name":"capability","ty":"String"}],"return_type":"Unit","doc":"Mutate the current filesystem capability set","origin":"crates/core/src/stdlib.rs"},{"name":"fs_copy_file","signature":"fn fs_copy_file(src: String, dest: String) -> Int","params":[{"name":"src","ty":"String"},{"name":"dest","ty":"String"}],"return_type":"Int","doc":"Copy one file","origin":"crates/core/src/stdlib.rs"},{"name":"fs_copy_file_streaming","signature":"fn fs_copy_file_streaming(src: String, dest: String, chunk_size: Int) -> Int","params":[{"name":"src","ty":"String"},{"name":"dest","ty":"String"},{"name":"chunk_size","ty":"Int"}],"return_type":"Int","doc":"Copy a file through a bounded streaming buffer","origin":"crates/core/src/stdlib.rs"},{"name":"fs_copy_path","signature":"fn fs_copy_path(src: String, dest: String) -> Unit","params":[{"name":"src","ty":"String"},{"name":"dest","ty":"String"}],"return_type":"Unit","doc":"Copy a file or directory tree","origin":"crates/core/src/stdlib.rs"},{"name":"fs_create_dir","signature":"fn fs_create_dir(path: String) -> Unit","params":[{"name":"path","ty":"String"}],"return_type":"Unit","doc":"Create one directory","origin":"crates/core/src/stdlib.rs"},{"name":"fs_create_dir_all","signature":"fn fs_create_dir_all(path: String) -> Unit","params":[{"name":"path","ty":"String"}],"return_type":"Unit","doc":"Create a directory and any missing parents","origin":"crates/core/src/stdlib.rs"},{"name":"fs_exists","signature":"fn fs_exists(path: String) -> Bool","params":[{"name":"path","ty":"String"}],"return_type":"Bool","doc":"Check whether a path exists","origin":"crates/core/src/stdlib.rs"},{"name":"fs_glob","signature":"fn fs_glob(path: String) -> Array","params":[{"name":"path","ty":"String"}],"return_type":"Array","doc":"Expand a glob pattern into sorted paths","origin":"crates/core/src/stdlib.rs"},{"name":"fs_hash_file","signature":"fn fs_hash_file(path: String) -> String","params":[{"name":"path","ty":"String"}],"return_type":"String","doc":"Compute a SHA-256 hash for a file","origin":"crates/core/src/stdlib.rs"},{"name":"fs_is_dir","signature":"fn fs_is_dir(path: String) -> Bool","params":[{"name":"path","ty":"String"}],"return_type":"Bool","doc":"Check whether a path is a directory","origin":"crates/core/src/stdlib.rs"},{"name":"fs_is_file","signature":"fn fs_is_file(path: String) -> Bool","params":[{"name":"path","ty":"String"}],"return_type":"Bool","doc":"Check whether a path is a file","origin":"crates/core/src/stdlib.rs"},{"name":"fs_is_symlink","signature":"fn fs_is_symlink(path: String) -> Bool","params":[{"name":"path","ty":"String"}],"return_type":"Bool","doc":"Check whether a path is a symlink","origin":"crates/core/src/stdlib.rs"},{"name":"fs_metadata","signature":"fn fs_metadata(path: String) -> FsMetadata","params":[{"name":"path","ty":"String"}],"return_type":"FsMetadata","doc":"Read typed metadata for a path","origin":"crates/core/src/stdlib.rs"},{"name":"fs_metadata_text","signature":"fn fs_metadata_text(path: String) -> String","params":[{"name":"path","ty":"String"}],"return_type":"String","doc":"Read native metadata as stable key-value text","origin":"crates/core/src/stdlib.rs"},{"name":"fs_mount","signature":"fn fs_mount(key: String, root: String, mode: String) -> Unit","params":[{"name":"key","ty":"String"},{"name":"root","ty":"String"},{"name":"mode","ty":"String"}],"return_type":"Unit","doc":"Mount a host path under an fs:// virtual root","origin":"crates/core/src/stdlib.rs"},{"name":"fs_move_path","signature":"fn fs_move_path(src: String, dest: String) -> Unit","params":[{"name":"src","ty":"String"},{"name":"dest","ty":"String"}],"return_type":"Unit","doc":"Move or rename a path","origin":"crates/core/src/stdlib.rs"},{"name":"fs_path_absolute","signature":"fn fs_path_absolute(path: String) -> String","params":[{"name":"path","ty":"String"}],"return_type":"String","doc":"Return an absolute normalized path","origin":"crates/core/src/stdlib.rs"},{"name":"fs_path_canonicalize","signature":"fn fs_path_canonicalize(path: String) -> String","params":[{"name":"path","ty":"String"}],"return_type":"String","doc":"Return the filesystem canonical path","origin":"crates/core/src/stdlib.rs"},{"name":"fs_path_extension","signature":"fn fs_path_extension(path: String) -> String","params":[{"name":"path","ty":"String"}],"return_type":"String","doc":"Return the path extension or empty string","origin":"crates/core/src/stdlib.rs"},{"name":"fs_path_file_name","signature":"fn fs_path_file_name(path: String) -> String","params":[{"name":"path","ty":"String"}],"return_type":"String","doc":"Return the final path component or empty string","origin":"crates/core/src/stdlib.rs"},{"name":"fs_path_join","signature":"fn fs_path_join(src: String, dest: String) -> String","params":[{"name":"src","ty":"String"},{"name":"dest","ty":"String"}],"return_type":"String","doc":"Join two path segments","origin":"crates/core/src/stdlib.rs"},{"name":"fs_path_normalize","signature":"fn fs_path_normalize(path: String) -> String","params":[{"name":"path","ty":"String"}],"return_type":"String","doc":"Normalize a path lexically","origin":"crates/core/src/stdlib.rs"},{"name":"fs_path_parent","signature":"fn fs_path_parent(path: String) -> String","params":[{"name":"path","ty":"String"}],"return_type":"String","doc":"Return the parent directory path or empty string","origin":"crates/core/src/stdlib.rs"},{"name":"fs_path_stem","signature":"fn fs_path_stem(path: String) -> String","params":[{"name":"path","ty":"String"}],"return_type":"String","doc":"Return the path stem or empty string","origin":"crates/core/src/stdlib.rs"},{"name":"fs_read_byte_range_hex","signature":"fn fs_read_byte_range_hex(path: String, offset: Int, length: Int) -> String","params":[{"name":"path","ty":"String"},{"name":"offset","ty":"Int"},{"name":"length","ty":"Int"}],"return_type":"String","doc":"Read a file byte range as lowercase hex","origin":"crates/core/src/stdlib.rs"},{"name":"fs_read_bytes","signature":"fn fs_read_bytes(path: String) -> Array","params":[{"name":"path","ty":"String"}],"return_type":"Array","doc":"Read raw bytes from a file","origin":"crates/core/src/stdlib.rs"},{"name":"fs_read_bytes_hex","signature":"fn fs_read_bytes_hex(path: String) -> String","params":[{"name":"path","ty":"String"}],"return_type":"String","doc":"Read raw file bytes as a lowercase hex string","origin":"crates/core/src/stdlib.rs"},{"name":"fs_read_bytes_range","signature":"fn fs_read_bytes_range(path: String, offset: Int, length: Int) -> Array","params":[{"name":"path","ty":"String"},{"name":"offset","ty":"Int"},{"name":"length","ty":"Int"}],"return_type":"Array","doc":"Read a byte range from a file","origin":"crates/core/src/stdlib.rs"},{"name":"fs_read_dir","signature":"fn fs_read_dir(path: String) -> Array","params":[{"name":"path","ty":"String"}],"return_type":"Array","doc":"Read direct directory entries as FsDirEntry values","origin":"crates/core/src/stdlib.rs"},{"name":"fs_read_dir_paths","signature":"fn fs_read_dir_paths(path: String) -> Array","params":[{"name":"path","ty":"String"}],"return_type":"Array","doc":"Read direct directory entries as sorted paths","origin":"crates/core/src/stdlib.rs"},{"name":"fs_read_dir_paths_text","signature":"fn fs_read_dir_paths_text(path: String) -> String","params":[{"name":"path","ty":"String"}],"return_type":"String","doc":"Read direct directory paths as newline-delimited text","origin":"crates/core/src/stdlib.rs"},{"name":"fs_read_text","signature":"fn fs_read_text(path: String) -> String","params":[{"name":"path","ty":"String"}],"return_type":"String","doc":"Read UTF-8 text from a file","origin":"crates/core/src/stdlib.rs"},{"name":"fs_read_text_range","signature":"fn fs_read_text_range(path: String, offset: Int, length: Int) -> String","params":[{"name":"path","ty":"String"},{"name":"offset","ty":"Int"},{"name":"length","ty":"Int"}],"return_type":"String","doc":"Read a UTF-8 byte range from a file","origin":"crates/core/src/stdlib.rs"},{"name":"fs_remove_dir","signature":"fn fs_remove_dir(path: String) -> Unit","params":[{"name":"path","ty":"String"}],"return_type":"Unit","doc":"Remove an empty directory","origin":"crates/core/src/stdlib.rs"},{"name":"fs_remove_dir_all","signature":"fn fs_remove_dir_all(path: String) -> Unit","params":[{"name":"path","ty":"String"}],"return_type":"Unit","doc":"Remove a directory tree","origin":"crates/core/src/stdlib.rs"},{"name":"fs_remove_file","signature":"fn fs_remove_file(path: String) -> Unit","params":[{"name":"path","ty":"String"}],"return_type":"Unit","doc":"Remove a file","origin":"crates/core/src/stdlib.rs"},{"name":"fs_remove_path","signature":"fn fs_remove_path(path: String) -> Unit","params":[{"name":"path","ty":"String"}],"return_type":"Unit","doc":"Remove a file or directory tree if it exists","origin":"crates/core/src/stdlib.rs"},{"name":"fs_resolve","signature":"fn fs_resolve(path: String) -> String","params":[{"name":"path","ty":"String"}],"return_type":"String","doc":"Resolve a virtual or host path through the filesystem sandbox","origin":"crates/core/src/stdlib.rs"},{"name":"fs_sandbox_allow_host_paths","signature":"fn fs_sandbox_allow_host_paths(allow: Bool) -> Unit","params":[{"name":"allow","ty":"Bool"}],"return_type":"Unit","doc":"Allow or deny direct host paths outside virtual roots","origin":"crates/core/src/stdlib.rs"},{"name":"fs_stream_chunks","signature":"fn fs_stream_chunks(path: String, chunk_size: Int) -> Array","params":[{"name":"path","ty":"String"},{"name":"chunk_size","ty":"Int"}],"return_type":"Array","doc":"Read a file as deterministic byte chunks","origin":"crates/core/src/stdlib.rs"},{"name":"fs_symlink_metadata","signature":"fn fs_symlink_metadata(path: String) -> FsMetadata","params":[{"name":"path","ty":"String"}],"return_type":"FsMetadata","doc":"Read symlink-aware metadata for a path","origin":"crates/core/src/stdlib.rs"},{"name":"fs_temp_dir","signature":"fn fs_temp_dir(path: String) -> String","params":[{"name":"path","ty":"String"}],"return_type":"String","doc":"Create a temp directory and return its path","origin":"crates/core/src/stdlib.rs"},{"name":"fs_temp_file","signature":"fn fs_temp_file(path: String) -> String","params":[{"name":"path","ty":"String"}],"return_type":"String","doc":"Create a temp file and return its path","origin":"crates/core/src/stdlib.rs"},{"name":"fs_try_append_bytes","signature":"fn fs_try_append_bytes(path: String, bytes: Array) -> Any","params":[{"name":"path","ty":"String"},{"name":"bytes","ty":"Array"}],"return_type":"Any","doc":"Append raw bytes as Result","origin":"crates/core/src/stdlib.rs"},{"name":"fs_try_append_text","signature":"fn fs_try_append_text(path: String, content: String) -> Any","params":[{"name":"path","ty":"String"},{"name":"content","ty":"String"}],"return_type":"Any","doc":"Append UTF-8 text as Result","origin":"crates/core/src/stdlib.rs"},{"name":"fs_try_atomic_write_text","signature":"fn fs_try_atomic_write_text(path: String, content: String) -> Any","params":[{"name":"path","ty":"String"},{"name":"content","ty":"String"}],"return_type":"Any","doc":"Atomic text write as Result","origin":"crates/core/src/stdlib.rs"},{"name":"fs_try_copy_file","signature":"fn fs_try_copy_file(src: String, dest: String) -> Any","params":[{"name":"src","ty":"String"},{"name":"dest","ty":"String"}],"return_type":"Any","doc":"Copy one file as Result","origin":"crates/core/src/stdlib.rs"},{"name":"fs_try_copy_path","signature":"fn fs_try_copy_path(src: String, dest: String) -> Any","params":[{"name":"src","ty":"String"},{"name":"dest","ty":"String"}],"return_type":"Any","doc":"Copy a path as Result","origin":"crates/core/src/stdlib.rs"},{"name":"fs_try_create_dir","signature":"fn fs_try_create_dir(path: String) -> Any","params":[{"name":"path","ty":"String"}],"return_type":"Any","doc":"Create one directory as Result","origin":"crates/core/src/stdlib.rs"},{"name":"fs_try_create_dir_all","signature":"fn fs_try_create_dir_all(path: String) -> Any","params":[{"name":"path","ty":"String"}],"return_type":"Any","doc":"Create missing parent directories as Result","origin":"crates/core/src/stdlib.rs"},{"name":"fs_try_glob","signature":"fn fs_try_glob(path: String) -> Any","params":[{"name":"path","ty":"String"}],"return_type":"Any","doc":"Expand a glob pattern as Result, FsError>","origin":"crates/core/src/stdlib.rs"},{"name":"fs_try_hash_file","signature":"fn fs_try_hash_file(path: String) -> Any","params":[{"name":"path","ty":"String"}],"return_type":"Any","doc":"Compute a SHA-256 hash as Result","origin":"crates/core/src/stdlib.rs"},{"name":"fs_try_metadata","signature":"fn fs_try_metadata(path: String) -> Any","params":[{"name":"path","ty":"String"}],"return_type":"Any","doc":"Read typed metadata as Result","origin":"crates/core/src/stdlib.rs"},{"name":"fs_try_move_path","signature":"fn fs_try_move_path(src: String, dest: String) -> Any","params":[{"name":"src","ty":"String"},{"name":"dest","ty":"String"}],"return_type":"Any","doc":"Move or rename a path as Result","origin":"crates/core/src/stdlib.rs"},{"name":"fs_try_read_bytes","signature":"fn fs_try_read_bytes(path: String) -> Any","params":[{"name":"path","ty":"String"}],"return_type":"Any","doc":"Read raw bytes from a file as Result, FsError>","origin":"crates/core/src/stdlib.rs"},{"name":"fs_try_read_dir","signature":"fn fs_try_read_dir(path: String) -> Any","params":[{"name":"path","ty":"String"}],"return_type":"Any","doc":"Read direct directory entries as Result, FsError>","origin":"crates/core/src/stdlib.rs"},{"name":"fs_try_read_dir_paths","signature":"fn fs_try_read_dir_paths(path: String) -> Any","params":[{"name":"path","ty":"String"}],"return_type":"Any","doc":"Read direct directory paths as Result, FsError>","origin":"crates/core/src/stdlib.rs"},{"name":"fs_try_read_text","signature":"fn fs_try_read_text(path: String) -> Any","params":[{"name":"path","ty":"String"}],"return_type":"Any","doc":"Read UTF-8 text from a file as Result","origin":"crates/core/src/stdlib.rs"},{"name":"fs_try_remove_dir","signature":"fn fs_try_remove_dir(path: String) -> Any","params":[{"name":"path","ty":"String"}],"return_type":"Any","doc":"Remove an empty directory as Result","origin":"crates/core/src/stdlib.rs"},{"name":"fs_try_remove_dir_all","signature":"fn fs_try_remove_dir_all(path: String) -> Any","params":[{"name":"path","ty":"String"}],"return_type":"Any","doc":"Remove a directory tree as Result","origin":"crates/core/src/stdlib.rs"},{"name":"fs_try_remove_file","signature":"fn fs_try_remove_file(path: String) -> Any","params":[{"name":"path","ty":"String"}],"return_type":"Any","doc":"Remove a file as Result","origin":"crates/core/src/stdlib.rs"},{"name":"fs_try_remove_path","signature":"fn fs_try_remove_path(path: String) -> Any","params":[{"name":"path","ty":"String"}],"return_type":"Any","doc":"Remove a path as Result","origin":"crates/core/src/stdlib.rs"},{"name":"fs_try_symlink_metadata","signature":"fn fs_try_symlink_metadata(path: String) -> Any","params":[{"name":"path","ty":"String"}],"return_type":"Any","doc":"Read symlink-aware metadata as Result","origin":"crates/core/src/stdlib.rs"},{"name":"fs_try_walk","signature":"fn fs_try_walk(path: String) -> Any","params":[{"name":"path","ty":"String"}],"return_type":"Any","doc":"Recursively walk a directory as Result, FsError>","origin":"crates/core/src/stdlib.rs"},{"name":"fs_try_write_bytes","signature":"fn fs_try_write_bytes(path: String, bytes: Array) -> Any","params":[{"name":"path","ty":"String"},{"name":"bytes","ty":"Array"}],"return_type":"Any","doc":"Write raw bytes as Result","origin":"crates/core/src/stdlib.rs"},{"name":"fs_try_write_text","signature":"fn fs_try_write_text(path: String, content: String) -> Any","params":[{"name":"path","ty":"String"},{"name":"content","ty":"String"}],"return_type":"Any","doc":"Write UTF-8 text as Result","origin":"crates/core/src/stdlib.rs"},{"name":"fs_tx_append_text","signature":"fn fs_tx_append_text(transaction_id: Int, path: String, content: String) -> Unit","params":[{"name":"transaction_id","ty":"Int"},{"name":"path","ty":"String"},{"name":"content","ty":"String"}],"return_type":"Unit","doc":"Queue a transactional text operation","origin":"crates/core/src/stdlib.rs"},{"name":"fs_tx_begin","signature":"fn fs_tx_begin() -> Int","params":[],"return_type":"Int","doc":"Begin a filesystem transaction","origin":"crates/core/src/stdlib.rs"},{"name":"fs_tx_commit","signature":"fn fs_tx_commit(transaction_id: Int) -> Array","params":[{"name":"transaction_id","ty":"Int"}],"return_type":"Array","doc":"Finish a filesystem transaction and return its journal","origin":"crates/core/src/stdlib.rs"},{"name":"fs_tx_copy_path","signature":"fn fs_tx_copy_path(transaction_id: Int, src: String, dest: String) -> Unit","params":[{"name":"transaction_id","ty":"Int"},{"name":"src","ty":"String"},{"name":"dest","ty":"String"}],"return_type":"Unit","doc":"Queue a transactional two-path operation","origin":"crates/core/src/stdlib.rs"},{"name":"fs_tx_move_path","signature":"fn fs_tx_move_path(transaction_id: Int, src: String, dest: String) -> Unit","params":[{"name":"transaction_id","ty":"Int"},{"name":"src","ty":"String"},{"name":"dest","ty":"String"}],"return_type":"Unit","doc":"Queue a transactional two-path operation","origin":"crates/core/src/stdlib.rs"},{"name":"fs_tx_remove_path","signature":"fn fs_tx_remove_path(transaction_id: Int, path: String) -> Unit","params":[{"name":"transaction_id","ty":"Int"},{"name":"path","ty":"String"}],"return_type":"Unit","doc":"Queue a transactional path removal","origin":"crates/core/src/stdlib.rs"},{"name":"fs_tx_rollback","signature":"fn fs_tx_rollback(transaction_id: Int) -> Array","params":[{"name":"transaction_id","ty":"Int"}],"return_type":"Array","doc":"Finish a filesystem transaction and return its journal","origin":"crates/core/src/stdlib.rs"},{"name":"fs_tx_write_text","signature":"fn fs_tx_write_text(transaction_id: Int, path: String, content: String) -> Unit","params":[{"name":"transaction_id","ty":"Int"},{"name":"path","ty":"String"},{"name":"content","ty":"String"}],"return_type":"Unit","doc":"Queue a transactional text operation","origin":"crates/core/src/stdlib.rs"},{"name":"fs_unmount","signature":"fn fs_unmount(key: String) -> Bool","params":[{"name":"key","ty":"String"}],"return_type":"Bool","doc":"Unmount an fs:// virtual root","origin":"crates/core/src/stdlib.rs"},{"name":"fs_walk","signature":"fn fs_walk(path: String) -> Array","params":[{"name":"path","ty":"String"}],"return_type":"Array","doc":"Recursively walk a directory as FsDirEntry values","origin":"crates/core/src/stdlib.rs"},{"name":"fs_walk_paths_text","signature":"fn fs_walk_paths_text(path: String) -> String","params":[{"name":"path","ty":"String"}],"return_type":"String","doc":"Walk directory paths as newline-delimited text","origin":"crates/core/src/stdlib.rs"},{"name":"fs_watch","signature":"fn fs_watch(path: String, recursive: Bool) -> Int","params":[{"name":"path","ty":"String"},{"name":"recursive","ty":"Bool"}],"return_type":"Int","doc":"Create a polling filesystem watcher and return its ID","origin":"crates/core/src/stdlib.rs"},{"name":"fs_watch_close","signature":"fn fs_watch_close(watcher_id: Int) -> Bool","params":[{"name":"watcher_id","ty":"Int"}],"return_type":"Bool","doc":"Close a filesystem watcher","origin":"crates/core/src/stdlib.rs"},{"name":"fs_watch_poll","signature":"fn fs_watch_poll(watcher_id: Int) -> Array","params":[{"name":"watcher_id","ty":"Int"}],"return_type":"Array","doc":"Poll a filesystem watcher for create/modify/delete events","origin":"crates/core/src/stdlib.rs"},{"name":"fs_write_bytes","signature":"fn fs_write_bytes(path: String, bytes: Array) -> Unit","params":[{"name":"path","ty":"String"},{"name":"bytes","ty":"Array"}],"return_type":"Unit","doc":"Write raw bytes to a file","origin":"crates/core/src/stdlib.rs"},{"name":"fs_write_bytes_at","signature":"fn fs_write_bytes_at(path: String, offset: Int, bytes: Array) -> Unit","params":[{"name":"path","ty":"String"},{"name":"offset","ty":"Int"},{"name":"bytes","ty":"Array"}],"return_type":"Unit","doc":"Write bytes at a byte offset","origin":"crates/core/src/stdlib.rs"},{"name":"fs_write_bytes_hex","signature":"fn fs_write_bytes_hex(path: String, hex: String) -> Unit","params":[{"name":"path","ty":"String"},{"name":"hex","ty":"String"}],"return_type":"Unit","doc":"Write lowercase hex-encoded bytes to a file","origin":"crates/core/src/stdlib.rs"},{"name":"fs_write_bytes_hex_at","signature":"fn fs_write_bytes_hex_at(path: String, offset: Int, hex: String) -> Unit","params":[{"name":"path","ty":"String"},{"name":"offset","ty":"Int"},{"name":"hex","ty":"String"}],"return_type":"Unit","doc":"Write lowercase hex-encoded bytes at a byte offset","origin":"crates/core/src/stdlib.rs"},{"name":"fs_write_text","signature":"fn fs_write_text(path: String, content: String) -> Unit","params":[{"name":"path","ty":"String"},{"name":"content","ty":"String"}],"return_type":"Unit","doc":"Write UTF-8 text to a file","origin":"crates/core/src/stdlib.rs"},{"name":"fs_write_text_at","signature":"fn fs_write_text_at(path: String, offset: Int, content: String) -> Unit","params":[{"name":"path","ty":"String"},{"name":"offset","ty":"Int"},{"name":"content","ty":"String"}],"return_type":"Unit","doc":"Write UTF-8 text at a byte offset","origin":"crates/core/src/stdlib.rs"},{"name":"input_action_down","signature":"fn input_action_down(session_id: Int, action: String) -> Int","params":[{"name":"session_id","ty":"Int"},{"name":"action","ty":"String"}],"return_type":"Int","doc":"Return 1 when an action is held after this frame","origin":"crates/core/src/stdlib.rs"},{"name":"input_action_pressed","signature":"fn input_action_pressed(session_id: Int, action: String) -> Int","params":[{"name":"session_id","ty":"Int"},{"name":"action","ty":"String"}],"return_type":"Int","doc":"Return 1 when an action was pressed this frame","origin":"crates/core/src/stdlib.rs"},{"name":"input_action_released","signature":"fn input_action_released(session_id: Int, action: String) -> Int","params":[{"name":"session_id","ty":"Int"},{"name":"action","ty":"String"}],"return_type":"Int","doc":"Return 1 when an action was released this frame","origin":"crates/core/src/stdlib.rs"},{"name":"input_axis_value","signature":"fn input_axis_value(session_id: Int, axis: String) -> Float","params":[{"name":"session_id","ty":"Int"},{"name":"axis","ty":"String"}],"return_type":"Float","doc":"Read a reduced frame-local axis value","origin":"crates/core/src/stdlib.rs"},{"name":"input_begin_frame","signature":"fn input_begin_frame(session_id: Int, delta_ms: Float) -> Int","params":[{"name":"session_id","ty":"Int"},{"name":"delta_ms","ty":"Float"}],"return_type":"Int","doc":"Reduce queued input events into the next frame","origin":"crates/core/src/stdlib.rs"},{"name":"input_bind_action","signature":"fn input_bind_action(session_id: Int, source_kind: String, event_kind: String, code: String, action: String) -> Int","params":[{"name":"session_id","ty":"Int"},{"name":"source_kind","ty":"String"},{"name":"event_kind","ty":"String"},{"name":"code","ty":"String"},{"name":"action","ty":"String"}],"return_type":"Int","doc":"Bind a source event to a semantic action","origin":"crates/core/src/stdlib.rs"},{"name":"input_bind_axis","signature":"fn input_bind_axis(session_id: Int, source_kind: String, event_kind: String, code: String, axis: String, scale: Float) -> Int","params":[{"name":"session_id","ty":"Int"},{"name":"source_kind","ty":"String"},{"name":"event_kind","ty":"String"},{"name":"code","ty":"String"},{"name":"axis","ty":"String"},{"name":"scale","ty":"Float"}],"return_type":"Int","doc":"Bind a source event to a semantic axis","origin":"crates/core/src/stdlib.rs"},{"name":"input_push_agent_intent","signature":"fn input_push_agent_intent(session_id: Int, source_id: String, action: String, command_text: String, confidence: Float) -> Int","params":[{"name":"session_id","ty":"Int"},{"name":"source_id","ty":"String"},{"name":"action","ty":"String"},{"name":"command_text","ty":"String"},{"name":"confidence","ty":"Float"}],"return_type":"Int","doc":"Push a first-class agent intent as a momentary action","origin":"crates/core/src/stdlib.rs"},{"name":"input_push_event","signature":"fn input_push_event(session_id: Int, source_kind: String, source_id: String, event_kind: String, code: String, value: Float, text: String, confidence: Float) -> Int","params":[{"name":"session_id","ty":"Int"},{"name":"source_kind","ty":"String"},{"name":"source_id","ty":"String"},{"name":"event_kind","ty":"String"},{"name":"code","ty":"String"},{"name":"value","ty":"Float"},{"name":"text","ty":"String"},{"name":"confidence","ty":"Float"}],"return_type":"Int","doc":"Push a typed input event into a session","origin":"crates/core/src/stdlib.rs"},{"name":"input_reset","signature":"fn input_reset() -> Int","params":[],"return_type":"Int","doc":"Reset interpreter input sessions","origin":"crates/core/src/stdlib.rs"},{"name":"input_session_create","signature":"fn input_session_create(name: String) -> Int","params":[{"name":"name","ty":"String"}],"return_type":"Int","doc":"Create a typed input session","origin":"crates/core/src/stdlib.rs"},{"name":"input_trace_json","signature":"fn input_trace_json(session_id: Int) -> String","params":[{"name":"session_id","ty":"Int"}],"return_type":"String","doc":"Serialize the session input trace","origin":"crates/core/src/stdlib.rs"},{"name":"join","signature":"fn join(arr: Array, sep: String) -> String","params":[{"name":"arr","ty":"Array"},{"name":"sep","ty":"String"}],"return_type":"String","doc":"Join array to string","origin":"crates/core/src/stdlib.rs"},{"name":"json_any_kind","signature":"fn json_any_kind(value: Any) -> Int","params":[{"name":"value","ty":"Any"}],"return_type":"Int","doc":"Return the native JSON kind tag for a runtime JSON value","origin":"crates/core/src/stdlib.rs"},{"name":"json_any_to_float","signature":"fn json_any_to_float(value: Any) -> Float","params":[{"name":"value","ty":"Any"}],"return_type":"Float","doc":"Coerce a runtime JSON value to a float using native JSON rules","origin":"crates/core/src/stdlib.rs"},{"name":"json_any_to_int","signature":"fn json_any_to_int(value: Any) -> Int","params":[{"name":"value","ty":"Any"}],"return_type":"Int","doc":"Coerce a runtime JSON value to an integer using native JSON rules","origin":"crates/core/src/stdlib.rs"},{"name":"json_any_to_string","signature":"fn json_any_to_string(value: Any) -> String","params":[{"name":"value","ty":"Any"}],"return_type":"String","doc":"Coerce a runtime JSON value to a string using native JSON rules","origin":"crates/core/src/stdlib.rs"},{"name":"json_array_get","signature":"fn json_array_get(array: Any, index: Int) -> Any","params":[{"name":"array","ty":"Any"},{"name":"index","ty":"Int"}],"return_type":"Any","doc":"Read one element from a JSON array","origin":"crates/core/src/stdlib.rs"},{"name":"json_array_len","signature":"fn json_array_len(array: Any) -> Int","params":[{"name":"array","ty":"Any"}],"return_type":"Int","doc":"Return the number of items in a JSON array","origin":"crates/core/src/stdlib.rs"},{"name":"json_array_new","signature":"fn json_array_new() -> Array","params":[],"return_type":"Array","doc":"Create a new mutable JSON array","origin":"crates/core/src/stdlib.rs"},{"name":"json_array_push","signature":"fn json_array_push(array: Any, value: Any) -> Unit","params":[{"name":"array","ty":"Any"},{"name":"value","ty":"Any"}],"return_type":"Unit","doc":"Append a value to a mutable JSON array","origin":"crates/core/src/stdlib.rs"},{"name":"json_get","signature":"fn json_get(object: Any, key: String) -> Any","params":[{"name":"object","ty":"Any"},{"name":"key","ty":"String"}],"return_type":"Any","doc":"Read a field from a JSON object, returning null-like None when missing","origin":"crates/core/src/stdlib.rs"},{"name":"json_get_bool","signature":"fn json_get_bool(object: Any, key: String) -> Bool","params":[{"name":"object","ty":"Any"},{"name":"key","ty":"String"}],"return_type":"Bool","doc":"Read a required boolean field from a JSON object","origin":"crates/core/src/stdlib.rs"},{"name":"json_get_float","signature":"fn json_get_float(object: Any, key: String) -> Float","params":[{"name":"object","ty":"Any"},{"name":"key","ty":"String"}],"return_type":"Float","doc":"Read a required floating-point field from a JSON object","origin":"crates/core/src/stdlib.rs"},{"name":"json_get_int","signature":"fn json_get_int(object: Any, key: String) -> Int","params":[{"name":"object","ty":"Any"},{"name":"key","ty":"String"}],"return_type":"Int","doc":"Read a required integer field from a JSON object","origin":"crates/core/src/stdlib.rs"},{"name":"json_get_string","signature":"fn json_get_string(object: Any, key: String) -> String","params":[{"name":"object","ty":"Any"},{"name":"key","ty":"String"}],"return_type":"String","doc":"Read a required string field from a JSON object","origin":"crates/core/src/stdlib.rs"},{"name":"json_has","signature":"fn json_has(object: Any, key: String) -> Bool","params":[{"name":"object","ty":"Any"},{"name":"key","ty":"String"}],"return_type":"Bool","doc":"Check whether a JSON object contains a field","origin":"crates/core/src/stdlib.rs"},{"name":"json_object_new","signature":"fn json_object_new() -> Any","params":[],"return_type":"Any","doc":"Create a new mutable JSON object","origin":"crates/core/src/stdlib.rs"},{"name":"json_object_set","signature":"fn json_object_set(object: Any, key: String, value: Any) -> Unit","params":[{"name":"object","ty":"Any"},{"name":"key","ty":"String"},{"name":"value","ty":"Any"}],"return_type":"Unit","doc":"Set a field on a mutable JSON object","origin":"crates/core/src/stdlib.rs"},{"name":"json_parse","signature":"fn json_parse(text: String) -> Any","params":[{"name":"text","ty":"String"}],"return_type":"Any","doc":"Parse JSON text","origin":"crates/core/src/stdlib.rs"},{"name":"json_string","signature":"fn json_string(value: Any) -> String","params":[{"name":"value","ty":"Any"}],"return_type":"String","doc":"Serialize a KAIN value into JSON text","origin":"crates/core/src/stdlib.rs"},{"name":"kain_input_action_down","signature":"fn kain_input_action_down(session_id: Int, action: String) -> Int","params":[{"name":"session_id","ty":"Int"},{"name":"action","ty":"String"}],"return_type":"Int","doc":"Bridge: query down action","origin":"crates/core/src/stdlib.rs"},{"name":"kain_input_action_pressed","signature":"fn kain_input_action_pressed(session_id: Int, action: String) -> Int","params":[{"name":"session_id","ty":"Int"},{"name":"action","ty":"String"}],"return_type":"Int","doc":"Bridge: query pressed action","origin":"crates/core/src/stdlib.rs"},{"name":"kain_input_action_released","signature":"fn kain_input_action_released(session_id: Int, action: String) -> Int","params":[{"name":"session_id","ty":"Int"},{"name":"action","ty":"String"}],"return_type":"Int","doc":"Bridge: query released action","origin":"crates/core/src/stdlib.rs"},{"name":"kain_input_axis_value","signature":"fn kain_input_axis_value(session_id: Int, axis: String) -> Float","params":[{"name":"session_id","ty":"Int"},{"name":"axis","ty":"String"}],"return_type":"Float","doc":"Bridge: query axis value","origin":"crates/core/src/stdlib.rs"},{"name":"kain_input_begin_frame","signature":"fn kain_input_begin_frame(session_id: Int, delta_ms: Float) -> Int","params":[{"name":"session_id","ty":"Int"},{"name":"delta_ms","ty":"Float"}],"return_type":"Int","doc":"Bridge: reduce input frame","origin":"crates/core/src/stdlib.rs"},{"name":"kain_input_bind_action","signature":"fn kain_input_bind_action(session_id: Int, source_kind: String, event_kind: String, code: String, action: String) -> Int","params":[{"name":"session_id","ty":"Int"},{"name":"source_kind","ty":"String"},{"name":"event_kind","ty":"String"},{"name":"code","ty":"String"},{"name":"action","ty":"String"}],"return_type":"Int","doc":"Bridge: bind input action","origin":"crates/core/src/stdlib.rs"},{"name":"kain_input_bind_axis","signature":"fn kain_input_bind_axis(session_id: Int, source_kind: String, event_kind: String, code: String, axis: String, scale: Float) -> Int","params":[{"name":"session_id","ty":"Int"},{"name":"source_kind","ty":"String"},{"name":"event_kind","ty":"String"},{"name":"code","ty":"String"},{"name":"axis","ty":"String"},{"name":"scale","ty":"Float"}],"return_type":"Int","doc":"Bridge: bind input axis","origin":"crates/core/src/stdlib.rs"},{"name":"kain_input_event_action","signature":"fn kain_input_event_action(session_id: Int, index: Int) -> String","params":[{"name":"session_id","ty":"Int"},{"name":"index","ty":"Int"}],"return_type":"String","doc":"Bridge: inspect current input event action","origin":"crates/core/src/stdlib.rs"},{"name":"kain_input_event_code","signature":"fn kain_input_event_code(session_id: Int, index: Int) -> String","params":[{"name":"session_id","ty":"Int"},{"name":"index","ty":"Int"}],"return_type":"String","doc":"Bridge: inspect current input event code","origin":"crates/core/src/stdlib.rs"},{"name":"kain_input_event_count","signature":"fn kain_input_event_count(session_id: Int) -> Int","params":[{"name":"session_id","ty":"Int"}],"return_type":"Int","doc":"Bridge: query current input event count","origin":"crates/core/src/stdlib.rs"},{"name":"kain_input_event_kind","signature":"fn kain_input_event_kind(session_id: Int, index: Int) -> String","params":[{"name":"session_id","ty":"Int"},{"name":"index","ty":"Int"}],"return_type":"String","doc":"Bridge: inspect current input event kind","origin":"crates/core/src/stdlib.rs"},{"name":"kain_input_event_source_kind","signature":"fn kain_input_event_source_kind(session_id: Int, index: Int) -> String","params":[{"name":"session_id","ty":"Int"},{"name":"index","ty":"Int"}],"return_type":"String","doc":"Bridge: inspect current input event source","origin":"crates/core/src/stdlib.rs"},{"name":"kain_input_event_text","signature":"fn kain_input_event_text(session_id: Int, index: Int) -> String","params":[{"name":"session_id","ty":"Int"},{"name":"index","ty":"Int"}],"return_type":"String","doc":"Bridge: inspect current input event text","origin":"crates/core/src/stdlib.rs"},{"name":"kain_input_frame_index","signature":"fn kain_input_frame_index(session_id: Int) -> Int","params":[{"name":"session_id","ty":"Int"}],"return_type":"Int","doc":"Bridge: query current input frame index","origin":"crates/core/src/stdlib.rs"},{"name":"kain_input_push_agent_intent","signature":"fn kain_input_push_agent_intent(session_id: Int, source_id: String, action: String, command_text: String, confidence: Float) -> Int","params":[{"name":"session_id","ty":"Int"},{"name":"source_id","ty":"String"},{"name":"action","ty":"String"},{"name":"command_text","ty":"String"},{"name":"confidence","ty":"Float"}],"return_type":"Int","doc":"Bridge: push agent intent","origin":"crates/core/src/stdlib.rs"},{"name":"kain_input_push_event","signature":"fn kain_input_push_event(session_id: Int, source_kind: String, source_id: String, event_kind: String, code: String, value: Float, text: String, confidence: Float) -> Int","params":[{"name":"session_id","ty":"Int"},{"name":"source_kind","ty":"String"},{"name":"source_id","ty":"String"},{"name":"event_kind","ty":"String"},{"name":"code","ty":"String"},{"name":"value","ty":"Float"},{"name":"text","ty":"String"},{"name":"confidence","ty":"Float"}],"return_type":"Int","doc":"Bridge: push input event","origin":"crates/core/src/stdlib.rs"},{"name":"kain_input_replay_trace_json","signature":"fn kain_input_replay_trace_json(session_id: Int, trace_json: String) -> Int","params":[{"name":"session_id","ty":"Int"},{"name":"trace_json","ty":"String"}],"return_type":"Int","doc":"Bridge: replay input trace","origin":"crates/core/src/stdlib.rs"},{"name":"kain_input_reset","signature":"fn kain_input_reset() -> Int","params":[],"return_type":"Int","doc":"Bridge: reset interpreter input sessions","origin":"crates/core/src/stdlib.rs"},{"name":"kain_input_session_create","signature":"fn kain_input_session_create(name: String) -> Int","params":[{"name":"name","ty":"String"}],"return_type":"Int","doc":"Bridge: create an interpreter input session","origin":"crates/core/src/stdlib.rs"},{"name":"kain_input_session_destroy","signature":"fn kain_input_session_destroy(session_id: Int) -> Int","params":[{"name":"session_id","ty":"Int"}],"return_type":"Int","doc":"Bridge: destroy an interpreter input session","origin":"crates/core/src/stdlib.rs"},{"name":"kain_input_text_commit","signature":"fn kain_input_text_commit(session_id: Int, index: Int) -> String","params":[{"name":"session_id","ty":"Int"},{"name":"index","ty":"Int"}],"return_type":"String","doc":"Bridge: query text commit","origin":"crates/core/src/stdlib.rs"},{"name":"kain_input_text_commit_count","signature":"fn kain_input_text_commit_count(session_id: Int) -> Int","params":[{"name":"session_id","ty":"Int"}],"return_type":"Int","doc":"Bridge: query text commit count","origin":"crates/core/src/stdlib.rs"},{"name":"kain_input_trace_json","signature":"fn kain_input_trace_json(session_id: Int) -> String","params":[{"name":"session_id","ty":"Int"}],"return_type":"String","doc":"Bridge: serialize input trace","origin":"crates/core/src/stdlib.rs"},{"name":"len","signature":"fn len(collection: Any) -> Int","params":[{"name":"collection","ty":"Any"}],"return_type":"Int","doc":"Get length","origin":"crates/core/src/stdlib.rs"},{"name":"length","signature":"fn length(v: Vec3) -> Float","params":[{"name":"v","ty":"Vec3"}],"return_type":"Float","doc":"Vector length","origin":"crates/core/src/stdlib.rs"},{"name":"map","signature":"fn map(array: Array, fn: Function) -> Array","params":[{"name":"array","ty":"Array"},{"name":"fn","ty":"Function"}],"return_type":"Array","doc":"Map over array","origin":"crates/core/src/stdlib.rs"},{"name":"map_get","signature":"fn map_get(map: Any, key: String) -> Any","params":[{"name":"map","ty":"Any"},{"name":"key","ty":"String"}],"return_type":"Any","doc":"Get map value","origin":"crates/core/src/stdlib.rs"},{"name":"map_new","signature":"fn map_new() -> Any","params":[],"return_type":"Any","doc":"Create new map","origin":"crates/core/src/stdlib.rs"},{"name":"map_set","signature":"fn map_set(map: Any, key: String, value: Any) -> Unit","params":[{"name":"map","ty":"Any"},{"name":"key","ty":"String"},{"name":"value","ty":"Any"}],"return_type":"Unit","doc":"Set map key","origin":"crates/core/src/stdlib.rs"},{"name":"max","signature":"fn max(a: Int, b: Int) -> Int","params":[{"name":"a","ty":"Int"},{"name":"b","ty":"Int"}],"return_type":"Int","doc":"Maximum","origin":"crates/core/src/stdlib.rs"},{"name":"min","signature":"fn min(a: Int, b: Int) -> Int","params":[{"name":"a","ty":"Int"},{"name":"b","ty":"Int"}],"return_type":"Int","doc":"Minimum","origin":"crates/core/src/stdlib.rs"},{"name":"mix","signature":"fn mix(a: Float, b: Float, t: Float) -> Float","params":[{"name":"a","ty":"Float"},{"name":"b","ty":"Float"},{"name":"t","ty":"Float"}],"return_type":"Float","doc":"Linear interpolation","origin":"crates/core/src/stdlib.rs"},{"name":"mount","signature":"fn mount(component: Any, selector: String) -> Unit","params":[{"name":"component","ty":"Any"},{"name":"selector","ty":"String"}],"return_type":"Unit","doc":"Mount component to DOM","origin":"crates/core/src/stdlib.rs"},{"name":"native_config_flag","signature":"fn native_config_flag(key: String, enabled: Int) -> Unit","params":[{"name":"key","ty":"String"},{"name":"enabled","ty":"Int"}],"return_type":"Unit","doc":"Set a raw native runtime boolean-like config value before launch using 0 or 1","origin":"crates/core/src/stdlib.rs"},{"name":"native_config_float","signature":"fn native_config_float(key: String, value: Float) -> Unit","params":[{"name":"key","ty":"String"},{"name":"value","ty":"Float"}],"return_type":"Unit","doc":"Set a raw native runtime float config value before launch","origin":"crates/core/src/stdlib.rs"},{"name":"native_config_int","signature":"fn native_config_int(key: String, value: Int) -> Unit","params":[{"name":"key","ty":"String"},{"name":"value","ty":"Int"}],"return_type":"Unit","doc":"Set a raw native runtime integer config value before launch","origin":"crates/core/src/stdlib.rs"},{"name":"native_config_string","signature":"fn native_config_string(key: String, value: String) -> Unit","params":[{"name":"key","ty":"String"},{"name":"value","ty":"String"}],"return_type":"Unit","doc":"Set a raw native runtime string config value before launch","origin":"crates/core/src/stdlib.rs"},{"name":"normalize","signature":"fn normalize(v: Vec3) -> Vec3","params":[{"name":"v","ty":"Vec3"}],"return_type":"Vec3","doc":"Normalize vector","origin":"crates/core/src/stdlib.rs"},{"name":"now","signature":"fn now() -> Float","params":[],"return_type":"Float","doc":"Current time in seconds","origin":"crates/core/src/stdlib.rs"},{"name":"ord","signature":"fn ord(s: String) -> Int","params":[{"name":"s","ty":"String"}],"return_type":"Int","doc":"Read the Unicode scalar value of the first character","origin":"crates/core/src/stdlib.rs"},{"name":"panic","signature":"fn panic(message: String) -> Never","params":[{"name":"message","ty":"String"}],"return_type":"Never","doc":"Panic with message","origin":"crates/core/src/stdlib.rs"},{"name":"path_extension","signature":"fn path_extension(path: String) -> String","params":[{"name":"path","ty":"String"}],"return_type":"String","doc":"Return the file extension or an empty string","origin":"crates/core/src/stdlib.rs"},{"name":"path_file_name","signature":"fn path_file_name(path: String) -> String","params":[{"name":"path","ty":"String"}],"return_type":"String","doc":"Return the final path component or an empty string","origin":"crates/core/src/stdlib.rs"},{"name":"path_is_dir","signature":"fn path_is_dir(path: String) -> Bool","params":[{"name":"path","ty":"String"}],"return_type":"Bool","doc":"Check whether a path is a directory","origin":"crates/core/src/stdlib.rs"},{"name":"path_is_file","signature":"fn path_is_file(path: String) -> Bool","params":[{"name":"path","ty":"String"}],"return_type":"Bool","doc":"Check whether a path is a file","origin":"crates/core/src/stdlib.rs"},{"name":"path_join","signature":"fn path_join(base: String, child: String) -> String","params":[{"name":"base","ty":"String"},{"name":"child","ty":"String"}],"return_type":"String","doc":"Join two path segments","origin":"crates/core/src/stdlib.rs"},{"name":"path_parent","signature":"fn path_parent(path: String) -> String","params":[{"name":"path","ty":"String"}],"return_type":"String","doc":"Return the parent directory path or an empty string","origin":"crates/core/src/stdlib.rs"},{"name":"path_stem","signature":"fn path_stem(path: String) -> String","params":[{"name":"path","ty":"String"}],"return_type":"String","doc":"Return the file stem or an empty string","origin":"crates/core/src/stdlib.rs"},{"name":"pop","signature":"fn pop(array: Array) -> Any","params":[{"name":"array","ty":"Array"}],"return_type":"Any","doc":"Pop from array","origin":"crates/core/src/stdlib.rs"},{"name":"pow","signature":"fn pow(base: Float, exp: Float) -> Float","params":[{"name":"base","ty":"Float"},{"name":"exp","ty":"Float"}],"return_type":"Float","doc":"Power","origin":"crates/core/src/stdlib.rs"},{"name":"print","signature":"fn print(value: Any) -> Unit","params":[{"name":"value","ty":"Any"}],"return_type":"Unit","doc":"Print value to console","origin":"crates/core/src/stdlib.rs"},{"name":"println","signature":"fn println(value: Any) -> Unit","params":[{"name":"value","ty":"Any"}],"return_type":"Unit","doc":"Print value with newline","origin":"crates/core/src/stdlib.rs"},{"name":"push","signature":"fn push(array: Array, value: Any) -> Unit","params":[{"name":"array","ty":"Array"},{"name":"value","ty":"Any"}],"return_type":"Unit","doc":"Push to array","origin":"crates/core/src/stdlib.rs"},{"name":"range","signature":"fn range(start: Int, end: Int) -> Array","params":[{"name":"start","ty":"Int"},{"name":"end","ty":"Int"}],"return_type":"Array","doc":"Create range","origin":"crates/core/src/stdlib.rs"},{"name":"read_dir","signature":"fn read_dir(path: String) -> Array","params":[{"name":"path","ty":"String"}],"return_type":"Array","doc":"List direct children of a directory as sorted paths","origin":"crates/core/src/stdlib.rs"},{"name":"read_file","signature":"fn read_file(path: String) -> String","params":[{"name":"path","ty":"String"}],"return_type":"String","doc":"Read file contents","origin":"crates/core/src/stdlib.rs"},{"name":"read_line","signature":"fn read_line() -> String","params":[],"return_type":"String","doc":"Read line from stdin","origin":"crates/core/src/stdlib.rs"},{"name":"reduce","signature":"fn reduce(array: Array, initial: Any, fn: Function) -> Any","params":[{"name":"array","ty":"Array"},{"name":"initial","ty":"Any"},{"name":"fn","ty":"Function"}],"return_type":"Any","doc":"Reduce array","origin":"crates/core/src/stdlib.rs"},{"name":"remove_file","signature":"fn remove_file(path: String) -> Unit","params":[{"name":"path","ty":"String"}],"return_type":"Unit","doc":"Remove a file","origin":"crates/core/src/stdlib.rs"},{"name":"replace","signature":"fn replace(s: String, from: String, to: String) -> String","params":[{"name":"s","ty":"String"},{"name":"from","ty":"String"},{"name":"to","ty":"String"}],"return_type":"String","doc":"Replace substring","origin":"crates/core/src/stdlib.rs"},{"name":"round","signature":"fn round(x: Float) -> Int","params":[{"name":"x","ty":"Float"}],"return_type":"Int","doc":"Round","origin":"crates/core/src/stdlib.rs"},{"name":"send","signature":"fn send(actor: ActorRef, message: Message) -> Unit","params":[{"name":"actor","ty":"ActorRef"},{"name":"message","ty":"Message"}],"return_type":"Unit","doc":"Send message","origin":"crates/core/src/stdlib.rs"},{"name":"sin","signature":"fn sin(x: Float) -> Float","params":[{"name":"x","ty":"Float"}],"return_type":"Float","doc":"Sine","origin":"crates/core/src/stdlib.rs"},{"name":"sleep","signature":"fn sleep(seconds: Float) -> Unit","params":[{"name":"seconds","ty":"Float"}],"return_type":"Unit","doc":"Sleep for seconds","origin":"crates/core/src/stdlib.rs"},{"name":"smoothstep","signature":"fn smoothstep(edge0: Float, edge1: Float, x: Float) -> Float","params":[{"name":"edge0","ty":"Float"},{"name":"edge1","ty":"Float"},{"name":"x","ty":"Float"}],"return_type":"Float","doc":"Smooth step","origin":"crates/core/src/stdlib.rs"},{"name":"socket_connect","signature":"fn socket_connect(host: String, port: Int) -> Int","params":[{"name":"host","ty":"String"},{"name":"port","ty":"Int"}],"return_type":"Int","doc":"Connect TCP socket","origin":"crates/core/src/stdlib.rs"},{"name":"socket_recv","signature":"fn socket_recv(sock: Int) -> String","params":[{"name":"sock","ty":"Int"}],"return_type":"String","doc":"Receive data","origin":"crates/core/src/stdlib.rs"},{"name":"socket_send","signature":"fn socket_send(sock: Int, data: String) -> Unit","params":[{"name":"sock","ty":"Int"},{"name":"data","ty":"String"}],"return_type":"Unit","doc":"Send data","origin":"crates/core/src/stdlib.rs"},{"name":"spawn","signature":"fn spawn(actor: Actor) -> ActorRef","params":[{"name":"actor","ty":"Actor"}],"return_type":"ActorRef","doc":"Spawn actor","origin":"crates/core/src/stdlib.rs"},{"name":"spawn_cube","signature":"fn spawn_cube(x: Float, y: Float) -> Unit","params":[{"name":"x","ty":"Float"},{"name":"y","ty":"Float"}],"return_type":"Unit","doc":"Open a native 3D cube window","origin":"crates/core/src/stdlib.rs"},{"name":"spawn_native_sculpt_lab","signature":"fn spawn_native_sculpt_lab(x: Float, y: Float) -> Unit","params":[{"name":"x","ty":"Float"},{"name":"y","ty":"Float"}],"return_type":"Unit","doc":"Open the raw native Kain sculpting lab","origin":"crates/core/src/stdlib.rs"},{"name":"spawn_native_viewport","signature":"fn spawn_native_viewport(x: Float, y: Float) -> Unit","params":[{"name":"x","ty":"Float"},{"name":"y","ty":"Float"}],"return_type":"Unit","doc":"Open the raw native Kain 3D viewport host","origin":"crates/core/src/stdlib.rs"},{"name":"split","signature":"fn split(s: String, sep: String) -> Array","params":[{"name":"s","ty":"String"},{"name":"sep","ty":"String"}],"return_type":"Array","doc":"Split string","origin":"crates/core/src/stdlib.rs"},{"name":"sqrt","signature":"fn sqrt(x: Float) -> Float","params":[{"name":"x","ty":"Float"}],"return_type":"Float","doc":"Square root","origin":"crates/core/src/stdlib.rs"},{"name":"starts_with","signature":"fn starts_with(s: String, prefix: String) -> Bool","params":[{"name":"s","ty":"String"},{"name":"prefix","ty":"String"}],"return_type":"Bool","doc":"Check whether a string starts with a prefix","origin":"crates/core/src/stdlib.rs"},{"name":"stderr_write","signature":"fn stderr_write(value: String) -> Unit","params":[{"name":"value","ty":"String"}],"return_type":"Unit","doc":"Write raw text to stderr without an automatic newline","origin":"crates/core/src/stdlib.rs"},{"name":"stdin_read_exact","signature":"fn stdin_read_exact(length: Int) -> String","params":[{"name":"length","ty":"Int"}],"return_type":"String","doc":"Read an exact number of bytes from stdin","origin":"crates/core/src/stdlib.rs"},{"name":"stdout_write","signature":"fn stdout_write(value: String) -> Unit","params":[{"name":"value","ty":"String"}],"return_type":"Unit","doc":"Write raw text to stdout without an automatic newline","origin":"crates/core/src/stdlib.rs"},{"name":"substring","signature":"fn substring(s: String, start: Int, end: Int) -> String","params":[{"name":"s","ty":"String"},{"name":"start","ty":"Int"},{"name":"end","ty":"Int"}],"return_type":"String","doc":"Extract a substring using start and end character offsets","origin":"crates/core/src/stdlib.rs"},{"name":"tan","signature":"fn tan(x: Float) -> Float","params":[{"name":"x","ty":"Float"}],"return_type":"Float","doc":"Tangent","origin":"crates/core/src/stdlib.rs"},{"name":"to_float","signature":"fn to_float(value: Any) -> Float","params":[{"name":"value","ty":"Any"}],"return_type":"Float","doc":"Convert to float","origin":"crates/core/src/stdlib.rs"},{"name":"to_int","signature":"fn to_int(value: Any) -> Int","params":[{"name":"value","ty":"Any"}],"return_type":"Int","doc":"Convert to int","origin":"crates/core/src/stdlib.rs"},{"name":"to_lower","signature":"fn to_lower(s: String) -> String","params":[{"name":"s","ty":"String"}],"return_type":"String","doc":"To lowercase","origin":"crates/core/src/stdlib.rs"},{"name":"to_string","signature":"fn to_string(value: Any) -> String","params":[{"name":"value","ty":"Any"}],"return_type":"String","doc":"Convert to string","origin":"crates/core/src/stdlib.rs"},{"name":"to_upper","signature":"fn to_upper(s: String) -> String","params":[{"name":"s","ty":"String"}],"return_type":"String","doc":"To uppercase","origin":"crates/core/src/stdlib.rs"},{"name":"trim","signature":"fn trim(s: String) -> String","params":[{"name":"s","ty":"String"}],"return_type":"String","doc":"Trim whitespace","origin":"crates/core/src/stdlib.rs"},{"name":"vec2","signature":"fn vec2(x: Float, y: Float) -> Vec2","params":[{"name":"x","ty":"Float"},{"name":"y","ty":"Float"}],"return_type":"Vec2","doc":"Create 2D vector","origin":"crates/core/src/stdlib.rs"},{"name":"vec3","signature":"fn vec3(x: Float, y: Float, z: Float) -> Vec3","params":[{"name":"x","ty":"Float"},{"name":"y","ty":"Float"},{"name":"z","ty":"Float"}],"return_type":"Vec3","doc":"Create 3D vector","origin":"crates/core/src/stdlib.rs"},{"name":"vec4","signature":"fn vec4(x: Float, y: Float, z: Float, w: Float) -> Vec4","params":[{"name":"x","ty":"Float"},{"name":"y","ty":"Float"},{"name":"z","ty":"Float"},{"name":"w","ty":"Float"}],"return_type":"Vec4","doc":"Create 4D vector","origin":"crates/core/src/stdlib.rs"},{"name":"write_file","signature":"fn write_file(path: String, content: String) -> Unit","params":[{"name":"path","ty":"String"},{"name":"content","ty":"String"}],"return_type":"Unit","doc":"Write to file","origin":"crates/core/src/stdlib.rs"}],"native_services":[{"key":"actor.registry","name":"Actor Registry","provider":"native-core","requirement":"optional","status":"available","platforms":[],"description":"Named actor registration and lookup","manifest_path":"runtime/native_core_runtime.toml"},{"key":"actor.runtime","name":"Actor Runtime","provider":"native-core","requirement":"optional","status":"available","platforms":[],"description":"Actor spawn, mailbox, lifecycle, and scheduling","manifest_path":"runtime/native_core_runtime.toml"},{"key":"asset.gltf","name":"glTF Asset Loader","provider":"native-core","requirement":"optional","status":"degraded","platforms":[],"description":"The legacy runtime-owned glTF loader was removed from the active runtime; authored packages or blade-owned loaders must satisfy this seam","manifest_path":"runtime/native_core_runtime.toml"},{"key":"asset.ingestion","name":"Asset Ingestion","provider":"native-core","requirement":"optional","status":"available","platforms":[],"description":"Canonical descriptor-driven entry path for assets and emitted bundles","manifest_path":"runtime/native_core_runtime.toml"},{"key":"asset.realtime","name":"Realtime Bundle Loader","provider":"native-core","requirement":"optional","status":"available","platforms":[],"description":"Realtime bundle loading and scene management","manifest_path":"runtime/native_core_runtime.toml"},{"key":"async.runtime","name":"Async Runtime","provider":"native-core","requirement":"optional","status":"available","platforms":[],"description":"Task/future execution, wake/poll, and cancellation","manifest_path":"runtime/native_core_runtime.toml"},{"key":"async.timers","name":"Async Timers","provider":"native-core","requirement":"optional","status":"available","platforms":[],"description":"Timer registration and wake delivery","manifest_path":"runtime/native_core_runtime.toml"},{"key":"base.diagnostics","name":"Base Diagnostics","provider":"native-core","requirement":"required","status":"available","platforms":[],"description":"Structured diagnostics and error reporting","manifest_path":"runtime/native_core_runtime.toml"},{"key":"base.memory","name":"Base Memory Services","provider":"native-core","requirement":"required","status":"available","platforms":[],"description":"Core allocation, retain/release, and memory management","manifest_path":"runtime/native_core_runtime.toml"},{"key":"compatibility","name":"Compatibility and Hot Reload","provider":"native-core","requirement":"optional","status":"available","platforms":[],"description":"Version validation, migration, hot reload, and snapshot flow","manifest_path":"runtime/native_core_runtime.toml"},{"key":"contract","name":"Runtime Contract","provider":"native-core","requirement":"required","status":"available","platforms":[],"description":"Runtime contract bundle loading and validation","manifest_path":"runtime/native_core_runtime.toml"},{"key":"control.converge.autotune","name":"Converge Lane Selector And Telemetry","provider":"native-core","requirement":"optional","status":"available","platforms":[],"description":"Proof-bounded native converge lane selection, warm cache state, and fixed-ring telemetry for future silicon autotuning","manifest_path":"runtime/native_core_runtime.toml"},{"key":"control.runtime-tiers","name":"Runtime Control Tiers","provider":"native-core","requirement":"optional","status":"available","platforms":[],"description":"Compile-time no-op, gated, and full-cost control tiers for diagnostics, profiling, and relocation bookkeeping","manifest_path":"runtime/native_core_runtime.toml"},{"key":"cpu.capabilities","name":"Native CPU Capability Service","provider":"native-core","requirement":"optional","status":"available","platforms":[],"description":"Runtime-published CPU feature bits for compiled converge selectors, including x86 AVX/AVX2/AVX-512 gates","manifest_path":"runtime/native_core_runtime.toml"},{"key":"data.json","name":"Native JSON Runtime","provider":"native-core","requirement":"optional","status":"available","platforms":[],"description":"Native JSON parse/render/object/array helpers for LLVM builtin calls over string, integer, boolean, null, object, and array values","manifest_path":"runtime/native_core_runtime.toml"},{"key":"device.reflection","name":"Device Reflection","provider":"native-core","requirement":"optional","status":"available","platforms":[],"description":"Backend, GPU, display, and hotplug capability descriptors","manifest_path":"runtime/native_core_runtime.toml"},{"key":"gfx.backend.d3d12","name":"DirectX 12 Backend Target","provider":"native-core","requirement":"optional","status":"degraded","platforms":["windows"],"description":"Runtime-owned DirectX 12 backend identity and capability target; concrete presenters live outside the C runtime","manifest_path":"runtime/native_core_runtime.toml"},{"key":"gfx.backend.vulkan","name":"Vulkan Backend Target","provider":"native-core","requirement":"optional","status":"degraded","platforms":["windows","linux"],"description":"Runtime-owned Vulkan backend identity and capability target; concrete presenters live outside the C runtime","manifest_path":"runtime/native_core_runtime.toml"},{"key":"gfx.compute","name":"Compute Runtime","provider":"native-core","requirement":"optional","status":"available","platforms":[],"description":"Compute bundle validation, dispatch planning, and native runtime handoff","manifest_path":"runtime/native_core_runtime.toml"},{"key":"gfx.compute.cuda","name":"CUDA PTX Dispatch","provider":"native-core","requirement":"optional","status":"degraded","platforms":["windows","linux"],"description":"Windows-first NVIDIA PTX sidecar dispatch bridge backed by the external kain-gpu-runtime driver lane","manifest_path":"runtime/native_core_runtime.toml"},{"key":"gfx.raw-native","name":"Raw Native Graphics","provider":"native-core","requirement":"optional","status":"available","platforms":[],"description":"Catalog-free graphics kernel for Kain-authored engines, buffers, SPIR-V modules, pipelines, and draw commands","manifest_path":"runtime/native_core_runtime.toml"},{"key":"gfx.shader.spirv","name":"SPIR-V Shader Modules","provider":"native-core","requirement":"optional","status":"available","platforms":[],"description":"Canonical native shader payload registration for Kain-authored graphics and compute pipelines","manifest_path":"runtime/native_core_runtime.toml"},{"key":"gfx.viewport","name":"Native Viewport","provider":"platform-win32","requirement":"optional","status":"degraded","platforms":["windows"],"description":"Platform window handles and presenter attachment contract; concrete presenters now live in blades or packages","manifest_path":"runtime/native_core_runtime.toml"},{"key":"host.bridge","name":"Host Bridge","provider":"native-core","requirement":"optional","status":"available","platforms":[],"description":"Plugin and foreign service integration","manifest_path":"runtime/native_core_runtime.toml"},{"key":"interop.shared-contracts","name":"Neutral Shared Buffer And Image Contracts","provider":"native-core","requirement":"optional","status":"available","platforms":[],"description":"Runtime-owned shared buffer/image handles plus neutral info and byte snapshot lanes for Python, JS, GPU, and foreign host bridges","manifest_path":"runtime/native_core_runtime.toml"},{"key":"io.net","name":"IO Network","provider":"native-core","requirement":"optional","status":"available","platforms":["windows","linux","macos"],"description":"Native TCP, protocol-aware HTTP client/server, capability-query, and Windows-first HTTPS/HTTP2 client primitives","manifest_path":"runtime/native_core_runtime.toml"},{"key":"io.process","name":"IO Process","provider":"native-core","requirement":"optional","status":"available","platforms":["windows","linux","macos"],"description":"Native child-process, pipe, and PTY session management","manifest_path":"runtime/native_core_runtime.toml"},{"key":"machine.stones","name":"Machine Stones Runtime","provider":"native-core","requirement":"optional","status":"available","platforms":[],"description":"Native axiom predicates, pulse scheduler/snapshots, shatter SoA lane buffers, and teleport zero-copy handoff telemetry","manifest_path":"runtime/native_core_runtime.toml"},{"key":"machine.topology","name":"Machine Topology And Affinity","provider":"native-core","requirement":"optional","status":"available","platforms":["windows","linux","macos"],"description":"Native logical-CPU count, thread identity, and current-thread affinity controls for systems blades","manifest_path":"runtime/native_core_runtime.toml"},{"key":"machine.virtual-memory","name":"Virtual Memory Pages","provider":"native-core","requirement":"optional","status":"available","platforms":["windows","linux","macos"],"description":"Native page-size, map/unmap, and page-protection ABI for authored systems code","manifest_path":"runtime/native_core_runtime.toml"},{"key":"memory.atomic-seqcst","name":"SeqCst Atomic Cells","provider":"native-core","requirement":"optional","status":"available","platforms":["windows","linux","macos"],"description":"Canonical seq-cst atomic cell ABI for native shared-memory fanout and LLVM fallback surfaces","manifest_path":"runtime/native_core_runtime.toml"},{"key":"memory.atomic-v2","name":"Ordered Atomic Cells","provider":"native-core","requirement":"optional","status":"available","platforms":["windows","linux","macos"],"description":"Explicit memory-order atomic load/store/RMW/CAS/fence ABI including bitwise RMW operations","manifest_path":"runtime/native_core_runtime.toml"},{"key":"memory.fixup","name":"Relocation Fixup Registry","provider":"native-core","requirement":"optional","status":"available","platforms":[],"description":"Known-ref registration, self-updating pointer patching, and handle-aware relocation tracking for helper-owned allocations","manifest_path":"runtime/native_core_runtime.toml"},{"key":"memory.handles","name":"Generation Tagged Runtime Handles","provider":"native-core","requirement":"optional","status":"available","platforms":[],"description":"Index plus magic runtime handles for stale rejection across relocation and control-plane surfaces","manifest_path":"runtime/native_core_runtime.toml"},{"key":"memory.ownership","name":"Ownership State Guards","provider":"native-core","requirement":"required","status":"available","platforms":[],"description":"Native collapse/observe/decay guards for helper-owned heap regions and imported pointer lifetimes","manifest_path":"runtime/native_core_runtime.toml"},{"key":"memory.shared-fanout","name":"Shared Fanout Runtime","provider":"native-core","requirement":"optional","status":"available","platforms":["windows","linux","macos"],"description":"Native shared-memory fanout over real OS threads for compiler-owned share/fanout lowering","manifest_path":"runtime/native_core_runtime.toml"},{"key":"memory.volatile","name":"Volatile Memory Cells","provider":"native-core","requirement":"optional","status":"available","platforms":["windows","linux","macos"],"description":"Byte-exact volatile load/store ABI for MMIO and externally-observed memory","manifest_path":"runtime/native_core_runtime.toml"},{"key":"platform.app-host","name":"Native App Host","provider":"platform-win32","requirement":"required","status":"available","platforms":["windows"],"description":"Raw Win32 app/window host substrate without baked presenters or app policy","manifest_path":"runtime/native_core_runtime.toml"},{"key":"platform.input","name":"Native Input","provider":"platform-win32","requirement":"required","status":"available","platforms":["windows"],"description":"Canonical Kain input sessions, semantic actions, replay traces, and native platform event handling","manifest_path":"runtime/native_core_runtime.toml"},{"key":"platform.library","name":"Native Dynamic Library Loader","provider":"native-core","requirement":"optional","status":"available","platforms":["windows","linux","macos"],"description":"Raw platform dynamic library open/resolve/close substrate for generated typed platform packages; no generic public ABI call surface is exposed","manifest_path":"runtime/native_core_runtime.toml"},{"key":"reflection","name":"Reflection Runtime","provider":"native-core","requirement":"optional","status":"available","platforms":[],"description":"Reflection payload loading and runtime type lookup","manifest_path":"runtime/native_core_runtime.toml"},{"key":"runtime.inspection","name":"Runtime Inspection","provider":"native-core","requirement":"optional","status":"available","platforms":[],"description":"Runtime-owned scene, resource, and binding inspection queries","manifest_path":"runtime/native_core_runtime.toml"},{"key":"runtime.profile","name":"Runtime Profiling Zones","provider":"native-core","requirement":"optional","status":"available","platforms":[],"description":"Scoped push/pop profiling zones with compile-out tiers and fixed-cost native timing telemetry","manifest_path":"runtime/native_core_runtime.toml"},{"key":"scene.mutation","name":"Scene Mutation","provider":"native-core","requirement":"optional","status":"available","platforms":[],"description":"Transactional scene mutation requests and receipts","manifest_path":"runtime/native_core_runtime.toml"},{"key":"scene.query","name":"Scene Query","provider":"native-core","requirement":"optional","status":"available","platforms":[],"description":"Picking, raycast, bounds, visibility, and selection query contracts","manifest_path":"runtime/native_core_runtime.toml"},{"key":"scene.runtime","name":"Scene Runtime","provider":"native-core","requirement":"optional","status":"available","platforms":[],"description":"Stable native scene handles and runtime-owned scene state access","manifest_path":"runtime/native_core_runtime.toml"},{"key":"ui.bundle","name":"Compiled UI Bundle","provider":"native-core","requirement":"optional","status":"available","platforms":[],"description":"Compiled UI bundle loading and overlay rendering","manifest_path":"runtime/native_core_runtime.toml"},{"key":"ui.component","name":"UI Component Runtime","provider":"native-core","requirement":"optional","status":"available","platforms":[],"description":"Component state, invalidation, focus, and event routing","manifest_path":"runtime/native_core_runtime.toml"}],"cookbook":[{"need":"Read/write files and paths","import_path":"std::fs","symbols":["FsBytesResult","FsChunk","FsDirEntry","FsError","FsMetadata","FsMetadataResult","FsOpResult","FsTextResult"]},{"need":"Spawn processes and capture output","import_path":"std::process","symbols":["process_arg_count","process_args","process_platform_available","process_reset","process_stdio_inherit","process_stdio_null","process_stdio_pipe","process_user_args"]},{"need":"Open network/http/tls lanes","import_path":"std::net","symbols":["net_capability_available","net_capability_state","net_capability_supported","net_platform_available","net_platform_name","net_reset","tcp_connect","tcp_listen"]},{"need":"Build deterministic hashes and fingerprints","import_path":"std::hash","symbols":["HASH_BYTE_MASK","HASH_CRC32_POLY","HASH_EMPTY32","HASH_FNV1A32_OFFSET","HASH_FNV1A32_PRIME","HASH_GOLDEN32","HASH_I63_MASK","HASH_U32_MASK"]},{"need":"Use actors and mailbox helpers","import_path":"std::actor","symbols":["native_actor_abi_version","native_actor_default_ask_timeout_ms","native_actor_default_mailbox_capacity","native_actor_default_shutdown_grace_ms","native_actor_invalid_id","native_actor_supervision_max_restarts","native_actor_supervision_restart_window_millis","native_actor_unbounded_mailbox_capacity"]},{"need":"Create native graphics sessions","import_path":"std::graphics","symbols":["native_graphics_backend_available","native_graphics_backend_select","native_graphics_backend_status","native_graphics_backend_supported","native_graphics_reset","native_graphics_session_count","native_graphics_session_create","native_graphics_session_destroy"]},{"need":"Use GPU shared-residency contracts","import_path":"std::gpu","symbols":["GPU_STAGE_ANY_HIT","GPU_STAGE_CLOSEST_HIT","GPU_STAGE_COMPUTE","GPU_STAGE_FRAGMENT","GPU_STAGE_MESH","GPU_STAGE_RAYGEN","GPU_STAGE_TASK","GPU_STAGE_VERTEX"]},{"need":"Author graphics-shared bindings","import_path":"std::graphics::shared","symbols":["GRAPHICS_SHARED_KIND_COLOR_ATTACHMENT","GRAPHICS_SHARED_KIND_DEPTH_ATTACHMENT","GRAPHICS_SHARED_KIND_INDEX_BUFFER","GRAPHICS_SHARED_KIND_SAMPLED_IMAGE","GRAPHICS_SHARED_KIND_STORAGE_BUFFER","GRAPHICS_SHARED_KIND_STORAGE_IMAGE","GRAPHICS_SHARED_KIND_UNIFORM_BUFFER","GRAPHICS_SHARED_KIND_VERTEX_BUFFER"]},{"need":"Author UI handles and component helpers","import_path":"std::ui","symbols":["native_ui_begin_frame","native_ui_end_frame","native_ui_reset","native_ui_session_count","native_ui_session_create","native_ui_session_destroy","native_ui_window_close","native_ui_window_open"]},{"need":"Use math vectors, matrices, quaternions, and colors","import_path":"std::math","symbols":["DEG_TO_RAD","EPSILON","HALF_PI","HUGE_EPSILON","PI","RAD_TO_DEG","TAU","pi"]}]} //!end-kain-file //!kain-file // path = "sync.kn" // kind = "text" // encoding = "utf8" // bytes = 17699 // sha256 = "sha256:e448703482640f9165269e0e0f94c1e8e1c48d31a5c29be0d5c1c5255a9b6172" // trailing_newline = true //!kain-file-content // use std::atomic // use std::memory // // pub const SYNC_OK: Int = 0 // pub const SYNC_ERR_NEGATIVE_COUNT: Int = -1 // pub const SYNC_ERR_COUNT_OVERFLOW: Int = -2 // pub const SYNC_ERR_INVALID_ONCE_STATE: Int = -3 // pub const SYNC_ERR_BUSY: Int = -4 // pub const SYNC_ERR_TIMEOUT: Int = -5 // pub const SYNC_ERR_INVALID_STATE: Int = -6 // // const SYNC_INT_MAX: Int = 9223372036854775807 // const SYNC_PARK_SLICE_MS: Int = 10 // const MCS_NODE_WORDS: Int = 2 // const MCS_NODE_NEXT_SLOT: Int = 0 // const MCS_NODE_WAITING_SLOT: Int = 1 // const TELEPORT_CHANNEL_MIN_REQUESTED_CAPACITY: Int = 1 // const TELEPORT_CHANNEL_MAX_REQUESTED_CAPACITY: Int = 2147483646 // const TELEPORT_CHANNEL_PADDING_SLOTS: Int = 1 // const TELEPORT_CHANNEL_CONTROL_WORDS: Int = 4 // const TELEPORT_CHANNEL_BUFFER_SLOT: Int = 0 // const TELEPORT_CHANNEL_CAPACITY_SLOT: Int = 1 // const TELEPORT_CHANNEL_WRITE_IDX_SLOT: Int = 2 // const TELEPORT_CHANNEL_READ_IDX_SLOT: Int = 3 // const ONCE_STATE_UNINITIALIZED: Int = 0 // const ONCE_STATE_INITIALIZING: Int = 1 // const ONCE_STATE_DONE: Int = 2 // const RWLOCK_WRITER_HELD: Int = -1 // // # --- McsMutex (Mellor-Crummey & Scott Cache-Line-Isolated Intrusive Lock) --- // // pub struct McsNode: // next: ptr // waiting: Int // // pub struct McsMutex: // tail: ptr // // pub fn mcs_node_words() -> Int: // return MCS_NODE_WORDS // // pub fn mcs_node_new() -> ptr: // return alloc_zeroed(MCS_NODE_WORDS, "Int") // // pub fn mcs_node_destroy(node: ptr) -> Int: // decay node // return SYNC_OK // // fn mcs_node_waiting_ptr(node: ptr) -> ptr with Unsafe: // return ptr_offset(node, MCS_NODE_WAITING_SLOT, "Int") // // fn sync_atomic_load(address: ptr, order: Ordering) -> Int with Unsafe: // return atomic_raw_load(address, order) // // fn sync_atomic_store(address: ptr, value: Int, order: Ordering) -> Int with Unsafe: // return atomic_raw_store(address, value, order) // // fn sync_atomic_exchange(address: ptr, value: Int) -> Int with Unsafe: // return atomic_raw_exchange(address, value, Ordering::AcqRel) // // fn sync_atomic_compare_exchange(address: ptr, expected: Int, desired: Int) -> Bool with Unsafe: // return atomic_raw_compare_exchange(address, expected, desired, Ordering::AcqRel, Ordering::Acquire) // // fn sync_atomic_wait_changed(address: ptr, expected: Int, timeout_ms: Int) -> Int with Unsafe: // return atomic_wait(address, expected, timeout_ms) // // fn sync_atomic_notify_one(address: ptr) -> Int with Unsafe: // return atomic_notify_one(address) // // fn sync_atomic_notify_all(address: ptr) -> Int with Unsafe: // return atomic_notify_all(address) // // pub fn mcs_mutex_new() -> McsMutex: // let tail = alloc_zeroed(1, "Int") // return McsMutex { tail: tail } // // pub fn mcs_mutex_destroy(lock: McsMutex) -> Int: // decay lock.tail // return SYNC_OK // // pub fn mcs_mutex_lock(lock: McsMutex, node: ptr) -> Int with Unsafe: // mem_store(ptr_offset(node, MCS_NODE_NEXT_SLOT, "Int"), 0, "Int") // mem_store(mcs_node_waiting_ptr(node), 0, "Int") // // let prev_tail_bits = sync_atomic_exchange(lock.tail, ptr_to_int(node)) // if prev_tail_bits != 0: // let prev_tail: ptr = int_to_ptr(prev_tail_bits, "ptr") // let waiting_ptr = mcs_node_waiting_ptr(node) // let _waiting = sync_atomic_store(mcs_node_waiting_ptr(node), 1, Ordering::Release) // let _link = sync_atomic_store(prev_tail, ptr_to_int(waiting_ptr), Ordering::Release) // while sync_atomic_load(waiting_ptr, Ordering::Acquire) == 1: // let _parked = sync_atomic_wait_changed(waiting_ptr, 1, SYNC_PARK_SLICE_MS) // // return SYNC_OK // // pub fn mcs_mutex_unlock(lock: McsMutex, node: ptr) -> Int with Unsafe: // while true: // let next_waiting_bits = sync_atomic_load(node, Ordering::Acquire) // if next_waiting_bits != 0: // let next_waiting: ptr = int_to_ptr(next_waiting_bits, "ptr") // let _release = sync_atomic_store(next_waiting, 0, Ordering::Release) // let _wake = sync_atomic_notify_one(next_waiting) // return SYNC_OK // if sync_atomic_compare_exchange(lock.tail, ptr_to_int(node), 0): // return SYNC_OK // let _parked = sync_atomic_wait_changed(lock.tail, ptr_to_int(node), SYNC_PARK_SLICE_MS) // // // # --- TeleportChannel (Lockless Zero-Copy SPSC Ring Buffer Queue) --- // // pub struct TeleportChannel: // control: ptr // // fn teleport_channel_buffer_ptr(chan: TeleportChannel) -> ptr with Unsafe: // let bits = mem_load(ptr_offset(chan.control, TELEPORT_CHANNEL_BUFFER_SLOT, "Int"), "Int") // return int_to_ptr(bits, "ptr") // // fn teleport_channel_capacity(chan: TeleportChannel) -> Int with Unsafe: // return mem_load(ptr_offset(chan.control, TELEPORT_CHANNEL_CAPACITY_SLOT, "Int"), "Int") // // fn teleport_channel_write_idx_ptr(chan: TeleportChannel) -> ptr with Unsafe: // return ptr_offset(chan.control, TELEPORT_CHANNEL_WRITE_IDX_SLOT, "Int") // // fn teleport_channel_read_idx_ptr(chan: TeleportChannel) -> ptr with Unsafe: // return ptr_offset(chan.control, TELEPORT_CHANNEL_READ_IDX_SLOT, "Int") // // fn sync_clamp_channel_capacity(capacity: Int) -> Int: // if capacity < TELEPORT_CHANNEL_MIN_REQUESTED_CAPACITY: // return TELEPORT_CHANNEL_MIN_REQUESTED_CAPACITY // if capacity > TELEPORT_CHANNEL_MAX_REQUESTED_CAPACITY: // return TELEPORT_CHANNEL_MAX_REQUESTED_CAPACITY // return capacity // // pub fn teleport_channel_new(capacity: Int) -> TeleportChannel: // let requested_capacity = sync_clamp_channel_capacity(capacity) // # Proof: crates/core/z3/proofs/stdlib-sync-teleport-channel-index-bounds.yaml // let safe_capacity = requested_capacity + TELEPORT_CHANNEL_PADDING_SLOTS // let buffer = alloc_zeroed(safe_capacity, "Int") // let control = alloc_zeroed(TELEPORT_CHANNEL_CONTROL_WORDS, "Int") // mem_store(ptr_offset(control, TELEPORT_CHANNEL_BUFFER_SLOT, "Int"), ptr_to_int(buffer), "Int") // mem_store(ptr_offset(control, TELEPORT_CHANNEL_CAPACITY_SLOT, "Int"), safe_capacity, "Int") // return TeleportChannel { control: control } // // pub fn teleport_channel_destroy(chan: TeleportChannel) -> Int with Unsafe: // let buffer = teleport_channel_buffer_ptr(chan) // decay buffer // decay chan.control // return SYNC_OK // // pub fn teleport_channel_send(chan: TeleportChannel, item_ptr: Int) -> Bool with Unsafe: // let write_idx = teleport_channel_write_idx_ptr(chan) // let read_idx = teleport_channel_read_idx_ptr(chan) // let capacity = teleport_channel_capacity(chan) // let w = sync_atomic_load(write_idx, Ordering::Acquire) // let r = sync_atomic_load(read_idx, Ordering::Acquire) // let next_w = (w + 1) % capacity // if next_w == r: // return false // // let buffer = teleport_channel_buffer_ptr(chan) // let _item = sync_atomic_store(ptr_offset(buffer, w, "Int"), item_ptr, Ordering::Release) // let _index = sync_atomic_store(write_idx, next_w, Ordering::Release) // return true // // pub fn teleport_channel_recv(chan: TeleportChannel) -> Int with Unsafe: // let write_idx = teleport_channel_write_idx_ptr(chan) // let read_idx = teleport_channel_read_idx_ptr(chan) // let capacity = teleport_channel_capacity(chan) // let r = sync_atomic_load(read_idx, Ordering::Acquire) // let w = sync_atomic_load(write_idx, Ordering::Acquire) // if r == w: // return 0 // // let buffer = teleport_channel_buffer_ptr(chan) // let item_ptr = sync_atomic_load(ptr_offset(buffer, r, "Int"), Ordering::Acquire) // let _index = sync_atomic_store(read_idx, (r + 1) % capacity, Ordering::Release) // return item_ptr // // // # --- Once (Thread-Safe Lazy Initialization Guard) --- // // pub struct Once: // state: ptr // // pub fn once_new() -> Once: // let state_cell = alloc_zeroed(1, "Int") // return Once { state: state_cell } // // pub fn once_destroy(o: Once) -> Int: // decay o.state // return SYNC_OK // // pub fn once_do(o: Once) -> Int with Unsafe: // while true: // let observed = sync_atomic_load(o.state, Ordering::Acquire) // if observed == ONCE_STATE_DONE: // return 0 // if observed == ONCE_STATE_UNINITIALIZED: // if sync_atomic_compare_exchange(o.state, ONCE_STATE_UNINITIALIZED, ONCE_STATE_INITIALIZING): // return 1 // elif observed == ONCE_STATE_INITIALIZING: // let _parked = sync_atomic_wait_changed(o.state, ONCE_STATE_INITIALIZING, SYNC_PARK_SLICE_MS) // else: // return SYNC_ERR_INVALID_ONCE_STATE // // pub fn once_do_sleep(o: Once) -> Int with Unsafe: // return once_do(o) // // pub fn once_complete(o: Once) -> Int with Unsafe: // while true: // let observed = sync_atomic_load(o.state, Ordering::Acquire) // if observed == ONCE_STATE_DONE: // return SYNC_OK // if observed != ONCE_STATE_INITIALIZING: // return SYNC_ERR_INVALID_ONCE_STATE // if sync_atomic_compare_exchange(o.state, ONCE_STATE_INITIALIZING, ONCE_STATE_DONE): // let _wake = sync_atomic_notify_all(o.state) // return SYNC_OK // let _parked = sync_atomic_wait_changed(o.state, observed, SYNC_PARK_SLICE_MS) // // pub fn once_reset(o: Once) -> Int with Unsafe: // while true: // let observed = sync_atomic_load(o.state, Ordering::Acquire) // if observed == ONCE_STATE_UNINITIALIZED: // return SYNC_OK // if observed != ONCE_STATE_INITIALIZING: // return SYNC_ERR_INVALID_ONCE_STATE // if sync_atomic_compare_exchange(o.state, ONCE_STATE_INITIALIZING, ONCE_STATE_UNINITIALIZED): // let _wake = sync_atomic_notify_all(o.state) // return SYNC_OK // let _parked = sync_atomic_wait_changed(o.state, observed, SYNC_PARK_SLICE_MS) // // // # --- WaitGroup (Structured Thread Synchronization Barrier) --- // // pub struct WaitGroup: // counter: ptr // // fn wait_group_delta_status(current: Int, delta: Int) -> Int: // if delta < 0 and current < (0 - delta): // return SYNC_ERR_NEGATIVE_COUNT // if delta > 0 and current > SYNC_INT_MAX - delta: // return SYNC_ERR_COUNT_OVERFLOW // return SYNC_OK // // pub fn wait_group_new() -> WaitGroup: // let counter = alloc_zeroed(1, "Int") // return WaitGroup { counter: counter } // // pub fn wait_group_destroy(wg: WaitGroup) -> Int: // decay wg.counter // return SYNC_OK // // pub fn wait_group_count(wg: WaitGroup) -> Int with Unsafe: // return sync_atomic_load(wg.counter, Ordering::Acquire) // // pub fn wait_group_add(wg: WaitGroup, delta: Int) -> Int with Unsafe: // # Proof: crates/core/z3/proofs/stdlib-sync-wait-group-counter-stays-in-range.yaml // while true: // let current = sync_atomic_load(wg.counter, Ordering::Acquire) // let status = wait_group_delta_status(current, delta) // if status != SYNC_OK: // return status // let next = current + delta // if sync_atomic_compare_exchange(wg.counter, current, next): // if next == 0: // let _wake = sync_atomic_notify_all(wg.counter) // return SYNC_OK // let _parked = sync_atomic_wait_changed(wg.counter, current, SYNC_PARK_SLICE_MS) // // pub fn wait_group_done(wg: WaitGroup) -> Int with Unsafe: // return wait_group_add(wg, -1) // // pub fn wait_group_wait(wg: WaitGroup) -> Int with Unsafe: // while true: // let current = sync_atomic_load(wg.counter, Ordering::Acquire) // if current == 0: // return SYNC_OK // if current < 0: // return SYNC_ERR_NEGATIVE_COUNT // let _parked = sync_atomic_wait_changed(wg.counter, current, SYNC_PARK_SLICE_MS) // // pub fn wait_group_wait_sleep(wg: WaitGroup) -> Int with Unsafe: // return wait_group_wait(wg) // // // # --- RwLock (Sleepable Reader/Writer Lock) --- // // pub struct RwLock: // state: ptr // // pub fn rwlock_new() -> RwLock: // let state_cell = alloc_zeroed(1, "Int") // return RwLock { state: state_cell } // // pub fn rwlock_destroy(lock: RwLock) -> Int: // decay lock.state // return SYNC_OK // // pub fn rwlock_read_lock(lock: RwLock) -> Int with Unsafe: // while true: // let observed = sync_atomic_load(lock.state, Ordering::Acquire) // if observed >= 0: // if observed == SYNC_INT_MAX: // return SYNC_ERR_COUNT_OVERFLOW // if sync_atomic_compare_exchange(lock.state, observed, observed + 1): // return SYNC_OK // else: // let _parked = sync_atomic_wait_changed(lock.state, observed, SYNC_PARK_SLICE_MS) // // pub fn rwlock_try_read_lock(lock: RwLock) -> Int with Unsafe: // let observed = sync_atomic_load(lock.state, Ordering::Acquire) // if observed < 0: // return SYNC_ERR_BUSY // if observed == SYNC_INT_MAX: // return SYNC_ERR_COUNT_OVERFLOW // if sync_atomic_compare_exchange(lock.state, observed, observed + 1): // return SYNC_OK // return SYNC_ERR_BUSY // // pub fn rwlock_read_unlock(lock: RwLock) -> Int with Unsafe: // while true: // let observed = sync_atomic_load(lock.state, Ordering::Acquire) // if observed <= 0: // return SYNC_ERR_INVALID_STATE // let next = observed - 1 // if sync_atomic_compare_exchange(lock.state, observed, next): // if next == 0: // let _wake = sync_atomic_notify_all(lock.state) // return SYNC_OK // let _parked = sync_atomic_wait_changed(lock.state, observed, SYNC_PARK_SLICE_MS) // // pub fn rwlock_write_lock(lock: RwLock) -> Int with Unsafe: // while true: // let observed = sync_atomic_load(lock.state, Ordering::Acquire) // if observed == 0: // if sync_atomic_compare_exchange(lock.state, 0, RWLOCK_WRITER_HELD): // return SYNC_OK // else: // let _parked = sync_atomic_wait_changed(lock.state, observed, SYNC_PARK_SLICE_MS) // // pub fn rwlock_try_write_lock(lock: RwLock) -> Int with Unsafe: // if sync_atomic_compare_exchange(lock.state, 0, RWLOCK_WRITER_HELD): // return SYNC_OK // return SYNC_ERR_BUSY // // pub fn rwlock_write_unlock(lock: RwLock) -> Int with Unsafe: // if sync_atomic_compare_exchange(lock.state, RWLOCK_WRITER_HELD, 0): // let _wake = sync_atomic_notify_all(lock.state) // return SYNC_OK // return SYNC_ERR_INVALID_STATE // // pub fn rwlock_reader_count(lock: RwLock) -> Int with Unsafe: // let observed = sync_atomic_load(lock.state, Ordering::Acquire) // if observed < 0: // return 0 // return observed // // pub fn rwlock_writer_held(lock: RwLock) -> Bool with Unsafe: // return sync_atomic_load(lock.state, Ordering::Acquire) == RWLOCK_WRITER_HELD // // // # --- Semaphore (Sleepable Counting Gate) --- // // pub struct Semaphore: // permits: ptr // // pub fn semaphore_new(initial: Int) -> Semaphore: // let permits = alloc_zeroed(1, "Int") // if initial > 0: // mem_store(permits, initial, "Int") // return Semaphore { permits: permits } // // pub fn semaphore_destroy(sema: Semaphore) -> Int: // decay sema.permits // return SYNC_OK // // pub fn semaphore_available(sema: Semaphore) -> Int with Unsafe: // return sync_atomic_load(sema.permits, Ordering::Acquire) // // pub fn semaphore_try_acquire(sema: Semaphore) -> Int with Unsafe: // while true: // let observed = sync_atomic_load(sema.permits, Ordering::Acquire) // if observed <= 0: // return SYNC_ERR_BUSY // if sync_atomic_compare_exchange(sema.permits, observed, observed - 1): // return SYNC_OK // return SYNC_ERR_BUSY // // pub fn semaphore_acquire(sema: Semaphore) -> Int with Unsafe: // while true: // let observed = sync_atomic_load(sema.permits, Ordering::Acquire) // if observed > 0: // if sync_atomic_compare_exchange(sema.permits, observed, observed - 1): // return SYNC_OK // else: // let _parked = sync_atomic_wait_changed(sema.permits, observed, SYNC_PARK_SLICE_MS) // // pub fn semaphore_release(sema: Semaphore, permits: Int) -> Int with Unsafe: // if permits <= 0: // return SYNC_ERR_NEGATIVE_COUNT // while true: // let observed = sync_atomic_load(sema.permits, Ordering::Acquire) // if observed > SYNC_INT_MAX - permits: // return SYNC_ERR_COUNT_OVERFLOW // if sync_atomic_compare_exchange(sema.permits, observed, observed + permits): // let _wake = sync_atomic_notify_all(sema.permits) // return SYNC_OK // let _parked = sync_atomic_wait_changed(sema.permits, observed, SYNC_PARK_SLICE_MS) // // // # --- CondVar (Epoch-Based Sleepable Notification Cell) --- // // pub struct CondVar: // epoch: ptr // // pub fn condvar_new() -> CondVar: // let epoch = alloc_zeroed(1, "Int") // return CondVar { epoch: epoch } // // pub fn condvar_destroy(cv: CondVar) -> Int: // decay cv.epoch // return SYNC_OK // // pub fn condvar_epoch(cv: CondVar) -> Int with Unsafe: // return sync_atomic_load(cv.epoch, Ordering::Acquire) // // pub fn condvar_wait_timeout(cv: CondVar, observed_epoch: Int, timeout_ms: Int) -> Int with Unsafe: // let result = sync_atomic_wait_changed(cv.epoch, observed_epoch, timeout_ms) // if result == 0: // return SYNC_ERR_TIMEOUT // if result < 0: // return result // return SYNC_OK // // pub fn condvar_wait_mcs_timeout(cv: CondVar, lock: McsMutex, node: ptr, timeout_ms: Int) -> Int with Unsafe: // let observed = condvar_epoch(cv) // let unlock_status = mcs_mutex_unlock(lock, node) // if unlock_status != SYNC_OK: // return unlock_status // let wait_status = condvar_wait_timeout(cv, observed, timeout_ms) // let lock_status = mcs_mutex_lock(lock, node) // if lock_status != SYNC_OK: // return lock_status // return wait_status // // pub fn condvar_notify_one(cv: CondVar) -> Int with Unsafe: // let _epoch = atomic_raw_fetch_add(cv.epoch, 1) // return sync_atomic_notify_one(cv.epoch) // // pub fn condvar_notify_all(cv: CondVar) -> Int with Unsafe: // let _epoch = atomic_raw_fetch_add(cv.epoch, 1) // return sync_atomic_notify_all(cv.epoch) //!end-kain-file //!kain-file // path = "tar.kn" // kind = "text" // encoding = "utf8" // bytes = 4305 // sha256 = "sha256:38398edca8a5a5ffe43eded1c71f0282a0e5c917db97bed7f48d32a7ff7aa40d" // trailing_newline = true //!kain-file-content // use std::memory // use std::io // // # --- TarEntry (Structured Archive Entry Descriptor) --- // // pub struct TarEntry: // name: String // size: Int // is_valid: Bool // // # --- TarWriter (Block-Oriented Stream Archiver) --- // // pub struct TarWriter: // dest: ptr // // pub fn tar_writer_new(dest: ptr) -> TarWriter: // return TarWriter { dest: dest } // // # Writes a 512-byte (64-word) TAR sector header to the BufferedWriter. // # Copies up to 96 characters of the name string into the header, and formats the file size. // pub fn tar_write_header(w: TarWriter, name: String, size_bytes: Int, flush_target: ptr) -> Int with Unsafe: // # 512 bytes = 64 Int words // let header = alloc_zeroed(64, "Int") // // # Store name characters into the first 12 words (96 bytes) // let name_len = len(name) // var i = 0 // while i < name_len and i < 96: // let char_val = ord(char_at(name, i)) // mem_store(ptr_offset(header, i, "Int"), char_val, "Int") // i = i + 1 // // # Store file size at word offset 16 (128 bytes) // mem_store(ptr_offset(header, 16, "Int"), size_bytes, "Int") // // # Store 'ustar' magic identifier at word offset 32 (256 bytes) // # 'u' = 117, 's' = 115, 't' = 116, 'a' = 97, 'r' = 114 // mem_store(ptr_offset(header, 32, "Int"), 117, "Int") // mem_store(ptr_offset(header, 33, "Int"), 115, "Int") // mem_store(ptr_offset(header, 34, "Int"), 116, "Int") // mem_store(ptr_offset(header, 35, "Int"), 97, "Int") // mem_store(ptr_offset(header, 36, "Int"), 114, "Int") // // # Write the 64-word header sector to the buffered writer // let _written = buffered_writer_write(w.dest, header, 64, flush_target) // decay header // return 0 // // # Writes file content blocks and pads the final block to a 512-byte (64-word) sector boundary. // pub fn tar_write_file_data(w: TarWriter, src: ptr, count_words: Int, flush_target: ptr) -> Int with Unsafe: // # Write the main data words // let _written = buffered_writer_write(w.dest, src, count_words, flush_target) // // # Pad to 64-word sector boundary // let remainder = count_words % 64 // if remainder > 0: // let pad_count = 64 - remainder // let pad = alloc_zeroed(pad_count, "Int") // let _ignored = buffered_writer_write(w.dest, pad, pad_count, flush_target) // decay pad // // return 0 // // // # --- TarReader (Block-Oriented Archive Extractor) --- // // pub struct TarReader: // src: ptr // // pub fn tar_reader_new(src: ptr) -> TarReader: // return TarReader { src: src } // // # Parses a 512-byte (64-word) sector header from the BufferedReader. // # Reconstructs the original file name and size metadata. // pub fn tar_read_entry(r: TarReader) -> TarEntry with Unsafe: // let header = alloc_zeroed(64, "Int") // let read_count = buffered_reader_read(r.src, header, 64) // if read_count < 64: // decay header // return TarEntry { name: "", size: 0, is_valid: false } // // # Verify if we hit the double-zero block denoting end of archive // let check_val = mem_load(header, "Int") // if check_val == 0: // decay header // return TarEntry { name: "", size: 0, is_valid: false } // // # Reconstruct name string from the first 12 words // var name = "" // var i = 0 // var done = false // while i < 96 and done == false: // let c = mem_load(ptr_offset(header, i, "Int"), "Int") // if c == 0: // done = true // else: // name = name + chr(c) // i = i + 1 // // # Extract size from word offset 16 // let size = mem_load(ptr_offset(header, 16, "Int"), "Int") // decay header // // return TarEntry { name: name, size: size, is_valid: true } // // # Skips/reads the data sectors of the current entry to advance to the next archive sector. // pub fn tar_skip_data(r: TarReader, size_words: Int) -> Int with Unsafe: // # Compute total padded sectors // var sectors = size_words / 64 // if size_words % 64 > 0: // sectors = sectors + 1 // // let total_words = sectors * 64 // let skip_buf = alloc_zeroed(64, "Int") // // var s = 0 // while s < sectors: // let _read = buffered_reader_read(r.src, skip_buf, 64) // s = s + 1 // // decay skip_buf // return total_words //!end-kain-file //!kain-file // path = "target.kn" // kind = "text" // encoding = "utf8" // bytes = 1275 // sha256 = "sha256:3c721fcdcb1356d1cbb263e4863da0660e43796b5fd2cdbf53b90005aa76bff4" // trailing_newline = true //!kain-file-content // use std::platform // use std::runtime // // pub enum Arch: // X86_64 // Aarch64 // Wasm32 // Unknown // // pub enum OS: // Windows // Linux // Macos // Freestanding // Unknown // // pub enum Env: // Gnu // Musl // Msvc // Unknown // // pub struct Target: // arch: Arch // os: OS // env: Env // is_64bit: Bool // // # Queries the executing environment's target facts, aligning with standard platforms // pub fn target_current() -> Target: // # Query runtime platform facts // let plat_avail = platform_current_kind() // // var os = OS::Unknown // var env = Env::Unknown // var arch = Arch::X86_64 # Default target of native LLVM compiler // // if plat_avail == 1: # Windows kind // os = OS::Windows // env = Env::Msvc // elif plat_avail == 2: # Linux kind // os = OS::Linux // env = Env::Gnu // elif plat_avail == 3: # Macos kind // os = OS::Macos // env = Env::Unknown // // return Target { // arch: arch, // os: os, // env: env, // is_64bit: true // } // // # Verifies if the target environment supports specific hardware instruction features // pub fn target_has_feature(feature_key: String) -> Bool: // let code = runtime_cpu_has_capability(feature_key) // return code != 0 //!end-kain-file //!kain-file // path = "test.kn" // kind = "text" // encoding = "utf8" // bytes = 4602 // sha256 = "sha256:c9d299e28d18606cfa7910287f7c9b227e86d620d6369dd21fbcb97d16834fd9" // trailing_newline = true //!kain-file-content // use std::build // use std::proof // // pub const TEST_STATUS_PASS: Int = 0 // pub const TEST_STATUS_FAIL: Int = -1 // pub const TEST_STATUS_SKIP: Int = 1 // pub const TEST_STATUS_PROVED: Int = 2 // pub const TEST_STATUS_WITNESS: Int = 3 // // pub struct TestOutcome: // status: Int // label: String // detail: String // evidence: String // // pub fn test_outcome(status: Int, label: String, detail: String, evidence: String) -> TestOutcome: // return TestOutcome { status: status, label: label, detail: detail, evidence: evidence } // // pub fn test_pass(label: String) -> TestOutcome: // return test_outcome(TEST_STATUS_PASS, label, "passed", "") // // pub fn test_fail(label: String, detail: String) -> TestOutcome: // return test_outcome(TEST_STATUS_FAIL, label, detail, "") // // pub fn test_skip(label: String, reason: String) -> TestOutcome: // return test_outcome(TEST_STATUS_SKIP, label, reason, "") // // pub fn test_proved(label: String, evidence: String) -> TestOutcome: // return test_outcome(TEST_STATUS_PROVED, label, "solver returned unsat", evidence) // // pub fn test_witness(label: String, evidence: String) -> TestOutcome: // return test_outcome(TEST_STATUS_WITNESS, label, "solver returned sat", evidence) // // pub fn test_outcome_ok(outcome: TestOutcome) -> Bool: // return outcome.status == TEST_STATUS_PASS or outcome.status == TEST_STATUS_PROVED or outcome.status == TEST_STATUS_WITNESS // // pub fn test_bool(label: String, condition: Bool) -> TestOutcome: // if condition: // return test_pass(label) // return test_fail(label, "condition was false") // // pub fn test_status(label: String, status: Int) -> TestOutcome: // if status == 0: // return test_pass(label) // return test_fail(label, "status was non-zero") // // pub fn test_combine(left: TestOutcome, right: TestOutcome) -> TestOutcome: // if test_outcome_ok(left) == false: // return left // return right // // pub fn test_count_failure(outcome: TestOutcome, count: Int) -> Int: // if test_outcome_ok(outcome): // return count // return count + 1 // // pub fn test_expect_proof_assessment(assessment: ProofAssessment) -> TestOutcome: // if proof_assessment_ok(assessment) == false: // return test_fail(assessment.case_spec.label, proof_assessment_summary(assessment)) // if proof_outcome_is_skip(assessment.outcome): // return test_skip(assessment.case_spec.label, proof_assessment_summary(assessment)) // if proof_outcome_is_proved(assessment.outcome): // return test_outcome( // TEST_STATUS_PROVED, // assessment.case_spec.label, // proof_assessment_summary(assessment), // assessment.outcome.evidence // ) // if proof_outcome_is_witness(assessment.outcome): // var evidence = assessment.outcome.model // if evidence == "": // evidence = assessment.outcome.evidence // return test_outcome( // TEST_STATUS_WITNESS, // assessment.case_spec.label, // proof_assessment_summary(assessment), // evidence // ) // return test_outcome( // TEST_STATUS_PASS, // assessment.case_spec.label, // proof_assessment_summary(assessment), // assessment.outcome.evidence // ) // // pub fn test_expect_proof_suite(summary: ProofSuiteSummary) -> TestOutcome: // if proof_suite_ok(summary): // return test_outcome(TEST_STATUS_PASS, summary.label, proof_suite_summary_text(summary), "") // return test_fail(summary.label, proof_suite_summary_text(summary)) // // pub fn test_expect_case(spec: ProofCase, outcome: ProofOutcome) -> TestOutcome: // return test_expect_proof_assessment(proof_case_assess(spec, outcome)) // // pub fn test_expect_proved(outcome: ProofOutcome) -> TestOutcome: // return test_expect_case(proof_case(outcome.label).expect_proved(), outcome) // // pub fn test_expect_witness(outcome: ProofOutcome) -> TestOutcome: // return test_expect_case(proof_case(outcome.label).expect_witness(), outcome) // // pub fn test_assert_case(spec: ProofCase, backend_subject: Any) -> TestOutcome: // return test_expect_proof_assessment(proof_case_check(spec, backend_subject)) // // pub fn test_assert_unsat(label: String, solver: Any) -> TestOutcome: // return test_assert_case(proof_case(label).expect_proved(), solver) // // pub fn test_assert_sat(label: String, solver: Any) -> TestOutcome: // return test_assert_case(proof_case(label).expect_witness(), solver) // // pub fn test_task(id: String) -> BuildTaskSpec: // return build_task_of_kind(id, BUILD_KIND_TEST) // // pub fn test_suite(id: String) -> BuildTaskSpec: // return test_task(id) //!end-kain-file //!kain-file // path = "text.kn" // kind = "text" // encoding = "utf8" // bytes = 15106 // sha256 = "sha256:a58cb650401eeda18ea9653ca1fb3022253e2162c86f8ba745570ec64cba05d5" // trailing_newline = true //!kain-file-content // use std::ascii // use std::bytes // // pub struct TextSlice: // source: String // start: Int // length: Int // // pub struct StringView: // source: String // start: Int // length: Int // // pub struct TextUnescapeResult: // ok: Bool // value: String // error: String // // fn text_unescape_error(message: String) -> TextUnescapeResult: // return TextUnescapeResult { // ok: false, // value: "", // error: message // } // // fn text_int_clamp(value: Int, low: Int, high: Int) -> Int: // if value < low: // return low // if value > high: // return high // return value // // fn text_escape_hex_byte(value: Int) -> String: // return ascii_hex_char_lower((value >> 4) & 15) + ascii_hex_char_lower(value & 15) // // pub fn text_slice(source: String, start: Int, length: Int) -> TextSlice: // let source_len = len(source) // let safe_start = text_int_clamp(start, 0, source_len) // let safe_length = text_int_clamp(length, 0, source_len - safe_start) // return TextSlice { source: source, start: safe_start, length: safe_length } // // pub fn text_from(source: String) -> TextSlice: // return text_slice(source, 0, len(source)) // // pub fn text_view(source: String, start: Int, length: Int) -> TextSlice: // return text_slice(source, start, length) // // pub fn text_len(view: TextSlice) -> Int: // return view.length // // pub fn text_start(view: TextSlice) -> Int: // return view.start // // pub fn text_end(view: TextSlice) -> Int: // return view.start + view.length // // pub fn text_is_empty(view: TextSlice) -> Bool: // return view.length == 0 // // pub fn text_byte_at(view: TextSlice, index: Int) -> Int: // if index < 0: // return 0 // if index >= view.length: // return 0 // return byte_at(view.source, view.start + index) // // pub fn text_char_at(view: TextSlice, index: Int) -> String: // if index < 0: // return "" // if index >= view.length: // return "" // return char_at(view.source, view.start + index) // // pub fn text_find_from(view: TextSlice, needle: String, start: Int) -> Int: // let safe_start = text_int_clamp(start, 0, view.length) // if len(needle) == 0: // return safe_start // if len(needle) > view.length - safe_start: // return -1 // let found = find_substring_from(view.source, needle, view.start + safe_start) // if found < view.start + safe_start: // return -1 // if found + len(needle) > text_end(view): // return -1 // return found - view.start // // pub fn text_find(view: TextSlice, needle: String) -> Int: // return text_find_from(view, needle, 0) // // pub fn text_contains(view: TextSlice, needle: String) -> Bool: // return text_find(view, needle) >= 0 // // pub fn text_starts_with(view: TextSlice, needle: String) -> Bool: // if len(needle) > view.length: // return false // return text_find_from(view, needle, 0) == 0 // // pub fn text_ends_with(view: TextSlice, needle: String) -> Bool: // let needle_len = len(needle) // if needle_len > view.length: // return false // return text_find_from(view, needle, view.length - needle_len) == view.length - needle_len // // pub fn text_equals_string(view: TextSlice, other: String) -> Bool: // if view.length != len(other): // return false // var index = 0 // while index < view.length: // if text_byte_at(view, index) != byte_at(other, index): // return false // index = index + 1 // return true // // pub fn text_equals(left: TextSlice, right: TextSlice) -> Bool: // if left.length != right.length: // return false // var index = 0 // while index < left.length: // if text_byte_at(left, index) != text_byte_at(right, index): // return false // index = index + 1 // return true // // pub fn text_count(view: TextSlice, needle: String) -> Int: // let needle_len = len(needle) // if needle_len == 0: // return 0 // var total = 0 // var cursor = 0 // while cursor < view.length: // let found = text_find_from(view, needle, cursor) // if found < 0: // return total // total = total + 1 // cursor = found + needle_len // return total // // pub fn text_subslice(view: TextSlice, start: Int, length: Int) -> TextSlice: // let safe_start = text_int_clamp(start, 0, view.length) // let safe_length = text_int_clamp(length, 0, view.length - safe_start) // return text_slice(view.source, view.start + safe_start, safe_length) // // pub fn text_trim_left(view: TextSlice) -> TextSlice: // var offset = 0 // while offset < view.length: // if ascii_is_whitespace_byte(text_byte_at(view, offset)) == false: // return text_subslice(view, offset, view.length - offset) // offset = offset + 1 // return text_subslice(view, view.length, 0) // // pub fn text_trim_right(view: TextSlice) -> TextSlice: // var remaining = view.length // while remaining > 0: // if ascii_is_whitespace_byte(text_byte_at(view, remaining - 1)) == false: // return text_subslice(view, 0, remaining) // remaining = remaining - 1 // return text_subslice(view, 0, 0) // // pub fn text_trim(view: TextSlice) -> TextSlice: // return text_trim_right(text_trim_left(view)) // // pub fn text_materialize(view: TextSlice) -> String: // return substring(view.source, view.start, text_end(view)) // // pub fn text_as_bytes(view: TextSlice) -> ByteSlice: // return bytes_slice(view.source, view.start, view.length) // // pub fn text_from_bytes(view: ByteSlice) -> TextSlice: // return text_slice(view.source, view.start, view.length) // // pub fn text_bytes_array(view: TextSlice) -> Array: // return bytes_array(text_as_bytes(view)) // // pub fn text_from_byte_array(values: Array) -> String: // return bytes_from_array(values) // // pub fn text_escape_basic(source: String) -> String: // var output = "" // var index = 0 // while index < len(source): // let code = byte_at(source, index) // let ch = char_at(source, index) // if ch == "\\": // output = output + "\\\\" // else: // if ch == "\"": // output = output + "\\\"" // else: // if code == 8: // output = output + "\\b" // else: // if code == 9: // output = output + "\\t" // else: // if code == 10: // output = output + "\\n" // else: // if code == 12: // output = output + "\\f" // else: // if code == 13: // output = output + "\\r" // else: // if code >= 0 and code < 32: // output = output + "\\x" + text_escape_hex_byte(code) // else: // output = output + ch // index = index + 1 // return output // // pub fn text_unescape_basic(source: String) -> TextUnescapeResult: // var output = "" // var index = 0 // while index < len(source): // let ch = char_at(source, index) // if ch != "\\": // output = output + ch // index = index + 1 // else: // if index + 1 >= len(source): // return text_unescape_error("trailing escape") // let esc = char_at(source, index + 1) // if esc == "\\" or esc == "\"" or esc == "'": // output = output + esc // index = index + 2 // else: // if esc == "b": // output = output + chr(8) // index = index + 2 // else: // if esc == "t": // output = output + chr(9) // index = index + 2 // else: // if esc == "n": // output = output + chr(10) // index = index + 2 // else: // if esc == "f": // output = output + chr(12) // index = index + 2 // else: // if esc == "r": // output = output + chr(13) // index = index + 2 // else: // if esc == "x": // if index + 3 >= len(source): // return text_unescape_error("short hex escape") // let high = ascii_hex_value_byte(byte_at(source, index + 2)) // let low = ascii_hex_value_byte(byte_at(source, index + 3)) // if high < 0 or low < 0: // return text_unescape_error("invalid hex escape") // output = output + chr((high << 4) | low) // index = index + 4 // else: // return text_unescape_error("unsupported escape `" + esc + "`") // return TextUnescapeResult { // ok: true, // value: output, // error: "" // } // // pub fn text_lines(view: TextSlice) -> Array: // return text_split_lines(text_materialize(view)) // // pub fn string_view(source: String, start: Int, length: Int) -> StringView: // let source_len = len(source) // let safe_start = text_int_clamp(start, 0, source_len) // let safe_length = text_int_clamp(length, 0, source_len - safe_start) // return StringView { source: source, start: safe_start, length: safe_length } // // pub fn string_view_from(source: String) -> StringView: // return string_view(source, 0, len(source)) // // pub fn string_view_len(view: StringView) -> Int: // return view.length // // pub fn string_view_to_text(view: StringView) -> TextSlice: // return text_slice(view.source, view.start, view.length) // // pub fn string_view_materialize(view: StringView) -> String: // return text_materialize(string_view_to_text(view)) // // pub fn text_builder_new() -> BytesBuilder: // return bytes_builder_new() // // pub fn text_builder_len(builder: BytesBuilder) -> Int: // return bytes_builder_len(builder) // // pub fn text_builder_push(builder: BytesBuilder, value: String) -> BytesBuilder: // return bytes_builder_push_string(builder, value) // // pub fn text_builder_push_view(builder: BytesBuilder, view: TextSlice) -> BytesBuilder: // return bytes_builder_push_slice(builder, text_as_bytes(view)) // // pub fn text_builder_push_char_code(builder: BytesBuilder, codepoint: Int) -> BytesBuilder: // return bytes_builder_push_byte(builder, codepoint) // // pub fn text_builder_build(builder: BytesBuilder) -> String: // return bytes_builder_build(builder) // // pub fn text_trim_string(source: String) -> String: // return trim(source) // // pub fn text_contains_string(source: String, needle: String) -> Bool: // return contains(source, needle) // // pub fn text_starts_with_string(source: String, needle: String) -> Bool: // return starts_with(source, needle) // // pub fn text_ends_with_string(source: String, needle: String) -> Bool: // return ends_with(source, needle) // // pub fn text_substring_string(source: String, start: Int, length: Int) -> String: // let source_len = len(source) // let safe_start = text_int_clamp(start, 0, source_len) // let safe_length = text_int_clamp(length, 0, source_len - safe_start) // return substring(source, safe_start, safe_start + safe_length) // // pub fn text_upper(source: String) -> String: // return to_upper(source) // // pub fn text_lower(source: String) -> String: // return to_lower(source) // // pub fn text_replace_string(source: String, from: String, to: String) -> String: // if len(from) == 0: // return source // return replace(source, from, to) // // pub fn text_repeat(source: String, count: Int) -> String: // if count <= 0: // return "" // var output = "" // var index = 0 // while index < count: // output = output + source // index = index + 1 // return output // // pub fn text_split_string(source: String, separator: String) -> Array: // let mut items: Array = [] // if len(separator) == 0: // if len(source) == 0: // push(items, "") // return items // var index = 0 // while index < len(source): // push(items, char_at(source, index)) // index = index + 1 // return items // var cursor = 0 // while cursor <= len(source): // let found = find_substring_from(source, separator, cursor) // if found < cursor: // push(items, substring(source, cursor, len(source))) // return items // push(items, substring(source, cursor, found)) // cursor = found + len(separator) // if cursor > len(source): // push(items, "") // return items // return items // // pub fn text_join_strings(items: Array, separator: String) -> String: // var output = "" // var index = 0 // while index < len(items): // if index > 0: // output = output + separator // output = output + items[index] // index = index + 1 // return output // // pub fn text_split_lines(source: String) -> Array: // let mut lines: Array = [] // var line_start = 0 // var index = 0 // while index < len(source): // let ch = char_at(source, index) // if ch == "\n": // var line_end = index // if line_end > line_start and char_at(source, line_end - 1) == "\r": // line_end = line_end - 1 // push(lines, substring(source, line_start, line_end)) // line_start = index + 1 // else: // if ch == "\r": // push(lines, substring(source, line_start, index)) // if index + 1 < len(source) and char_at(source, index + 1) == "\n": // index = index + 1 // line_start = index + 1 // index = index + 1 // push(lines, substring(source, line_start, len(source))) // return lines // // pub fn text_tokenize_whitespace(source: String) -> Array: // let mut items: Array = [] // var current = "" // var index = 0 // while index < len(source): // let ch = char_at(source, index) // if ascii_is_whitespace(ch): // if len(current) > 0: // push(items, current) // current = "" // else: // current = current + ch // index = index + 1 // if len(current) > 0: // push(items, current) // return items // // pub fn text_ord(source: String) -> Int: // return ord(source) // // pub fn text_chr(codepoint: Int) -> String: // return chr(codepoint) // // pub fn text_to_string(value: Any) -> String: // return to_string(value) //!end-kain-file //!kain-file // path = "thread.kn" // kind = "text" // encoding = "utf8" // bytes = 1862 // sha256 = "sha256:54f1a138cea43f8cfc1cb1843d8a0517da9a5f1b66da4b99f6b2ac39f17a2239" // trailing_newline = true //!kain-file-content // use std::memory // use std::machine // // @extern // pub fn abi_thread_spawn(func: ptr, arg: ptr, thread_id_out: ptr, done_flag: ptr) -> ptr // // @extern // pub fn abi_thread_join(thread_handle: ptr) -> Int // // @extern // pub fn abi_thread_set_name(name: String) -> Int // // @extern // pub fn abi_thread_yield() -> Int // // pub struct ThreadEntry: // fn_ptr: ptr // // pub struct Thread: // handle: ptr // thread_id: ptr // done_flag: ptr // // pub fn thread_entry(func: ptr) -> ThreadEntry: // return ThreadEntry { fn_ptr: func } // // pub fn thread_spawn(func: ptr, arg: ptr) -> Thread: // let thread_id_out = alloc_zeroed(1, "Int") // let done_flag = alloc_zeroed(1, "Int") // let handle = abi_thread_spawn(func, arg, thread_id_out, done_flag) // return Thread { handle: handle, thread_id: thread_id_out, done_flag: done_flag } // // pub fn thread_spawn_entry(entry: ThreadEntry, arg: ptr) -> Thread: // return thread_spawn(entry.fn_ptr, arg) // // pub fn thread_join(thread: Thread) -> Int: // if ptr_to_int(thread.handle) == 0: // return -1 // let res = abi_thread_join(thread.handle) // decay thread.thread_id // decay thread.done_flag // return res // // pub fn thread_set_name(name: String) -> Int: // return abi_thread_set_name(name) // // pub fn thread_yield() -> Int: // return abi_thread_yield() // // pub fn thread_current_id() -> Int: // return current_thread_id() // // pub fn thread_affinity_mask() -> Int: // return current_thread_affinity_mask() // // pub fn thread_set_affinity(core_index: Int) -> Int with Unsafe: // return set_current_thread_affinity(core_index) // // pub fn thread_logical_count() -> Int: // return cpu_logical_count() // // pub fn thread_core_count() -> Int: // return cpu_core_count() // // pub fn thread_is_done(thread: Thread) -> Bool: // return mem_load(thread.done_flag, "Int") != 0 //!end-kain-file //!kain-file // path = "time.kn" // kind = "text" // encoding = "utf8" // bytes = 6359 // sha256 = "sha256:a35c9f5e520c692697a52c39acf6dde1f3aef124326a89ce841ad04715559575" // trailing_newline = true //!kain-file-content // @extern // fn abi_now_millis() -> Int // // @extern // fn abi_sleep_millis(milliseconds: Int) -> Int // // pub fn native_now_millis() -> Int: // return abi_now_millis() // // pub fn native_sleep_millis(milliseconds: Int) -> Int: // return abi_sleep_millis(milliseconds) // // pub fn native_deadline_millis(duration_millis: Int) -> Int: // return native_now_millis() + duration_millis // // pub fn native_deadline_elapsed(deadline_millis: Int) -> Bool: // return native_now_millis() >= deadline_millis // // # root-domain aliases: generated public std names // pub fn now_millis() -> Int: // return native_now_millis() // // pub fn sleep_millis(milliseconds: Int) -> Int: // return native_sleep_millis(milliseconds) // // pub fn deadline_millis(duration_millis: Int) -> Int: // return native_deadline_millis(duration_millis) // // pub fn deadline_elapsed(deadline_millis: Int) -> Bool: // return native_deadline_elapsed(deadline_millis) // # end root-domain aliases // // # --- Rich Systems Primitives --- // // pub struct Duration: // millis: Int // // pub fn duration_from_millis(ms: Int) -> Duration: // return Duration { millis: ms } // // pub fn duration_from_secs(secs: Int) -> Duration: // return Duration { millis: secs * 1000 } // // pub fn duration_from_mins(mins: Int) -> Duration: // return Duration { millis: mins * 60000 } // // pub fn duration_from_hours(hours: Int) -> Duration: // return Duration { millis: hours * 3600000 } // // pub fn duration_to_millis(self: Duration) -> Int: // return self.millis // // pub fn duration_to_secs(self: Duration) -> Int: // return self.millis / 1000 // // pub fn duration_add(a: Duration, b: Duration) -> Duration: // return Duration { millis: a.millis + b.millis } // // pub fn duration_sub(a: Duration, b: Duration) -> Duration: // var diff = a.millis - b.millis // if diff < 0: // diff = 0 // return Duration { millis: diff } // // pub fn duration_compare(a: Duration, b: Duration) -> Int: // if a.millis < b.millis: // return -1 // elif a.millis > b.millis: // return 1 // return 0 // // // pub struct Instant: // millis: Int // // pub fn instant_now() -> Instant: // return Instant { millis: now_millis() } // // pub fn instant_elapsed(self: Instant) -> Duration: // let now = now_millis() // var diff = now - self.millis // if diff < 0: // diff = 0 // return Duration { millis: diff } // // pub fn instant_add_duration(self: Instant, dur: Duration) -> Instant: // return Instant { millis: self.millis + dur.millis } // // pub fn instant_sub_instant(self: Instant, other: Instant) -> Duration: // var diff = self.millis - other.millis // if diff < 0: // diff = 0 // return Duration { millis: diff } // // pub fn instant_compare(a: Instant, b: Instant) -> Int: // if a.millis < b.millis: // return -1 // elif a.millis > b.millis: // return 1 // return 0 // // // pub struct Deadline: // target: Instant // // pub fn deadline_from_duration(dur: Duration) -> Deadline: // let now = now_millis() // return Deadline { target: Instant { millis: now + dur.millis } } // // pub fn deadline_is_elapsed(self: Deadline) -> Bool: // return now_millis() >= self.target.millis // // pub fn deadline_remaining(self: Deadline) -> Duration: // let now = now_millis() // var diff = self.target.millis - now // if diff < 0: // diff = 0 // return Duration { millis: diff } // // // pub struct Ticker: // next_tick: Instant // interval: Duration // // pub fn ticker_new(interval: Duration) -> Ticker: // let now = now_millis() // return Ticker { next_tick: Instant { millis: now + interval.millis }, interval: interval } // // pub fn ticker_next(t: Ticker) -> Ticker: // let now = now_millis() // let diff = t.next_tick.millis - now // if diff > 0: // let _ignored = sleep_millis(diff) // return Ticker { next_tick: Instant { millis: t.next_tick.millis + t.interval.millis }, interval: t.interval } // // // # --- Gregorian UTC DateTime Decomposition --- // // pub struct DateTime: // year: Int // month: Int // day: Int // hour: Int // minute: Int // second: Int // millis: Int // // pub fn datetime_from_epoch_millis(epoch_ms: Int) -> DateTime: // if epoch_ms < 0: // return DateTime { // year: 1970, // month: 1, // day: 1, // hour: 0, // minute: 0, // second: 0, // millis: 0 // } // // let total_secs = epoch_ms / 1000 // let sub_ms = epoch_ms % 1000 // // var remaining_days = total_secs / 86400 // let seconds_in_day = total_secs % 86400 // // let hour = seconds_in_day / 3600 // let minutes_in_hour = seconds_in_day % 3600 // let minute = minutes_in_hour / 60 // let second = minutes_in_hour % 60 // // var year = 1970 // var done = false // while done == false: // var days_in_year = 365 // var is_leap = false // if year % 4 == 0: // if year % 100 != 0: // is_leap = true // elif year % 400 == 0: // is_leap = true // // if is_leap: // days_in_year = 366 // // if remaining_days >= days_in_year: // remaining_days = remaining_days - days_in_year // year = year + 1 // else: // done = true // // var month = 1 // var month_done = false // while month_done == false: // var days_in_month = 31 // if month == 2: // var is_leap = false // if year % 4 == 0: // if year % 100 != 0: // is_leap = true // elif year % 400 == 0: // is_leap = true // // if is_leap: // days_in_month = 29 // else: // days_in_month = 28 // elif month == 4: // days_in_month = 30 // elif month == 6: // days_in_month = 30 // elif month == 9: // days_in_month = 30 // elif month == 11: // days_in_month = 30 // // if remaining_days >= days_in_month: // remaining_days = remaining_days - days_in_month // month = month + 1 // else: // month_done = true // // let day = remaining_days + 1 // return DateTime { // year: year, // month: month, // day: day, // hour: hour, // minute: minute, // second: second, // millis: sub_ms // } //!end-kain-file //!kain-file // path = "tls.kn" // kind = "text" // encoding = "utf8" // bytes = 1288 // sha256 = "sha256:80a5de8f0f3fe4ee964432f212324752959d3e9019810a5c9cf9903fa628f4d0" // trailing_newline = true //!kain-file-content // use std::http // use std::net // // pub fn tls_client_state() -> Int: // return net_capability_state("tls.client") // // pub fn tls_client_supported() -> Bool: // return net_capability_supported("tls.client") // // pub fn tls_client_available() -> Bool: // return net_capability_available("tls.client") // // pub fn tls_platform_name() -> String: // return net_platform_name() // // pub fn tls_https_request_create(method: String, url: String) -> Int: // return request_create(method, url) // // pub fn tls_https_request_set_header(request_id: Int, key: String, value: String) -> Int: // return request_set_header(request_id, key, value) // // pub fn tls_https_request_set_body_text(request_id: Int, payload: String) -> Int: // return request_set_body_text(request_id, payload) // // pub fn tls_https_request_set_timeout(request_id: Int, timeout_ms: Int) -> Int: // return request_set_timeout(request_id, timeout_ms) // // pub fn tls_https_client_send(request_id: Int) -> Int: // return client_send(request_id) // // pub fn tls_https_response_protocol(response_id: Int) -> String: // return response_protocol(response_id) // // pub fn tls_https_get_text(url: String) -> String: // let request = tls_https_request_create("GET", url) // let response = tls_https_client_send(request) // return response_body_text(response) //!end-kain-file //!kain-file // path = "ui.kn" // kind = "text" // encoding = "utf8" // bytes = 68189 // sha256 = "sha256:94ee21aaaa45bdb72224815d8449a8aa91e0c5e16ee54675c87ea14d74b05bc4" // trailing_newline = true //!kain-file-content // use std::graphics::shared // use std::input // // @extern // fn abi_ui_reset() -> Int // // @extern // fn abi_ui_session_create(app_name: String, width: Int, height: Int) -> Int // // @extern // fn abi_ui_session_destroy(session_id: Int) -> Int // // @extern // fn abi_ui_session_count() -> Int // // @extern // fn abi_ui_window_open(session_id: Int, title: String, width: Int, height: Int) -> Int // // @extern // fn abi_ui_window_close(session_id: Int) -> Int // // @extern // fn abi_ui_begin_frame(session_id: Int, delta_ms: Float) -> Int // // @extern // fn abi_ui_end_frame(session_id: Int) -> Int // // @extern // fn abi_ui_present(session_id: Int) -> Int // // @extern // fn abi_ui_frame_index(session_id: Int) -> Int // // @extern // fn abi_ui_last_presented_frame(session_id: Int) -> Int // // @extern // fn abi_ui_node_create(session_id: Int, kind: String) -> Int // // @extern // fn abi_ui_node_destroy(session_id: Int, node_id: Int) -> Int // // @extern // fn abi_ui_node_count(session_id: Int) -> Int // // @extern // fn abi_ui_node_exists(session_id: Int, node_id: Int) -> Int // // @extern // fn abi_ui_node_set_parent(session_id: Int, node_id: Int, parent_id: Int) -> Int // // @extern // fn abi_ui_node_parent(session_id: Int, node_id: Int) -> Int // // @extern // fn abi_ui_node_child_count(session_id: Int, node_id: Int) -> Int // // @extern // fn abi_ui_node_set_rect(session_id: Int, node_id: Int, x: Float, y: Float, width: Float, height: Float) -> Int // // @extern // fn abi_ui_node_x(session_id: Int, node_id: Int) -> Float // // @extern // fn abi_ui_node_y(session_id: Int, node_id: Int) -> Float // // @extern // fn abi_ui_node_width(session_id: Int, node_id: Int) -> Float // // @extern // fn abi_ui_node_height(session_id: Int, node_id: Int) -> Float // // @extern // fn abi_ui_node_set_text(session_id: Int, node_id: Int, text: String) -> Int // // @extern // fn abi_ui_node_text(session_id: Int, node_id: Int) -> String // // @extern // fn abi_ui_node_kind(session_id: Int, node_id: Int) -> String // // @extern // fn abi_ui_node_set_flag(session_id: Int, node_id: Int, flag: String, enabled: Int) -> Int // // @extern // fn abi_ui_node_has_flag(session_id: Int, node_id: Int, flag: String) -> Int // // @extern // fn abi_ui_node_set_style_i64(session_id: Int, node_id: Int, key: String, value: Int) -> Int // // @extern // fn abi_ui_node_set_style_f64(session_id: Int, node_id: Int, key: String, value: Float) -> Int // // @extern // fn abi_ui_node_set_style_string(session_id: Int, node_id: Int, key: String, value: String) -> Int // // @extern // fn abi_ui_node_style_i64(session_id: Int, node_id: Int, key: String, fallback: Int) -> Int // // @extern // fn abi_ui_node_style_f64(session_id: Int, node_id: Int, key: String, fallback: Float) -> Float // // @extern // fn abi_ui_node_style_string(session_id: Int, node_id: Int, key: String, fallback: String) -> String // // @extern // fn abi_ui_node_set_state_i64(session_id: Int, node_id: Int, key: String, value: Int) -> Int // // @extern // fn abi_ui_node_set_state_f64(session_id: Int, node_id: Int, key: String, value: Float) -> Int // // @extern // fn abi_ui_node_set_state_string(session_id: Int, node_id: Int, key: String, value: String) -> Int // // @extern // fn abi_ui_node_state_i64(session_id: Int, node_id: Int, key: String, fallback: Int) -> Int // // @extern // fn abi_ui_node_state_f64(session_id: Int, node_id: Int, key: String, fallback: Float) -> Float // // @extern // fn abi_ui_node_state_string(session_id: Int, node_id: Int, key: String, fallback: String) -> String // // @extern // fn abi_ui_state_count(session_id: Int) -> Int // // @extern // fn abi_ui_focus(session_id: Int, node_id: Int) -> Int // // @extern // fn abi_ui_focused_node(session_id: Int) -> Int // // @extern // fn abi_ui_hit_test(session_id: Int, x: Float, y: Float) -> Int // // @extern // fn abi_ui_mark_dirty(session_id: Int, node_id: Int, reason: Int) -> Int // // @extern // fn abi_ui_dirty_count(session_id: Int) -> Int // // @extern // fn abi_ui_push_event(session_id: Int, kind: String, target_node_id: Int, x: Float, y: Float, key_code: Int, text: String) -> Int // // @extern // fn abi_ui_poll_event(session_id: Int) -> Int // // @extern // fn abi_ui_event_kind(session_id: Int) -> String // // @extern // fn abi_ui_event_target(session_id: Int) -> Int // // @extern // fn abi_ui_event_x(session_id: Int) -> Float // // @extern // fn abi_ui_event_y(session_id: Int) -> Float // // @extern // fn abi_ui_event_key_code(session_id: Int) -> Int // // @extern // fn abi_ui_event_text(session_id: Int) -> String // // @extern // fn abi_ui_draw_rect(session_id: Int, node_id: Int, x: Float, y: Float, width: Float, height: Float, style_key: String) -> Int // // @extern // fn abi_ui_draw_text(session_id: Int, node_id: Int, font_resource_id: Int, x: Float, y: Float, text: String, style_key: String) -> Int // // @extern // fn abi_ui_draw_command_count(session_id: Int) -> Int // // @extern // fn abi_ui_draw_command_kind(session_id: Int, command_index: Int) -> String // // @extern // fn abi_ui_draw_command_node(session_id: Int, command_index: Int) -> Int // // @extern // fn abi_ui_host_attach(session_id: Int, backend_id: String) -> Int // // @extern // fn abi_ui_host_pump(session_id: Int) -> Int // // @extern // fn abi_ui_host_present(session_id: Int) -> Int // // @extern // fn abi_ui_host_presented_draw_count(session_id: Int) -> Int // // @extern // fn abi_ui_host_frame_hash(session_id: Int) -> Int // // @extern // fn abi_ui_host_should_close(session_id: Int) -> Int // // @extern // fn abi_ui_host_backend(session_id: Int) -> String // // @extern // fn abi_ui_node_set_stable_key(session_id: Int, node_id: Int, stable_key: String) -> Int // // @extern // fn abi_ui_node_stable_key(session_id: Int, node_id: Int) -> String // // @extern // fn abi_ui_node_find_by_stable_key(session_id: Int, stable_key: String) -> Int // // @extern // fn abi_ui_accessibility_set_role(session_id: Int, node_id: Int, role: String) -> Int // // @extern // fn abi_ui_accessibility_set_label(session_id: Int, node_id: Int, label: String) -> Int // // @extern // fn abi_ui_accessibility_role(session_id: Int, node_id: Int) -> String // // @extern // fn abi_ui_accessibility_label(session_id: Int, node_id: Int) -> String // // @extern // fn abi_ui_draw_command_resource(session_id: Int, command_index: Int) -> Int // // @extern // fn abi_ui_draw_command_x(session_id: Int, command_index: Int) -> Float // // @extern // fn abi_ui_draw_command_y(session_id: Int, command_index: Int) -> Float // // @extern // fn abi_ui_draw_command_width(session_id: Int, command_index: Int) -> Float // // @extern // fn abi_ui_draw_command_height(session_id: Int, command_index: Int) -> Float // // @extern // fn abi_ui_draw_command_text(session_id: Int, command_index: Int) -> String // // @extern // fn abi_ui_draw_command_style(session_id: Int, command_index: Int) -> String // // @extern // fn abi_ui_draw_command_font(session_id: Int, command_index: Int) -> Int // // @extern // fn abi_ui_resource_create(session_id: Int, resource_type: String, key: String, width: Int, height: Int, byte_length: Int) -> Int // // @extern // fn abi_ui_font_create(session_id: Int, key: String, family: String, size: Float) -> Int // // @extern // fn abi_ui_texture_create(session_id: Int, key: String, width: Int, height: Int, format: String, byte_length: Int) -> Int // // @extern // fn abi_ui_canvas_create(session_id: Int, key: String, width: Int, height: Int) -> Int // // @extern // fn abi_ui_shader_create(session_id: Int, key: String, stage: String, byte_length: Int) -> Int // // @extern // fn abi_ui_resource_set_bytes_hex(session_id: Int, resource_id: Int, bytes_hex: String) -> Int // // @extern // fn abi_ui_resource_count(session_id: Int) -> Int // // @extern // fn abi_ui_resource_exists(session_id: Int, resource_id: Int) -> Int // // @extern // fn abi_ui_resource_type(session_id: Int, resource_id: Int) -> String // // @extern // fn abi_ui_resource_key(session_id: Int, resource_id: Int) -> String // // @extern // fn abi_ui_resource_width(session_id: Int, resource_id: Int) -> Int // // @extern // fn abi_ui_resource_height(session_id: Int, resource_id: Int) -> Int // // @extern // fn abi_ui_resource_byte_length(session_id: Int, resource_id: Int) -> Int // // @extern // fn abi_ui_text_measure_width(session_id: Int, font_resource_id: Int, text: String) -> Float // // @extern // fn abi_ui_text_measure_height(session_id: Int, font_resource_id: Int, text: String) -> Float // // @extern // fn abi_ui_draw_resource(session_id: Int, node_id: Int, resource_id: Int, x: Float, y: Float, width: Float, height: Float, style_key: String) -> Int // // @extern // fn abi_ui_clipboard_set_text(session_id: Int, text: String) -> Int // // @extern // fn abi_ui_clipboard_text(session_id: Int) -> String // // @extern // fn abi_ui_ime_begin(session_id: Int, node_id: Int) -> Int // // @extern // fn abi_ui_ime_commit_text(session_id: Int, text: String) -> Int // // @extern // fn abi_ui_ime_end(session_id: Int) -> Int // // @extern // fn abi_ui_ime_active_node(session_id: Int) -> Int // // @extern // fn abi_ui_ime_text(session_id: Int) -> String // // @extern // fn abi_ui_drag_begin(session_id: Int, node_id: Int, payload: String, x: Float, y: Float) -> Int // // @extern // fn abi_ui_drag_update(session_id: Int, x: Float, y: Float, drop_target_node_id: Int) -> Int // // @extern // fn abi_ui_drag_drop(session_id: Int, drop_target_node_id: Int) -> Int // // @extern // fn abi_ui_drag_active_node(session_id: Int) -> Int // // @extern // fn abi_ui_drag_drop_target(session_id: Int) -> Int // // @extern // fn abi_ui_drag_x(session_id: Int) -> Float // // @extern // fn abi_ui_drag_y(session_id: Int) -> Float // // @extern // fn abi_ui_drag_payload(session_id: Int) -> String // // @extern // fn abi_ui_menu_create(session_id: Int, key: String) -> Int // // @extern // fn abi_ui_menu_add_item(session_id: Int, menu_id: Int, key: String, label: String, command_id: Int) -> Int // // @extern // fn abi_ui_menu_open(session_id: Int, menu_id: Int, x: Float, y: Float) -> Int // // @extern // fn abi_ui_menu_active(session_id: Int) -> Int // // @extern // fn abi_ui_menu_item_count(session_id: Int, menu_id: Int) -> Int // // @extern // fn abi_ui_menu_item_label(session_id: Int, menu_id: Int, item_index: Int) -> String // // @extern // fn abi_ui_menu_item_command(session_id: Int, menu_id: Int, item_index: Int) -> Int // // @extern // fn abi_ui_dialog_request(session_id: Int, kind: String, title: String, message: String) -> Int // // @extern // fn abi_ui_dialog_active(session_id: Int) -> Int // // @extern // fn abi_ui_dialog_kind(session_id: Int, dialog_id: Int) -> String // // @extern // fn abi_ui_dialog_title(session_id: Int, dialog_id: Int) -> String // // @extern // fn abi_ui_dialog_message(session_id: Int, dialog_id: Int) -> String // // @extern // fn abi_ui_dialog_respond(session_id: Int, dialog_id: Int, result: Int, response_text: String) -> Int // // @extern // fn abi_ui_dialog_poll_response(session_id: Int) -> Int // // @extern // fn abi_ui_dialog_response_text(session_id: Int) -> String // // @extern // fn abi_ui_hot_reload_begin(session_id: Int, revision_key: String) -> Int // // @extern // fn abi_ui_hot_reload_commit(session_id: Int) -> Int // // @extern // fn abi_ui_hot_reload_generation(session_id: Int) -> Int // // @extern // fn abi_ui_hot_reload_key(session_id: Int) -> String // // pub fn native_ui_reset() -> Int: // return abi_ui_reset() // // pub fn native_ui_session_create(app_name: String, width: Int, height: Int) -> Int: // return abi_ui_session_create(app_name, width, height) // // pub fn native_ui_session_destroy(session_id: Int) -> Int: // return abi_ui_session_destroy(session_id) // // pub fn native_ui_session_count() -> Int: // return abi_ui_session_count() // // pub fn native_ui_window_open(session_id: Int, title: String, width: Int, height: Int) -> Int: // return abi_ui_window_open(session_id, title, width, height) // // pub fn native_ui_window_close(session_id: Int) -> Int: // return abi_ui_window_close(session_id) // // pub fn native_ui_begin_frame(session_id: Int, delta_ms: Float) -> Int: // return abi_ui_begin_frame(session_id, delta_ms) // // pub fn native_ui_end_frame(session_id: Int) -> Int: // return abi_ui_end_frame(session_id) // // pub fn native_ui_present(session_id: Int) -> Int: // return abi_ui_present(session_id) // // pub fn native_ui_frame_index(session_id: Int) -> Int: // return abi_ui_frame_index(session_id) // // pub fn native_ui_last_presented_frame(session_id: Int) -> Int: // return abi_ui_last_presented_frame(session_id) // // pub fn native_ui_node_create(session_id: Int, kind: String) -> Int: // return abi_ui_node_create(session_id, kind) // // pub fn native_ui_node_destroy(session_id: Int, node_id: Int) -> Int: // return abi_ui_node_destroy(session_id, node_id) // // pub fn native_ui_node_count(session_id: Int) -> Int: // return abi_ui_node_count(session_id) // // pub fn native_ui_node_exists(session_id: Int, node_id: Int) -> Int: // return abi_ui_node_exists(session_id, node_id) // // pub fn native_ui_node_set_parent(session_id: Int, node_id: Int, parent_id: Int) -> Int: // return abi_ui_node_set_parent(session_id, node_id, parent_id) // // pub fn native_ui_node_parent(session_id: Int, node_id: Int) -> Int: // return abi_ui_node_parent(session_id, node_id) // // pub fn native_ui_node_child_count(session_id: Int, node_id: Int) -> Int: // return abi_ui_node_child_count(session_id, node_id) // // pub fn native_ui_node_set_rect(session_id: Int, node_id: Int, x: Float, y: Float, width: Float, height: Float) -> Int: // return abi_ui_node_set_rect(session_id, node_id, x, y, width, height) // // pub fn native_ui_node_x(session_id: Int, node_id: Int) -> Float: // return abi_ui_node_x(session_id, node_id) // // pub fn native_ui_node_y(session_id: Int, node_id: Int) -> Float: // return abi_ui_node_y(session_id, node_id) // // pub fn native_ui_node_width(session_id: Int, node_id: Int) -> Float: // return abi_ui_node_width(session_id, node_id) // // pub fn native_ui_node_height(session_id: Int, node_id: Int) -> Float: // return abi_ui_node_height(session_id, node_id) // // pub fn native_ui_node_set_text(session_id: Int, node_id: Int, text: String) -> Int: // return abi_ui_node_set_text(session_id, node_id, text) // // pub fn native_ui_node_text(session_id: Int, node_id: Int) -> String: // return abi_ui_node_text(session_id, node_id) // // pub fn native_ui_node_kind(session_id: Int, node_id: Int) -> String: // return abi_ui_node_kind(session_id, node_id) // // pub fn native_ui_node_set_flag(session_id: Int, node_id: Int, flag: String, enabled: Int) -> Int: // return abi_ui_node_set_flag(session_id, node_id, flag, enabled) // // pub fn native_ui_node_has_flag(session_id: Int, node_id: Int, flag: String) -> Int: // return abi_ui_node_has_flag(session_id, node_id, flag) // // pub fn native_ui_node_set_style_i64(session_id: Int, node_id: Int, key: String, value: Int) -> Int: // return abi_ui_node_set_style_i64(session_id, node_id, key, value) // // pub fn native_ui_node_set_style_f64(session_id: Int, node_id: Int, key: String, value: Float) -> Int: // return abi_ui_node_set_style_f64(session_id, node_id, key, value) // // pub fn native_ui_node_set_style_string(session_id: Int, node_id: Int, key: String, value: String) -> Int: // return abi_ui_node_set_style_string(session_id, node_id, key, value) // // pub fn native_ui_node_style_i64(session_id: Int, node_id: Int, key: String, fallback: Int) -> Int: // return abi_ui_node_style_i64(session_id, node_id, key, fallback) // // pub fn native_ui_node_style_f64(session_id: Int, node_id: Int, key: String, fallback: Float) -> Float: // return abi_ui_node_style_f64(session_id, node_id, key, fallback) // // pub fn native_ui_node_style_string(session_id: Int, node_id: Int, key: String, fallback: String) -> String: // return abi_ui_node_style_string(session_id, node_id, key, fallback) // // pub fn native_ui_node_set_state_i64(session_id: Int, node_id: Int, key: String, value: Int) -> Int: // return abi_ui_node_set_state_i64(session_id, node_id, key, value) // // pub fn native_ui_node_set_state_f64(session_id: Int, node_id: Int, key: String, value: Float) -> Int: // return abi_ui_node_set_state_f64(session_id, node_id, key, value) // // pub fn native_ui_node_set_state_string(session_id: Int, node_id: Int, key: String, value: String) -> Int: // return abi_ui_node_set_state_string(session_id, node_id, key, value) // // pub fn native_ui_node_state_i64(session_id: Int, node_id: Int, key: String, fallback: Int) -> Int: // return abi_ui_node_state_i64(session_id, node_id, key, fallback) // // pub fn native_ui_node_state_f64(session_id: Int, node_id: Int, key: String, fallback: Float) -> Float: // return abi_ui_node_state_f64(session_id, node_id, key, fallback) // // pub fn native_ui_node_state_string(session_id: Int, node_id: Int, key: String, fallback: String) -> String: // return abi_ui_node_state_string(session_id, node_id, key, fallback) // // pub fn native_ui_state_count(session_id: Int) -> Int: // return abi_ui_state_count(session_id) // // pub fn native_ui_focus(session_id: Int, node_id: Int) -> Int: // return abi_ui_focus(session_id, node_id) // // pub fn native_ui_focused_node(session_id: Int) -> Int: // return abi_ui_focused_node(session_id) // // pub fn native_ui_hit_test(session_id: Int, x: Float, y: Float) -> Int: // return abi_ui_hit_test(session_id, x, y) // // pub fn native_ui_mark_dirty(session_id: Int, node_id: Int, reason: Int) -> Int: // return abi_ui_mark_dirty(session_id, node_id, reason) // // pub fn native_ui_dirty_count(session_id: Int) -> Int: // return abi_ui_dirty_count(session_id) // // pub fn native_ui_push_event(session_id: Int, kind: String, target_node_id: Int, x: Float, y: Float, key_code: Int, text: String) -> Int: // return abi_ui_push_event(session_id, kind, target_node_id, x, y, key_code, text) // // pub fn native_ui_poll_event(session_id: Int) -> Int: // return abi_ui_poll_event(session_id) // // pub fn native_ui_event_kind(session_id: Int) -> String: // return abi_ui_event_kind(session_id) // // pub fn native_ui_event_target(session_id: Int) -> Int: // return abi_ui_event_target(session_id) // // pub fn native_ui_event_x(session_id: Int) -> Float: // return abi_ui_event_x(session_id) // // pub fn native_ui_event_y(session_id: Int) -> Float: // return abi_ui_event_y(session_id) // // pub fn native_ui_event_key_code(session_id: Int) -> Int: // return abi_ui_event_key_code(session_id) // // pub fn native_ui_event_text(session_id: Int) -> String: // return abi_ui_event_text(session_id) // // pub fn native_ui_draw_rect(session_id: Int, node_id: Int, x: Float, y: Float, width: Float, height: Float, style_key: String) -> Int: // return abi_ui_draw_rect(session_id, node_id, x, y, width, height, style_key) // // pub fn native_ui_draw_text(session_id: Int, node_id: Int, font_resource_id: Int, x: Float, y: Float, text: String, style_key: String) -> Int: // return abi_ui_draw_text(session_id, node_id, font_resource_id, x, y, text, style_key) // // pub fn native_ui_draw_command_count(session_id: Int) -> Int: // return abi_ui_draw_command_count(session_id) // // pub fn native_ui_draw_command_kind(session_id: Int, command_index: Int) -> String: // return abi_ui_draw_command_kind(session_id, command_index) // // pub fn native_ui_draw_command_node(session_id: Int, command_index: Int) -> Int: // return abi_ui_draw_command_node(session_id, command_index) // // pub fn native_ui_host_attach(session_id: Int, backend_id: String) -> Int: // return abi_ui_host_attach(session_id, backend_id) // // pub fn native_ui_host_pump(session_id: Int) -> Int: // return abi_ui_host_pump(session_id) // // pub fn native_ui_host_present(session_id: Int) -> Int: // return abi_ui_host_present(session_id) // // pub fn native_ui_host_presented_draw_count(session_id: Int) -> Int: // return abi_ui_host_presented_draw_count(session_id) // // pub fn native_ui_host_frame_hash(session_id: Int) -> Int: // return abi_ui_host_frame_hash(session_id) // // pub fn native_ui_host_should_close(session_id: Int) -> Int: // return abi_ui_host_should_close(session_id) // // pub fn native_ui_host_backend(session_id: Int) -> String: // return abi_ui_host_backend(session_id) // // pub fn native_ui_node_set_stable_key(session_id: Int, node_id: Int, stable_key: String) -> Int: // return abi_ui_node_set_stable_key(session_id, node_id, stable_key) // // pub fn native_ui_node_stable_key(session_id: Int, node_id: Int) -> String: // return abi_ui_node_stable_key(session_id, node_id) // // pub fn native_ui_node_find_by_stable_key(session_id: Int, stable_key: String) -> Int: // return abi_ui_node_find_by_stable_key(session_id, stable_key) // // pub fn native_ui_accessibility_set_role(session_id: Int, node_id: Int, role: String) -> Int: // return abi_ui_accessibility_set_role(session_id, node_id, role) // // pub fn native_ui_accessibility_set_label(session_id: Int, node_id: Int, label: String) -> Int: // return abi_ui_accessibility_set_label(session_id, node_id, label) // // pub fn native_ui_accessibility_role(session_id: Int, node_id: Int) -> String: // return abi_ui_accessibility_role(session_id, node_id) // // pub fn native_ui_accessibility_label(session_id: Int, node_id: Int) -> String: // return abi_ui_accessibility_label(session_id, node_id) // // pub fn native_ui_draw_command_resource(session_id: Int, command_index: Int) -> Int: // return abi_ui_draw_command_resource(session_id, command_index) // // pub fn native_ui_draw_command_x(session_id: Int, command_index: Int) -> Float: // return abi_ui_draw_command_x(session_id, command_index) // // pub fn native_ui_draw_command_y(session_id: Int, command_index: Int) -> Float: // return abi_ui_draw_command_y(session_id, command_index) // // pub fn native_ui_draw_command_width(session_id: Int, command_index: Int) -> Float: // return abi_ui_draw_command_width(session_id, command_index) // // pub fn native_ui_draw_command_height(session_id: Int, command_index: Int) -> Float: // return abi_ui_draw_command_height(session_id, command_index) // // pub fn native_ui_draw_command_text(session_id: Int, command_index: Int) -> String: // return abi_ui_draw_command_text(session_id, command_index) // // pub fn native_ui_draw_command_style(session_id: Int, command_index: Int) -> String: // return abi_ui_draw_command_style(session_id, command_index) // // pub fn native_ui_draw_command_font(session_id: Int, command_index: Int) -> Int: // return abi_ui_draw_command_font(session_id, command_index) // // pub fn native_ui_resource_create(session_id: Int, resource_type: String, key: String, width: Int, height: Int, byte_length: Int) -> Int: // return abi_ui_resource_create(session_id, resource_type, key, width, height, byte_length) // // pub fn native_ui_font_create(session_id: Int, key: String, family: String, size: Float) -> Int: // return abi_ui_font_create(session_id, key, family, size) // // pub fn native_ui_texture_create(session_id: Int, key: String, width: Int, height: Int, format: String, byte_length: Int) -> Int: // return abi_ui_texture_create(session_id, key, width, height, format, byte_length) // // pub fn native_ui_canvas_create(session_id: Int, key: String, width: Int, height: Int) -> Int: // return abi_ui_canvas_create(session_id, key, width, height) // // pub fn native_ui_shader_create(session_id: Int, key: String, stage: String, byte_length: Int) -> Int: // return abi_ui_shader_create(session_id, key, stage, byte_length) // // pub fn native_ui_resource_set_bytes_hex(session_id: Int, resource_id: Int, bytes_hex: String) -> Int: // return abi_ui_resource_set_bytes_hex(session_id, resource_id, bytes_hex) // // pub fn native_ui_resource_count(session_id: Int) -> Int: // return abi_ui_resource_count(session_id) // // pub fn native_ui_resource_exists(session_id: Int, resource_id: Int) -> Int: // return abi_ui_resource_exists(session_id, resource_id) // // pub fn native_ui_resource_type(session_id: Int, resource_id: Int) -> String: // return abi_ui_resource_type(session_id, resource_id) // // pub fn native_ui_resource_key(session_id: Int, resource_id: Int) -> String: // return abi_ui_resource_key(session_id, resource_id) // // pub fn native_ui_resource_width(session_id: Int, resource_id: Int) -> Int: // return abi_ui_resource_width(session_id, resource_id) // // pub fn native_ui_resource_height(session_id: Int, resource_id: Int) -> Int: // return abi_ui_resource_height(session_id, resource_id) // // pub fn native_ui_resource_byte_length(session_id: Int, resource_id: Int) -> Int: // return abi_ui_resource_byte_length(session_id, resource_id) // // pub fn native_ui_text_measure_width(session_id: Int, font_resource_id: Int, text: String) -> Float: // return abi_ui_text_measure_width(session_id, font_resource_id, text) // // pub fn native_ui_text_measure_height(session_id: Int, font_resource_id: Int, text: String) -> Float: // return abi_ui_text_measure_height(session_id, font_resource_id, text) // // pub fn native_ui_draw_resource(session_id: Int, node_id: Int, resource_id: Int, x: Float, y: Float, width: Float, height: Float, style_key: String) -> Int: // return abi_ui_draw_resource(session_id, node_id, resource_id, x, y, width, height, style_key) // // pub fn native_ui_clipboard_set_text(session_id: Int, text: String) -> Int: // return abi_ui_clipboard_set_text(session_id, text) // // pub fn native_ui_clipboard_text(session_id: Int) -> String: // return abi_ui_clipboard_text(session_id) // // pub fn native_ui_ime_begin(session_id: Int, node_id: Int) -> Int: // return abi_ui_ime_begin(session_id, node_id) // // pub fn native_ui_ime_commit_text(session_id: Int, text: String) -> Int: // return abi_ui_ime_commit_text(session_id, text) // // pub fn native_ui_ime_end(session_id: Int) -> Int: // return abi_ui_ime_end(session_id) // // pub fn native_ui_ime_active_node(session_id: Int) -> Int: // return abi_ui_ime_active_node(session_id) // // pub fn native_ui_ime_text(session_id: Int) -> String: // return abi_ui_ime_text(session_id) // // pub fn native_ui_drag_begin(session_id: Int, node_id: Int, payload: String, x: Float, y: Float) -> Int: // return abi_ui_drag_begin(session_id, node_id, payload, x, y) // // pub fn native_ui_drag_update(session_id: Int, x: Float, y: Float, drop_target_node_id: Int) -> Int: // return abi_ui_drag_update(session_id, x, y, drop_target_node_id) // // pub fn native_ui_drag_drop(session_id: Int, drop_target_node_id: Int) -> Int: // return abi_ui_drag_drop(session_id, drop_target_node_id) // // pub fn native_ui_drag_active_node(session_id: Int) -> Int: // return abi_ui_drag_active_node(session_id) // // pub fn native_ui_drag_drop_target(session_id: Int) -> Int: // return abi_ui_drag_drop_target(session_id) // // pub fn native_ui_drag_x(session_id: Int) -> Float: // return abi_ui_drag_x(session_id) // // pub fn native_ui_drag_y(session_id: Int) -> Float: // return abi_ui_drag_y(session_id) // // pub fn native_ui_drag_payload(session_id: Int) -> String: // return abi_ui_drag_payload(session_id) // // pub fn native_ui_menu_create(session_id: Int, key: String) -> Int: // return abi_ui_menu_create(session_id, key) // // pub fn native_ui_menu_add_item(session_id: Int, menu_id: Int, key: String, label: String, command_id: Int) -> Int: // return abi_ui_menu_add_item(session_id, menu_id, key, label, command_id) // // pub fn native_ui_menu_open(session_id: Int, menu_id: Int, x: Float, y: Float) -> Int: // return abi_ui_menu_open(session_id, menu_id, x, y) // // pub fn native_ui_menu_active(session_id: Int) -> Int: // return abi_ui_menu_active(session_id) // // pub fn native_ui_menu_item_count(session_id: Int, menu_id: Int) -> Int: // return abi_ui_menu_item_count(session_id, menu_id) // // pub fn native_ui_menu_item_label(session_id: Int, menu_id: Int, item_index: Int) -> String: // return abi_ui_menu_item_label(session_id, menu_id, item_index) // // pub fn native_ui_menu_item_command(session_id: Int, menu_id: Int, item_index: Int) -> Int: // return abi_ui_menu_item_command(session_id, menu_id, item_index) // // pub fn native_ui_dialog_request(session_id: Int, kind: String, title: String, message: String) -> Int: // return abi_ui_dialog_request(session_id, kind, title, message) // // pub fn native_ui_dialog_active(session_id: Int) -> Int: // return abi_ui_dialog_active(session_id) // // pub fn native_ui_dialog_kind(session_id: Int, dialog_id: Int) -> String: // return abi_ui_dialog_kind(session_id, dialog_id) // // pub fn native_ui_dialog_title(session_id: Int, dialog_id: Int) -> String: // return abi_ui_dialog_title(session_id, dialog_id) // // pub fn native_ui_dialog_message(session_id: Int, dialog_id: Int) -> String: // return abi_ui_dialog_message(session_id, dialog_id) // // pub fn native_ui_dialog_respond(session_id: Int, dialog_id: Int, result: Int, response_text: String) -> Int: // return abi_ui_dialog_respond(session_id, dialog_id, result, response_text) // // pub fn native_ui_dialog_poll_response(session_id: Int) -> Int: // return abi_ui_dialog_poll_response(session_id) // // pub fn native_ui_dialog_response_text(session_id: Int) -> String: // return abi_ui_dialog_response_text(session_id) // // pub fn native_ui_hot_reload_begin(session_id: Int, revision_key: String) -> Int: // return abi_ui_hot_reload_begin(session_id, revision_key) // // pub fn native_ui_hot_reload_commit(session_id: Int) -> Int: // return abi_ui_hot_reload_commit(session_id) // // pub fn native_ui_hot_reload_generation(session_id: Int) -> Int: // return abi_ui_hot_reload_generation(session_id) // // pub fn native_ui_hot_reload_key(session_id: Int) -> String: // return abi_ui_hot_reload_key(session_id) // // pub fn ui_layout_column_y(index_offset: Float, start_y: Float, item_height: Float, gap: Float) -> Float: // return start_y + ((item_height + gap) * index_offset) // // pub fn ui_layout_row_x(index_offset: Float, start_x: Float, item_width: Float, gap: Float) -> Float: // return start_x + ((item_width + gap) * index_offset) // // pub fn ui_float_min(left: Float, right: Float) -> Float: // if left < right: // return left // return right // // pub fn ui_float_max(left: Float, right: Float) -> Float: // if left > right: // return left // return right // // pub fn ui_float_clamp(value: Float, low: Float, high: Float) -> Float: // if value < low: // return low // if value > high: // return high // return value // // pub fn ui_rect_right(x: Float, width: Float) -> Float: // return x + width // // pub fn ui_rect_bottom(y: Float, height: Float) -> Float: // return y + height // // pub fn ui_rect_contains(px: Float, py: Float, x: Float, y: Float, width: Float, height: Float) -> Int: // if px >= x and px <= x + width and py >= y and py <= y + height: // return 1 // return 0 // // pub fn ui_layout_inset_x(x: Float, inset: Float) -> Float: // return x + inset // // pub fn ui_layout_inset_y(y: Float, inset: Float) -> Float: // return y + inset // // pub fn ui_layout_inset_width(width: Float, left: Float, right: Float) -> Float: // return ui_float_max(0.0, width - left - right) // // pub fn ui_layout_inset_height(height: Float, top: Float, bottom: Float) -> Float: // return ui_float_max(0.0, height - top - bottom) // // pub fn ui_layout_center_x(x: Float, width: Float, child_width: Float) -> Float: // return x + ((width - child_width) * 0.5) // // pub fn ui_layout_center_y(y: Float, height: Float, child_height: Float) -> Float: // return y + ((height - child_height) * 0.5) // // pub fn ui_layout_column_height(item_count: Float, item_height: Float, gap: Float) -> Float: // if item_count <= 0.0: // return 0.0 // return (item_count * item_height) + ((item_count - 1.0) * gap) // // pub fn ui_layout_row_width(item_count: Float, item_width: Float, gap: Float) -> Float: // if item_count <= 0.0: // return 0.0 // return (item_count * item_width) + ((item_count - 1.0) * gap) // // pub fn ui_layout_split_left_width(width: Float, fraction: Float, gap: Float) -> Float: // return ui_float_max(0.0, (width - gap) * ui_float_clamp(fraction, 0.0, 1.0)) // // pub fn ui_layout_split_right_x(x: Float, width: Float, fraction: Float, gap: Float) -> Float: // return x + ui_layout_split_left_width(width, fraction, gap) + gap // // pub fn ui_layout_split_right_width(width: Float, fraction: Float, gap: Float) -> Float: // return ui_float_max(0.0, width - ui_layout_split_left_width(width, fraction, gap) - gap) // // pub fn ui_host_session_create(app_name: String, window_title: String, width: Int, height: Int, backend_id: String) -> Int: // let session = native_ui_session_create(app_name, width, height) // let _window = native_ui_window_open(session, window_title, width, height) // let _host = native_ui_host_attach(session, backend_id) // return session // // pub fn ui_frame_begin(session_id: Int, delta_ms: Float) -> Int: // return native_ui_begin_frame(session_id, delta_ms) // // pub fn ui_frame_submit(session_id: Int) -> Int: // return ui_present_to_attached_host(session_id) // // pub fn ui_node_from_stable_key(session_id: Int, parent_id: Int, kind: String, stable_key: String, text: String, x: Float, y: Float, width: Float, height: Float) -> Int: // let existing = native_ui_node_find_by_stable_key(session_id, stable_key) // if existing > 0: // let _existing_parent = native_ui_node_set_parent(session_id, existing, parent_id) // let _existing_rect = native_ui_node_set_rect(session_id, existing, x, y, width, height) // let _existing_text = native_ui_node_set_text(session_id, existing, text) // return existing // // let node = native_ui_node_create(session_id, kind) // let _key = native_ui_node_set_stable_key(session_id, node, stable_key) // let _parent = native_ui_node_set_parent(session_id, node, parent_id) // let _rect = native_ui_node_set_rect(session_id, node, x, y, width, height) // let _text = native_ui_node_set_text(session_id, node, text) // return node // // pub fn ui_reconcile_node(session_id: Int, parent_id: Int, kind: String, stable_key: String, x: Float, y: Float, width: Float, height: Float) -> Int: // return ui_node_from_stable_key(session_id, parent_id, kind, stable_key, "", x, y, width, height) // // pub fn ui_reconcile_text_node(session_id: Int, parent_id: Int, kind: String, stable_key: String, text: String, x: Float, y: Float, width: Float, height: Float) -> Int: // return ui_node_from_stable_key(session_id, parent_id, kind, stable_key, text, x, y, width, height) // // pub fn ui_reconcile_labeled_node(session_id: Int, parent_id: Int, kind: String, stable_key: String, text: String, role: String, label: String, x: Float, y: Float, width: Float, height: Float) -> Int: // let node = ui_node_from_stable_key(session_id, parent_id, kind, stable_key, text, x, y, width, height) // let _role = native_ui_accessibility_set_role(session_id, node, role) // let _label = native_ui_accessibility_set_label(session_id, node, label) // return node // // pub fn ui_reconcile_focusable_node(session_id: Int, parent_id: Int, kind: String, stable_key: String, text: String, role: String, label: String, x: Float, y: Float, width: Float, height: Float) -> Int: // let node = ui_reconcile_labeled_node(session_id, parent_id, kind, stable_key, text, role, label, x, y, width, height) // let _focusable = native_ui_node_set_flag(session_id, node, "focusable", 1) // return node // // pub fn ui_node_style_color_rgba(session_id: Int, node_id: Int, style_key: String, r: Float, g: Float, b: Float, a: Float) -> Int: // let _r = native_ui_node_set_style_f64(session_id, node_id, style_key + ".color.r", r) // let _g = native_ui_node_set_style_f64(session_id, node_id, style_key + ".color.g", g) // let _b = native_ui_node_set_style_f64(session_id, node_id, style_key + ".color.b", b) // return native_ui_node_set_style_f64(session_id, node_id, style_key + ".color.a", a) // // pub fn ui_style_color_rgba(session_id: Int, node_id: Int, style_key: String, r: Float, g: Float, b: Float, a: Float) -> Int: // return ui_node_style_color_rgba(session_id, node_id, style_key, r, g, b, a) // // pub fn ui_style_metric(session_id: Int, node_id: Int, style_key: String, metric: String, value: Float) -> Int: // return native_ui_node_set_style_f64(session_id, node_id, style_key + "." + metric, value) // // pub fn ui_style_metric_value(session_id: Int, node_id: Int, style_key: String, metric: String, fallback: Float) -> Float: // return native_ui_node_style_f64(session_id, node_id, style_key + "." + metric, fallback) // // pub fn ui_style_padding(session_id: Int, node_id: Int, style_key: String, left: Float, top: Float, right: Float, bottom: Float) -> Int: // let _left = ui_style_metric(session_id, node_id, style_key, "padding.left", left) // let _top = ui_style_metric(session_id, node_id, style_key, "padding.top", top) // let _right = ui_style_metric(session_id, node_id, style_key, "padding.right", right) // return ui_style_metric(session_id, node_id, style_key, "padding.bottom", bottom) // // pub fn ui_style_spacing(session_id: Int, node_id: Int, style_key: String, gap: Float) -> Int: // return ui_style_metric(session_id, node_id, style_key, "gap", gap) // // pub fn ui_style_inherit_color_rgba(session_id: Int, parent_id: Int, node_id: Int, parent_style_key: String, style_key: String, r: Float, g: Float, b: Float, a: Float) -> Int: // let inherited_r = native_ui_node_style_f64(session_id, parent_id, parent_style_key + ".color.r", r) // let inherited_g = native_ui_node_style_f64(session_id, parent_id, parent_style_key + ".color.g", g) // let inherited_b = native_ui_node_style_f64(session_id, parent_id, parent_style_key + ".color.b", b) // let inherited_a = native_ui_node_style_f64(session_id, parent_id, parent_style_key + ".color.a", a) // let resolved_r = native_ui_node_style_f64(session_id, node_id, style_key + ".color.r", inherited_r) // let resolved_g = native_ui_node_style_f64(session_id, node_id, style_key + ".color.g", inherited_g) // let resolved_b = native_ui_node_style_f64(session_id, node_id, style_key + ".color.b", inherited_b) // let resolved_a = native_ui_node_style_f64(session_id, node_id, style_key + ".color.a", inherited_a) // return ui_style_color_rgba(session_id, node_id, style_key, resolved_r, resolved_g, resolved_b, resolved_a) // // pub fn ui_style_copy_color_rgba(session_id: Int, source_node_id: Int, target_node_id: Int, source_style_key: String, target_style_key: String) -> Int: // let r = native_ui_node_style_f64(session_id, source_node_id, source_style_key + ".color.r", 1.0) // let g = native_ui_node_style_f64(session_id, source_node_id, source_style_key + ".color.g", 1.0) // let b = native_ui_node_style_f64(session_id, source_node_id, source_style_key + ".color.b", 1.0) // let a = native_ui_node_style_f64(session_id, source_node_id, source_style_key + ".color.a", 1.0) // return ui_style_color_rgba(session_id, target_node_id, target_style_key, r, g, b, a) // // pub fn ui_state_set_i64(session_id: Int, node_id: Int, key: String, value: Int) -> Int: // return native_ui_node_set_state_i64(session_id, node_id, key, value) // // pub fn ui_state_set_f64(session_id: Int, node_id: Int, key: String, value: Float) -> Int: // return native_ui_node_set_state_f64(session_id, node_id, key, value) // // pub fn ui_state_set_string(session_id: Int, node_id: Int, key: String, value: String) -> Int: // return native_ui_node_set_state_string(session_id, node_id, key, value) // // pub fn ui_state_i64(session_id: Int, node_id: Int, key: String, fallback: Int) -> Int: // return native_ui_node_state_i64(session_id, node_id, key, fallback) // // pub fn ui_state_f64(session_id: Int, node_id: Int, key: String, fallback: Float) -> Float: // return native_ui_node_state_f64(session_id, node_id, key, fallback) // // pub fn ui_state_string(session_id: Int, node_id: Int, key: String, fallback: String) -> String: // return native_ui_node_state_string(session_id, node_id, key, fallback) // // pub fn ui_state_bool(session_id: Int, node_id: Int, key: String, fallback: Int) -> Int: // if native_ui_node_state_i64(session_id, node_id, key, fallback) != 0: // return 1 // return 0 // // pub fn ui_state_set_bool(session_id: Int, node_id: Int, key: String, enabled: Int) -> Int: // if enabled != 0: // return native_ui_node_set_state_i64(session_id, node_id, key, 1) // return native_ui_node_set_state_i64(session_id, node_id, key, 0) // // pub fn ui_state_toggle(session_id: Int, node_id: Int, key: String) -> Int: // let current = ui_state_bool(session_id, node_id, key, 0) // if current == 0: // let _enabled = native_ui_node_set_state_i64(session_id, node_id, key, 1) // return 1 // let _disabled = native_ui_node_set_state_i64(session_id, node_id, key, 0) // return 0 // // pub fn ui_state_counter(session_id: Int, node_id: Int, key: String, delta: Int) -> Int: // let next = native_ui_node_state_i64(session_id, node_id, key, 0) + delta // let _state = native_ui_node_set_state_i64(session_id, node_id, key, next) // return next // // pub fn ui_state_reference(session_id: Int, node_id: Int, key: String, referenced_id: Int) -> Int: // return native_ui_node_set_state_i64(session_id, node_id, key, referenced_id) // // pub fn ui_state_shape(session_id: Int, node_id: Int, shape_kind: String, shape_payload: String) -> Int: // let _kind = native_ui_node_set_state_string(session_id, node_id, "shape.kind", shape_kind) // return native_ui_node_set_state_string(session_id, node_id, "shape.payload", shape_payload) // // pub fn ui_state_hit(session_id: Int, node_id: Int, hit_kind: String, hit_payload: String) -> Int: // let _kind = native_ui_node_set_state_string(session_id, node_id, "hit.kind", hit_kind) // return native_ui_node_set_state_string(session_id, node_id, "hit.payload", hit_payload) // // pub fn ui_state_draw(session_id: Int, node_id: Int, draw_kind: String, draw_payload: String) -> Int: // let _kind = native_ui_node_set_state_string(session_id, node_id, "draw.kind", draw_kind) // return native_ui_node_set_state_string(session_id, node_id, "draw.payload", draw_payload) // // pub fn ui_state_resource(session_id: Int, node_id: Int, resource_kind: String, resource_payload: String, resource_id: Int) -> Int: // let _kind = native_ui_node_set_state_string(session_id, node_id, "resource.kind", resource_kind) // let _payload = native_ui_node_set_state_string(session_id, node_id, "resource.payload", resource_payload) // return native_ui_node_set_state_i64(session_id, node_id, "resource.id", resource_id) // // fn ui_code_is_numeric(code: String) -> Bool: // if len(code) == 0: // return false // var index = 0 // while index < len(code): // let ch = char_at(code, index) // if ch < "0" or ch > "9": // return false // index = index + 1 // return true // // fn ui_input_key_code_or_zero(code: String) -> Int: // if ui_code_is_numeric(code): // return to_int(code) // return 0 // // pub fn ui_state_shared_buffer_resource(session_id: Int, node_id: Int, resource_view: GraphicsSharedBuffer, resource_id: Int) -> Int: // return ui_state_resource( // session_id, // node_id, // resource_view.graphics_kind, // json_stringify(graphics_shared_buffer_descriptor(resource_view)), // resource_id // ) // // pub fn ui_state_shared_image_resource(session_id: Int, node_id: Int, resource_view: GraphicsSharedImage, resource_id: Int) -> Int: // return ui_state_resource( // session_id, // node_id, // resource_view.graphics_kind, // json_stringify(graphics_shared_image_descriptor(resource_view)), // resource_id // ) // // pub fn ui_reconcile_stateful_node(session_id: Int, parent_id: Int, kind: String, stable_key: String, state_kind: String, state_payload: String, x: Float, y: Float, width: Float, height: Float) -> Int: // let node = ui_reconcile_node(session_id, parent_id, kind, stable_key, x, y, width, height) // let _kind = native_ui_node_set_state_string(session_id, node, "state.kind", state_kind) // let _payload = native_ui_node_set_state_string(session_id, node, "state.payload", state_payload) // return node // // pub fn ui_custom_hit_contains(session_id: Int, node_id: Int, x: Float, y: Float) -> Int: // let hit_kind = native_ui_node_state_string(session_id, node_id, "hit.kind", "rect") // if hit_kind == "none": // return 0 // return ui_node_contains_point(session_id, node_id, x, y) // // pub fn ui_custom_hit_targets(session_id: Int, node_id: Int, x: Float, y: Float) -> Int: // if ui_custom_hit_contains(session_id, node_id, x, y) == 1: // return node_id // return 0 // // pub fn ui_text_width(session_id: Int, font_resource_id: Int, text: String) -> Float: // return native_ui_text_measure_width(session_id, font_resource_id, text) // // pub fn ui_text_height(session_id: Int, font_resource_id: Int, text: String) -> Float: // return native_ui_text_measure_height(session_id, font_resource_id, text) // // pub fn native_ui_texture_create_from_hex(session_id: Int, key: String, width: Int, height: Int, format: String, bytes_hex: String) -> Int: // let texture = native_ui_texture_create(session_id, key, width, height, format, len(bytes_hex) / 2) // let _upload = native_ui_resource_set_bytes_hex(session_id, texture, bytes_hex) // return texture // // pub fn ui_texture_rgba8_from_hex(session_id: Int, key: String, width: Int, height: Int, bytes_hex: String) -> Int: // return native_ui_texture_create_from_hex(session_id, key, width, height, "rgba8", bytes_hex) // // pub fn ui_render_box(session_id: Int, node_id: Int, style_key: String) -> Int: // return native_ui_draw_rect(session_id, node_id, native_ui_node_x(session_id, node_id), native_ui_node_y(session_id, node_id), native_ui_node_width(session_id, node_id), native_ui_node_height(session_id, node_id), style_key) // // pub fn ui_render_box_at(session_id: Int, node_id: Int, x: Float, y: Float, width: Float, height: Float, style_key: String) -> Int: // return native_ui_draw_rect(session_id, node_id, x, y, width, height, style_key) // // pub fn ui_render_text(session_id: Int, node_id: Int, font_resource_id: Int, x: Float, y: Float, style_key: String) -> Int: // return native_ui_draw_text(session_id, node_id, font_resource_id, x, y, native_ui_node_text(session_id, node_id), style_key) // // pub fn ui_render_text_value(session_id: Int, node_id: Int, font_resource_id: Int, text: String, x: Float, y: Float, style_key: String) -> Int: // return native_ui_draw_text(session_id, node_id, font_resource_id, x, y, text, style_key) // // pub fn ui_render_resource(session_id: Int, node_id: Int, resource_id: Int, x: Float, y: Float, width: Float, height: Float, style_key: String) -> Int: // return native_ui_draw_resource(session_id, node_id, resource_id, x, y, width, height, style_key) // // pub fn ui_render_resource_in_node(session_id: Int, node_id: Int, resource_id: Int, style_key: String) -> Int: // return native_ui_draw_resource(session_id, node_id, resource_id, native_ui_node_x(session_id, node_id), native_ui_node_y(session_id, node_id), native_ui_node_width(session_id, node_id), native_ui_node_height(session_id, node_id), style_key) // // pub fn ui_render_text_in_box(session_id: Int, node_id: Int, font_resource_id: Int, inset_x: Float, baseline_y: Float, style_key: String) -> Int: // return native_ui_draw_text(session_id, node_id, font_resource_id, native_ui_node_x(session_id, node_id) + inset_x, native_ui_node_y(session_id, node_id) + baseline_y, native_ui_node_text(session_id, node_id), style_key) // // pub fn ui_event_kind_is(session_id: Int, expected_kind: String) -> Int: // let actual_kind = native_ui_event_kind(session_id) // if len(actual_kind) != len(expected_kind): // return 0 // let mut index = 0 // while index < len(expected_kind): // if char_at(actual_kind, index) != char_at(expected_kind, index): // return 0 // index = index + 1 // return 1 // // pub fn ui_event_targets(session_id: Int, node_id: Int) -> Int: // if native_ui_event_target(session_id) == node_id: // return 1 // return 0 // // pub fn ui_focus_if_event_targets(session_id: Int, node_id: Int) -> Int: // if ui_event_targets(session_id, node_id) == 1: // return native_ui_focus(session_id, node_id) // return 0 // // pub fn ui_node_contains_point(session_id: Int, node_id: Int, x: Float, y: Float) -> Int: // return ui_rect_contains(x, y, native_ui_node_x(session_id, node_id), native_ui_node_y(session_id, node_id), native_ui_node_width(session_id, node_id), native_ui_node_height(session_id, node_id)) // // pub fn ui_node_is_hit(session_id: Int, node_id: Int, x: Float, y: Float) -> Int: // if native_ui_hit_test(session_id, x, y) == node_id: // return 1 // return 0 // // pub fn ui_apply_hover_flag(session_id: Int, node_id: Int, x: Float, y: Float) -> Int: // let hovered = ui_node_contains_point(session_id, node_id, x, y) // let _flag = native_ui_node_set_flag(session_id, node_id, "hovered", hovered) // return hovered // // pub fn ui_apply_pressed_flag_from_event(session_id: Int, node_id: Int) -> Int: // if ui_event_targets(session_id, node_id) == 1 and ui_event_kind_is(session_id, "pointer.down") == 1: // let _focus = native_ui_focus(session_id, node_id) // let _pressed = native_ui_node_set_flag(session_id, node_id, "pressed", 1) // return 1 // if ui_event_targets(session_id, node_id) == 1 and ui_event_kind_is(session_id, "pointer.up") == 1: // let _released = native_ui_node_set_flag(session_id, node_id, "pressed", 0) // return 0 // return native_ui_node_has_flag(session_id, node_id, "pressed") // // pub fn ui_drain_events_for_node(session_id: Int, node_id: Int) -> Int: // let handled = 0 // while native_ui_poll_event(session_id) == 1: // if ui_event_targets(session_id, node_id) == 1: // let _hover = ui_apply_hover_flag(session_id, node_id, native_ui_event_x(session_id), native_ui_event_y(session_id)) // let _pressed = ui_apply_pressed_flag_from_event(session_id, node_id) // handled = handled + 1 // return handled // // pub fn ui_present_to_attached_host(session_id: Int) -> Int: // let _end = native_ui_end_frame(session_id) // let _present = native_ui_present(session_id) // return native_ui_host_present(session_id) // // # root-domain aliases: generated public std names // pub fn ui_reset() -> Int: // return native_ui_reset() // // pub fn ui_session_create(app_name: String, width: Int, height: Int) -> Int: // return native_ui_session_create(app_name, width, height) // // pub fn ui_session_destroy(session_id: Int) -> Int: // return native_ui_session_destroy(session_id) // // pub fn ui_session_count() -> Int: // return native_ui_session_count() // // pub fn ui_window_open(session_id: Int, title: String, width: Int, height: Int) -> Int: // return native_ui_window_open(session_id, title, width, height) // // pub fn ui_window_close(session_id: Int) -> Int: // return native_ui_window_close(session_id) // // pub fn ui_begin_frame(session_id: Int, delta_ms: Float) -> Int: // return native_ui_begin_frame(session_id, delta_ms) // // pub fn ui_end_frame(session_id: Int) -> Int: // return native_ui_end_frame(session_id) // // pub fn ui_present(session_id: Int) -> Int: // return native_ui_present(session_id) // // pub fn ui_frame_index(session_id: Int) -> Int: // return native_ui_frame_index(session_id) // // pub fn ui_last_presented_frame(session_id: Int) -> Int: // return native_ui_last_presented_frame(session_id) // // pub fn ui_node_create(session_id: Int, kind: String) -> Int: // return native_ui_node_create(session_id, kind) // // pub fn ui_node_destroy(session_id: Int, node_id: Int) -> Int: // return native_ui_node_destroy(session_id, node_id) // // pub fn ui_node_count(session_id: Int) -> Int: // return native_ui_node_count(session_id) // // pub fn ui_node_exists(session_id: Int, node_id: Int) -> Int: // return native_ui_node_exists(session_id, node_id) // // pub fn ui_node_set_parent(session_id: Int, node_id: Int, parent_id: Int) -> Int: // return native_ui_node_set_parent(session_id, node_id, parent_id) // // pub fn ui_node_parent(session_id: Int, node_id: Int) -> Int: // return native_ui_node_parent(session_id, node_id) // // pub fn ui_node_child_count(session_id: Int, node_id: Int) -> Int: // return native_ui_node_child_count(session_id, node_id) // // pub fn ui_node_set_rect(session_id: Int, node_id: Int, x: Float, y: Float, width: Float, height: Float) -> Int: // return native_ui_node_set_rect(session_id, node_id, x, y, width, height) // // pub fn ui_node_x(session_id: Int, node_id: Int) -> Float: // return native_ui_node_x(session_id, node_id) // // pub fn ui_node_y(session_id: Int, node_id: Int) -> Float: // return native_ui_node_y(session_id, node_id) // // pub fn ui_node_width(session_id: Int, node_id: Int) -> Float: // return native_ui_node_width(session_id, node_id) // // pub fn ui_node_height(session_id: Int, node_id: Int) -> Float: // return native_ui_node_height(session_id, node_id) // // pub fn ui_node_set_text(session_id: Int, node_id: Int, text: String) -> Int: // return native_ui_node_set_text(session_id, node_id, text) // // pub fn ui_node_text(session_id: Int, node_id: Int) -> String: // return native_ui_node_text(session_id, node_id) // // pub fn ui_node_kind(session_id: Int, node_id: Int) -> String: // return native_ui_node_kind(session_id, node_id) // // pub fn ui_node_set_flag(session_id: Int, node_id: Int, flag: String, enabled: Int) -> Int: // return native_ui_node_set_flag(session_id, node_id, flag, enabled) // // pub fn ui_node_has_flag(session_id: Int, node_id: Int, flag: String) -> Int: // return native_ui_node_has_flag(session_id, node_id, flag) // // pub fn ui_node_set_style_i64(session_id: Int, node_id: Int, key: String, value: Int) -> Int: // return native_ui_node_set_style_i64(session_id, node_id, key, value) // // pub fn ui_node_set_style_f64(session_id: Int, node_id: Int, key: String, value: Float) -> Int: // return native_ui_node_set_style_f64(session_id, node_id, key, value) // // pub fn ui_node_set_style_string(session_id: Int, node_id: Int, key: String, value: String) -> Int: // return native_ui_node_set_style_string(session_id, node_id, key, value) // // pub fn ui_node_style_i64(session_id: Int, node_id: Int, key: String, fallback: Int) -> Int: // return native_ui_node_style_i64(session_id, node_id, key, fallback) // // pub fn ui_node_style_f64(session_id: Int, node_id: Int, key: String, fallback: Float) -> Float: // return native_ui_node_style_f64(session_id, node_id, key, fallback) // // pub fn ui_node_style_string(session_id: Int, node_id: Int, key: String, fallback: String) -> String: // return native_ui_node_style_string(session_id, node_id, key, fallback) // // pub fn ui_node_set_state_i64(session_id: Int, node_id: Int, key: String, value: Int) -> Int: // return native_ui_node_set_state_i64(session_id, node_id, key, value) // // pub fn ui_node_set_state_f64(session_id: Int, node_id: Int, key: String, value: Float) -> Int: // return native_ui_node_set_state_f64(session_id, node_id, key, value) // // pub fn ui_node_set_state_string(session_id: Int, node_id: Int, key: String, value: String) -> Int: // return native_ui_node_set_state_string(session_id, node_id, key, value) // // pub fn ui_node_state_i64(session_id: Int, node_id: Int, key: String, fallback: Int) -> Int: // return native_ui_node_state_i64(session_id, node_id, key, fallback) // // pub fn ui_node_state_f64(session_id: Int, node_id: Int, key: String, fallback: Float) -> Float: // return native_ui_node_state_f64(session_id, node_id, key, fallback) // // pub fn ui_node_state_string(session_id: Int, node_id: Int, key: String, fallback: String) -> String: // return native_ui_node_state_string(session_id, node_id, key, fallback) // // pub fn ui_state_count(session_id: Int) -> Int: // return native_ui_state_count(session_id) // // pub fn ui_focus(session_id: Int, node_id: Int) -> Int: // return native_ui_focus(session_id, node_id) // // pub fn ui_focused_node(session_id: Int) -> Int: // return native_ui_focused_node(session_id) // // pub fn ui_hit_test(session_id: Int, x: Float, y: Float) -> Int: // return native_ui_hit_test(session_id, x, y) // // pub fn ui_mark_dirty(session_id: Int, node_id: Int, reason: Int) -> Int: // return native_ui_mark_dirty(session_id, node_id, reason) // // pub fn ui_dirty_count(session_id: Int) -> Int: // return native_ui_dirty_count(session_id) // // pub fn ui_push_event(session_id: Int, kind: String, target_node_id: Int, x: Float, y: Float, key_code: Int, text: String) -> Int: // return native_ui_push_event(session_id, kind, target_node_id, x, y, key_code, text) // // pub fn ui_poll_event(session_id: Int) -> Int: // return native_ui_poll_event(session_id) // // pub fn ui_event_kind(session_id: Int) -> String: // return native_ui_event_kind(session_id) // // pub fn ui_event_target(session_id: Int) -> Int: // return native_ui_event_target(session_id) // // pub fn ui_event_x(session_id: Int) -> Float: // return native_ui_event_x(session_id) // // pub fn ui_event_y(session_id: Int) -> Float: // return native_ui_event_y(session_id) // // pub fn ui_event_key_code(session_id: Int) -> Int: // return native_ui_event_key_code(session_id) // // pub fn ui_event_text(session_id: Int) -> String: // return native_ui_event_text(session_id) // // pub fn ui_event_record(session_id: Int) -> InputEventRecord: // return InputEventRecord { // index: 0, // source_kind: input_source_ui_runtime(), // event_kind: ui_event_kind(session_id), // code: str(ui_event_key_code(session_id)), // action: "", // text: ui_event_text(session_id), // } // // pub fn ui_push_input_event(session_id: Int, target_node_id: Int, event: InputEventRecord) -> Int: // return ui_push_event( // session_id, // event.event_kind, // target_node_id, // 0.0, // 0.0, // ui_input_key_code_or_zero(event.code), // event.text // ) // // pub fn ui_draw_rect(session_id: Int, node_id: Int, x: Float, y: Float, width: Float, height: Float, style_key: String) -> Int: // return native_ui_draw_rect(session_id, node_id, x, y, width, height, style_key) // // pub fn ui_draw_text(session_id: Int, node_id: Int, font_resource_id: Int, x: Float, y: Float, text: String, style_key: String) -> Int: // return native_ui_draw_text(session_id, node_id, font_resource_id, x, y, text, style_key) // // pub fn ui_draw_command_count(session_id: Int) -> Int: // return native_ui_draw_command_count(session_id) // // pub fn ui_draw_command_kind(session_id: Int, command_index: Int) -> String: // return native_ui_draw_command_kind(session_id, command_index) // // pub fn ui_draw_command_node(session_id: Int, command_index: Int) -> Int: // return native_ui_draw_command_node(session_id, command_index) // // pub fn ui_host_attach(session_id: Int, backend_id: String) -> Int: // return native_ui_host_attach(session_id, backend_id) // // pub fn ui_host_pump(session_id: Int) -> Int: // return native_ui_host_pump(session_id) // // pub fn ui_host_present(session_id: Int) -> Int: // return native_ui_host_present(session_id) // // pub fn ui_host_presented_draw_count(session_id: Int) -> Int: // return native_ui_host_presented_draw_count(session_id) // // pub fn ui_host_frame_hash(session_id: Int) -> Int: // return native_ui_host_frame_hash(session_id) // // pub fn ui_host_should_close(session_id: Int) -> Int: // return native_ui_host_should_close(session_id) // // pub fn ui_host_backend(session_id: Int) -> String: // return native_ui_host_backend(session_id) // // pub fn ui_node_set_stable_key(session_id: Int, node_id: Int, stable_key: String) -> Int: // return native_ui_node_set_stable_key(session_id, node_id, stable_key) // // pub fn ui_node_stable_key(session_id: Int, node_id: Int) -> String: // return native_ui_node_stable_key(session_id, node_id) // // pub fn ui_node_find_by_stable_key(session_id: Int, stable_key: String) -> Int: // return native_ui_node_find_by_stable_key(session_id, stable_key) // // pub fn ui_accessibility_set_role(session_id: Int, node_id: Int, role: String) -> Int: // return native_ui_accessibility_set_role(session_id, node_id, role) // // pub fn ui_accessibility_set_label(session_id: Int, node_id: Int, label: String) -> Int: // return native_ui_accessibility_set_label(session_id, node_id, label) // // pub fn ui_accessibility_role(session_id: Int, node_id: Int) -> String: // return native_ui_accessibility_role(session_id, node_id) // // pub fn ui_accessibility_label(session_id: Int, node_id: Int) -> String: // return native_ui_accessibility_label(session_id, node_id) // // pub fn ui_draw_command_resource(session_id: Int, command_index: Int) -> Int: // return native_ui_draw_command_resource(session_id, command_index) // // pub fn ui_draw_command_x(session_id: Int, command_index: Int) -> Float: // return native_ui_draw_command_x(session_id, command_index) // // pub fn ui_draw_command_y(session_id: Int, command_index: Int) -> Float: // return native_ui_draw_command_y(session_id, command_index) // // pub fn ui_draw_command_width(session_id: Int, command_index: Int) -> Float: // return native_ui_draw_command_width(session_id, command_index) // // pub fn ui_draw_command_height(session_id: Int, command_index: Int) -> Float: // return native_ui_draw_command_height(session_id, command_index) // // pub fn ui_draw_command_text(session_id: Int, command_index: Int) -> String: // return native_ui_draw_command_text(session_id, command_index) // // pub fn ui_draw_command_style(session_id: Int, command_index: Int) -> String: // return native_ui_draw_command_style(session_id, command_index) // // pub fn ui_draw_command_font(session_id: Int, command_index: Int) -> Int: // return native_ui_draw_command_font(session_id, command_index) // // pub fn ui_resource_create(session_id: Int, resource_type: String, key: String, width: Int, height: Int, byte_length: Int) -> Int: // return native_ui_resource_create(session_id, resource_type, key, width, height, byte_length) // // pub fn ui_font_create(session_id: Int, key: String, family: String, size: Float) -> Int: // return native_ui_font_create(session_id, key, family, size) // // pub fn ui_texture_create(session_id: Int, key: String, width: Int, height: Int, format: String, byte_length: Int) -> Int: // return native_ui_texture_create(session_id, key, width, height, format, byte_length) // // pub fn ui_canvas_create(session_id: Int, key: String, width: Int, height: Int) -> Int: // return native_ui_canvas_create(session_id, key, width, height) // // pub fn ui_shader_create(session_id: Int, key: String, stage: String, byte_length: Int) -> Int: // return native_ui_shader_create(session_id, key, stage, byte_length) // // pub fn ui_resource_set_bytes_hex(session_id: Int, resource_id: Int, bytes_hex: String) -> Int: // return native_ui_resource_set_bytes_hex(session_id, resource_id, bytes_hex) // // pub fn ui_resource_count(session_id: Int) -> Int: // return native_ui_resource_count(session_id) // // pub fn ui_resource_exists(session_id: Int, resource_id: Int) -> Int: // return native_ui_resource_exists(session_id, resource_id) // // pub fn ui_resource_type(session_id: Int, resource_id: Int) -> String: // return native_ui_resource_type(session_id, resource_id) // // pub fn ui_resource_key(session_id: Int, resource_id: Int) -> String: // return native_ui_resource_key(session_id, resource_id) // // pub fn ui_resource_width(session_id: Int, resource_id: Int) -> Int: // return native_ui_resource_width(session_id, resource_id) // // pub fn ui_resource_height(session_id: Int, resource_id: Int) -> Int: // return native_ui_resource_height(session_id, resource_id) // // pub fn ui_resource_byte_length(session_id: Int, resource_id: Int) -> Int: // return native_ui_resource_byte_length(session_id, resource_id) // // pub fn ui_text_measure_width(session_id: Int, font_resource_id: Int, text: String) -> Float: // return native_ui_text_measure_width(session_id, font_resource_id, text) // // pub fn ui_text_measure_height(session_id: Int, font_resource_id: Int, text: String) -> Float: // return native_ui_text_measure_height(session_id, font_resource_id, text) // // pub fn ui_draw_resource(session_id: Int, node_id: Int, resource_id: Int, x: Float, y: Float, width: Float, height: Float, style_key: String) -> Int: // return native_ui_draw_resource(session_id, node_id, resource_id, x, y, width, height, style_key) // // pub fn ui_clipboard_set_text(session_id: Int, text: String) -> Int: // return native_ui_clipboard_set_text(session_id, text) // // pub fn ui_clipboard_text(session_id: Int) -> String: // return native_ui_clipboard_text(session_id) // // pub fn ui_ime_begin(session_id: Int, node_id: Int) -> Int: // return native_ui_ime_begin(session_id, node_id) // // pub fn ui_ime_commit_text(session_id: Int, text: String) -> Int: // return native_ui_ime_commit_text(session_id, text) // // pub fn ui_ime_end(session_id: Int) -> Int: // return native_ui_ime_end(session_id) // // pub fn ui_ime_active_node(session_id: Int) -> Int: // return native_ui_ime_active_node(session_id) // // pub fn ui_ime_text(session_id: Int) -> String: // return native_ui_ime_text(session_id) // // pub fn ui_drag_begin(session_id: Int, node_id: Int, payload: String, x: Float, y: Float) -> Int: // return native_ui_drag_begin(session_id, node_id, payload, x, y) // // pub fn ui_drag_update(session_id: Int, x: Float, y: Float, drop_target_node_id: Int) -> Int: // return native_ui_drag_update(session_id, x, y, drop_target_node_id) // // pub fn ui_drag_drop(session_id: Int, drop_target_node_id: Int) -> Int: // return native_ui_drag_drop(session_id, drop_target_node_id) // // pub fn ui_drag_active_node(session_id: Int) -> Int: // return native_ui_drag_active_node(session_id) // // pub fn ui_drag_drop_target(session_id: Int) -> Int: // return native_ui_drag_drop_target(session_id) // // pub fn ui_drag_x(session_id: Int) -> Float: // return native_ui_drag_x(session_id) // // pub fn ui_drag_y(session_id: Int) -> Float: // return native_ui_drag_y(session_id) // // pub fn ui_drag_payload(session_id: Int) -> String: // return native_ui_drag_payload(session_id) // // pub fn ui_menu_create(session_id: Int, key: String) -> Int: // return native_ui_menu_create(session_id, key) // // pub fn ui_menu_add_item(session_id: Int, menu_id: Int, key: String, label: String, command_id: Int) -> Int: // return native_ui_menu_add_item(session_id, menu_id, key, label, command_id) // // pub fn ui_menu_open(session_id: Int, menu_id: Int, x: Float, y: Float) -> Int: // return native_ui_menu_open(session_id, menu_id, x, y) // // pub fn ui_menu_active(session_id: Int) -> Int: // return native_ui_menu_active(session_id) // // pub fn ui_menu_item_count(session_id: Int, menu_id: Int) -> Int: // return native_ui_menu_item_count(session_id, menu_id) // // pub fn ui_menu_item_label(session_id: Int, menu_id: Int, item_index: Int) -> String: // return native_ui_menu_item_label(session_id, menu_id, item_index) // // pub fn ui_menu_item_command(session_id: Int, menu_id: Int, item_index: Int) -> Int: // return native_ui_menu_item_command(session_id, menu_id, item_index) // // pub fn ui_dialog_request(session_id: Int, kind: String, title: String, message: String) -> Int: // return native_ui_dialog_request(session_id, kind, title, message) // // pub fn ui_dialog_active(session_id: Int) -> Int: // return native_ui_dialog_active(session_id) // // pub fn ui_dialog_kind(session_id: Int, dialog_id: Int) -> String: // return native_ui_dialog_kind(session_id, dialog_id) // // pub fn ui_dialog_title(session_id: Int, dialog_id: Int) -> String: // return native_ui_dialog_title(session_id, dialog_id) // // pub fn ui_dialog_message(session_id: Int, dialog_id: Int) -> String: // return native_ui_dialog_message(session_id, dialog_id) // // pub fn ui_dialog_respond(session_id: Int, dialog_id: Int, result: Int, response_text: String) -> Int: // return native_ui_dialog_respond(session_id, dialog_id, result, response_text) // // pub fn ui_dialog_poll_response(session_id: Int) -> Int: // return native_ui_dialog_poll_response(session_id) // // pub fn ui_dialog_response_text(session_id: Int) -> String: // return native_ui_dialog_response_text(session_id) // // pub fn ui_hot_reload_begin(session_id: Int, revision_key: String) -> Int: // return native_ui_hot_reload_begin(session_id, revision_key) // // pub fn ui_hot_reload_commit(session_id: Int) -> Int: // return native_ui_hot_reload_commit(session_id) // // pub fn ui_hot_reload_generation(session_id: Int) -> Int: // return native_ui_hot_reload_generation(session_id) // // pub fn ui_hot_reload_key(session_id: Int) -> String: // return native_ui_hot_reload_key(session_id) // // pub fn ui_texture_create_from_hex(session_id: Int, key: String, width: Int, height: Int, format: String, bytes_hex: String) -> Int: // return native_ui_texture_create_from_hex(session_id, key, width, height, format, bytes_hex) // # end root-domain aliases //!end-kain-file //!kain-file // path = "unicode.kn" // kind = "text" // encoding = "utf8" // bytes = 6556 // sha256 = "sha256:8325556ef73bffcd050fc55e98a71e4f7c930854a508ccc0ccc2f0263bd89e82" // trailing_newline = true //!kain-file-content // pub struct UnicodeDecodeResult: // codepoint: Int // length: Int // valid: Bool // // pub struct UnicodeCursor: // source: String // index: Int // // pub struct UnicodeCursorNextResult: // cursor: UnicodeCursor // decode: UnicodeDecodeResult // has_next: Bool // // enum UnicodeNormalizationForm: // Nfc // Nfd // Nfkc // Nfkd // // pub fn unicode_utf8_char_length(first_byte: Int) -> Int: // if first_byte < 0: // return -1 // if first_byte < 128: // return 1 // if first_byte >= 192 and first_byte < 224: // return 2 // if first_byte >= 224 and first_byte < 240: // return 3 // if first_byte >= 240 and first_byte < 248: // return 4 // return -1 // // pub fn unicode_utf8_decode_at(value: String, start_index: Int) -> UnicodeDecodeResult: // let string_len = len(value) // if start_index < 0 or start_index >= string_len: // return UnicodeDecodeResult { codepoint: 65533, length: 0, valid: false } // // let byte0 = byte_at(value, start_index) // let expected_len = unicode_utf8_char_length(byte0) // // if expected_len < 1: // return UnicodeDecodeResult { codepoint: 65533, length: 1, valid: false } // // if start_index + expected_len > string_len: // # Unexpected end of sequence; consume 1 byte to allow recovery // return UnicodeDecodeResult { codepoint: 65533, length: 1, valid: false } // // if expected_len == 1: // return UnicodeDecodeResult { codepoint: byte0, length: 1, valid: true } // // if expected_len == 2: // let byte1 = byte_at(value, start_index + 1) // if byte1 < 128 or byte1 > 191: // return UnicodeDecodeResult { codepoint: 65533, length: 1, valid: false } // // let cp = ((byte0 & 31) << 6) | (byte1 & 63) // if cp < 128: // # Overlong encoding // return UnicodeDecodeResult { codepoint: 65533, length: 1, valid: false } // // return UnicodeDecodeResult { codepoint: cp, length: 2, valid: true } // // if expected_len == 3: // let byte1 = byte_at(value, start_index + 1) // let byte2 = byte_at(value, start_index + 2) // if byte1 < 128 or byte1 > 191 or byte2 < 128 or byte2 > 191: // return UnicodeDecodeResult { codepoint: 65533, length: 1, valid: false } // // let cp = ((byte0 & 15) << 12) | ((byte1 & 63) << 6) | (byte2 & 63) // if cp < 2048: // # Overlong encoding // return UnicodeDecodeResult { codepoint: 65533, length: 1, valid: false } // // if cp >= 55296 and cp <= 57343: // # Surrogate pair codepoint ranges are invalid UTF-8 // return UnicodeDecodeResult { codepoint: 65533, length: 1, valid: false } // // return UnicodeDecodeResult { codepoint: cp, length: 3, valid: true } // // if expected_len == 4: // let byte1 = byte_at(value, start_index + 1) // let byte2 = byte_at(value, start_index + 2) // let byte3 = byte_at(value, start_index + 3) // if byte1 < 128 or byte1 > 191 or byte2 < 128 or byte2 > 191 or byte3 < 128 or byte3 > 191: // return UnicodeDecodeResult { codepoint: 65533, length: 1, valid: false } // // let cp = ((byte0 & 7) << 18) | ((byte1 & 63) << 12) | ((byte2 & 63) << 6) | (byte3 & 63) // if cp < 65536 or cp > 1114111: // # Overlong encoding or out of Unicode range // return UnicodeDecodeResult { codepoint: 65533, length: 1, valid: false } // // return UnicodeDecodeResult { codepoint: cp, length: 4, valid: true } // // return UnicodeDecodeResult { codepoint: 65533, length: 1, valid: false } // // pub fn unicode_utf8_encode(codepoint: Int) -> String: // var cp = codepoint // if cp < 0 or cp > 1114111 or (cp >= 55296 and cp <= 57343): // # Invalid codepoint, fallback to Unicode replacement char (65533) // cp = 65533 // // if cp < 128: // return chr(cp) // // if cp < 2048: // let b0 = 192 | (cp >> 6) // let b1 = 128 | (cp & 63) // return chr(b0) + chr(b1) // // if cp < 65536: // let b0 = 224 | (cp >> 12) // let b1 = 128 | ((cp >> 6) & 63) // let b2 = 128 | (cp & 63) // return chr(b0) + chr(b1) + chr(b2) // // let b0 = 240 | (cp >> 18) // let b1 = 128 | ((cp >> 12) & 63) // let b2 = 128 | ((cp >> 6) & 63) // let b3 = 128 | (cp & 63) // return chr(b0) + chr(b1) + chr(b2) + chr(b3) // // pub fn unicode_utf8_is_valid(value: String) -> Bool: // let string_len = len(value) // var index = 0 // while index < string_len: // let result = unicode_utf8_decode_at(value, index) // if result.valid == false: // return false // index = index + result.length // return true // // pub fn unicode_utf8_codepoint_count(value: String) -> Int: // let string_len = len(value) // var count = 0 // var index = 0 // while index < string_len: // let result = unicode_utf8_decode_at(value, index) // count = count + 1 // if result.length > 0: // index = index + result.length // else: // index = index + 1 // return count // // pub fn unicode_utf8_codepoint_at(value: String, codepoint_index: Int) -> Int: // let string_len = len(value) // var current_char = 0 // var index = 0 // while index < string_len: // let result = unicode_utf8_decode_at(value, index) // if current_char == codepoint_index: // return result.codepoint // current_char = current_char + 1 // if result.length > 0: // index = index + result.length // else: // index = index + 1 // return -1 // // pub fn unicode_cursor_new(source: String) -> UnicodeCursor: // return UnicodeCursor { source: source, index: 0 } // // pub fn unicode_cursor_has_next(cursor: UnicodeCursor) -> Bool: // return cursor.index < len(cursor.source) // // pub fn unicode_cursor_next(cursor: UnicodeCursor) -> UnicodeCursorNextResult: // let decode_res = unicode_utf8_decode_at(cursor.source, cursor.index) // let new_index = cursor.index + decode_res.length // let next_cursor = UnicodeCursor { source: cursor.source, index: new_index } // let has_more = new_index < len(cursor.source) // return UnicodeCursorNextResult { cursor: next_cursor, decode: decode_res, has_next: has_more } // // pub fn unicode_normalize(value: String, form: UnicodeNormalizationForm) -> String: // # In this pure-Kain stdlib v1 core pass, direct database normalization is deferred. // # We expose the canonical API contract and return the string unmodified. // return value //!end-kain-file //!kain-file // path = "uri.kn" // kind = "text" // encoding = "utf8" // bytes = 12489 // sha256 = "sha256:7469783b10c7b728ad060ef9b6e0e8af4988a46064c75dee9d85de05b0d160c0" // trailing_newline = true //!kain-file-content // use std::ascii // use std::collections // use std::text // // pub struct Uri: // source: String // valid: Bool // scheme: TextSlice // userinfo: TextSlice // host: TextSlice // port: Int # -1 if not specified // path: TextSlice // query: TextSlice // frag_part: TextSlice // // pub struct UriQueryParam: // key: TextSlice // value: TextSlice // has_value: Bool // // pub struct UriQueryParamIterator: // source: String // query: TextSlice // cursor: Int // // pub struct UriQueryParamNext: // iterator: UriQueryParamIterator // param: UriQueryParam // has_next: Bool // // pub fn uri_parse(url: String) -> Uri: // let url_len = len(url) // if url_len == 0: // return Uri { // source: url, // valid: false, // scheme: text_slice(url, 0, 0), // userinfo: text_slice(url, 0, 0), // host: text_slice(url, 0, 0), // port: -1, // path: text_slice(url, 0, 0), // query: text_slice(url, 0, 0), // frag_part: text_slice(url, 0, 0) // } // // var cursor = 0 // var valid = true // // # 1. Scheme parsing // # RFC 3986: scheme = alpha *( alpha / digit / "+" / "-" / "." ) // var scheme_start = 0 // var scheme_end = 0 // var has_scheme = false // // # Scan forward to see if there is a colon ':' before any '/', '?', '#' // var scan = 0 // var found_colon = -1 // var done_scan = false // while scan < url_len and done_scan == false: // let b = byte_at(url, scan) // if b == 58: # ':' // found_colon = scan // done_scan = true // elif b == 47 or b == 63 or b == 35: # '/', '?', '#' // done_scan = true // scan = scan + 1 // // if found_colon > 0: // # Validate scheme characters // let first_b = byte_at(url, 0) // if ascii_is_alpha_byte(first_b): // var valid_scheme = true // var check = 1 // while check < found_colon: // let cb = byte_at(url, check) // if ascii_is_alnum_byte(cb) == false and cb != 43 and cb != 45 and cb != 46: # '+', '-', '.' // valid_scheme = false // check = check + 1 // if valid_scheme: // has_scheme = true // scheme_end = found_colon // cursor = found_colon + 1 # skip ':' // // # 2. Hierarchical part (Authority & Path) // # Check if starts with "//" // var has_authority = false // var userinfo_start = 0 // var userinfo_end = 0 // var host_start = 0 // var host_end = 0 // var port = -1 // // if cursor + 1 < url_len: // let b0 = byte_at(url, cursor) // let b1 = byte_at(url, cursor + 1) // if b0 == 47 and b1 == 47: # "//" // has_authority = true // cursor = cursor + 2 // // if has_authority: // # Authority parsing: [userinfo "@"] host [":" port] // # Authority ends at the first '/', '?', '#' or end of string // let auth_start = cursor // var auth_end = cursor // var done_auth = false // while auth_end < url_len and done_auth == false: // let b = byte_at(url, auth_end) // if b == 47 or b == 63 or b == 35: # '/', '?', '#' // done_auth = true // else: // auth_end = auth_end + 1 // // # We now have the authority string from auth_start to auth_end. // # Find '@' to see if there is userinfo // var at_index = -1 // var scan_auth = auth_start // while scan_auth < auth_end: // if byte_at(url, scan_auth) == 64: # '@' // at_index = scan_auth // scan_auth = scan_auth + 1 // // var host_search_start = auth_start // if at_index >= auth_start: // userinfo_start = auth_start // userinfo_end = at_index // host_search_start = at_index + 1 // else: // userinfo_start = auth_start // userinfo_end = auth_start // // # Now parse host and port from host_search_start to auth_end. // # Port is separated by the LAST ':' in the host part (to support IPv6 addresses like [::1]:80) // var is_ipv6 = false // if host_search_start < auth_end: // if byte_at(url, host_search_start) == 91: # '[' // is_ipv6 = true // // var colon_index = -1 // if is_ipv6: // # Find matching ']' // var close_bracket = -1 // var scan_v6 = host_search_start // while scan_v6 < auth_end: // if byte_at(url, scan_v6) == 93: # ']' // close_bracket = scan_v6 // scan_v6 = scan_v6 + 1 // // if close_bracket >= host_search_start: // # Port is after ']' if there is a colon // if close_bracket + 1 < auth_end and byte_at(url, close_bracket + 1) == 58: # ':' // colon_index = close_bracket + 1 // host_start = host_search_start // host_end = close_bracket + 1 // else: // # Invalid IPv6 address, treat it as host // host_start = host_search_start // host_end = auth_end // else: // # Normal host. Scan backwards for ':' to find port // var scan_port = auth_end - 1 // var done_port = false // while scan_port >= host_search_start and done_port == false: // if byte_at(url, scan_port) == 58: # ':' // colon_index = scan_port // done_port = true // scan_port = scan_port - 1 // // if colon_index >= host_search_start: // host_start = host_search_start // host_end = colon_index // else: // host_start = host_search_start // host_end = auth_end // // # Parse port number // if colon_index >= host_search_start and colon_index + 1 < auth_end: // var p_val = 0 // var p_idx = colon_index + 1 // var valid_port = true // while p_idx < auth_end: // let pb = byte_at(url, p_idx) // if ascii_is_digit_byte(pb): // p_val = p_val * 10 + (pb - 48) // else: // valid_port = false // p_idx = p_idx + 1 // if valid_port: // port = p_val // else: // valid = false // else: // port = -1 // // cursor = auth_end // else: // # No authority // userinfo_start = cursor // userinfo_end = cursor // host_start = cursor // host_end = cursor // port = -1 // // # 3. Path parsing // let path_start = cursor // var path_end = cursor // var done_path = false // while path_end < url_len and done_path == false: // let b = byte_at(url, path_end) // if b == 63 or b == 35: # '?', '#' // done_path = true // else: // path_end = path_end + 1 // cursor = path_end // // # 4. Query parsing // var query_start = cursor // var query_end = cursor // if cursor < url_len and byte_at(url, cursor) == 63: # '?' // query_start = cursor + 1 // var done_query = false // query_end = query_start // while query_end < url_len and done_query == false: // if byte_at(url, query_end) == 35: # '#' // done_query = true // else: // query_end = query_end + 1 // cursor = query_end // else: // query_start = cursor // query_end = cursor // // # 5. Fragment parsing // var frag_start = cursor // var frag_end = cursor // if cursor < url_len and byte_at(url, cursor) == 35: # '#' // frag_start = cursor + 1 // frag_end = url_len // else: // frag_start = cursor // frag_end = cursor // // return Uri { // source: url, // valid: valid, // scheme: text_slice(url, scheme_start, scheme_end - scheme_start), // userinfo: text_slice(url, userinfo_start, userinfo_end - userinfo_start), // host: text_slice(url, host_start, host_end - host_start), // port: port, // path: text_slice(url, path_start, path_end - path_start), // query: text_slice(url, query_start, query_end - query_start), // frag_part: text_slice(url, frag_start, frag_end - frag_start) // } // // pub fn uri_decode(value: String) -> String: // let val_len = len(value) // var result = "" // var index = 0 // while index < val_len: // let b = byte_at(value, index) // if b == 37: # '%' // if index + 2 < val_len: // let hex1 = byte_at(value, index + 1) // let hex2 = byte_at(value, index + 2) // let dec1 = ascii_hex_digit_to_int(hex1) // let dec2 = ascii_hex_digit_to_int(hex2) // if dec1 >= 0 and dec2 >= 0: // let decoded_char = chr((dec1 << 4) | dec2) // result = result + decoded_char // index = index + 3 // else: // result = result + "%" // index = index + 1 // else: // result = result + "%" // index = index + 1 // elif b == 43: # '+' // result = result + " " // index = index + 1 // else: // result = result + char_at(value, index) // index = index + 1 // return result // // fn ascii_hex_digit_to_int(b: Int) -> Int: // if b >= 48 and b <= 57: # '0'-'9' // return b - 48 // if b >= 65 and b <= 70: # 'A'-'F' // return b - 55 // if b >= 97 and b <= 102: # 'a'-'f' // return b - 87 // return -1 // // pub fn uri_encode(value: String) -> String: // let val_len = len(value) // var result = "" // var index = 0 // while index < val_len: // let b = byte_at(value, index) // # RFC 3986 unreserved characters: alpha, digit, '-', '.', '_', '~' // if ascii_is_alnum_byte(b) or b == 45 or b == 46 or b == 95 or b == 126: // result = result + char_at(value, index) // else: // result = result + "%" + int_to_hex_digit(b >> 4) + int_to_hex_digit(b & 15) // index = index + 1 // return result // // fn int_to_hex_digit(val: Int) -> String: // let digit = val & 15 // if digit < 10: // return chr(48 + digit) // return chr(65 + (digit - 10)) // // pub fn uri_query_param_iterator(uri: Uri) -> UriQueryParamIterator: // return UriQueryParamIterator { // source: uri.source, // query: uri.query, // cursor: 0 // } // // pub fn uri_query_param_has_next(it: UriQueryParamIterator) -> Bool: // return it.cursor < text_len(it.query) // // pub fn uri_query_param_next(it: UriQueryParamIterator) -> UriQueryParamNext: // let q = it.query // let q_len = text_len(q) // let q_start = text_start(q) // // var current = it.cursor // var key_end = -1 // var val_start = -1 // var param_end = -1 // // var done = false // while current < q_len and done == false: // let b = text_byte_at(q, current) // if b == 38 or b == 59: # '&' or ';' // param_end = current // done = true // elif b == 61: # '=' // if key_end == -1: // key_end = current // val_start = current + 1 // current = current + 1 // // if param_end == -1: // param_end = q_len // // var key_len = 0 // var val_len = 0 // var has_value = false // // if key_end == -1: // key_len = param_end - it.cursor // key_end = param_end // val_start = param_end // val_len = 0 // has_value = false // else: // key_len = key_end - it.cursor // val_len = param_end - val_start // has_value = true // // let key_slice = text_slice(it.source, q_start + it.cursor, key_len) // let val_slice = text_slice(it.source, q_start + val_start, val_len) // // var next_cursor = q_len // if param_end + 1 < q_len: // next_cursor = param_end + 1 // // let next_it = UriQueryParamIterator { // source: it.source, // query: q, // cursor: next_cursor // } // // let param = UriQueryParam { // key: key_slice, // value: val_slice, // has_value: has_value // } // // let has_more = next_cursor < q_len // return UriQueryParamNext { // iterator: next_it, // param: param, // has_next: has_more // } //!end-kain-file //!kain-file // path = "wasm.kn" // kind = "text" // encoding = "utf8" // bytes = 2701 // sha256 = "sha256:8574576522f5aa24bcce847b9018eb7b5b708f7bb3657a2f3c09cbae28691e08" // trailing_newline = true //!kain-file-content // use std::memory // // # --- WASM Format Spec Constants --- // pub const WASM_MAGIC: Int = 1836278016 # 0x6d736100 (little-endian \x00asm) // pub const WASM_VERSION: Int = 1 // // pub const WASM_SECTION_CUSTOM: Int = 0 // pub const WASM_SECTION_TYPE: Int = 1 // pub const WASM_SECTION_IMPORT: Int = 2 // pub const WASM_SECTION_FUNC: Int = 3 // pub const WASM_SECTION_TABLE: Int = 4 // pub const WASM_SECTION_MEMORY: Int = 5 // pub const WASM_SECTION_GLOBAL: Int = 6 // pub const WASM_SECTION_EXPORT: Int = 7 // pub const WASM_SECTION_START: Int = 8 // pub const WASM_SECTION_ELEMENT: Int = 9 // pub const WASM_SECTION_CODE: Int = 10 // pub const WASM_SECTION_DATA: Int = 11 // // pub struct WasmHeader: // magic: Int // version: Int // // pub struct WasmSection: // id: Int // size: Int // offset: Int // // # Validates WASM binary header. Buffer must have at least 2 words. // pub fn wasm_validate_header(buffer: ptr) -> Bool with Unsafe: // let magic = mem_load(ptr_offset(buffer, 0, "Int"), "Int") // let version = mem_load(ptr_offset(buffer, 1, "Int"), "Int") // return magic == 1836278016 and version == 1 // // # Extracts a WASM section header details from a raw payload index. // # Returns WasmSection details. // pub fn wasm_read_section_header(buffer: ptr, offset: Int) -> WasmSection with Unsafe: // # WASM sections encode ID as a byte, followed by U32 LEB128 length. // # For a standard word-aligned buffer we can parse the bytes: // let byte_offset = offset // let raw_val = mem_load(ptr_offset(buffer, byte_offset / 8, "Int"), "Int") // let shift = (byte_offset % 8) * 8 // let id = (raw_val >> shift) & 255 // // # Parse a simplified LEB128 size (supporting 1-4 bytes) // # A standard single word read will cover LEB128 easily // let size_offset = byte_offset + 1 // let raw_size_val = mem_load(ptr_offset(buffer, size_offset / 8, "Int"), "Int") // let size_shift = (size_offset % 8) * 8 // let size_byte = (raw_size_val >> size_shift) & 255 // // var size = size_byte & 127 // var leb_bytes = 1 // if size_byte >= 128: // let size_byte2 = (raw_size_val >> (size_shift + 8)) & 255 // size = size | ((size_byte2 & 127) << 7) // leb_bytes = 2 // if size_byte2 >= 128: // let size_byte3 = (raw_size_val >> (size_shift + 16)) & 255 // size = size | ((size_byte3 & 127) << 14) // leb_bytes = 3 // if size_byte3 >= 128: // let size_byte4 = (raw_size_val >> (size_shift + 24)) & 255 // size = size | ((size_byte4 & 127) << 21) // leb_bytes = 4 // // return WasmSection { // id: id, // size: size, // offset: byte_offset + 1 + leb_bytes // } //!end-kain-file //!kain-file // path = "z3.kn" // kind = "text" // encoding = "utf8" // bytes = 4885 // sha256 = "sha256:9d5d1092d3b93942fe2abd927be4732ba034e8c4c82932ee59421495883b6c72" // trailing_newline = true //!kain-file-content // use std::python // // // Root Z3 surface for Kain. // // // // This is intentionally an optional host-backed solver lane. Authored Kain // // owns the proof shape and orchestration; the active Python environment owns // // the actual `z3-solver` package. Call `z3_available()` before requiring it if // // your flow needs to stay soft when the module is missing. // // fn z3_operator_module() -> Any: // return python_require_module("operator") // // fn z3_string_builtin() -> Any: // return python_eval_raw("str") // // fn z3_repr_builtin() -> Any: // return python_eval_raw("repr") // // pub fn z3_available() -> Bool: // return python_module_available("z3") // // pub fn z3_require() -> Any: // return python_require_module("z3") // // pub fn z3_version() -> String: // return to_string(python_call_attr_raw(z3_require(), "get_version_string", [])) // // pub fn z3_solver() -> Any: // return python_call_attr_raw(z3_require(), "Solver", []) // // pub fn z3_optimize() -> Any: // return python_call_attr_raw(z3_require(), "Optimize", []) // // pub fn z3_int(name: String) -> Any: // return python_call_attr_raw(z3_require(), "Int", [name]) // // pub fn z3_real(name: String) -> Any: // return python_call_attr_raw(z3_require(), "Real", [name]) // // pub fn z3_bool(name: String) -> Any: // return python_call_attr_raw(z3_require(), "Bool", [name]) // // pub fn z3_bitvec(name: String, bits: Int) -> Any: // return python_call_attr_raw(z3_require(), "BitVec", [name, bits]) // // pub fn z3_int_val(value: Int) -> Any: // return python_call_attr_raw(z3_require(), "IntVal", [value]) // // pub fn z3_bool_val(value: Bool) -> Any: // return python_call_attr_raw(z3_require(), "BoolVal", [value]) // // pub fn z3_bitvec_val(value: Int, bits: Int) -> Any: // return python_call_attr_raw(z3_require(), "BitVecVal", [value, bits]) // // pub fn z3_expr_add(left: Any, right: Any) -> Any: // return python_call_attr_raw(z3_operator_module(), "add", [left, right]) // // pub fn z3_expr_sub(left: Any, right: Any) -> Any: // return python_call_attr_raw(z3_operator_module(), "sub", [left, right]) // // pub fn z3_expr_mul(left: Any, right: Any) -> Any: // return python_call_attr_raw(z3_operator_module(), "mul", [left, right]) // // pub fn z3_expr_eq(left: Any, right: Any) -> Any: // return python_call_attr_raw(z3_operator_module(), "eq", [left, right]) // // pub fn z3_expr_ne(left: Any, right: Any) -> Any: // return python_call_attr_raw(z3_operator_module(), "ne", [left, right]) // // pub fn z3_expr_lt(left: Any, right: Any) -> Any: // return python_call_attr_raw(z3_operator_module(), "lt", [left, right]) // // pub fn z3_expr_le(left: Any, right: Any) -> Any: // return python_call_attr_raw(z3_operator_module(), "le", [left, right]) // // pub fn z3_expr_gt(left: Any, right: Any) -> Any: // return python_call_attr_raw(z3_operator_module(), "gt", [left, right]) // // pub fn z3_expr_ge(left: Any, right: Any) -> Any: // return python_call_attr_raw(z3_operator_module(), "ge", [left, right]) // // pub fn z3_and(clauses: Any) -> Any: // return python_call_attr_raw(z3_require(), "And", clauses) // // pub fn z3_or(clauses: Any) -> Any: // return python_call_attr_raw(z3_require(), "Or", clauses) // // pub fn z3_not(clause: Any) -> Any: // return python_call_attr_raw(z3_require(), "Not", [clause]) // // pub fn z3_distinct(values: Any) -> Any: // return python_call_attr_raw(z3_require(), "Distinct", values) // // pub fn z3_sum(values: Any) -> Any: // return python_call_attr_raw(z3_require(), "Sum", values) // // pub fn z3_solver_add(solver: Any, constraints: Any): // python_call_attr_raw(solver, "add", constraints) // // pub fn z3_solver_push(solver: Any): // python_call_attr_raw(solver, "push", []) // // pub fn z3_solver_pop(solver: Any, depth: Int): // python_call_attr_raw(solver, "pop", [depth]) // // pub fn z3_solver_check(solver: Any) -> Any: // return python_call_attr_raw(solver, "check", []) // // pub fn z3_result_name(result: Any) -> String: // return to_string(python_call_raw(z3_string_builtin(), [result])) // // pub fn z3_solver_check_name(solver: Any) -> String: // return z3_result_name(z3_solver_check(solver)) // // pub fn z3_is_sat(result: Any) -> Bool: // return z3_result_name(result) == "sat" // // pub fn z3_is_unsat(result: Any) -> Bool: // return z3_result_name(result) == "unsat" // // pub fn z3_is_unknown(result: Any) -> Bool: // return z3_result_name(result) == "unknown" // // pub fn z3_solver_model(solver: Any) -> Any: // return python_call_attr_raw(solver, "model", []) // // pub fn z3_model_eval(model: Any, expr: Any) -> Any: // return python_call_attr_raw(model, "evaluate", [expr]) // // pub fn z3_as_long(value: Any) -> Int: // return to_int(python_call_attr_raw(value, "as_long", [])) // // pub fn z3_as_string(value: Any) -> String: // return to_string(python_call_raw(z3_string_builtin(), [value])) // // pub fn z3_repr(value: Any) -> String: // return to_string(python_call_raw(z3_repr_builtin(), [value])) //!end-kain-file //!kain-file // path = "zip.kn" // kind = "text" // encoding = "utf8" // bytes = 4006 // sha256 = "sha256:128722489e8793d5f8bdd7c2b6faf7b485f8d2f49916a4a74fe72ef8a5749595" // trailing_newline = true //!kain-file-content // use std::memory // // # --- PKZIP Format Spec Constants --- // pub const ZIP_LOCAL_HEADER_SIG: Int = 67324752 # 0x04034b50 // pub const ZIP_CENTRAL_HEADER_SIG: Int = 33639248 # 0x02014b50 // pub const ZIP_EOCD_SIG: Int = 101010256 # 0x06054b50 // // pub struct ZipLocalHeader: // version_needed: Int // flags: Int // compression_method: Int // last_mod_time: Int // last_mod_date: Int // crc32: Int // compressed_size: Int // uncompressed_size: Int // file_name_len: Int // extra_field_len: Int // // pub struct ZipCentralHeader: // version_made: Int // version_needed: Int // flags: Int // compression_method: Int // last_mod_time: Int // last_mod_date: Int // crc32: Int // compressed_size: Int // uncompressed_size: Int // file_name_len: Int // extra_field_len: Int // comment_len: Int // disk_start: Int // internal_attrs: Int // external_attrs: Int // local_header_offset: Int // // pub struct ZipEocd: // disk_number: Int // disk_with_cd: Int // disk_entries: Int // total_entries: Int // cd_size: Int // cd_offset: Int // comment_len: Int // // # Serializes a Local File Header into a 30-byte buffer word block (which is 4 words or 32 bytes with padding). // # The buffer must have at least 4 words allocated. // pub fn zip_write_local_header(buffer: ptr, header: ZipLocalHeader) -> Int with Unsafe: // mem_store(ptr_offset(buffer, 0, "Int"), 67324752, "Int") // mem_store(ptr_offset(buffer, 1, "Int"), (header.flags << 16) | header.version_needed, "Int") // mem_store(ptr_offset(buffer, 2, "Int"), (header.last_mod_time << 16) | header.compression_method, "Int") // mem_store(ptr_offset(buffer, 3, "Int"), header.last_mod_date, "Int") // mem_store(ptr_offset(buffer, 4, "Int"), header.crc32, "Int") // mem_store(ptr_offset(buffer, 5, "Int"), header.compressed_size, "Int") // mem_store(ptr_offset(buffer, 6, "Int"), header.uncompressed_size, "Int") // mem_store(ptr_offset(buffer, 7, "Int"), (header.extra_field_len << 16) | header.file_name_len, "Int") // return 30 // // # Parses a Local File Header from a 30-byte buffer word block. // pub fn zip_read_local_header(buffer: ptr) -> ZipLocalHeader with Unsafe: // let sig = mem_load(ptr_offset(buffer, 0, "Int"), "Int") // if sig != 67324752: // return ZipLocalHeader { version_needed: 0, flags: 0, compression_method: 0, last_mod_time: 0, last_mod_date: 0, crc32: 0, compressed_size: 0, uncompressed_size: 0, file_name_len: 0, extra_field_len: 0 } // // let word1 = mem_load(ptr_offset(buffer, 1, "Int"), "Int") // let word2 = mem_load(ptr_offset(buffer, 2, "Int"), "Int") // let date = mem_load(ptr_offset(buffer, 3, "Int"), "Int") // let crc = mem_load(ptr_offset(buffer, 4, "Int"), "Int") // let comp = mem_load(ptr_offset(buffer, 5, "Int"), "Int") // let uncomp = mem_load(ptr_offset(buffer, 6, "Int"), "Int") // let word7 = mem_load(ptr_offset(buffer, 7, "Int"), "Int") // // return ZipLocalHeader { // version_needed: word1 & 65535, // flags: (word1 >> 16) & 65535, // compression_method: word2 & 65535, // last_mod_time: (word2 >> 16) & 65535, // last_mod_date: date, // crc32: crc, // compressed_size: comp, // uncompressed_size: uncomp, // file_name_len: word7 & 65535, // extra_field_len: (word7 >> 16) & 65535 // } // // # Serializes an EOCD record into a 22-byte buffer block (3 words or 24 bytes). // pub fn zip_write_eocd(buffer: ptr, eocd: ZipEocd) -> Int with Unsafe: // mem_store(ptr_offset(buffer, 0, "Int"), 101010256, "Int") // mem_store(ptr_offset(buffer, 1, "Int"), (eocd.disk_with_cd << 16) | eocd.disk_number, "Int") // mem_store(ptr_offset(buffer, 2, "Int"), (eocd.total_entries << 16) | eocd.disk_entries, "Int") // mem_store(ptr_offset(buffer, 3, "Int"), eocd.cd_size, "Int") // mem_store(ptr_offset(buffer, 4, "Int"), eocd.cd_offset, "Int") // mem_store(ptr_offset(buffer, 5, "Int"), eocd.comment_len, "Int") // return 22 //!end-kain-file