Skip to content

feat(rust)!: support cloud engines in the Rust library - #68

Open
ielashi wants to merge 1 commit into
mainfrom
feat/rust-with-cycles
Open

feat(rust)!: support cloud engines in the Rust library#68
ielashi wants to merge 1 commit into
mainfrom
feat/rust-with-cycles

Conversation

@ielashi

@ielashi ielashi commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Problem

The ic-llm crate didn't support cloud engines: calls attached cycles by default, and cycle attachments aren't supported on cloud engines. (Calls already used a bounded wait, so that side was fine.)

Solution

  • Attaching cycles is now an explicit decision via with_cycles; by default none are attached. Note with_cycles works on mainnet only.
  • To pay from a cloud engine (or mainnet), top up a balance on IIG and the canister draws from it — no attached cycles needed.
  • Remove the with_canister API and resolve the LLM canister purely from the PUBLIC_CANISTER_ID:llm env var (falling back to mainnet), mirroring the Motoko library.

NOTE: breaking change — removes the with_canister API and bumps to 3.0.0.

@ielashi
ielashi force-pushed the feat/rust-with-cycles branch from 6c3b9c0 to 51b0c11 Compare August 13, 2026 17:14
@ielashi ielashi changed the title feat(rust)!: add with_cycles opt-in and skip cycles by default feat(rust)!: support cloud engines in the Rust library Aug 13, 2026
@ielashi
ielashi force-pushed the feat/rust-with-cycles branch from 51b0c11 to db36597 Compare August 13, 2026 17:22
## Problem

The `ic-llm` crate didn't support cloud engines: calls attached cycles by
default, and cycle attachments aren't supported on cloud engines. (Calls
already used a bounded wait, so that side was fine.)

## Solution

- Attaching cycles is now an explicit decision via `with_cycles`; by default
none are attached. Note `with_cycles` works on mainnet only.
- To pay from a cloud engine (or mainnet), top up a balance on IIG and the
canister draws from it - no attached cycles needed.
- Resolve the LLM canister purely from the `PUBLIC_CANISTER_ID:llm` env var
(falling back to mainnet), mirroring the Motoko library; drop the unused
`with_canister` override.

NOTE: breaking change - bumped to 3.0.0.
@ielashi
ielashi force-pushed the feat/rust-with-cycles branch from db36597 to f8f03f7 Compare August 13, 2026 17:32
@ielashi
ielashi marked this pull request as ready for review August 13, 2026 17:38
@ielashi
ielashi requested a review from a team as a code owner August 13, 2026 17:38
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.

1 participant