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
- Start with
runandprelude. - Use
Appas the validated local application context. - Replace its canonical defaults with explicit
manifestcontracts when installation policy must be supplied externally. - Implement
Applicationand callApp::prepareto collect commands, events, states, decisions, handlers, queries and scheduled tasks. - Enable
storage,api,sync,aiorfilemakeronly when that capability is genuinely required. - Enable
deploymentfor provider-resolved bindings andschedulerfor bounded task definitions. - Select an explicit deployment process for distributed composition,
clustering and lifecycle. The
SDKnever 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
SDKsetup and zero-configuration manifest synthesis. - logging
- Bounded structured logging configuration used by
App::logging. - manifest
- Canonical manifest contracts accepted by every compatible
AppCoreRuntime. - prelude
- Small, stable imports for a new
AppCoreapplication.
Structs§
- App
- A small local application context with effective validated manifests.
- Capability
Declaration - Re-export the contract types needed to construct declarations. Application declaration for one generic capability.
- Prepared
Application - Application behavior prepared for an explicit deployment boundary.
Enums§
- Capability
Class - Re-export the contract types needed to construct declarations. Ownership boundary for a capability declaration.
- Capability
Mode - Re-export the contract types needed to construct declarations. How a capability is invoked.
- Capability
Visibility - 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.