Skip to content

Provide FreeBSD amd64 system randomness for std::random #787

Closed

Description

@LunaStev

Motivation

The FreeBSD target has working provider routing, but the random provider still advertises unavailable and returns -38. #383 deferred this OS after implementing Linux/macOS. This is the focused entropy-provider follow-up to #386.

Starting points: std/sys/random.wave, std/sys/freebsd/amd64/syscall.wave, std/random/fill.wave.

Scope

Implement FreeBSD amd64 OS entropy using the existing raw syscall layer and the FreeBSD getrandom contract. Verify the syscall number and argument ABI against the supported FreeBSD headers. Keep high-level random_fill unchanged and do not add libc FFI or weak fallback entropy.

Difficulty: medium.

Completion criteria

  • The provider fills caller-owned memory and reports accurate progress/errors.
  • Interruption, partial reads, zero length and invalid arguments are covered.
  • A FreeBSD amd64 native/VM smoke checks actual OS behavior; cross-compilation alone does not complete the issue.

Activity

  1. added
    enhancement
    help wanted
    os support
    cross-platform
    on Sep 26, 2026
  2. self-assigned this
    on Sep 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

cross-platformenhancementhelp wantedos support

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions