29 releases

0.9.4 Nov 27, 2023
0.9.2 Oct 19, 2023
0.8.2 Feb 15, 2023
0.7.4 Sep 21, 2022
0.0.0 Jan 5, 2017

#130 in Web programming

Download history 2264/week @ 2023-12-11 2046/week @ 2023-12-18 1763/week @ 2023-12-25 1912/week @ 2024-01-01 1894/week @ 2024-01-08 1989/week @ 2024-01-15 1476/week @ 2024-01-22 1416/week @ 2024-01-29 1426/week @ 2024-02-05 1613/week @ 2024-02-12 1639/week @ 2024-02-19 1866/week @ 2024-02-26 1765/week @ 2024-03-04 1286/week @ 2024-03-11 1527/week @ 2024-03-18 1138/week @ 2024-03-25

5,945 downloads per month
Used in 42 crates (17 directly)

MIT license

1MB
19K SLoC

ruma

crates.io page docs.rs page license: MIT

Types and traits for working with the Matrix protocol.

This crate re-exports things from all of the other ruma crates so you don't have to manually keep all the versions in sync.

Which crates are re-exported can be configured through cargo features. Depending on which parts of Matrix are relevant to you, activate the following features:

  • client-api for the client-server API
  • federation-api for the server-server (federation) API
  • appservice-api for the application service API

lib.rs:

Types and traits for working with the Matrix protocol.

This crate re-exports things from all of the other ruma crates so you don't have to manually keep all the versions in sync.

Which crates are re-exported can be configured through cargo features.

⚠ Some details might be missing because rustdoc has trouble with re-exports so you may need to refer to other crates' documentations.

🛈 For internal consistency, Ruma uses American spelling for variable names. Names may differ in the serialized representation, as the Matrix specification has a mix of British and American English.

API features

Depending on which parts of Matrix are relevant to you, activate the following features:

  • appservice-api -- Application Service API.
  • client-api -- Client-Server API.
  • federation-api -- Server-Server (Federation) API.
  • identity-service-api -- Identity Service API.
  • push-gateway-api -- Push Gateway API.

These features have client- and server-optimized variants that are enabled respectively with the -c and -s suffixes. For example:

  • client-api-c -- The Client-Server API optimized for the client side.
  • client-api-s -- The Client-Server API optimized for the server side.

Compatibility feature

  • compat increases compatibility with other parts of the Matrix ecosystem, at the expense of deviating from the specification.

Convenience features

These features are only useful if you want to use a method that requires it:

  • rand
  • markdown
  • html

Unstable features

By using these features, you opt out of all semver guarantees Ruma otherwise provides:

  • unstable-exhaustive-types -- Most types in Ruma are marked as non-exhaustive to avoid breaking changes when new fields are added in the specification. This feature compiles all types as exhaustive.
  • unstable-mscXXXX, where XXXX is the MSC number -- Upcoming Matrix features that may be subject to change or removal.
  • unstable-unspecified -- Undocumented Matrix features that may be subject to change or removal.

Common features

These submodules are usually activated by the API features when needed:

  • api
  • events
  • signatures

ruma-client features

The client feature activates [ruma::client][client], and client-ext-client-api activates ruma-clients client-api feature. All other client-* features activate the same feature without the client- prefix on ruma-client. See the crate's documentation for the effect of these features.

If you are viewing this on docs.rs, you can have a look at the feature dependencies by clicking Feature flags in the toolbar at the top.

Dependencies

~8–29MB
~470K SLoC