Documentation
¶
Overview ¶
Package sdk resolves versioned Karty SDK manifests.
Package sdk resolves installed versioned Karty SDK bundles.
Index ¶
- Constants
- Variables
- func ClientFiles(manifest Manifest, compiler string) (map[string][]byte, error)
- func ClientFilesContext(ctx context.Context, manifest Manifest, compiler string) (map[string][]byte, error)
- func InstallBundle(version string, data []byte, checksum string) error
- func InstallBundleContext(ctx context.Context, version string, data []byte, checksum string) error
- func InstallPublished(ctx context.Context, version string) error
- func Resources(manifest Manifest) (fs.FS, error)
- func ResourcesContext(ctx context.Context, manifest Manifest) (fs.FS, error)
- func SyncDocs(projectDirectory string, manifest Manifest) error
- func SyncDocsContext(ctx context.Context, projectDirectory string, manifest Manifest) error
- func ValidateMaterialize(manifest Manifest) error
- type AssetProfile
- type Compatibility
- type Manifest
- type MaterialToolArtifact
- type SoundProfile
- type ToolArtifact
Constants ¶
const MinimumVersion = "0.0.5"
MinimumVersion is the oldest supported development SDK release.
const ReviewedProjectCodegen = 3
ReviewedProjectCodegen selects explicit setters and authored entity lookup.
Variables ¶
var ErrNotInstalled = errors.New("SDK is not installed")
ErrNotInstalled distinguishes an absent SDK bundle from a damaged installation.
Functions ¶
func ClientFiles ¶
ClientFiles copies pre-generated SDK bindings; no WIT generator runs in the CLI.
func ClientFilesContext ¶ added in v0.0.2
func InstallBundle ¶
InstallBundle installs a bounded, checksummed SDK atomically. This also supports candidate artifacts produced locally by engine contributors.
func InstallBundleContext ¶ added in v0.0.2
func InstallPublished ¶
InstallPublished verifies the signed release manifest before trusting its bundle URL.
func ResourcesContext ¶ added in v0.0.2
func SyncDocsContext ¶ added in v0.0.2
func ValidateMaterialize ¶ added in v0.0.2
ValidateMaterialize accepts an absent pin or a complete released tools pin. Keep this contract aligned with the engine's versioned SDK schema.
Types ¶
type AssetProfile ¶
type AssetProfile struct {
Processor assetcontract.Processor `toml:"processor"`
Transform assetcontract.ImageRecipe `toml:"transform"`
}
AssetProfile pins the processor selected for an SDK asset profile.
type Compatibility ¶ added in v0.0.2
type Compatibility struct {
Format int `json:"format" toml:"format"`
UISchema uint32 `json:"ui_schema" toml:"ui_schema"`
ProjectCodegen int `json:"project_codegen" toml:"project_codegen"`
}
Compatibility describes supported formats declared by the SDK's bundle.toml (or immutable released format1 metadata). These are format revisions, independent of SDK and API release numbers.
type Manifest ¶
type Manifest struct {
Compatibility Compatibility `toml:"-"`
Bundle ToolArtifact `toml:"bundle"`
Version string `toml:"version"`
API struct {
Version string `toml:"version"`
} `toml:"api"`
Host struct {
Version string `toml:"version"`
} `toml:"host"`
Docs struct {
Version string `toml:"version"`
} `toml:"docs"`
Templates struct {
Game string `toml:"game"`
} `toml:"templates"`
Assets struct {
Capabilities assetcontract.Capabilities `toml:"capabilities"`
TextureProfiles map[string]AssetProfile `toml:"texture-profiles"`
SoundProfiles map[string]SoundProfile `toml:"sound-profiles"`
} `toml:"assets"`
Tools struct {
// Air preserves historical signed SDK metadata; it is never installed or required.
Air string `toml:"air,omitempty"`
Go string `toml:"go"`
Materialize string `toml:"materialize"`
MaterializeRevision string `toml:"materialize-revision"`
TinyGo string `toml:"tinygo"`
WasmTools string `toml:"wasm-tools"`
} `toml:"tools"`
Artifacts struct {
// Air preserves historical signed SDK metadata; it is never installed or required.
Air map[string]ToolArtifact `toml:"air,omitempty"`
Materialize map[string]MaterialToolArtifact `toml:"materialize"`
TinyGo map[string]ToolArtifact `toml:"tinygo"`
WasmTools map[string]ToolArtifact `toml:"wasm-tools"`
Host struct {
Native map[string]ToolArtifact `toml:"native"`
Web ToolArtifact `toml:"web"`
WebRuntime ToolArtifact `toml:"web-runtime"`
WebOptimized ToolArtifact `toml:"web-optimized"`
WebBrotli ToolArtifact `toml:"web-brotli"`
} `toml:"host"`
} `toml:"artifacts"`
// contains filtered or unexported fields
}
Manifest is the subset of an SDK manifest required by the initial CLI.
func ResolveContext ¶ added in v0.0.2
func ResolvePublished ¶
ResolvePublished downloads and verifies the SDK manifest attached to the matching Karty release. Callers must use its exact project-pinned version.
func (Manifest) SupportsAuthoredActions ¶ added in v0.0.2
SupportsAuthoredActions reports whether the bundle supplies the action generator contract.
type MaterialToolArtifact ¶ added in v0.0.2
type MaterialToolArtifact struct {
URL string `toml:"url"`
SHA256 string `toml:"sha256"`
Format string `toml:"format"`
Executable string `toml:"executable"`
}
MaterialToolArtifact pins a tool archive and its confined executable entry.
type SoundProfile ¶ added in v0.0.2
type SoundProfile struct {
Processor assetcontract.Processor `toml:"processor"`
Transform assetcontract.AudioRecipe `toml:"transform"`
}
SoundProfile pins one deterministic WAV-to-QOA processing recipe.
type ToolArtifact ¶
ToolArtifact identifies a verified tool release archive.