Skip to content

Commit 61946a8

Browse files
committed
Continue implementing new realization. Implementing Cursor. pre-commit disabled.
Signed-off-by: chandr-andr (Kiselev Aleksandr) <chandr@chandr.net>
1 parent dcf3713 commit 61946a8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+7999
-15
lines changed

Cargo.lock

Lines changed: 47 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ tokio-postgres = { version = "0.7.10", features = [
1818
"with-chrono-0_4",
1919
"with-uuid-1",
2020
] }
21+
pyo3-asyncio = { path = "./external_crates/pyo3-asyncio", version = "0.20.0", features = [
22+
"tokio-runtime",
23+
] }
2124
thiserror = "1.0.56"
2225
bytes = "1.5.0"
2326
byteorder = "1.5.0"
Lines changed: 10 additions & 0 deletions
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
Lines changed: 56 additions & 0 deletions
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+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
cargo check --all-targets --all-features
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
3+
make clippy
4+
make test
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "cargo" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "weekly"
12+
allow:
13+
- dependency-type: direct
14+
- dependency-name: tokio # haven't been seeing updates for tokio
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
## 🐛 Bug Reports
2+
3+
When reporting a bug, please provide the following information. If this is not a bug report you can just discard this template.
4+
5+
### 🌍 Environment
6+
7+
- Your operating system and version:
8+
- Your python version:
9+
- How did you install python (e.g. apt or pyenv)? Did you use a virtualenv?:
10+
- Your Rust version (`rustc --version`):
11+
- Your PyO3 version:
12+
- Have you tried using latest PyO3 master (replace `version = "0.x.y"` with `git = "https://github.com/awestlake87/pyo3-asyncio")?`:
13+
14+
### 💥 Reproducing
15+
16+
Please provide a [minimal working example](https://stackoverflow.com/help/mcve). This means both the Rust code and the Python.
17+
18+
Please also write what exact flags are required to reproduce your results.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Thank you for contributing to pyo3-asyncio!
2+
3+
Please consider adding the following to your pull request:
4+
- an entry in CHANGELOG.md
5+
- docs to all new functions and / or detail in the guide
6+
- tests for all new or changed functions
7+
8+
Be aware the CI pipeline will check your pull request for the following:
9+
- Rust tests (Just `cargo test`)
10+
- Rust lints (`make clippy`)
11+
- Rust formatting (`cargo fmt`)
12+
- Python formatting (`black . --check`. You can install black with `pip install black`)

0 commit comments

Comments
 (0)