Skip to content

docs: update Motoko env var example to motoko-core Runtime.envVar#408

Merged
marc0olo merged 1 commit intomainfrom
docs/motoko-core-runtime-envvar
Mar 5, 2026
Merged

docs: update Motoko env var example to motoko-core Runtime.envVar#408
marc0olo merged 1 commit intomainfrom
docs/motoko-core-runtime-envvar

Conversation

@marc0olo
Copy link
Member

@marc0olo marc0olo commented Mar 5, 2026

Summary

  • Update the Motoko canister environment variable example in the canister discovery docs to use Runtime.envVar from mo:core/Runtime (motoko-core v2.1.0+)
  • Remove the deprecated Prim.envVar<system> pattern using the internal mo:⛔ module
  • Remove the note about Prim being an internal module, since this is now the official API

Ref: dfinity/icp-cli-templates#11

motoko-core v2.1.0 now provides `Runtime.envVar` as the official API
for reading canister environment variables, replacing the internal
`Prim.envVar<system>` from `mo:⛔`.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@marc0olo marc0olo requested a review from a team as a code owner March 5, 2026 09:25
@marc0olo marc0olo merged commit 070c9e8 into main Mar 5, 2026
84 checks passed
@marc0olo marc0olo deleted the docs/motoko-core-runtime-envvar branch March 5, 2026 10:12
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