Files
markbase/markbase-core/src/cli/tools/mod.rs
Warren 0f77983483 Implement NFS Support stub (Phase 11 P0 #3)
NFS Support Features:
- nfs_server.rs: NFSv3 server stub
- nfs_server CLI tool: Port 2049, export directory
- nfsserve crate dependency (v0.11.0)

Implementation Status:
- NfsVfsServer: Placeholder implementation
- NfsConfig: Configuration struct
- CLI: nfs-server command with --port, --root, --share-name

Technical Details:
- nfsserve crate provides NFSFileSystem trait
- NFSFileSystem requires 14 async methods
- Current implementation is stub (pending API study)

Build:  markbase-core + nfs feature
Tests: 495 markbase-core (without nfs feature)

Note: Full NFS server implementation requires studying nfsserve crate API
(expected time: 2-3 days for 500 lines)
2026-06-24 05:42:15 +08:00

31 lines
856 B
Rust

pub mod render;
pub mod smb_server;
pub mod test;
#[cfg(feature = "nfs")]
pub mod nfs_server;
use clap::Subcommand;
#[derive(Subcommand)]
pub enum ToolsCommands {
#[command(flatten)]
Render(render::RenderCommand),
#[command(flatten)]
Test(test::TestCommand),
#[command(flatten)]
SmbServer(smb_server::SmbServerCommand),
#[cfg(feature = "nfs")]
Nfs(nfs_server::NfsServerCommand),
}
pub async fn handle_tools_command(cmd: ToolsCommands) -> anyhow::Result<()> {
match cmd {
ToolsCommands::Render(c) => render::handle_render_command(c)?,
ToolsCommands::Test(c) => test::handle_test_command(c)?,
ToolsCommands::SmbServer(c) => smb_server::handle_smb_server_command(c).await?,
#[cfg(feature = "nfs")]
ToolsCommands::Nfs(c) => nfs_server::run_nfs_server(c).await?,
}
Ok(())
}