entropy
entropy copied to clipboard
RFC: a backend-only version
Hi, while I appreciate the need for a truly platform-independent source of cryptographic entropy, the JS dependencies are very heavy.
Would you be open to a smaller, upstream package called say entropy-backend
that provides the Unix and Windows stuff, imported by this one which then will provide the JS interface and reexport the other ones too?
Do I understand correctly that the impl(ghcjs) || os(ghcjs)
in the library stanza of the .cabal
file makes it so that the JS dependencies are not active when the compiler is not GHCJS?
library
ghc-options: -O2
exposed-modules: System.Entropy
if impl(ghcjs) || os(ghcjs)
other-modules: System.EntropyGhcjs
else {
if os(windows)
other-modules: System.EntropyWindows
else {
other-modules: System.EntropyNix
}
}
other-extensions: CPP, ForeignFunctionInterface, BangPatterns,
ScopedTypeVariables
build-depends: base >= 4.8 && < 5, bytestring
default-language: Haskell2010
if impl(ghcjs) || os(ghcjs) {
build-depends: ghcjs-dom >= 0.9.5.0 && < 1
, jsaddle
}
Yes, that's right.