Declaring dependencies
nuget { dependencies { } } declares which NuGet packages your Kotlin/Native module resolves. Declaring a dependency always restores it and its transitive packages through dotnet restore, the same way a plain <PackageReference> would. Add a bind { } block to also generate Kotlin stubs for it, scoped to the namespaces you name.
The bridgeable types in the MimeMapping namespace bind under the mimemapping package, so MimeUtility.GetMimeMapping(...) is callable as mimemapping.MimeUtility.getMimeMapping(...); see Static classes and methods and The bridgeable subset.
Choosing namespaces
include(), exclude(), and alias() scope and rename what a bind { } block generates:
No
include()call means every public namespace in the package is a candidate.include()narrows candidates to the named namespaces and their sub-namespaces;exclude()then removes from that set and always wins on a conflict.A namespace outside the final set gets no Kotlin at all: no stub, no import, nothing to call.
alias(csharpNamespace, kotlinPackage)overridespackageNamefor that one namespace. A namespace without a matchingalias()falls back topackageName, or, if that's unset too, to the package id lowercased with-replaced by_.
See The nuget {} DSL for every bind { } property, its default, and whether it's required.
Limitations
Only one
bind { }block perdependency()is supported: a secondbind { }call on the same dependency replaces the first rather than merging with it.A private feed is set per package with
source = "https://.../index.json"insidedependency(); there's no extension-level shared feed list yet.There's no local
.nupkgor path-based dependency source yet, only registry resolution.