Cargo Features
[dependencies]
ruma-common = { version = "0.19.0", default-features = false, features = ["server", "api", "js", "rand", "unstable-msc2666", "unstable-msc2870", "unstable-msc3930", "unstable-msc3931", "unstable-msc3932", "unstable-msc4186", "unstable-msc4306", "unstable-msc4406", "compat-arbitrary-length-ids", "compat-server-signing-key-version", "compat-empty-string-null", "compat-null", "compat-optional"] }
- default = client, server
-
These feature gates exist only for the tests. Disabling them results in a compile error.
- client server default
- api
-
Enables date_header, http, and konst
Affects
ruma-common::api,ruma-common::http_headers… - js
-
Enables js of optional uuid and wasm_js of optional getrandom
getrandom:
Optional backend: wasm_js
This flag enables the wasm_js backend and uses it by default on wasm32 where the target_os is unknown. The getrandom_backend cfg may override this.
WARNING: We strongly recommend against enabling this feature in libraries (except for tests) since it is known to break non-Web WASM builds and further since the usage of
wasm-bindgencauses significant bloat toCargo.lock(on all targets).The only exception to this rule: if your crate already unconditionally depends on
wasm-bindgenorjs-syson "unknown" WASM targets then it's acceptable to enable this feature unconditionally. - rand
- unstable-msc2666
- unstable-msc2870
-
Affects
room_version_rules::RedactionRules.keep_room_server_acl_allow_deny_allow_ip_literals… - unstable-msc3417 unstable-msc3768 unstable-msc3843 unstable-msc3930
- unstable-msc3931 unstable-msc3932?
-
Affects
condition::RoomVersionSupportsConditionData,condition::RoomVersionFeature,condition::PushConditionRoomCtx.supported_features… - unstable-msc3932 = unstable-msc3931
- unstable-msc4108 unstable-msc4140 unstable-msc4186
- unstable-msc4306
-
Thread subscriptions.
Affects
condition::ThreadSubscriptionConditionData,push::Ruleset.postcontent… - unstable-msc4406
-
M_SENDER_IGNORED
Affects
kind::SenderIgnoredErrorData… - compat-arbitrary-length-ids
-
Allow IDs to exceed 255 bytes.
Enables compat-arbitrary-length-ids of ruma-identifiers-validation
- compat-server-signing-key-version
-
Don't validate
ServerSigningKeyVersion.Enables compat-server-signing-key-version of ruma-identifiers-validation
- compat-empty-string-null
-
Allow some mandatory fields to be missing, defaulting them to an empty string in deserialization.
- compat-null
-
Allow certain fields to be
nullfor compatibility, treating that the same as the field being absent. - compat-optional
-
Allow certain fields to be absent even though the spec marks them as mandatory. Deserialization will yield a default value like an empty string.