~/bend-docscommunity

entropy.bend relies on unsafe/foreign

raw source on the hub · import 0xb6eebf6253ee268a21f3e308b12cacba/entropy.bend as Entropy

Host entropy ============

The package's only host binding for randomness: entropy/native.c natively and entropy/webcrypto.js in JavaScript. generation.bend reads source words from it; trace_context.bend never does.

1 import
import Base

Effects (foreign code)

effect read_u32 source · line 14 · raw

IO(Result<&1, &1, Pair(U32, String), U32>)

One word from the host's cryptographic source: WebCrypto in JavaScript and the operating system's generator natively. Fail code 1 means unavailable and code 2 means source-failure in JavaScript; natively the code is the host errno with its strerror text. The pure codec never calls it implicitly.

foreign: entropy/native.c, entropy/webcrypto.js