Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialize dev env for Rust agent #2293

Merged
merged 2 commits into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,20 @@ hack/go.mod.default3
.vscode/

telepresence.log

# Generated by Cargo
# will have compiled files and executables
debug/
target/

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
#Cargo.lock

# These are backup files generated by rustfmt
**/*.rs.bk

# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb

!rust/libs
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ SWAP_TAG ?= latest

BINDIR ?= /usr/local/bin

RUST_DIR ?= $(HOME)/.cargo
RUST_BIN ?= $(RUST_DIR)/bin

UNAME := $(eval UNAME := $(shell uname -s))$(UNAME)
ARCH := $(eval ARCH := $(shell uname -m))$(ARCH)
PWD := $(eval PWD := $(shell pwd))$(PWD)
Expand Down
6 changes: 6 additions & 0 deletions Makefile.d/tools.mk
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,9 @@ stern/install: $(GOPATH)/bin/stern

$(GOPATH)/bin/stern:
$(call go-install, github.com/stern/stern)

.PHONY: rust/install
rust/install: $(RUST_BIN)/cargo

$(RUST_BIN)/cargo:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
6 changes: 6 additions & 0 deletions buf.gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,9 @@ plugins:
out: apis/swagger
opt:
- json_names_for_fields=true
- plugin: buf.build/community/neoeinstein-prost
out: rust/libs/proto/src
- plugin: buf.build/community/neoeinstein-tonic
out: rust/libs/proto/src
opt:
- no_include
2 changes: 2 additions & 0 deletions hack/license/gen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,8 @@ func readAndRewrite(path string) error {
tmpl = googleProtoApache
}
d.Escape = slushEscape
case ".rs":
d.Escape = slushEscape
default:
if fi.Name() == "Dockerfile" {
tmpl = docker
Expand Down
Loading
Loading