emeraldpay / emeraldpay/emerald-vault

Put more code behind feature flags?

Open
#319 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
58
Forks
18
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the Cargo feature definitions and the CI build configuration, then reproduce the documented --no-default-features and fs-storage builds. Map which dependencies and code paths each feature enables, and add coverage for the relevant feature combinations. Done means offline signing can build without unnecessary dependencies and CI catches unsupported combinations.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system, ci-cd
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.