pub struct GoConfig {Show 13 fields
pub module: Option<String>,
pub package_name: Option<String>,
pub capsule_types: HashMap<String, HostCapsuleTypeConfig>,
pub shares_native_runtime: bool,
pub module_major: Option<u32>,
pub features: Option<Vec<String>>,
pub exclude_types: Vec<String>,
pub exclude_functions: Vec<String>,
pub serde_rename_all: Option<String>,
pub rename_fields: HashMap<String, String>,
pub run_wrapper: Option<String>,
pub extra_lint_paths: Vec<String>,
pub functional_options: Vec<String>,
}Fields§
§module: Option<String>§package_name: Option<String>Override the Go package name (default: derived from module path)
capsule_types: HashMap<String, HostCapsuleTypeConfig>Map of Rust type name -> host-native capsule (Language-passthrough) config.
When set, functions returning the type construct the host runtime’s native
Language (e.g. *tree_sitter.Language) from the raw C grammar pointer instead
of an opaque handle. See crate::core::config::HostCapsuleTypeConfig.
Affirms every configured capsule wrapper uses the exact native runtime instance ~keep and ownership contract that produced its pointer. ~keep
module_major: Option<u32>Go module major version segment (/vN). Required for any v2+ Go module.
Defaults to no segment when None and the Go module path has no version suffix;
when set, emits packages/go/v<N>/.
features: Option<Vec<String>>§exclude_types: Vec<String>Types to exclude from Go binding generation.
Go bindings call the generated C FFI directly through cgo, so types excluded from
[crates.ffi].exclude_types are also excluded automatically by the Go backend.
exclude_functions: Vec<String>Functions to exclude from Go binding generation, unioned with
[crates.ffi].exclude_functions.
Use this for functions that must stay in the C ABI (and therefore in
[crates.ffi].exclude_functions) for other bindings but that this Go binding
wants to hide from its own public surface — e.g. an async variant with no
synchronous counterpart worth exposing in Go’s idiom. Mirrors
CSharpConfig::exclude_functions / KotlinAndroidConfig::exclude_functions.
serde_rename_all: Option<String>Override the serde rename_all strategy for JSON field names (e.g. “camelCase”, “snake_case”). When set, this takes priority over the IR type-level serde_rename_all.
rename_fields: HashMap<String, String>Per-field name remapping for this language. Key is TypeName.field_name, value is the
desired binding field name. Applied after automatic keyword escaping.
run_wrapper: Option<String>Prefix wrapper for default tool invocations. When set, prepends this string to default commands across all pipelines (lint, test, build, etc.).
extra_lint_paths: Vec<String>Extra paths to append to default lint commands (format, check, typecheck).
functional_options: Vec<String>Struct types that should emit the functional-options pattern (With<Field> helpers
plus New<Struct>(opts ...<Struct>Option) constructor).
By default, pure data DTOs emit plain struct literals; this allowlist enables the
functional-options pattern only for behaviour-knob types (e.g., DialOptions).
Defaults to empty (no functional-options emitted).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for GoConfig
impl<'de> Deserialize<'de> for GoConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for GoConfig
impl JsonSchema for GoConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for GoConfig
impl RefUnwindSafe for GoConfig
impl Send for GoConfig
impl Sync for GoConfig
impl Unpin for GoConfig
impl UnsafeUnpin for GoConfig
impl UnwindSafe for GoConfig
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
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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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