emeraldpay / emerald-vault

Secure account management for Ethereum blockchains
https://emerald.cash
Apache License 2.0
54 stars 25 forks source link

Put more code behind feature flags? #319

Open thomaseizinger opened 4 years ago

thomaseizinger commented 4 years ago

Currently, depending on emerald-vault-core brings in a lot of dependencies, like librocksdb-sys which takes a long time to compile. In addition, the shared library libusb-1.0 needs to be installed in order to compile it.

We are only using emerald-core-vault for the core feature of signing transactions offline. It would be nice if there were a set of feature flags that allows us to not compile all the other code if we are not using it.

I've played around with the current flags and also noticed that they are actually not working. Compiling with --no-default-features for example doesn't work and even if I add --features fs-storage it still fails :(

The CI build doesn't seem to test all the possible combinations. It would be good if it were to avoid these kind of problems.

splix commented 4 years ago

Thank you for your input. We were using it as a standalone server mostly, i.e. always expected all of the features. Though now we started to use it as a lib instead, and I agree it's not well designed/written for such case and needs to be refactored.