pub struct NativeBuildConfig {Show 22 fields
pub entrypoints: Vec<String>,
pub outdir: Option<String>,
pub root: Option<String>,
pub target: String,
pub format: String,
pub naming: Option<String>,
pub naming_entry: Option<String>,
pub naming_chunk: Option<String>,
pub naming_asset: Option<String>,
pub minify: NativeMinify,
pub sourcemap: String,
pub external: Vec<String>,
pub define: Vec<(String, String)>,
pub splitting: bool,
pub banner: Option<String>,
pub footer: Option<String>,
pub public_path: Option<String>,
pub jsx_runtime: Option<String>,
pub jsx_factory: Option<String>,
pub jsx_fragment: Option<String>,
pub jsx_import_source: Option<String>,
pub jsx_development: Option<bool>,
}Expand description
Bun.build(config) — parsed JS config (pure Rust, Send).
Fields§
§entrypoints: Vec<String>entrypoints: string[] (required, non-empty upstream).
outdir: Option<String>outdir: string | undefined — when set, outputs are written to disk.
root: Option<String>root: string | undefined — the root dir for output path computation.
target: Stringtarget: "browser" | "bun" | "node" (upstream default “browser”).
format: Stringformat: "esm" | "cjs" | "iife" (upstream default “esm”).
naming: Option<String>naming: string — entry template when a plain string
(“[dir]/[name].[ext]” placeholders).
naming_entry: Option<String>§naming_chunk: Option<String>§naming_asset: Option<String>§minify: NativeMinify§sourcemap: Stringsourcemap: "none" | "linked" | "inline" | "external" (default “none”).
external: Vec<String>external: string[] — passthrough module specifiers.
define: Vec<(String, String)>define: Record<string, string>.
splitting: boolsplitting: boolean (code splitting; default false).
banner: string prepended to each output.
footer: string appended to each output.
public_path: Option<String>publicPath: string.
jsx_runtime: Option<String>jsx.runtime: “classic” | “automatic” (upstream default automatic).
jsx_factory: Option<String>jsx.factory (dotted member list, e.g. “React.createElement”).
jsx_fragment: Option<String>jsx.fragment (dotted member list, e.g. “React.Fragment”).
jsx_import_source: Option<String>jsx.importSource (e.g. “react” → react/jsx-runtime).
jsx_development: Option<bool>jsx.development: development vs production automatic runtime.
Trait Implementations§
Source§impl Clone for NativeBuildConfig
impl Clone for NativeBuildConfig
Source§fn clone(&self) -> NativeBuildConfig
fn clone(&self) -> NativeBuildConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NativeBuildConfig
impl Debug for NativeBuildConfig
Source§impl Default for NativeBuildConfig
impl Default for NativeBuildConfig
Source§fn default() -> NativeBuildConfig
fn default() -> NativeBuildConfig
Auto Trait Implementations§
impl Freeze for NativeBuildConfig
impl RefUnwindSafe for NativeBuildConfig
impl Send for NativeBuildConfig
impl Sync for NativeBuildConfig
impl Unpin for NativeBuildConfig
impl UnsafeUnpin for NativeBuildConfig
impl UnwindSafe for NativeBuildConfig
Blanket Implementations§
Source§impl<T> AsCtxPtr for Twhere
T: ?Sized,
impl<T> AsCtxPtr for Twhere
T: ?Sized,
Source§fn as_ctx_ptr(&self) -> *mut Selfwhere
Self: Sized,
fn as_ctx_ptr(&self) -> *mut Selfwhere
Self: Sized,
self’s address as *mut Self for deferred-task / scopeguard /
ref_guard ctx slots. The closures/trampolines deref it as shared
(&*p) — every method they reach is &self post-R-2, so no write
provenance is required; the *mut spelling is purely to match the
existing DerefOnDrop / HasAutoFlush / RefCount ABI.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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Filterable for T
impl<T> Filterable for T
Source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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