pub struct BuildSystem { /* private fields */ }Implementations§
Source§impl BuildSystem
impl BuildSystem
Sourcepub fn open(project_root: &Path, verbose: bool) -> Result<Self>
pub fn open(project_root: &Path, verbose: bool) -> Result<Self>
Create a BuildSystem from a project root containing pascal.toml
Sourcepub fn init(dir: &Path, name: &str) -> Result<()>
pub fn init(dir: &Path, name: &str) -> Result<()>
pascal init [name] — scaffold a new project (delegates to init_with_template)
Sourcepub fn init_with_template(dir: &Path, name: &str, template: &str) -> Result<()>
pub fn init_with_template(dir: &Path, name: &str, template: &str) -> Result<()>
pascal init [name] --template X — scaffold with template
Sourcepub fn build(&self, quiet: bool) -> Result<()>
pub fn build(&self, quiet: bool) -> Result<()>
pascal build — compile all units in dependency order, then the main program
Sourcepub fn run(&self, quiet: bool, profile_output: Option<PathBuf>) -> Result<()>
pub fn run(&self, quiet: bool, profile_output: Option<PathBuf>) -> Result<()>
pascal run (project mode) — build then run the main program
Sourcepub fn add_dependency(
&mut self,
name: &str,
version: Option<&str>,
path: Option<&str>,
git: Option<&str>,
) -> Result<()>
pub fn add_dependency( &mut self, name: &str, version: Option<&str>, path: Option<&str>, git: Option<&str>, ) -> Result<()>
pascal add <name> [--path <path>] [--git <url>]
Sourcepub fn remove_dependency(&mut self, name: &str) -> Result<()>
pub fn remove_dependency(&mut self, name: &str) -> Result<()>
pascal remove <name>
pub fn manifest(&self) -> &Manifest
pub fn manifest_mut(&mut self) -> &mut Manifest
pub fn project_root(&self) -> &Path
Auto Trait Implementations§
impl Freeze for BuildSystem
impl RefUnwindSafe for BuildSystem
impl Send for BuildSystem
impl Sync for BuildSystem
impl Unpin for BuildSystem
impl UnsafeUnpin for BuildSystem
impl UnwindSafe for BuildSystem
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more