René's URL Explorer Experiment


Title: Use rustix/windows-sys for page size; drop maplit & page_size by joshuamegnauth54 · Pull Request #7876 · RustPython/RustPython · GitHub

Open Graph Title: Use rustix/windows-sys for page size; drop maplit & page_size by joshuamegnauth54 · Pull Request #7876 · RustPython/RustPython

X Title: Use rustix/windows-sys for page size; drop maplit & page_size by joshuamegnauth54 · Pull Request #7876 · RustPython/RustPython

Description: The page_size crate is a simple libc wrapper for Unix and uses winapi-rs for Windows. windows-sys and windows-rs are the modern alternatives for winapi-rs. Both crates are maintained by Microsoft - they're official. Getting the page size for Unix is a simple call. Rustix can do it safely for us. Windows is effectively the same. Besides Unix and Windows, I also added the page size for wasm32 which the page_size crate did not support. Rust has a built-in API for wasm32's page size, so I didn't add any new dependencies. Finally, I dropped maplit which is seven years old and only used in one place. Using collect() with a single item iterator is better in this case because Rust can optimize it. maplist called HashMap::insert which would over allocate to amortize future allocs. Summary by CodeRabbit Chores Removed unused dependencies and enabled an additional feature on a workspace dependency. Chores Added explicit, platform-specific page-size and allocation-granularity helpers and updated the memory-mapping layer so Python-visible PAGESIZE and ALLOCATIONGRANULARITY use those helpers (PAGESIZE behavior changed for wasm32).

Open Graph Description: The page_size crate is a simple libc wrapper for Unix and uses winapi-rs for Windows. windows-sys and windows-rs are the modern alternatives for winapi-rs. Both crates are maintained by Microsoft -...

X Description: The page_size crate is a simple libc wrapper for Unix and uses winapi-rs for Windows. windows-sys and windows-rs are the modern alternatives for winapi-rs. Both crates are maintained by Microsoft -...

Opengraph URL: https://github.com/RustPython/RustPython/pull/7876

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:0e5ffeba-e59f-9827-884b-579b87d3b35e
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id87BA:11110:3BFF5B:524645:6A61060C
html-safe-noncef376a647635c1a71a3a4b2999e7fc3b98d214fa1a9892c176eaa6f471e155828
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4N0JBOjExMTEwOjNCRkY1Qjo1MjQ2NDU6NkE2MTA2MEMiLCJ2aXNpdG9yX2lkIjoiMTE4MzQ3Njc3MTMxODcyODIwNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac599ce7bdc0d968e4242c9342bd525262f53dd3186795476d7eab9f9b4e13c2f0
hovercard-subject-tagpull_request:3693024629
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/RustPython/RustPython/pull/7876/files
twitter:imagehttps://avatars.githubusercontent.com/u/48846352?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/48846352?s=400&v=4
og:image:altThe page_size crate is a simple libc wrapper for Unix and uses winapi-rs for Windows. windows-sys and windows-rs are the modern alternatives for winapi-rs. Both crates are maintained by Microsoft -...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None9029e642b81338577ec563d0cede79b18d6f1471b9ecdd8e364313b9cc67dd06
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/RustPython/RustPython git https://github.com/RustPython/RustPython.git
octolytics-dimension-user_id39710557
octolytics-dimension-user_loginRustPython
octolytics-dimension-repository_id135201145
octolytics-dimension-repository_nwoRustPython/RustPython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id135201145
octolytics-dimension-repository_network_root_nwoRustPython/RustPython
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release0af5dc40dcb0f82accd92a80d9517702c13746f0
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/RustPython/RustPython/pull/7876/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FRustPython%2FRustPython%2Fpull%2F7876%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
Code QualityEnforce quality at mergehttps://github.com/features/code-quality
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FRustPython%2FRustPython%2Fpull%2F7876%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=RustPython%2FRustPython
Reloadhttps://github.com/RustPython/RustPython/pull/7876/files
Reloadhttps://github.com/RustPython/RustPython/pull/7876/files
Reloadhttps://github.com/RustPython/RustPython/pull/7876/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/7876/files
RustPython https://github.com/RustPython
RustPythonhttps://github.com/RustPython/RustPython
Notifications https://github.com/login?return_to=%2FRustPython%2FRustPython
Fork 1.5k https://github.com/login?return_to=%2FRustPython%2FRustPython
Star 22.2k https://github.com/login?return_to=%2FRustPython%2FRustPython
Code https://github.com/RustPython/RustPython
Issues 293 https://github.com/RustPython/RustPython/issues
Pull requests 103 https://github.com/RustPython/RustPython/pulls
Discussions https://github.com/RustPython/RustPython/discussions
Actions https://github.com/RustPython/RustPython/actions
Projects https://github.com/RustPython/RustPython/projects
Models https://github.com/RustPython/RustPython/models
Wiki https://github.com/RustPython/RustPython/wiki
Security and quality 0 https://github.com/RustPython/RustPython/security
Insights https://github.com/RustPython/RustPython/pulse
Code https://github.com/RustPython/RustPython
Issues https://github.com/RustPython/RustPython/issues
Pull requests https://github.com/RustPython/RustPython/pulls
Discussions https://github.com/RustPython/RustPython/discussions
Actions https://github.com/RustPython/RustPython/actions
Projects https://github.com/RustPython/RustPython/projects
Models https://github.com/RustPython/RustPython/models
Wiki https://github.com/RustPython/RustPython/wiki
Security and quality https://github.com/RustPython/RustPython/security
Insights https://github.com/RustPython/RustPython/pulse
Sign up for GitHub https://github.com/signup?return_to=%2FRustPython%2FRustPython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2FRustPython%2FRustPython%2Fissues%2Fnew%2Fchoose
youknowonehttps://github.com/youknowone
RustPython:mainhttps://github.com/RustPython/RustPython/tree/main
joshuamegnauth54:drop-some-unused-depshttps://github.com/joshuamegnauth54/RustPython/tree/drop-some-unused-deps
Conversation 9 https://github.com/RustPython/RustPython/pull/7876
Commits 1 https://github.com/RustPython/RustPython/pull/7876/commits
Checks 25 https://github.com/RustPython/RustPython/pull/7876/checks
Files changed https://github.com/RustPython/RustPython/pull/7876/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/7876/files
Use rustix/windows-sys for page size; drop maplit & page_size https://github.com/RustPython/RustPython/pull/7876/files#top
Show all changes 1 commit https://github.com/RustPython/RustPython/pull/7876/files
482bcf3 rustix/windows-sys for page size; drop maplit joshuamegnauth54 May 16, 2026 https://github.com/RustPython/RustPython/pull/7876/commits/482bcf36fdb5ff56462067f4cc67a74d05c0de18
Clear filters https://github.com/RustPython/RustPython/pull/7876/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/7876/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/7876/files
Cargo.lock https://github.com/RustPython/RustPython/pull/7876/files#diff-13ee4b2252c9e516a0547f2891aa2105c3ca71c6d7a1e682c69be97998dfc87e
Cargo.toml https://github.com/RustPython/RustPython/pull/7876/files#diff-2e9d962a08321605940b5a657135052fbcef87b5e360662bb527c96d9a615542
Cargo.toml https://github.com/RustPython/RustPython/pull/7876/files#diff-3637d4a0c235a05cc50beda95da2ea516b37e3d19b47b269a48b9621f1159c04
compile_bytecode.rs https://github.com/RustPython/RustPython/pull/7876/files#diff-2b4f511433775d3869738466b5bd300d17fd283ca524e3b33ca95bb4df5f726f
lib.rs https://github.com/RustPython/RustPython/pull/7876/files#diff-1b272457e12e3b4142bf16f49a3fdc9bae11316a2ca8e676d3b7ba452aebce20
Cargo.toml https://github.com/RustPython/RustPython/pull/7876/files#diff-e4412732c72406dfd2c3158e46bd5886285711715534b15ae910e1aec622ae4f
os.rs https://github.com/RustPython/RustPython/pull/7876/files#diff-8386eeda7531a21596cda0264432ca6be99373cd18eefa363578485488b1bcf9
Cargo.toml https://github.com/RustPython/RustPython/pull/7876/files#diff-206ca536c8a0e972ae8dd6a3c7f1b87f2cf39bc248bc1ea0735ef140ab4b290c
mmap.rs https://github.com/RustPython/RustPython/pull/7876/files#diff-f019287585dfa476feb78beedd3e67b25292c5da5514fccbff2981bd8e0dc0df
Cargo.lockhttps://github.com/RustPython/RustPython/pull/7876/files#diff-13ee4b2252c9e516a0547f2891aa2105c3ca71c6d7a1e682c69be97998dfc87e
View file https://github.com/joshuamegnauth54/RustPython/blob/482bcf36fdb5ff56462067f4cc67a74d05c0de18/Cargo.lock
Open in desktop https://desktop.github.com
how customized files appear on GitHubhttps://docs.github.com/github/administering-a-repository/customizing-how-changed-files-appear-on-github
Please reload this pagehttps://github.com/RustPython/RustPython/pull/7876/files
Cargo.tomlhttps://github.com/RustPython/RustPython/pull/7876/files#diff-2e9d962a08321605940b5a657135052fbcef87b5e360662bb527c96d9a615542
View file https://github.com/joshuamegnauth54/RustPython/blob/482bcf36fdb5ff56462067f4cc67a74d05c0de18/Cargo.toml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/7876/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/7876/files#diff-2e9d962a08321605940b5a657135052fbcef87b5e360662bb527c96d9a615542
https://github.com/RustPython/RustPython/pull/7876/files#diff-2e9d962a08321605940b5a657135052fbcef87b5e360662bb527c96d9a615542
https://github.com/RustPython/RustPython/pull/7876/files#diff-2e9d962a08321605940b5a657135052fbcef87b5e360662bb527c96d9a615542
https://github.com/RustPython/RustPython/pull/7876/files#diff-2e9d962a08321605940b5a657135052fbcef87b5e360662bb527c96d9a615542
crates/derive-impl/Cargo.tomlhttps://github.com/RustPython/RustPython/pull/7876/files#diff-3637d4a0c235a05cc50beda95da2ea516b37e3d19b47b269a48b9621f1159c04
View file https://github.com/joshuamegnauth54/RustPython/blob/482bcf36fdb5ff56462067f4cc67a74d05c0de18/crates/derive-impl/Cargo.toml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/7876/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/7876/files#diff-3637d4a0c235a05cc50beda95da2ea516b37e3d19b47b269a48b9621f1159c04
https://github.com/RustPython/RustPython/pull/7876/files#diff-3637d4a0c235a05cc50beda95da2ea516b37e3d19b47b269a48b9621f1159c04
crates/derive-impl/src/compile_bytecode.rshttps://github.com/RustPython/RustPython/pull/7876/files#diff-2b4f511433775d3869738466b5bd300d17fd283ca524e3b33ca95bb4df5f726f
View file https://github.com/joshuamegnauth54/RustPython/blob/482bcf36fdb5ff56462067f4cc67a74d05c0de18/crates/derive-impl/src/compile_bytecode.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/7876/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/7876/files#diff-2b4f511433775d3869738466b5bd300d17fd283ca524e3b33ca95bb4df5f726f
https://github.com/RustPython/RustPython/pull/7876/files#diff-2b4f511433775d3869738466b5bd300d17fd283ca524e3b33ca95bb4df5f726f
crates/derive-impl/src/lib.rshttps://github.com/RustPython/RustPython/pull/7876/files#diff-1b272457e12e3b4142bf16f49a3fdc9bae11316a2ca8e676d3b7ba452aebce20
View file https://github.com/joshuamegnauth54/RustPython/blob/482bcf36fdb5ff56462067f4cc67a74d05c0de18/crates/derive-impl/src/lib.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/7876/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/7876/files#diff-1b272457e12e3b4142bf16f49a3fdc9bae11316a2ca8e676d3b7ba452aebce20
https://github.com/RustPython/RustPython/pull/7876/files#diff-1b272457e12e3b4142bf16f49a3fdc9bae11316a2ca8e676d3b7ba452aebce20
crates/host_env/Cargo.tomlhttps://github.com/RustPython/RustPython/pull/7876/files#diff-e4412732c72406dfd2c3158e46bd5886285711715534b15ae910e1aec622ae4f
View file https://github.com/joshuamegnauth54/RustPython/blob/482bcf36fdb5ff56462067f4cc67a74d05c0de18/crates/host_env/Cargo.toml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/7876/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/7876/files#diff-e4412732c72406dfd2c3158e46bd5886285711715534b15ae910e1aec622ae4f
https://github.com/RustPython/RustPython/pull/7876/files#diff-e4412732c72406dfd2c3158e46bd5886285711715534b15ae910e1aec622ae4f
crates/host_env/src/os.rshttps://github.com/RustPython/RustPython/pull/7876/files#diff-8386eeda7531a21596cda0264432ca6be99373cd18eefa363578485488b1bcf9
View file https://github.com/joshuamegnauth54/RustPython/blob/482bcf36fdb5ff56462067f4cc67a74d05c0de18/crates/host_env/src/os.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/7876/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/7876/files#diff-8386eeda7531a21596cda0264432ca6be99373cd18eefa363578485488b1bcf9
https://github.com/RustPython/RustPython/pull/7876/files#diff-8386eeda7531a21596cda0264432ca6be99373cd18eefa363578485488b1bcf9
https://github.com/RustPython/RustPython/pull/7876/files#diff-8386eeda7531a21596cda0264432ca6be99373cd18eefa363578485488b1bcf9
Please reload this pagehttps://github.com/RustPython/RustPython/pull/7876/files
https://github.com/RustPython/RustPython/pull/7876/files#diff-8386eeda7531a21596cda0264432ca6be99373cd18eefa363578485488b1bcf9
crates/stdlib/Cargo.tomlhttps://github.com/RustPython/RustPython/pull/7876/files#diff-206ca536c8a0e972ae8dd6a3c7f1b87f2cf39bc248bc1ea0735ef140ab4b290c
View file https://github.com/joshuamegnauth54/RustPython/blob/482bcf36fdb5ff56462067f4cc67a74d05c0de18/crates/stdlib/Cargo.toml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/7876/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/7876/files#diff-206ca536c8a0e972ae8dd6a3c7f1b87f2cf39bc248bc1ea0735ef140ab4b290c
https://github.com/RustPython/RustPython/actions/runs/25971896841/job/76345313773?pr=7876
https://github.com/RustPython/RustPython/pull/7876/files#diff-206ca536c8a0e972ae8dd6a3c7f1b87f2cf39bc248bc1ea0735ef140ab4b290c
https://github.com/RustPython/RustPython/pull/7876/files#diff-206ca536c8a0e972ae8dd6a3c7f1b87f2cf39bc248bc1ea0735ef140ab4b290c
https://github.com/RustPython/RustPython/actions/runs/25971896841/job/76345313773?pr=7876
https://github.com/RustPython/RustPython/actions/runs/25971896841/job/76345313773?pr=7876
https://github.com/RustPython/RustPython/pull/7876/files#diff-206ca536c8a0e972ae8dd6a3c7f1b87f2cf39bc248bc1ea0735ef140ab4b290c
crates/stdlib/src/mmap.rshttps://github.com/RustPython/RustPython/pull/7876/files#diff-f019287585dfa476feb78beedd3e67b25292c5da5514fccbff2981bd8e0dc0df
View file https://github.com/joshuamegnauth54/RustPython/blob/482bcf36fdb5ff56462067f4cc67a74d05c0de18/crates/stdlib/src/mmap.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/7876/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/7876/files#diff-f019287585dfa476feb78beedd3e67b25292c5da5514fccbff2981bd8e0dc0df
https://github.com/RustPython/RustPython/pull/7876/files#diff-f019287585dfa476feb78beedd3e67b25292c5da5514fccbff2981bd8e0dc0df
Please reload this pagehttps://github.com/RustPython/RustPython/pull/7876/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.