Skip to content

add postcard & postcard-rpc re-exports for macros#110

Merged
jamesmunns merged 2 commits intojamesmunns:mainfrom
rursprung:add-reexports
Jul 8, 2025
Merged

add postcard & postcard-rpc re-exports for macros#110
jamesmunns merged 2 commits intojamesmunns:mainfrom
rursprung:add-reexports

Conversation

@rursprung
Copy link
Copy Markdown
Contributor

the macros reference postcard & postcard-schema and expect their callers to add the dependency.
this has two downsides:

  • this dependency leaks to the caller
  • we have no guarantee as to which version the caller adds (and with which features), thus we don't know whether it'll actually compile

by re-exporting it and referencing our re-export we can resolve this issue. the re-export is hidden from the docs as consumers are not supposed to use it directly.

resolves #105

rursprung added 2 commits May 15, 2025 14:21
the macros reference `postcard-schema` and expect their callers to add
the dependency.
this has two downsides:
* this dependency leaks to the caller
* we have no guarantee as to which version the caller adds (and with
  which features), thus we don't know whether it'll actually compile

by re-exporting it and referencing our re-export we can resolve this
issue. the re-export is hidden from the docs as consumers are not
supposed to use it directly.

note that the ICD example has not been modified since it explicitly uses
`#[derive(Schema)]` and thus directly depends on the crate.

resolves jamesmunns#105
the macro references `postcard` and expects its callers to add the
dependency.
this has two downsides:
* this dependency leaks to the caller
* we have no guarantee as to which version the caller adds (and with
  which features), thus we don't know whether it'll actually compile

by re-exporting it and referencing our re-export we can resolve this
issue. the re-export is hidden from the docs as consumers are not
supposed to use it directly.

resolves jamesmunns#105
@jamesmunns jamesmunns added the Q2 '25 Triage Items tracked as part of https://github.com/jamesmunns/postcard/issues/241 label Jun 19, 2025
@jamesmunns jamesmunns merged commit 1b4a744 into jamesmunns:main Jul 8, 2025
@rursprung rursprung deleted the add-reexports branch July 8, 2025 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Q2 '25 Triage Items tracked as part of https://github.com/jamesmunns/postcard/issues/241

Projects

None yet

Development

Successfully merging this pull request may close these issues.

postcard-rpc: pull in postcard-schema directly

2 participants