Extract livekit-token from livekit-api - #1344
Open
1egoman wants to merge 6 commits into
Open
Conversation
Contributor
Changeset ✓This PR includes a changeset covering all affected packages:
|
1egoman
force-pushed
the
break-apart-livekit-api
branch
from
August 21, 2026 19:14
bf1d1e6 to
b041fc7
Compare
livekit-token (and an unexpected side effect, livekit-region) from livekit-apilivekit-token from livekit-api
1egoman
force-pushed
the
break-apart-livekit-api
branch
from
August 21, 2026 19:18
24adcc4 to
58887f0
Compare
1egoman
marked this pull request as ready for review
August 21, 2026 19:38
Open
1 task
Moves access_token.rs, jwt_provider.rs and the test_token.txt fixture, plus the get_env_keys helper, into a new livekit-token crate. livekit-api re-exports it as `access_token`, which stays the documented path, so no consumer changes. Also fixes services-tokio and services-async, which used the access-token types without declaring the access-token feature: building with --no-default-features --features services-tokio failed to compile. The extraction forces the fix, since services/ can no longer reach the types any other way. Adds livekit-api/tests/backcompat_paths.rs, a compile-only guard on the re-export paths, since nothing else in the workspace imports them. Also records in the implementation plan that test_token.txt has to move with the token code; the plan had missed it, and cargo test -p livekit-token fails without it.
The test suites in livekit and livekit-ffi were the last places reaching access tokens through livekit-api. Both now use livekit-token directly. livekit takes livekit-token as a dev-dependency rather than livekit-api: a member-level default-features override is ignored for an inherited workspace dep, so a livekit-api dev-dep would pull reqwest and the whole Twirp stack into test builds. No functional change; livekit_api::access_token is a re-export of these same types.
1egoman
force-pushed
the
break-apart-livekit-api
branch
from
August 24, 2026 15:31
202290c to
d7ac776
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Project Overview
Right now,
livekit-apiis a crate that is an amalgamation of many things:We've discussed on the client team that it would be good to start to split this up. Larger, monolithic crates are harder to build and require larger numbers of features (which can interact in unexpected ways) than smaller ones, and ideally once this migration is complete,
livekitwill be able to depend on the smaller constituent crates rather than the monolithiclivekit-api.Description
This initial pull request is focused on extracting out a new
livekit-tokencrate fromlivekit-api. This new crate will contain all access token generation code and be depended on bylivekit-uniffi(for exposing via uniffi) andlivekit-api(so it can be re-exported under its old path for downstream consumption).This should NOT be a breaking change and is largely scoped as a lift and shift effort right now. The expectation is that from this point forward, all livekit packages will consume
livekit-tokendirectly, and any external packages will be expected to consumelivekit-api.TODO
livekit-tokento crates.io