Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trouble Getting Started #1183

Open
kwmartin opened this issue Nov 22, 2024 · 0 comments
Open

Trouble Getting Started #1183

kwmartin opened this issue Nov 22, 2024 · 0 comments

Comments

@kwmartin
Copy link

Description: Ubuntu 22.04.5 LTS
Release: 22.04
Codename: jammy

Getting Started Program: hello-rust in vscode 1.95.s

rustc --version
rustc 1.82.0 (f6e511eec 2024-10-15)

main.rs:

use ferris_says::say; // from the previous step
use std::io::{stdout, BufWriter};

fn main() {
    let stdout = stdout();
    let out = b"Hello fellow Rustaceans!";
    let width = 24;

    let mut writer = BufWriter::new(stdout.lock());
    say(out, width, &mut writer).unwrap();
}

Running in verbose mode, output of terminal:

 *  Executing task: CodeLLDB: cargo 

Running `cargo build --lib --message-format=json --color=always`...
error: no library targets found in package `hello-rust`
Error: Cargo invocation failed.
        at t.Cargo.getCargoArtifacts (/home/martin/.vscode/extensions/vadimcn.vscode-lldb-1.11.1/extension.js:1:10993)
        at async Object.open (/home/martin/.vscode/extensions/vadimcn.vscode-lldb-1.11.1/extension.js:1:9296)
Caused by: Error: exit code: 101.
        at ChildProcess.<anonymous> (/home/martin/.vscode/extensions/vadimcn.vscode-lldb-1.11.1/extension.js:1:12660)
        at ChildProcess.emit (node:events:519:28)
        at maybeClose (node:internal/child_process:1105:16)
        at Socket.<anonymous> (node:internal/child_process:457:11)
        at Socket.emit (node:events:519:28)
        at Pipe.<anonymous> (node:net:339:12)
 *  The terminal process terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it. 

Seems I need to add a library-target to hello-rust package, but being a newbie to Rust (and only using vscode occasionally), I'm not sure how. Any suggestions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant