Skip to main content

Crate appcore_sdk

Crate appcore_sdk 

Source
Expand description

§AppCore SDK

appcore-sdk is the stable, application-facing entry point for AppCore. It deliberately presents contracts and small adapters rather than owning a host, provider selection, storage engine, scheduler, gateway, or protocol. Those systems remain independently usable in their owning crates.

§Hello World

use appcore_sdk::prelude::*;

fn main() -> AppResult<()> {
    appcore_sdk::run("hello-world", |app| {
        app.log("Hello, world!");
        Ok(())
    })
}

This local entry point validates the application identifier and provides a bounded, structured logging boundary. It intentionally does not start a network listener or infer deployment policy. A deployed application owns its process boundary and uses explicit manifests; add specialized crates only when a capability is needed.

§Learning path

  1. Start with run and prelude.
  2. Use App as the validated local application context.
  3. Replace its canonical defaults with explicit manifest contracts when installation policy must be supplied externally.
  4. Implement Application and call App::prepare to collect commands, events, states, decisions, handlers, queries and scheduled tasks.
  5. Enable storage, api, sync, ai or filemaker only when that capability is genuinely required.
  6. Enable deployment for provider-resolved bindings and scheduler for bounded task definitions.
  7. Select an explicit deployment process for distributed composition, clustering and lifecycle. The SDK never makes a low-level crate depend on it.

§Escape hatches

The namespaced reexports are intentionally selective. Import an owning appcore-* crate directly for an advanced API not represented here. That is an explicit choice, not a limitation of the SDK.

Re-exports§

pub use application::Application;
pub use capability::command_name;
pub use capability::declare_command_capability;
pub use capability::CapabilityCoverage;
pub use capability::CapabilityOutcome;
pub use capability::CapabilityOutcomeError;
pub use capability::CapabilityRegistry;
pub use capability::MAX_CAPABILITY_ENTRIES;
pub use diagnostics::DiagnosticBundleBuilder;
pub use diagnostics::DiagnosticBundleV1;
pub use diagnostics::DiagnosticComponent;
pub use diagnostics::DiagnosticError;
pub use diagnostics::DiagnosticPrivacy;
pub use diagnostics::DiagnosticStatus;
pub use diagnostics::DIAGNOSTIC_BUNDLE_SCHEMA_V1;
pub use diagnostics::MAX_DIAGNOSTIC_ERRORS;
pub use diagnostics::MAX_DIAGNOSTIC_STATUS_BYTES;
pub use diagnostics::MAX_DIAGNOSTIC_TEXT_BYTES;
pub use environment::EnvironmentProfile;
pub use environment::EnvironmentStage;
pub use environment::EnvironmentTopology;
pub use environment::ReleaseKind;
pub use environment::RuntimeSurface;
pub use environment::MAX_ENVIRONMENT_LABEL_BYTES;
pub use error::AppError;
pub use error::AppResult;

Modules§

application
Contracts used by business code hosted by AppCore.
capability
Application capability declarations and command coverage helpers.
diagnostics
Bounded, redacted diagnostics for application support bundles.
environment
Unified, non-secret SDK environment identity.
error
Errors returned by SDK setup and zero-configuration manifest synthesis.
logging
Bounded structured logging configuration used by App::logging.
manifest
Canonical manifest contracts accepted by every compatible AppCore Runtime.
prelude
Small, stable imports for a new AppCore application.

Structs§

App
A small local application context with effective validated manifests.
CapabilityDeclaration
Re-export the contract types needed to construct declarations. Application declaration for one generic capability.
PreparedApplication
Application behavior prepared for an explicit deployment boundary.

Enums§

CapabilityClass
Re-export the contract types needed to construct declarations. Ownership boundary for a capability declaration.
CapabilityMode
Re-export the contract types needed to construct declarations. How a capability is invoked.
CapabilityVisibility
Re-export the contract types needed to construct declarations. Where a capability may be resolved.

Functions§

run
Runs a local application callback with canonical standalone defaults.