Crate cairo_native_runtime Copy item path Source DICT_GAS_REFUND_PER_ACCESS FeltDict Felt252 type used in cairo native runtime FormattedItem A formatted string representation of anything formattable (e.g. ByteArray, felt, short-string). HALF_PRIME BYTES_IN_WORD BYTE_ARRAY_MAGIC as_cairo_short_string Converts a bigint representing a felt252 to a Cairo short-string. as_cairo_short_string_ex Converts a bigint representing a felt252 to a Cairo short-string of the given length.
Nulls are allowed and length must be <= 31. cairo_native__dict_drop ⚠ Free a dictionary using an optional callback to drop each element. cairo_native__dict_dup ⚠ Duplicate a dictionary using a provided callback to clone each element. cairo_native__dict_gas_refund ⚠ Compute the total gas refund for the dictionary at squash time. cairo_native__dict_get ⚠ Return a pointer to the entry’s value pointer for a given key, inserting a null pointer if not
present. Increment the access count. cairo_native__dict_new ⚠ Allocate a new dictionary. cairo_native__get_costs_builtin Get the gas builtin from the internal thread local. cairo_native__get_version ⚠ cairo_native__libfunc__debug__print ⚠ Based on cairo-lang-runner
’s implementation. cairo_native__libfunc__ec__ec_point_from_x_nz ⚠ Compute ec_point_from_x_nz(x)
and store it. cairo_native__libfunc__ec__ec_point_try_new_nz ⚠ Compute ec_point_try_new_nz(x)
. cairo_native__libfunc__ec__ec_state_add ⚠ Compute ec_state_add(state, point)
and store the state back. cairo_native__libfunc__ec__ec_state_add_mul ⚠ Compute ec_state_add_mul(state, scalar, point)
and store the state back. cairo_native__libfunc__ec__ec_state_init ⚠ Compute ec_state_init()
and store the state back. cairo_native__libfunc__ec__ec_state_try_finalize_nz ⚠ Compute ec_state_try_finalize_nz(state)
and store the result. cairo_native__libfunc__hades_permutation ⚠ Compute hades_permutation(op0, op1, op2)
and replace the operands with the results. cairo_native__libfunc__pedersen ⚠ Compute pedersen(lhs, rhs)
and store it into dst
. cairo_native__set_costs_builtin Store the gas builtin in the internal thread local. Returns the old pointer, to restore it after execution.
Not a runtime metadata method, it should be called before the program is executed. format_next_item Formats a string or a short string / felt252
. Returns the formatted string and a boolean
indicating whether it’s a string. If can’t format the item, returns None.