neon-cli
Version:
Build and load native Rust/Neon modules.
30 lines (29 loc) • 1.09 kB
TypeScript
import Artifacts from "./artifacts";
import Project from "./project";
export declare type CrateOptions = {
subdirectory?: string;
nodefile?: string;
};
export default class Crate {
/** The Neon project containing this crate. */
readonly project: Project;
/** The subpath of this crate relative to the Neon project root. */
readonly subdirectory: string;
/** The subpath of the `.node` addon relative to this crate root. */
readonly nodefile: string;
/** The absolute path of this crate. */
readonly root: string;
/** The absolute path of the `.node` addon. */
readonly addon: string;
/** The crate name extracted from the manifest. */
readonly name: string;
/** The absolute path of the artifacts file. */
readonly artifactsfile: string;
/** The state of current build artifacts for each target. */
readonly artifacts: Artifacts;
constructor(project: Project, options?: CrateOptions);
finish(dylib: string): Promise<void>;
removeAddon(): Promise<void>;
resetArtifacts(): void;
saveArtifacts(): void;
}