Sign in

    #proton/bootstrap

    moonbit-community/proton/bootstrap loads Proton app configuration.

    It decodes proton.project.json into runtime manifests and project tooling metadata. It does not install extensions or create windows.

    Primary entry points:

    • load_config_manifest_from_file(...)
    • load_proton_project_config_from_file(...)
    • load_proton_project_summary_from_file(...)
    • load_runtime_manifest_from_json(...)

    BootstrapError

    pub(all) suberror BootstrapError {
    ProjectConfig(
    ProjectConfigError
    )
    ManifestRead(path~ : String, detail~ : String)
    InvalidJson(context~ : String, detail~ : String)
    MissingField(path~ : String)
    InvalidField(path~ : String, expectation~ : String)
    UnsupportedField(path~ : String, reason~ : String)
    UnsupportedValue(path~ : String, value~ : String)
    } derive(Eq,
    Debug
    )

    Failures while loading user configuration or internal runtime manifests.

    BootstrapError::equal

    BootstrapError::message

    fn BootstrapError::message(self : BootstrapError) -> String

    BootstrapError::not_equal

    fn BootstrapError::not_equal(x : BootstrapError, y : BootstrapError) -> Bool

    BootstrapError::output

    fn BootstrapError::output(self : BootstrapError, logger : &Logger) -> Unit

    BootstrapError::to_string

    fn BootstrapError::to_string(self : BootstrapError) -> String

    LoadedAppManifest

    type LoadedAppManifest

    Loaded manifest plus the base directory used to resolve relative file paths.

    LoadedAppManifest::base_dir

    fn LoadedAppManifest::base_dir(self : LoadedAppManifest) -> String?

    Returns the manifest base directory, if the manifest came from disk. Relative file entries should be interpreted against this directory when it is present.

    LoadedAppManifest::manifest

    Returns the loaded manifest value. This is a cheap accessor over the normalized manifest captured at load time.

    LoadedAppManifest::new

    Creates a loaded manifest wrapper. This is primarily used by bootstrap helpers that need to carry both the typed manifest value and its optional base directory.

    ProtonAppMetadata

    type ProtonAppMetadata

    Release metadata resolved from proton.project.json and the nearest moon.mod.

    ProtonAppMetadata::description

    fn ProtonAppMetadata::description(self : ProtonAppMetadata) -> String?

    ProtonAppMetadata::identifier

    fn ProtonAppMetadata::identifier(self : ProtonAppMetadata) -> String?

    ProtonAppMetadata::license

    fn ProtonAppMetadata::license(self : ProtonAppMetadata) -> String?

    ProtonAppMetadata::new

    fn ProtonAppMetadata::new(product_name : String, identifier? : String?, version? : String?, description? : String?, license? : String?) -> ProtonAppMetadata

    ProtonAppMetadata::product_name

    fn ProtonAppMetadata::product_name(self : ProtonAppMetadata) -> String

    ProtonAppMetadata::version

    fn ProtonAppMetadata::version(self : ProtonAppMetadata) -> String?

    ProtonBackendConfig

    type ProtonBackendConfig

    Backend module settings from proton.project.json.

    ProtonBackendConfig::app_package

    fn ProtonBackendConfig::app_package(self : ProtonBackendConfig) -> String

    ProtonBackendConfig::new

    fn ProtonBackendConfig::new(path : String, app_package : String) -> ProtonBackendConfig

    ProtonBackendConfig::path

    fn ProtonBackendConfig::path(self : ProtonBackendConfig) -> String

    ProtonBundleConfig

    type ProtonBundleConfig

    Bundle input settings from proton.project.json.

    ProtonBundleConfig::active

    fn ProtonBundleConfig::active(self : ProtonBundleConfig) -> Bool

    ProtonBundleConfig::document_extensions

    fn ProtonBundleConfig::document_extensions(self : ProtonBundleConfig) -> Array[String]

    ProtonBundleConfig::icon

    fn ProtonBundleConfig::icon(self : ProtonBundleConfig) -> Array[String]

    ProtonBundleConfig::new

    fn ProtonBundleConfig::new(active? : Bool, targets? : Array[String], icon? : Array[String], resources? : Array[String], sign? : ProtonSignConfig?, url_schemes? : Array[String], document_types? : Array[
    ProjectDocumentType
    ], output? : String) -> ProtonBundleConfig

    ProtonBundleConfig::output

    fn ProtonBundleConfig::output(self : ProtonBundleConfig) -> String

    ProtonBundleConfig::resources

    fn ProtonBundleConfig::resources(self : ProtonBundleConfig) -> Array[String]

    ProtonBundleConfig::sign

    ProtonBundleConfig::targets

    fn ProtonBundleConfig::targets(self : ProtonBundleConfig) -> Array[String]

    ProtonBundleConfig::url_schemes

    fn ProtonBundleConfig::url_schemes(self : ProtonBundleConfig) -> Array[String]

    ProtonFrontendConfig

    type ProtonFrontendConfig

    Frontend dev/build settings from proton.project.json.

    ProtonFrontendConfig::before_build

    fn ProtonFrontendConfig::before_build(self : ProtonFrontendConfig) -> String?

    ProtonFrontendConfig::before_dev

    fn ProtonFrontendConfig::before_dev(self : ProtonFrontendConfig) -> String?

    ProtonFrontendConfig::dev_url

    fn ProtonFrontendConfig::dev_url(self : ProtonFrontendConfig) -> String?

    ProtonFrontendConfig::dist

    fn ProtonFrontendConfig::dist(self : ProtonFrontendConfig) -> String?

    ProtonFrontendConfig::new

    fn ProtonFrontendConfig::new(dev_url? : String?, dist? : String?, before_dev? : String?, before_build? : String?, path? : String?) -> ProtonFrontendConfig

    ProtonFrontendConfig::path

    fn ProtonFrontendConfig::path(self : ProtonFrontendConfig) -> String?

    ProtonProjectConfig

    type ProtonProjectConfig

    ProtonProjectConfig::backend

    ProtonProjectConfig::bundle

    ProtonProjectConfig::dev_manifest

    Returns the runtime manifest that proton dev should start.

    When frontend.dev_url is present, the entry is replaced in memory with that URL. The source proton.project.json file is not rewritten.

    ProtonProjectConfig::frontend

    ProtonProjectConfig::manifest

    ProtonProjectConfig::metadata

    ProtonProjectConfig::new

    fn ProtonProjectConfig::new(manifest : LoadedAppManifest, metadata : ProtonAppMetadata, single_instance? : Bool, backend? : ProtonBackendConfig?, frontend? : ProtonFrontendConfig?, bundle? : ProtonBundleConfig?, updater? : ProtonUpdaterConfig?) -> ProtonProjectConfig

    ProtonProjectConfig::single_instance

    fn ProtonProjectConfig::single_instance(self : ProtonProjectConfig) -> Bool

    ProtonProjectConfig::to_summary_json

    fn ProtonProjectConfig::to_summary_json(self : ProtonProjectConfig) -> Json

    Returns a normalized JSON summary suitable for proton inspect config.

    ProtonProjectConfig::updater

    Returns the update channel, when one is declared and active.

    An inactive channel is reported as absent rather than as a channel that happens to be switched off: nothing downstream should have to remember to check a flag before trusting an endpoint.

    ProtonSignConfig

    type ProtonSignConfig

    Signing settings from bundle.sign in proton.project.json.

    ProtonSignConfig::binaries

    fn ProtonSignConfig::binaries(self : ProtonSignConfig) -> Array[String]

    Returns the project paths whose packaged copies must be signed.

    ProtonSignConfig::new

    fn ProtonSignConfig::new(binaries? : Array[String]) -> ProtonSignConfig

    Creates signing settings for packaged resource binaries.

    ProtonUpdaterConfig

    type ProtonUpdaterConfig

    Complete proton.project.json document for developer tooling. The application's update channel, as declared in proton.project.json.

    Only what the runtime needs to decide whether to check, and whom to trust when it does. No private key material reaches here, because none of it is anywhere the framework can see.

    ProtonUpdaterConfig::checks_on_launch

    fn ProtonUpdaterConfig::checks_on_launch(self : ProtonUpdaterConfig) -> Bool

    ProtonUpdaterConfig::endpoint

    fn ProtonUpdaterConfig::endpoint(self : ProtonUpdaterConfig) -> String

    ProtonUpdaterConfig::freshness_days

    fn ProtonUpdaterConfig::freshness_days(self : ProtonUpdaterConfig) -> Int

    ProtonUpdaterConfig::new

    fn ProtonUpdaterConfig::new(endpoint : String, public_keys : Array[String], check_on_launch? : Bool, freshness_days? : Int) -> ProtonUpdaterConfig

    ProtonUpdaterConfig::public_keys

    fn ProtonUpdaterConfig::public_keys(self : ProtonUpdaterConfig) -> Array[String]

    app_manifest_to_json

    Converts a typed runtime manifest into JSON for native runtime handoff.

    load_config_manifest_from_file

    fn load_config_manifest_from_file(path : String) -> LoadedAppManifest raise BootstrapError

    load_proton_project_config_from_file

    fn load_proton_project_config_from_file(path : String) -> ProtonProjectConfig raise BootstrapError

    load_proton_project_summary_from_file

    fn load_proton_project_summary_from_file(path : String) -> Json raise BootstrapError

    load_runtime_manifest_from_json

    fn load_runtime_manifest_from_json(text : String) -> LoadedAppManifest raise BootstrapError

    Parses an internal runtime manifest from JSON text.

    User-facing app config is proton.project.json. Runtime manifests are only used for native runtime bootstrap and may carry code-declared extension settings.

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io