feat(rust)!: support cloud engines in the Rust library - #68
Open
ielashi wants to merge 1 commit into
Open
Conversation
ielashi
force-pushed
the
feat/rust-with-cycles
branch
from
August 13, 2026 17:14
6c3b9c0 to
51b0c11
Compare
ielashi
force-pushed
the
feat/rust-with-cycles
branch
from
August 13, 2026 17:22
51b0c11 to
db36597
Compare
## 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
force-pushed
the
feat/rust-with-cycles
branch
from
August 13, 2026 17:32
db36597 to
f8f03f7
Compare
ielashi
marked this pull request as ready for review
August 13, 2026 17:38
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
ic-llmcrate 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
with_cycles; by default none are attached. Notewith_cyclesworks on mainnet only.with_canisterAPI and resolve the LLM canister purely from thePUBLIC_CANISTER_ID:llmenv var (falling back to mainnet), mirroring the Motoko library.NOTE: breaking change — removes the
with_canisterAPI and bumps to 3.0.0.