Skip to content

Custom impl of std::random_device? #10068

Closed
@kripken

Description

@kripken

Right now we use libc++'s impl, which accesses /dev/random as a file. That brings in the filesystem support code which is bad for code size, and also as filesystem code it currently gets proxied to the main thread.

Instead, a simple C++ impl could just call emscripten_random which calls into JS.

This might be upstreamable into libc++. If not, maybe we can have a directory of things that override the default files in libc++?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions