Skip to content

Conversation

@sfackler
Copy link
Member

Before this PR

Endpoints would always use the default ConjureRuntime.

After this PR

==COMMIT_MSG==
Added the ability to configure the ConjureRuntime used by endpoints.
==COMMIT_MSG==

Like WC-Java, this is implemented via a builder API before the standard server initialization process.

This does not affect the runtime used for the status endpoints to ensure they continue to work properly.

@sfackler sfackler requested a review from a team November 22, 2025 19:59
@changelog-app
Copy link

changelog-app bot commented Nov 22, 2025

Generate changelog in changelog/@unreleased

Type (Select exactly one)

  • Feature (Adding new functionality)
  • Improvement (Improving existing functionality)
  • Fix (Fixing an issue with existing functionality)
  • Break (Creating a new major version by breaking public APIs)
  • Deprecation (Removing functionality in a non-breaking way)
  • Migration (Automatically moving data/functionality to a new system)

Description

Added the ability to configure the ConjureRuntime used by endpoints.

Check the box to generate changelog(s)

  • Generate changelog entry

@changelog-app
Copy link

changelog-app bot commented Nov 22, 2025

Successfully generated changelog entry!

Need to regenerate?

Simply interact with the changelog bot comment again to regenerate these entries.


📋Changelog Preview

✨ Features

  • Added the ability to configure the ConjureRuntime used by endpoints. (#274)

@sfackler
Copy link
Member Author

Here's an example of customizing the runtime using the server main macro:

#[witchcraft_server::main(conjure_runtime = Arc::new(ConjureRuntime::builder().encoding(JsonEncoding).build()))]
fn main(
    _install: InstallConfig,
    _runtime: Refreshable<RuntimeConfig, Error>,
    wc: &mut Witchcraft,
) -> Result<(), Error> {
    wc.blocking_api(TestServiceEndpoints::new(TestResource));

    Ok(())
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants