Skip to content

Add 9p fs to LiteBox#663

Merged
CvvT merged 20 commits intomainfrom
weiteng/nine_p
Feb 25, 2026
Merged

Add 9p fs to LiteBox#663
CvvT merged 20 commits intomainfrom
weiteng/nine_p

Conversation

@CvvT
Copy link
Contributor

@CvvT CvvT commented Feb 11, 2026

This PR adds implementation of 9p fs that uses 9P2000.L protocol. For testing, I used diod as the remote server. The implementation of 9p client was largely migrated from VSBox.

Note that different from other fs, this only support blocking operations as it relies on network. Not sure if it breaks any assumption that LiteBox has.

Currently it only allows issuing one call over network at a time and waiting for it to complete. We should allow concurrent requests. I will fix it in the next PR.

@CvvT CvvT marked this pull request as ready for review February 11, 2026 22:23
Copy link
Member

@wdcui wdcui left a comment

Choose a reason for hiding this comment

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

I went through the code and left some comments. Thank you for adding 9p support in LiteBox!

@github-actions
Copy link

🤖 SemverChecks 🤖 ⚠️ Potential breaking API changes detected ⚠️

Click for details
--- failure enum_variant_added: enum variant added on exhaustive enum ---

Description:
A publicly-visible enum without #[non_exhaustive] has a new variant.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#enum-variant-new
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.46.0/src/lints/enum_variant_added.ron

Failed in:
  variant MigrationError:Io in /home/runner/work/litebox/litebox/litebox/src/fs/layered.rs:430
  variant TruncateError:Io in /home/runner/work/litebox/litebox/litebox/src/fs/errors.rs:95

--- failure method_parameter_count_changed: pub method parameter count changed ---

Description:
A publicly-visible method now takes a different number of parameters, not counting the receiver (self) parameter.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#fn-change-arity
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.46.0/src/lints/method_parameter_count_changed.ron

Failed in:
  litebox::fs::nine_p::FileSystem::new now takes 5 parameters instead of 1, in /home/runner/work/litebox/litebox/litebox/src/fs/nine_p/mod.rs:306

--- failure trait_requires_more_generic_type_params: trait now requires more generic type parameters ---

Description:
A trait now requires more generic type parameters than it used to. Uses of this trait that supplied the previously-required number of generic types will be broken. To fix this, consider supplying default values for newly-added generic types.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#trait-new-parameter-no-default
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.46.0/src/lints/trait_requires_more_generic_type_params.ron

Failed in:
  trait FileSystem (1 -> 2 required generic types) in /home/runner/work/litebox/litebox/litebox/src/fs/nine_p/mod.rs:270

--- failure type_requires_more_generic_type_params: type now requires more generic type parameters ---

Description:
A type now requires more generic type parameters than it used to. Uses of this type that supplied the previously-required number of generic types will be broken. To fix this, consider supplying default values for newly-added generic types.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#trait-new-parameter-no-default
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.46.0/src/lints/type_requires_more_generic_type_params.ron

Failed in:
  Struct FileSystem (1 -> 2 required generic types) in /home/runner/work/litebox/litebox/litebox/src/fs/nine_p/mod.rs:270

Copy link
Member

@wdcui wdcui left a comment

Choose a reason for hiding this comment

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

I left two comments unresolved. Once you create issues to track them, please feel free to merge this PR. Thanks!

@CvvT CvvT mentioned this pull request Feb 25, 2026
@wdcui
Copy link
Member

wdcui commented Feb 25, 2026

I resolved all my comments. Please feel free to merge it. Thanks!

@CvvT CvvT added this pull request to the merge queue Feb 25, 2026
Merged via the queue into main with commit b365ecc Feb 25, 2026
14 checks passed
@CvvT CvvT deleted the weiteng/nine_p branch February 25, 2026 02:35
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.

3 participants