Skip to content

Fixes issue #1154 by forward-declaring PeerContext as struct#1231

Merged
ladvoc merged 4 commits into
livekit:mainfrom
OlympusM:issue-1154-peercontext
Jul 9, 2026
Merged

Fixes issue #1154 by forward-declaring PeerContext as struct#1231
ladvoc merged 4 commits into
livekit:mainfrom
OlympusM:issue-1154-peercontext

Conversation

@OlympusM

@OlympusM OlympusM commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Description

This PR changes the forward declaration of PeerContext from a class to a struct in jsep.h to match how the type is generated by the cxx crate on the Rust side.

This resolves the name-mangling mismatch that causes 4x LNK2019 unresolved external symbol errors on stricter MSVC toolchains on Windows.

Fixes #1154

Notes

Re-submitting this clean fix as the previous PR (#1167) was abandoned last month without a CLA signature. Verified locally that this compiles and passes all unit tests for webrtc-sys.

@OlympusM OlympusM requested a review from cloudwebrtc as a code owner July 9, 2026 03:17

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@OlympusM OlympusM changed the title Fixes issue 1154 by forward-declaring PeerContext as struct Fixes issue #1154 by forward-declaring PeerContext as struct Jul 9, 2026
@cloudwebrtc

Copy link
Copy Markdown
Contributor

Hey @OlympusM, thank you for the fix. Could you please also add this .changeset/fix-peercontext-forward-declaration.md from these changes https://github.com/livekit/rust-sdks/pull/1233/changes, because one CI failed here.

@OlympusM OlympusM requested a review from ladvoc as a code owner July 9, 2026 04:02
@CLAassistant

CLAassistant commented Jul 9, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@ladvoc ladvoc merged commit 0caf9f5 into livekit:main Jul 9, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

webrtc-sys: jsep.h forward-declares PeerContext as class (it's a cxx struct) → 4× LNK2019 on windows-msvc (clang-cl)

4 participants