pub struct ZigCompiler { /* private fields */ }Expand description
Wrapper for invoking the Zig compiler
Implementations§
Source§impl ZigCompiler
impl ZigCompiler
Sourcepub fn check_version(&self) -> Result<String>
pub fn check_version(&self) -> Result<String>
Check Zig compiler version
Sourcepub fn compile_with_target(
&self,
source: &Path,
output_lib: &Path,
target: &str,
) -> Result<()>
pub fn compile_with_target( &self, source: &Path, output_lib: &Path, target: &str, ) -> Result<()>
Compile Zig source to static library with target support
§Arguments
source- Path to .zig source fileoutput_lib- Path for output static library (.a)target- Target triple (e.g., “x86_64-linux-gnu”, “native”)
Sourcepub fn compile(&self, source: &Path, output_lib: &Path) -> Result<()>
pub fn compile(&self, source: &Path, output_lib: &Path) -> Result<()>
Compile with native target (convenience method)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ZigCompiler
impl RefUnwindSafe for ZigCompiler
impl Send for ZigCompiler
impl Sync for ZigCompiler
impl Unpin for ZigCompiler
impl UnwindSafe for ZigCompiler
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