matrix-org / matrix-org/matrix-rust-sdk

Undocumented feature flags

Open
#2,994 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

documentation help wanted
Dominant language
Rust
Stars
2.3k
Forks
500
Avg merge
1d 16h
Merged PRs (30d)
106

Description

I just tried to build `matrix-sdk` as a dependency in my program with the following invocation in `cargo.toml`:

```toml
matrix-sdk = { version = "0.7.0", features = ["e2e-encryption"], default-features = false }
```

This led to the following error showing up in my terminal, upon attempted `cargo run`:

```
error: failed to run custom build command for `matrix-sdk v0.7.0`

Caused by:
process didn't exit successfully: `C:\Users\Alyssa\Miscellanea\Programming\Rust\matrix-chat-exporter\target\debug\build\matrix-sdk-48c5aca6c0ec4c49\build-script-build` (exit code: 1)
--- stderr

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ error: one of the features 'native-tls' or 'rustls-tls' must be enabled ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
```

...which is strange, because neither `native-tls` nor `rustls-tls` are listed as settable feature flags on [the `matrix-sdk` crates.io page](https://crates.io/crates/matrix-sdk). So it seems like the documentation there is out-of-date, missing some feature flags which in fact exist (and, moreover, are required for a successful build).

(Adding `rustls-tls` to the features list, after seeing this error message, let me subsequently compile without further issue; my report is purely of a documentation problem, not of anything wrong on a deeper technical level.)

Contributor guide

Open the contributing guide

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 checking the matrix-sdk feature list shown on crates.io against the feature flags exposed by the package configuration. Document native-tls and rustls-tls, including that one is required when default-features is false, and verify that the documented configuration builds successfully with the reported Cargo.toml setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.