document recommendations for multicodec implementations
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- Half a day
- Newbie friendliness
- 45/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- go
- Domain
- documentation
Research direction
Start by locating the documentation's "Implementations" section, which the issue identifies as the destination. Add a brief, language-agnostic recommendation covering named constants, avoiding full table exposure, unstable categorization, and broad external dependencies; done means the guidance reflects these points clearly.
Written by the indexing model from the issue text.
Description
While trying to resurrect a Go implementation (since go-multicodec is deprecated and archived), I went through multiple phases of what a multicodec library should look like. Only after talking to other members of the IPLD team I came to the conclusion that many of my initial ideas weren't great.
For example, exposing the entire table in an implementation is a bad idea. The table will grow over time, so it will mean higher costs such as memory usage, binary size, and compile time.
Similarly, categorizing the names or codes is not a good idea. The table has a tag field, but it doesn't mean that each of the codes fits neatly into a single category which will remain stable over time. I initially had the idea to give named constants different types in Go to separate the categories and avoid using the wrong type of code, but that turns out to be a bad idea.
Another pitfall would be to implement all of the multicodecs as part of the library, such as via external dependencies. This would mean that importing the multicodec library would suddenly pull hundreds of indirect dependencies, whereas the user likely only needs a tiny minority.
So it seems like the general recommendation should be to just expose a series of named constants for each of the codes. For example, in Go, we could simply code generate:
package multicodec
const (
Identity = 0x00 // raw binary
CIDv1 = 0x01 // CIDv1
[...]
The main advantage here would be that code would be self-explanatory; instead of having:
Codec: 0x71, // dag-cbor
we'd have just:
Codec: multicodec.DagCBOR,
I think this could be a brief section under "Implementations". I imagine that the general recommendations would apply to most languages.
- Dominant language
- Python
- Stars
- 383
- Forks
- 222
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from multiformats/multicodec
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
multiformats/multicodec#410 · 5 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 42/100
multiformats/multicodec#408 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
multiformats/multicodec#389 ·
-
PGP public keysOpen
Difficulty 5/5 Over a week Newbie friendliness 25/100
multiformats/multicodec#381 · 4 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
multiformats/multicodec#368 · 1 comment ·
All issues in multiformats/multicodec
Similar issues
-
`burr` fails to start when the Python path has a space in itPossibly taken @enekoreto claimed this today. Openstatus/needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 5 days
-
gemini 出现了新的域名需要加入Open
Difficulty 1/5 Under an hour Newbie friendliness 72/100
-
Difficulty 2/5 Half a day Newbie friendliness 72/100
debpalash/VoiceStudio#2903 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
dagster-io/community-integrations#367 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
aws-samples/sample-per-model-bedrock#243 ·
Maintainers usually reply within 1 day