rust-lang / rust-lang/libc

Implement `Default`

Open
#4,975 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

E-help-wanted E-medium
Dominant language
Rust
Stars
2.6k
Forks
1.3k
Avg merge
1d 22h
Merged PRs (30d)
69

Description

Discussed at #t-libs > Questions and polls about `libc` 1.0 @ 💬, we would like to have a Default impl for pretty much everything. This should be part of s!/s_no_extra_traits! but won't work out of the box with a derive.

In particular, we need a workaround for [T; N] where N > 32, and unions somehow.

Contributor guide

Open the contributing guide

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

Start by reading the s! and s_no_extra_traits! macro definitions and the linked Zulip discussion. Investigate how Default could cover the generated bindings, especially [T; N] for N > 32 and unions. Done means the intended broad set of types has working Default implementations without relying directly on an unsuitable derive.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.