NAME
Module::Install::Rust - Helpers to build Perl extensions written in Rust
VERSION
Version 0.02
SYNOPSIS
# In Makefile.PL
use inc::Module::Install;
# ...
rust_requires libc => "0.2";
rust_write;
WriteAll;
DESCRIPTION
This package allows Module::Install to build Perl extensions written in Rust.
COMMANDS
rust_requires
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
rust_feature default => [ "some_feature" ];
rust_feature some_feature => [ "some-crate/feature" ];
This command adds items to [features]
section of the generated Cargo.toml
.
rust_profile
rust_profile debug => { "opt-level" => 1 };
rust_profile release => { lto => 1 };
This command configures a [profile]
section to the generated Cargo.toml
.
rust_use_perl_xs
rust_use_perl_xs;
Configure crate to use perl-xs
bindings.
rust_clean_on_rebuild
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
).
rust_write
rust_write;
Writes Cargo.toml
and sets up Makefile options as needed.
AUTHOR
Vickenty Fesunov, <kent at setattr.net>
BUGS
Please report any bugs or feature requests to https://github.com/vickenty/mi-rust.
LICENSE AND COPYRIGHT
Copyright 2016 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.