#dusk $DUSK

I thought Piecrust, Dusk's virtual machine, was just there to run smart contracts. Same job any VM does — execute code, keep state, done. Turns out that's maybe half of what it's actually for.

Digging into the docs, Piecrust exposes a set of host functions.

operations the VM hands off to native code instead of running inside the sandboxed WASM environment.
Hashing, through Blake2b and Poseidon.
Verifying PlonK and Groth16 zero-knowledge proofs.
Validating Schnorr and BLS signatures.
None of that runs as regular contract bytecode.

Why would a VM go out of its way to route specific operations around itself instead of just running everything the normal way?

Turns out WASM execution can be 45-255% slower than native code for compute-heavy operations, the overhead comes from virtualized memory management and the extra instruction handling a sandboxed environment adds.
For a chain where ZK proof verification isn't occasional but happens on basically every transaction, running that math inside WASM instead of natively isn't a small tax.
It compounds, block after block.
This same principle carries straight into DuskEVM, the EVM-compatible layer bringing Solidity developers onto Dusk.

Hedger, its confidential execution module, leans on homomorphic encryption plus ZK proofs to keep transactions private; none of which is fast enough to matter without the native host functions underneath doing the heavy lifting first.
So Piecrust isn't just where contracts execute. It's also a fast lane for the exact cryptographic operations @Dusk depends on most, deliberately kept out of the slow path, and the same fast lane is what makes DuskEVM's privacy layer viable at all, not just Dusk-native contracts.

Makes me wonder — how many other "general purpose" VMs are quietly eating a proof-verification tax nobody's bothered to measure?