Skip to content

Commit

Permalink
Merge pull request #8 from ssoudan/updates
Browse files Browse the repository at this point in the history
Updates
  • Loading branch information
ssoudan authored Sep 16, 2023
2 parents 89a267f + 8bf1fcf commit a676940
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 10 deletions.
17 changes: 17 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM mcr.microsoft.com/devcontainers/base:ubuntu-22.04

RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends build-essential pkg-config libssl-dev lldb protobuf-compiler\
&& apt-get clean -y && rm -rf /var/lib/apt/lists/*

USER vscode

RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain nightly

ENV PATH="/home/vscode/.cargo/bin:${PATH}"

RUN rustup update

RUN rustup component add clippy rustfmt rust-src rust-analysis rls

RUN cargo install cargo-edit cargo-deny cargo-udeps cargo-audit cargo-update
52 changes: 52 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/rust
{
"name": "rust-gcp-vertex-ai-generative-ai",
"build": {
"context": "..",
"dockerfile": "./Dockerfile",
},
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
// Use 'mounts' to make the cargo cache persistent in a Docker Volume.
// "mounts": [
// {
// "source": "devcontainer-cargo-cache-${devcontainerId}",
// "target": "/usr/local/cargo",
// "type": "volume"
// }
// ]
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": [
"GitHub.copilot",
"github.copilot-chat",
"github.vscode-github-actions",
"vadimcn.vscode-lldb",
"rust-lang.rust-analyzer",
"tamasfe.even-better-toml",
"serayuzgur.crates",
],
"settings": {
"files.associations": {
"*.rs": "rust"
},
"editor.quickSuggestions": {
"other": "on",
"comments": "on",
"strings": true
},
}
}
},
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"configureZshAsDefaultShell": true
},
"ghcr.io/devcontainers/features/github-cli:1": {},
},
// "postCreateCommand": "",
"remoteUser": "vscode"
}
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ categories.workspace = true
edition.workspace = true

[dev-dependencies]
tokio = { version = "1.28.1", features = ["macros", "rt-multi-thread"] }
tokio = { version = "1.32.0", features = ["macros", "rt-multi-thread"] }
gcp-vertex-ai-generative-language = { path = "./language", version = "^0.1.1" }

[workspace]
Expand Down
18 changes: 9 additions & 9 deletions language/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@ unstable = []
doctest = false

[dependencies]
tonic = { version = "0.9", features = ["tls"] }
prost = "0.11.9"
prost-types = "0.11.9"
tokio = "1.28.1"
tonic = { version = "0.10", features = ["tls"] }
prost = "0.12.1"
prost-types = "0.12.1"
tokio = "1.32.0"
tower-service = "0.3.2"
futures-util = "0.3.28"
thiserror = "1.0.40"
thiserror = "1.0.48"

[build-dependencies]
tonic-build = { version = "0.9", features = ["prost"] }
prost-build = { version = "0.11.9" }
tonic-build = { version = "0.10", features = ["prost"] }
prost-build = { version = "0.12.1" }

[dev-dependencies]
insta = { version = "1.29.0", features = ["json"] }
tokio-test = "0.4.2"
insta = { version = "1.31.0", features = ["json"] }
tokio-test = "0.4.3"

0 comments on commit a676940

Please sign in to comment.