Add package randx 1.4.2 - #10481
Conversation
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
There was a problem hiding this comment.
Pull request overview
Adds a new xmake-repo package recipe for the header-only C++ pseudo-random number generator library RandX v1.3.1, including platform-specific system link settings and a compile-time smoke test.
Changes:
- Introduces
package("randx")with homepage/description/license metadata and a pinned v1.3.1 source tarball + SHA256. - Adds platform-specific entropy-provider linking (Windows
bcrypt, AppleSecurity). - Adds install rules to copy the two public headers and an
on_testC++ snippet compile check.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
please push to dev branch instead of master. it will trigger ci tests. |
| end) | ||
|
|
||
| on_install(function (package) | ||
| -- 仅安装两个头文件到 include/ |
| -- 跨平台 OS 熵源链接(ChaCha20 CSPRNG 需要) | ||
| -- Windows: BCryptGenRandom → bcrypt | ||
| -- macOS: SecRandomCopyBytes → Security framework | ||
| -- Linux: getrandom → libc 内置,无需额外链接 |
| add_versions("1.3.1", "f271bbcb26bea7747ee292646df895c2305b696bb0d58d69b54e84fe96fab3c1") | ||
|
|
||
| on_load(function (package) | ||
| package:set("kind", "library", {headeronly = true}) |
There was a problem hiding this comment.
就这么几行配置,没必要放 on_load ,直接描述域 直接配置
|
Done. Changed base to dev, switched macOS Security to add_frameworks, and on_test now uses RandX_Cpp17.hpp with C++17. Also corrected the SHA256 hashes. |
Corrected the checksum for version 1.3.1.
Removed version 1.3.1 from the list of available versions.
Updated the C++ standard version in the test configuration and changed the included header from RandX.hpp to RandX_Cpp17.hpp.
Add Android compatibility for getrandom syscall in RandX_Cpp17.hpp
Replace include directive for Android with unistd.h and syscall.h.
Fix pragma once replacement in xmake.lua during installation.
Summary
Test
xrepo install -y randxon_testC++23 compilation check passed