Skip to content

Latest commit

 

History

History
44 lines (32 loc) · 1.35 KB

README.md

File metadata and controls

44 lines (32 loc) · 1.35 KB

rust-devcontainer

Rust devcontainer definition for VS Code Remote - Containers extension to easily develop locally in the same environment used by the CodeRunner.

If you're not familiar with devcontainers, see Developing inside a Container.

Usage

Open this project in a devcontainer with VS Code Remote - Containers extension.

Put your solution and tests in src/lib.rs:

fn add(a: i32, b: i32) -> i32 {
    a + b
}

// -------------------- 8< --------------------
#[cfg(test)]
mod tests {
    use super::*;
    #[test]
    fn test_example() {
        assert_eq!(add(1, 1), 2);
    }
}

Then run cargo test. If the kata uses preloaded code, create lib/preloaded.rs.

Extensions

Only rust-analyzer and Better TOML are installed.

To install more extensions in the devcontainer, configure default extensions in your VS Code settings:

    "remote.containers.defaultExtensions": [
        "usernamehw.errorlens",
    ],