Skip to content

Conversation

@mgild
Copy link
Contributor

@mgild mgild commented Oct 10, 2025

This pull request introduces major improvements to the switchboard-on-demand Rust library, focusing on merging the client crate into the main crate, updating documentation, and adding tooling for automated Rustdoc site generation and deployment. The changes streamline dependency management, clarify migration for users, and set up infrastructure for publishing and hosting documentation. Below are the most important changes grouped by theme:

Client Crate Merge and Migration

  • Merged the switchboard-on-demand-client crate into the main switchboard-on-demand crate under the client feature flag, consolidating codebases and dependencies, and providing a comprehensive migration guide (MERGE_COMPLETE.md, MIGRATION.md). [1] [2]
  • Updated module structure and feature flags to enforce clear boundaries between on-chain and client functionality, including type compatibility notes and migration steps.

Documentation and Rustdoc Site

  • Added a new DOCS.md to document prerequisites and deployment steps for the Rustdoc site, including Firebase CLI usage and deployment scripts.
  • Added firebase.json and package.json for configuring Firebase hosting and npm scripts to automate doc generation, compilation, and deployment. [1] [2]
  • Introduced a TypeScript script scripts/compile_docs.ts to post-process Rustdoc output, fix asset paths, and prepare the site for hosting.

General Library Improvements

  • Added a new compatibility layer src/account_info_compat.rs to abstract over different AccountInfo types (pinocchio, anchor, solana-program) and provide macros for safe field access and data borrowing.
  • Updated the library README with a new overview, feature list, usage examples, and documentation links to improve onboarding and clarity for new users.

Other Tooling and Maintenance

  • Added rustfmt.toml to enforce import ordering and grouping conventions for consistent code style.
  • Updated .gitignore to include docs and ensure .env files are tracked.

Codebase Refactoring

  • Re-exported account types from the unified module in src/accounts.rs to support the new crate structure.

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