npmgen-core 0.3.1

Library that generates the npm publish tree shipping a prebuilt Rust binary.
Documentation
1
2
3
4
5
6
7
8
9
10
use crate::project::Project;
use crate::target::Target;

use super::CompileError;

/// A backend that builds one target's binary. The default is [`CargoDriver`](super::CargoDriver);
/// implementing this trait swaps in another toolchain or a test double.
pub trait BuildDriver: std::fmt::Debug {
    fn build(&self, project: &Project, target: &Target) -> Result<(), CompileError>;
}