feat: add Rust framework support#947
Draft
sarahxsanders wants to merge 1 commit into
Draft
Conversation
🧙 Wizard CIRun the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands: Test all apps:
Test all apps in a directory:
Test an individual app:
Show more apps
Results will be posted here when complete. |
sarahxsanders
force-pushed
the
posthog-code/elixir-framework-support
branch
from
July 22, 2026 20:41
5bc160d to
f14d962
Compare
sarahxsanders
force-pushed
the
posthog-code/rust-framework-support
branch
from
July 22, 2026 20:41
700cbba to
6cad9a7
Compare
sarahxsanders
changed the base branch from
posthog-code/elixir-framework-support
to
main
July 22, 2026 20:42
Adds Rust as a supported framework, stacked on the Elixir framework PR: - Integration.rust enum entry in the frameworks block, before the language fallbacks - RUST_AGENT_CONFIG in src/frameworks/rust/ — claims a Cargo.toml with a [package] section (workspace-root-only manifests fall through; the agentic monorepo scan finds nested crates), gathers async-runtime presence (tokio/async-std/smol) to steer the agent between the default async client and the blocking one, installs via cargo add posthog-rs - cargoPackageManager helper + FRAMEWORK_REGISTRY entry - bash-fence allowlist for cargo: add/remove/build/check/fmt/clippy/metadata/tree/fetch; run/test stay denied (arbitrary code execution) and install/publish stay denied (outward-facing); the pinned cargo run assertion's reason changes from "no rust framework" to "arbitrary code execution" - Pins framework: rust on a new integration-rust entry in the variant-resolution contract test, matching context-mill PR #269 which must release before this merges - Marks Cargo.toml as a real framework target in the agentic manifest comment Generated-By: PostHog Code Task-Id: 9c949855-7611-48f2-b8b5-7aa4112543e5
sarahxsanders
force-pushed
the
posthog-code/rust-framework-support
branch
from
July 22, 2026 20:43
6cad9a7 to
ff7610d
Compare
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.
Related PRs:
mainand can merge on its own, in any order relative to the sibling Go/Elixir/Rust/Java framework PRs.Adds Rust as a supported framework, following the backend-framework pattern:
Integration.rustenum entry in the frameworks block, before the language fallbacksRUST_AGENT_CONFIGinsrc/frameworks/rust/— claims aCargo.tomlwith a[package]section; a workspace-root-only manifest ([workspace], no[package]) falls through, and the registry-driven agentic monorepo scan finds the nested crates. Gathers async-runtime presence (tokio/async-std/smol) as agent context to steer between posthog-rs's default async client and the blocking one (--no-default-features). Installs viacargo add posthog-rs.cargoPackageManagerhelper +FRAMEWORK_REGISTRYentrycargo:add|remove|build|check|fmt|clippy|metadata|tree|fetch;cargo run/teststay denied (arbitrary code execution) andinstall/publishstay denied (outward-facing). The pre-existing pinnedcargo rundeny assertion keeps its verdict but its reason comment changes from "no rust framework" to "arbitrary code execution".framework: ruston a newintegration-rustentry in the variant-resolution contract test, matching the context-mill PR aboveflush()/shutdown()must run before exitWhy: the wizard docs page lists Rust as "Coming soon"; instead of removing the label (posthog.com#18797), we're making the wizard actually support it.
Verification:
pnpm build✅,pnpm test✅ (1548 tests, incl. new rust detect + cargo fence tests),pnpm fix✅Created with PostHog Code