Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port to CloudABI. #20

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

Port to CloudABI. #20

wants to merge 1 commit into from

Conversation

EdSchouten
Copy link

CloudABI does not provide access to the global filesystem namespace. We
can simply call into arc4random_buf() to get high-quality random data.

CloudABI does not provide access to the global filesystem namespace. We
can simply call into arc4random_buf() to get high-quality random data.
}

// CloudABI does not provide access to the global filesystem namespace.
// The only way to obtain random data is by calling arcrandom_buf().

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you meant "arc4random_buf" instead. I.e. with the 4 included.

@jeking3
Copy link
Contributor

jeking3 commented Oct 8, 2017

Once #29 is merged, this could be added as a entropy provider concept to random device if we create a new file similar to https://github.com/boostorg/random/pull/29/files#diff-f2cd05667b88b5aa79ee2ec8de16f63f and then hook it into the automatic selection logic in random_device (include/boost/random/random_device.hpp, line 155).

Would probably recommend we add CloudABI to the Boost.Predef library first as BOOST_PLAT_CLOUDABI for detection.

@jeking3
Copy link
Contributor

jeking3 commented Oct 19, 2017

I submitted a pull request into Boost.Predef for CloudABI platform detection: boostorg/predef#65

I can use that to make a very simple random device entropy provider that will work with #29.

@EdSchouten can I assume the correct call these days is documented at https://github.com/NuxiNL/cloudabi#random_get ?

jeking3 added a commit to jeking3/random that referenced this pull request Dec 7, 2017
* Supports more platforms optimally, for example CloudABI, OpenBSD, and Windows UWP
* Is easier to maintain as each platform's implementation is in a separate file
* Removes the library dependency on Boost.System
* Is header-only, and thus makes Boost.Random header-only
* Is well-tested for happy and sad paths

Adds a new exception "entropy_error" to handle errors getting entropy.

Removed the detail auto_link implementation inside Boost.Random as it is no longer
necessary - the one in Boost.Config is sufficient.

Also added a top-level Jamfile that builds the example subdirectory with each
build, as one of the examples needed to be updated in order to build.  This will
prevent rot in the example directory.

Note: Other libraries that link against Boost.Random (like Boost.Uuid) will fail
to build until they stop trying to link against Boost.Random.

This fixes boostorg#20
This fixes boostorg#22
jeking3 added a commit to jeking3/random that referenced this pull request Dec 7, 2017
* Supports more platforms optimally, for example CloudABI, OpenBSD, and Windows UWP
* Is easier to maintain as each platform's implementation is in a separate file
* Removes the library dependency on Boost.System
* Is header-only, and thus makes Boost.Random header-only
* Is well-tested for happy and sad paths

Removes the token-based random_device explicit constructor.

Adds a new exception "entropy_error" to handle errors getting entropy.

Removed the detail auto_link implementation inside Boost.Random as it is no longer
necessary - the one in Boost.Config is sufficient.

Also added a top-level Jamfile that builds the example subdirectory with each
build, as one of the examples needed to be updated in order to build.  This will
prevent rot in the example directory.

Note: Other libraries that link against Boost.Random (like Boost.Uuid) will fail
to build until they stop trying to link against Boost.Random.

This fixes boostorg#20
This fixes boostorg#22
jeking3 added a commit to jeking3/random that referenced this pull request Dec 7, 2017
* Supports more platforms optimally, for example CloudABI, OpenBSD, and Windows UWP
* Is easier to maintain as each platform's implementation is in a separate file
* Removes the library dependency on Boost.System
* Is header-only, and thus makes Boost.Random header-only
* Is well-tested for happy and sad paths

Removes the token-based random_device explicit constructor.

Adds a new exception "entropy_error" to handle errors getting entropy.

Removed the detail auto_link implementation inside Boost.Random as it is no longer
necessary - the one in Boost.Config is sufficient.

Also added a top-level Jamfile that builds the example subdirectory with each
build, as one of the examples needed to be updated in order to build.  This will
prevent rot in the example directory.

Note: Other libraries that link against Boost.Random (like Boost.Uuid) will fail
to build until they stop trying to link against Boost.Random.

This fixes boostorg#20
This fixes boostorg#22
jeking3 added a commit to jeking3/random that referenced this pull request Dec 7, 2017
* Supports more platforms optimally, for example CloudABI, OpenBSD, and Windows UWP
* Is easier to maintain as each platform's implementation is in a separate file
* Removes the library dependency on Boost.System
* Is header-only, and thus makes Boost.Random header-only
* Is well-tested for happy and sad paths

Removes the token-based random_device explicit constructor.

Adds a new exception "entropy_error" to handle errors getting entropy.

Removed the detail auto_link implementation inside Boost.Random as it is no longer
necessary - the one in Boost.Config is sufficient.

Also added a top-level Jamfile that builds the example subdirectory with each
build, as one of the examples needed to be updated in order to build.  This will
prevent rot in the example directory.

Note: Other libraries that link against Boost.Random (like Boost.Uuid) will fail
to build until they stop trying to link against Boost.Random.

This fixes boostorg#20
This fixes boostorg#22
jeking3 added a commit to jeking3/random that referenced this pull request Dec 7, 2017
* Supports more platforms optimally, for example CloudABI, OpenBSD, and Windows UWP
* Is easier to maintain as each platform's implementation is in a separate file
* Removes the library dependency on Boost.System
* Is header-only, and thus makes Boost.Random header-only
* Is well-tested for happy and sad paths

Removes the token-based random_device explicit constructor.

Adds a new exception "entropy_error" to handle errors getting entropy.

Removed the detail auto_link implementation inside Boost.Random as it is no longer
necessary - the one in Boost.Config is sufficient.

Also added a top-level Jamfile that builds the example subdirectory with each
build, as one of the examples needed to be updated in order to build.  This will
prevent rot in the example directory.

Note: Other libraries that link against Boost.Random (like Boost.Uuid) will fail
to build until they stop trying to link against Boost.Random.

This fixes boostorg#20
This fixes boostorg#22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants