Crate randomx_bindings_sys

Source

Structs§

Constants§

Functions§

  • Creates a randomx_cache structure and allocates memory for RandomX Cache.
  • Creates a randomx_dataset structure and allocates memory for RandomX Dataset.
  • Calculates a RandomX hash value.
  • Set of functions used to calculate multiple RandomX hashes more efficiently. randomx_calculate_hash_first will begin a hash calculation. randomx_calculate_hash_next will output the hash value of the previous input and begin the calculation of the next hash. randomx_calculate_hash_last will output the hash value of the previous input.
  • Creates and initializes a RandomX virtual machine.
  • Gets the number of items contained in the dataset.
  • Releases all memory occupied by the randomx_vm structure.
  • Returns a pointer to the internal memory buffer of the dataset structure. The size of the internal memory buffer is randomx_dataset_item_count() * RANDOMX_DATASET_ITEM_SIZE.
  • @return The recommended flags to be used on the current machine. Does not include: RANDOMX_FLAG_LARGE_PAGES RANDOMX_FLAG_FULL_MEM RANDOMX_FLAG_SECURE These flags must be added manually if desired. On OpenBSD RANDOMX_FLAG_SECURE is enabled by default in JIT mode as W^X is enforced by the OS.
  • Initializes the cache memory and SuperscalarHash using the provided key value. Does nothing if called again with the same key value.
  • Initializes dataset items.
  • Releases all memory occupied by the randomx_cache structure.
  • Releases all memory occupied by the randomx_dataset structure.
  • Reinitializes a virtual machine with a new Cache. This function should be called anytime the Cache is reinitialized with a new key. Does nothing if called with a Cache containing the same key value as already set.
  • Reinitializes a virtual machine with a new Dataset.

Type Aliases§