SoftbearStudios / SoftbearStudios/bitcode

Reimplement #[bitcode(with_serde)]

Open
#47 4 comments 8 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
671
Forks
61
PR merge metrics
No merged PRs in 30d

Description

There have been many requests for supporting 3rd party crates such as: time, rust_decimal, uuid, and chrono. Rather than implementing support manually for these crates and more, an easier solution is to allow types implementing serde::Serialize inside types implementing bitcode::Encode.

This was previously a feature in 0.5, but we didn't reimplement it in the 0.6 rewrite due due to technical limitations. I have since found a path forward and intend to add this feature to 0.6.

The downsides of using serde instead of implementing these types in native bitcode are:

  1. Worse performance
  2. Requiring #[bitcode(with_serde)] annotations on every field where serde is used
  3. Doesn't work well on collection types since it forces everything inside them to use serde

1 and 2 aren't much of an issue if serde is used infrequently. 3 poses more of an issue, but so far none of the types requested are collections. We could mitigate it by implementing some of the popular collections such as IndexMap.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files, tests, or entry points. Start by comparing the current 0.6 implementation with the previous 0.5 feature, then determine how #[bitcode(with_serde)] should support serde::Serialize fields while handling the stated collection limitations. Done means the feature is reimplemented for the requested third-party types and its behavior is verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.