Skip to content

Commit 375c59b

Browse files
author
Andrew J Westlake
committed
Added devcontainer
1 parent 548d21e commit 375c59b

File tree

3 files changed

+67
-0
lines changed

3 files changed

+67
-0
lines changed

.devcontainer/Dockerfile

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/rust/.devcontainer/base.Dockerfile
2+
3+
# [Choice] Debian OS version (use bullseye on local arm64/Apple Silicon): buster, bullseye
4+
ARG VARIANT="buster"
5+
FROM mcr.microsoft.com/vscode/devcontainers/rust:0-${VARIANT}
6+
7+
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
8+
&& apt-get -y install python3-dev python3-pip
9+
10+
RUN python3 -m pip install uvloop

.devcontainer/devcontainer.json

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/rust
3+
{
4+
"name": "Rust",
5+
"build": {
6+
"dockerfile": "Dockerfile",
7+
"args": {
8+
// Use the VARIANT arg to pick a Debian OS version: buster, bullseye
9+
// Use bullseye when on local on arm64/Apple Silicon.
10+
"VARIANT": "buster"
11+
}
12+
},
13+
"runArgs": [
14+
"--cap-add=SYS_PTRACE",
15+
"--security-opt",
16+
"seccomp=unconfined"
17+
],
18+
19+
// Configure tool-specific properties.
20+
"customizations": {
21+
// Configure properties specific to VS Code.
22+
"vscode": {
23+
// Set *default* container specific settings.json values on container create.
24+
"settings": {
25+
"lldb.executable": "/usr/bin/lldb",
26+
// VS Code don't watch files under ./target
27+
"files.watcherExclude": {
28+
"**/target/**": true
29+
},
30+
"rust-analyzer.checkOnSave.command": "clippy"
31+
},
32+
33+
// Add the IDs of extensions you want installed when the container is created.
34+
"extensions": [
35+
"vadimcn.vscode-lldb",
36+
"mutantdino.resourcemonitor",
37+
"rust-lang.rust-analyzer",
38+
"tamasfe.even-better-toml",
39+
"serayuzgur.crates"
40+
]
41+
}
42+
},
43+
44+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
45+
// "forwardPorts": [],
46+
47+
// Use 'postCreateCommand' to run commands after the container is created.
48+
// "postCreateCommand": "rustc --version",
49+
50+
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
51+
"remoteUser": "vscode",
52+
"features": {
53+
"git": "latest",
54+
"git-lfs": "latest"
55+
}
56+
}

src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![warn(missing_docs)]
2+
#![allow(clippy::borrow_deref_ref)]
23

34
//! Rust Bindings to the Python Asyncio Event Loop
45
//!

0 commit comments

Comments
 (0)