{"id":13437925,"url":"https://github.com/vickenty/perl-xs","last_synced_at":"2025-03-19T18:31:08.392Z","repository":{"id":56637882,"uuid":"49171188","full_name":"vickenty/perl-xs","owner":"vickenty","description":"High-level Rust bindings to Perl XS API","archived":true,"fork":false,"pushed_at":"2020-10-27T18:26:48.000Z","size":158,"stargazers_count":59,"open_issues_count":13,"forks_count":14,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-10-27T23:23:45.039Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vickenty.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-07T00:50:42.000Z","updated_at":"2023-01-28T12:09:13.000Z","dependencies_parsed_at":"2022-08-15T22:20:45.853Z","dependency_job_id":null,"html_url":"https://github.com/vickenty/perl-xs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vickenty%2Fperl-xs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vickenty%2Fperl-xs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vickenty%2Fperl-xs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vickenty%2Fperl-xs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vickenty","download_url":"https://codeload.github.com/vickenty/perl-xs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244483202,"owners_count":20460074,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T03:01:01.255Z","updated_at":"2025-03-19T18:31:08.081Z","avatar_url":"https://github.com/vickenty.png","language":"Rust","funding_links":[],"categories":["Development tools","Rust","开发工具","开发工具 Development tools"],"sub_categories":["FFI","示例 FFI"],"readme":"[![Build Status](https://travis-ci.org/vickenty/perl-xs.svg?branch=master)](https://travis-ci.org/vickenty/perl-xs)\n\n# Perl XS for Rust\n\nHigh-level Rust bindings to Perl XS API.\n\n## Example\n\n```rust\nxs! {\n  package Array::Sum;\n  sub sum_array(ctx, array: AV) {\n    array.iter().map(|it| it.unwrap_or(0.0)).sum::\u003cNV\u003e()\n  }\n}\n```\n\nFor a more complete example see the XSTest package in the `t/` directory.\n\n## Goals\n\n- safety\n- correctness\n- speed\n\nPerl XS API is deliberately low-level and requires user to maintain a\ngood deal of internal invariants, thus allowing for very fast\ncode. This package takes a different approach of encapsulating\nimplementation details to provide a simpler and safer API at the cost\nof speed.\n\nFor now, this library focuses on Perl's public documented API, which\nis a small subset of what is available to authors of modules written\nin C.\n\n## Work in progress\n\nThis project is very much in progress. It is not yet clear if project\ngoals are attainable at all or if the API will make any sense in\npractice.\n\n## How to use\n\n`Module::Install::Rust` integrates traditional Perl build system with\nCargo, allowing Rust code to be compiled and installed using familiar\n`perl Makefile.PL \u0026\u0026 make` process. For example, see test package\nunder `t` directory.\n\n## Prerequisites\n\n- Perl 5.20+ (for 64-bit array methods)\n- Rust 1.31+\n\n## Testing\n\nTo install packages required for testing and benchmarking:\n\n```shell\ncpanm --installdeps .\n```\n\nTo run tests:\n\n```shell\n(cd t \u0026\u0026 perl Makefile.PL \u0026\u0026 make test)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvickenty%2Fperl-xs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvickenty%2Fperl-xs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvickenty%2Fperl-xs/lists"}