diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..672a47e --- /dev/null +++ b/.devcontainer/Dockerfile @@ -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 \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..5eec2bf --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -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" +} \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index 60de531..ba5c8cb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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] diff --git a/language/Cargo.toml b/language/Cargo.toml index b24febf..2ceba3a 100644 --- a/language/Cargo.toml +++ b/language/Cargo.toml @@ -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"