Skip to content
/ rust Public

A beginner-friendly Rust monorepo with examples and dev container setup

Notifications You must be signed in to change notification settings

dfberry/rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

89 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust

Reference

The Rust Programming Language for 2021

001 Hello world with Cargo

  • Dev container for Rust
  • Monorepo
  • Debugging
  • Example crate

YouTube video

002 Guessing game

Cargo build warning: resolver

When running Cargo build, get warning before build completes:

warning: virtual workspace defaulting to `resolver = "1"` despite one or more workspace members being on edition 2021 which implies `resolver = "2"`
note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest
note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest
note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions
   Compiling libc v0.2.152
   Compiling cfg-if v1.0.0
   Compiling ppv-lite86 v0.2.17
   Compiling getrandom v0.2.12
   Compiling rand_core v0.6.4
   Compiling rand_chacha v0.3.1
   Compiling rand v0.8.5
   Compiling crate_002_guessing_game v0.1.0 (/workspaces/rust/crates/crate_002_guessing_game)
    Finished dev [unoptimized + debuginfo] target(s) in 1.92s

Fix: update root Cargo.toml with resolver of 2

[workspace]
members = ["crates/*"]
resolver = "2"

Version for rand doesn't update?

No idea why this happened.

Troubleshooting

Only have 1 vscode instance with the rust-analyzer running.

Examples

About

A beginner-friendly Rust monorepo with examples and dev container setup

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages