Skip to content

Drop the uuid "v4" feature from the library's dependencies #439

Closed

Description

@adityamukho

Summary

Cargo.toml enables uuid's v4 feature in the main [dependencies] (line 38, and the wasm target's entry on line 43). The library never calls it. It creates UUIDs only with v5:

  • src/query/datalog/matcher.rs:733: a keyword entity becomes Uuid::new_v5(NAMESPACE_OID, keyword)
  • src/query/datalog/magic_sets.rs:74: a v5 sentinel entity for magic-sets rewriting

Uuid::new_v4 appears only in #[cfg(test)] modules, tests/, benches/, examples/ and three rustdoc examples (src/graph/types.rs:246,255, src/graph/storage.rs:79). The dev-dependency entry (Cargo.toml:71) already enables v4 for all of those.

Ask

  • Remove "v4" from the uuid features in [dependencies] and in the wasm target entry. Keep it in [dev-dependencies].
  • Check that cargo build, cargo test (including doctests), cargo build --target wasm32-unknown-unknown --features browser and the binary-size check all still pass. Note the size change, if any.
  • If any wasm or browser build still needs getrandom/js without v4, decide what that dependency is for and drop it too if nothing uses it.

Why v3.0.0

minigraf does not re-export uuid, but a downstream crate could be relying on Cargo feature unification to get Uuid::new_v4 through minigraf's dependency. Dropping the feature could break that build, so it goes in the major release.

Philosophy check

Aligned with "self-contained": fewer enabled features, fewer transitive dependencies (v4 pulls in getrandom).

Activity

  1. added this to the v3.0.0 milestone on Oct 5, 2026
  2. added
    dependenciesPull requests that update a dependency file
    rustPull requests that update rust code
    on Oct 5, 2026
  3. added a commit that references this issue on Oct 10, 2026
  4. adityamukho commented on Oct 10, 2026

    @adityamukho
    CollaboratorAuthor

    Done on v3 by #527 (a86f1ab).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    dependenciesPull requests that update a dependency filegood first issueGood for newcomersrustPull requests that update rust code

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions