Module::Install::Rust - Helpers to build Perl extensions written in Rust
Version 0.02
# In Makefile.PL use inc::Module::Install; # ... rust_requires libc => "0.2"; rust_write; WriteAll;
This package allows Module::Install to build Perl extensions written in Rust.
rust_requires libc => "0.2"; rust_requires internal_crate => { path => "../internal_crate" };
This command is used to specify Rust dependencies. First argument should be a crate name, second - either a version string, or a hashref with keys per Cargo manifest spec.
rust_feature default => [ "some_feature" ]; rust_feature some_feature => [ "some-crate/feature" ];
This command adds items to [features] section of the generated Cargo.toml.
[features]
Cargo.toml
rust_use_perl_xs;
Configure crate to use perl-xs bindings.
perl-xs
rust_clean_on_rebuild; # or rust_clean_on_rebuild qw/crate_name/;
If Makefile changed since last build, force cargo clean run. If crate names are specified, force clean only for those packages (cargo clean -p).
cargo clean
cargo clean -p
rust_write;
Writes Cargo.toml and sets up Makefile options as needed.
Vickenty Fesunov, <kent at setattr.net>
<kent at setattr.net>
Please report any bugs or feature requests to https://github.com/vickenty/mi-rust.
Copyright 2015 Vickenty Fesunov.
This module may be used, modified, and distributed under the same terms as Perl itself. Please see the license that came with your Perl distribution for details.
To install Module::Install::Rust, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Module::Install::Rust
CPAN shell
perl -MCPAN -e shell install Module::Install::Rust
For more information on module installation, please visit the detailed CPAN module installation guide.