Topic | C# | C++ | Rust |
---|---|---|---|
Installation |
dotnet
Download dotnet core latest SDK and
Desktop Runtime.
Run installer from Downloads directory. The download page has links for Windows, Linux, and macOS.
|
CMake, C++ tools
Download CMake. For Windows, if you have
Visual Studio Community Edition you already
have the tools you need. For Linux download gcc/g++ from your connected repositories. On Ubuntu, install
build-essential for a late version.
|
Rust: cargo, rustc, clippy
Download Rust. That includes rustc, the rust compiler,
cargo, a package manager, and other tools like clippy. This works for Windows and Linux.
|
Work Flow |
C#
In VS Code navigate to the parent folder where you want to create a dotnet project. Open the
terminal (ctrl `) and issue the commands:
Now you can run the debugger by clicking on the top Run menu, select .net core launch,
and step through the code.
Results are, by default, shown in the integrated terminal,
but you can change that to an external terminal if you wish by editing launch.json
in the .vscode folder.
Start editing, adding files, and debugging to implement your design.
|
C++
In VS Code, open the parent folder where you want to create a new C++ project.
In the terminal issue the command:
Open the file and add some C++ code in the editor. Now add a CMakeTests.txt file.
Initially you may wish to simply copy from the CMakeDemo repository.
Create a build directory:
Now you can run or start debugging.
Here's a couple of nice, brief, CMake tutorials:
|
Rust
In VS Code, open the parent folder where you want to create a new Rust project.
In the terminal issue the command:
Now you can open the new folder from the File menu and run or start debugging. when you don't
need to debug just issue the command:
You create a library with the terminal command:
cargo builds the library starter code with test fixtures for unit tests. Once you have some
library code and corresponding tests, you run tests with the terminal command:
If you manually create an /examples folder as a sibling to the /src folder, you can put
demonstration code that uses the library and displays results on the termianl. To do that
use the command:
|