From 073104d1a63240faafcd0e64a54482690e12eec2 Mon Sep 17 00:00:00 2001 From: Adam Lock Date: Tue, 3 Oct 2023 15:19:48 +0100 Subject: [PATCH] Update document --- docs/developer.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/docs/developer.md b/docs/developer.md index 63624d8f4..052989382 100644 --- a/docs/developer.md +++ b/docs/developer.md @@ -6,7 +6,11 @@ This is just a loose list of things that can come in useful for debugging and de OPCUA for Rust will always track quite close to the most stable version of Rust, therefore ensure your toolchain is kept up to date. -## Rustfmt +## Style guide + +Some styling hints and design philosophy are provided in [design](./design.md). + +### Rustfmt Rustfmt will be used to format the sources and ensure a consistent style. Install rustfmt like so: @@ -21,16 +25,20 @@ cd opcua cargo fmt ``` -## CLion +## CLion / RustRover + +Note: JetBrains is deprecating Rust support in CLion (a bad idea IMO) for a standalone RustRover IDE. So this information is only for older installations of CLion. CLion has very good Rust support. Install the `rust` and `toml` plugins and choose to use them with your existing Rust toolchain. 1. Enable "Use rustfmt instead of built-in formatter" 2. Enable "Run rustfmt on save" +If you are using RustRover then you get Rust out of the box but you need to ensure you use Rustfmt as your formatter. Using RustRover also prevents you from using some of the 3rd party samples and might also impact on some debugging scenarios, e.g. into OpenSSL code. + ## Visual Studio Code -TODO +Visual Studio Code has pretty decent Rust support these days. You will need to install `rust-analyzer`, `Even Better TOML` extensions to make it work. You might also install `CodeLLDB` if you intend to debug. ## OpenSSL