package worker import "github.com/jfraeys/fetch_ml/internal/worker/integrity" // UseNativeLibs controls whether to use C++ implementations. // Set FETCHML_NATIVE_LIBS=1 to enable native libraries. // This is defined here so it's available regardless of build tags. var UseNativeLibs = false // dirOverallSHA256Hex selects implementation based on toggle. // This file has no CGo imports so it compiles even when CGO is disabled. // The actual implementations are in native_bridge.go (native) and integrity package (Go). func dirOverallSHA256Hex(root string) (string, error) { if !UseNativeLibs { return integrity.DirOverallSHA256Hex(root) } return dirOverallSHA256HexNative(root) } // DirOverallSHA256HexParallel exports the parallel directory hashing function. func DirOverallSHA256HexParallel(root string) (string, error) { return integrity.DirOverallSHA256HexParallel(root) }