Skip to content

refactor: Move jetdbg to own crate; workspace deps.#84

Merged
tcrypt25519 merged 2 commits into
mainfrom
ts/jetdbg
Feb 17, 2026
Merged

refactor: Move jetdbg to own crate; workspace deps.#84
tcrypt25519 merged 2 commits into
mainfrom
ts/jetdbg

Conversation

@tcrypt25519

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings February 17, 2026 00:39
@semanticdiff-com

semanticdiff-com Bot commented Feb 17, 2026

Copy link
Copy Markdown

Review changes with  SemanticDiff

Changed Files
File Status
  crates/jetdbg/src/main.rs  43% smaller
  Cargo.lock Unsupported file format
  Cargo.toml Unsupported file format
  crates/jet/Cargo.toml Unsupported file format
  crates/jet_ir/Cargo.toml Unsupported file format
  crates/jet_push_macros/Cargo.toml Unsupported file format
  crates/jet_runtime/Cargo.toml Unsupported file format
  crates/jetdbg/Cargo.toml Unsupported file format

@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello @tcrypt25519, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly refactors the project's dependency management and modular structure. The jetdbg utility, previously a binary within the jet crate, has been moved into its own crate. This change is accompanied by the adoption of Cargo workspace features, centralizing package metadata and common dependencies. This approach streamlines dependency declarations, enhances maintainability, and sets a clearer boundary for the jetdbg tool.

Highlights

  • Modularization of jetdbg: The jetdbg binary has been extracted from the jet crate into its own dedicated crates/jetdbg crate, improving modularity and separation of concerns within the project.
  • Introduction of Workspace Dependencies: A new [workspace.dependencies] section has been added to the root Cargo.toml to centralize and manage common dependencies across all crates in the workspace. This promotes consistency and simplifies dependency updates.
  • Consolidation of Package Metadata: Common package metadata such as version, edition, license, and authors have been moved to the [workspace.package] section in the root Cargo.toml. Individual crate Cargo.toml files now inherit these values using workspace = true.
  • Dependency Inheritance: All internal and external dependencies in the Cargo.toml files of jet, jet_ir, jet_push_macros, and jet_runtime crates have been updated to reference the workspace-defined dependencies, reducing redundancy.
Changelog
  • Cargo.lock
    • Removed simple_logger from the jet package's dependencies.
    • Added a new jetdbg package entry with its specific dependencies.
  • Cargo.toml
    • Added crates/jetdbg to the workspace members list.
    • Introduced [workspace.package] to define common package metadata.
    • Added [workspace.dependencies] to centralize external and internal crate dependencies.
  • crates/jet/Cargo.toml
    • Removed the jetdbg binary definition.
    • Updated package metadata (version, edition, license, authors) to inherit from the workspace.
    • Modified all dependencies to reference workspace-defined versions and paths.
  • crates/jet/src/bin/jetdbg.rs
    • Renamed to crates/jetdbg/src/main.rs as part of the crate move.
    • Updated PUSH2 instruction to PUSH20 for Bob's address, providing a full 20-byte address.
    • Added comments to clarify EVM stack operations for CALL instruction.
    • Adjusted argument forwarding logic in main function to pass top-level flags to build_cmd when no subcommand is given.
    • Refactored new_test_block_info_hash_history to use a for loop instead of for_each for iterating and modifying hash history.
  • crates/jet_ir/Cargo.toml
    • Updated package metadata to inherit from the workspace.
    • Modified the inkwell dependency to reference the workspace-defined version.
  • crates/jet_push_macros/Cargo.toml
    • Updated package metadata to inherit from the workspace.
    • Modified syn, quote, and proc-macro2 dependencies to reference workspace-defined versions.
  • crates/jet_runtime/Cargo.toml
    • Updated package metadata to inherit from the workspace.
    • Modified all dependencies to reference workspace-defined versions and paths.
  • crates/jetdbg/Cargo.toml
    • Added a new Cargo.toml file for the jetdbg crate.
    • Defined jetdbg as a binary crate.
    • Configured package metadata and dependencies to inherit from the workspace.
Activity
  • No human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request is a great refactoring. It moves the jetdbg binary into its own dedicated crate and leverages Cargo workspaces to manage dependencies, which significantly improves the project structure and maintainability. The dependencies in all Cargo.toml files have been correctly updated to use the new workspace definitions.

In addition to the structural changes, this PR also includes several valuable improvements to the jetdbg source code:

  • The EVM bytecode for the test contracts has been corrected to use PUSH20 for addresses, and the associated comments are now more descriptive.
  • A bug in the command-line argument parsing has been fixed, ensuring that top-level flags are correctly handled.
  • A loop has been refactored for better readability.

I have one minor suggestion for improving consistency in the test setup.

Comment thread crates/jetdbg/src/main.rs

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors the workspace to move the jetdbg CLI into its own crate and centralizes shared dependency/version metadata at the workspace level to reduce duplication across member crates.

Changes:

  • Added a new crates/jetdbg crate (with its own Cargo.toml) and updated jetdbg CLI logic/comments.
  • Introduced [workspace.package] and [workspace.dependencies] in the root Cargo.toml, and updated member crates to use *.workspace = true.
  • Removed jetdbg bin configuration from crates/jet and updated the lockfile accordingly.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
crates/jetdbg/src/main.rs Updates the example CALL ROM to use a 20-byte address push and forwards top-level CLI flags when no subcommand is provided.
crates/jetdbg/Cargo.toml Defines the new standalone jetdbg crate and its workspace-managed dependencies.
crates/jet_runtime/Cargo.toml Migrates package metadata + dependencies to workspace-managed entries.
crates/jet_push_macros/Cargo.toml Migrates proc-macro dependencies to workspace-managed entries.
crates/jet_ir/Cargo.toml Migrates metadata and inkwell dependency to workspace-managed entries.
crates/jet/Cargo.toml Removes the jetdbg bin stanza and migrates deps/dev-deps to workspace-managed entries.
Cargo.toml Adds crates/jetdbg to workspace members and centralizes shared package metadata/deps.
Cargo.lock Reflects the new jetdbg package and dependency graph updates.
Comments suppressed due to low confidence (3)

crates/jetdbg/src/main.rs:95

  • The comment suggests MSTORE only sets a single byte (Mem[0x01] = 0xFF), but MSTORE writes a full 32-byte word starting at the offset (in this codebase’s little-endian word representation, the first byte happens to be 0xFF here). Consider clarifying that it stores a 32-byte word to avoid misleading readers.
    crates/jetdbg/src/main.rs:100
  • Same as above: this MSTORE writes a 32-byte word starting at 0x0A; the comment currently reads like a single-byte store. Clarifying the 32-byte store (and endian convention if relevant) would make this example easier to reason about.
    crates/jetdbg/src/main.rs:105
  • RETURN uses (offset, length); the comment mem[0x00..0x0A] can be read as inclusive of 0x0A. Consider wording it as “10 bytes starting at 0x00” (or “mem[0x00..0x0A)”) to match the length semantics.

@tcrypt25519 tcrypt25519 merged commit 3c52b9c into main Feb 17, 2026
tcrypt25519 added a commit that referenced this pull request May 16, 2026
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