Struct neon_build::Setup [−][src]
pub struct Setup { /* fields omitted */ }
Expand description
Setup
acts as a builder for initializing a Neon build script
A default setup builder is provided as neon_build::setup()
.
Example
Output the neon module at lib/native.node
fn main() {
neon_build::Setup::options()
.output_dir("lib")
.output_dir("native.node")
.setup();
}
Implementations
Sets the output directory for the native library. Defaults to the cargo manifest directory. If not absolute, paths will be relative to the cargo manifest directory.
Sets the name of the native library. Defaults to index.node
. If not
absolute, paths will be relative to the Setup::output_dir
.
Note: Node.js requires that native libraries have the .node
extension to be loaded by require
.