From da19bcfa759cafe1ede2e78602cf413ecc97147b Mon Sep 17 00:00:00 2001 From: Piotr Figiela <77412592+Draggu@users.noreply.github.com> Date: Wed, 23 Oct 2024 17:38:35 +0200 Subject: [PATCH] Add `proc-macro-server` command commit-id:330d5fd9 --- scarb/src/bin/scarb/args.rs | 2 ++ scarb/src/bin/scarb/commands/mod.rs | 2 ++ scarb/src/bin/scarb/commands/proc_macro_server.rs | 7 +++++++ 3 files changed, 11 insertions(+) create mode 100644 scarb/src/bin/scarb/commands/proc_macro_server.rs diff --git a/scarb/src/bin/scarb/args.rs b/scarb/src/bin/scarb/args.rs index 1a730bd1f..1bce8fd58 100644 --- a/scarb/src/bin/scarb/args.rs +++ b/scarb/src/bin/scarb/args.rs @@ -178,6 +178,8 @@ pub enum Command { codes of selected packages. Resulting files will be placed in `target/package` directory. ")] Package(PackageArgs), + /// Start proc macro server. + ProcMacroServer, /// Upload a package to the registry. #[command(after_help = "\ This command will create distributable, compressed `.tar.zst` archive containing source \ diff --git a/scarb/src/bin/scarb/commands/mod.rs b/scarb/src/bin/scarb/commands/mod.rs index 936976a9d..8dcde4ba7 100644 --- a/scarb/src/bin/scarb/commands/mod.rs +++ b/scarb/src/bin/scarb/commands/mod.rs @@ -22,6 +22,7 @@ pub mod manifest_path; pub mod metadata; pub mod new; pub mod package; +mod proc_macro_server; pub mod publish; pub mod remove; pub mod run; @@ -49,6 +50,7 @@ pub fn run(command: Command, config: &mut Config) -> Result<()> { Metadata(args) => metadata::run(args, config), New(args) => new::run(args, config), Package(args) => package::run(args, config), + ProcMacroServer => proc_macro_server::run(config), Publish(args) => publish::run(args, config), Remove(args) => remove::run(args, config), Run(args) => run::run(args, config), diff --git a/scarb/src/bin/scarb/commands/proc_macro_server.rs b/scarb/src/bin/scarb/commands/proc_macro_server.rs new file mode 100644 index 000000000..398c50e76 --- /dev/null +++ b/scarb/src/bin/scarb/commands/proc_macro_server.rs @@ -0,0 +1,7 @@ +use anyhow::Result; +use scarb::core::Config; + +#[tracing::instrument(skip_all, level = "info")] +pub fn run(_config: &Config) -> Result<()> { + unimplemented!() +}