Skip to content

Add package randx 1.4.2 - #10481

Merged
waruqi merged 16 commits into
xmake-io:devfrom
lidaixingchen:add-randx-1.3.1
Aug 5, 2026
Merged

Add package randx 1.4.2#10481
waruqi merged 16 commits into
xmake-io:devfrom
lidaixingchen:add-randx-1.3.1

Conversation

@lidaixingchen

Copy link
Copy Markdown
Contributor

Summary

  • Add new header-only C++ pseudo-random number generator library RandX (v1.3.1)
  • Based on xoshiro/xoroshiro algorithm family, supports C++17 and C++23
  • Cross-platform OS entropy linking (Windows bcrypt / macOS Security)

Test

  • Local install verified: xrepo install -y randx
  • on_test C++23 compilation check passed
  • SHA256 matches GitHub archive tarball for tag v1.3.1

Copilot AI review requested due to automatic review settings July 22, 2026 19:18
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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, Apple Security).
  • Adds install rules to copy the two public headers and an on_test C++ snippet compile check.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/r/randx/xmake.lua Outdated
Comment thread packages/r/randx/xmake.lua Outdated
@lidaixingchen lidaixingchen changed the title Add package randx 1.3.1 Add package randx 1.4.0 Jul 22, 2026
@waruqi

waruqi commented Jul 23, 2026

Copy link
Copy Markdown
Member

please push to dev branch instead of master. it will trigger ci tests.

@waruqi
waruqi changed the base branch from master to dev July 23, 2026 14:47
@waruqi waruqi closed this Jul 23, 2026
@waruqi waruqi reopened this Jul 23, 2026
Comment thread packages/r/randx/xmake.lua Outdated
end)

on_install(function (package)
-- 仅安装两个头文件到 include/

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

删了中文注释

Comment thread packages/r/randx/xmake.lua Outdated
-- 跨平台 OS 熵源链接(ChaCha20 CSPRNG 需要)
-- Windows: BCryptGenRandom → bcrypt
-- macOS: SecRandomCopyBytes → Security framework
-- Linux: getrandom → libc 内置,无需额外链接

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

注释删了

Comment thread packages/r/randx/xmake.lua Outdated
add_versions("1.3.1", "f271bbcb26bea7747ee292646df895c2305b696bb0d58d69b54e84fe96fab3c1")

on_load(function (package)
package:set("kind", "library", {headeronly = true})

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

就这么几行配置,没必要放 on_load ,直接描述域 直接配置

Comment thread packages/r/randx/xmake.lua
@lidaixingchen

Copy link
Copy Markdown
Contributor Author

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.

@lidaixingchen lidaixingchen changed the title Add package randx 1.4.0 Add package randx 1.4.2 Jul 25, 2026
Comment thread packages/r/randx/xmake.lua Outdated
lidaixingchen and others added 7 commits July 26, 2026 16:55
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.
@luadebug
luadebug requested a review from waruqi August 4, 2026 16:40
@waruqi
waruqi merged commit 59aa955 into xmake-io:dev Aug 5, 2026
61 checks passed
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.

4 participants