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

Update DevContainer and add crates into third-party #878

Merged
merged 11 commits into from
Feb 28, 2025
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
30 changes: 17 additions & 13 deletions .devcontainer/setup.sh
Original file line number Diff line number Diff line change
@@ -1,44 +1,48 @@
## update and install some things we should probably have
apt-get update
apt-get upgrade -y
apt-get install -y \
apt-utils \
curl \
git \
gnupg2 \
jq \
sudo \
zsh \
vim \
build-essential \
openssl \
libssl-dev \
fuse3 \
libfuse3-dev \
pkg-config \
postgresql \
cmake \
clang \
nodejs \
npm \
wget \
file \
libgtk-3-dev \
libayatana-appindicator3-dev \
librsvg2-dev \
ca-certificates \
zstd
zstd \
clang \
clang-18 \
lldb-18 \
lld-18 \
libllvm-18-ocaml-dev \
libllvm18 \
llvm-18 \
llvm-18-dev \
llvm-18-doc \
llvm-18-examples \
llvm-18-runtime \

## Install rustup and common components
curl https://sh.rustup.rs -sSf | sh -s -- -y
rustup install default
rustup component add rustfmt
rustup component add clippy

source $HOME/.cargo/env
cargo install cargo-expand
cargo install cargo-edit

## Install Buck2
## Install Buck2 and Reindeer
wget https://github.com/facebook/buck2/releases/download/2025-02-01/buck2-x86_64-unknown-linux-musl.zst
zstd -d /home/buck2-x86_64-unknown-linux-musl.zst
mv /home/buck2-x86_64-unknown-linux-musl /home/buck2
chmod +x /home/buck2
mv /home/buck2 /usr/local/bin/buck2
cargo install --locked --git https://github.com/facebookincubator/reindeer reindeer
81 changes: 0 additions & 81 deletions .github/workflows/build.yml

This file was deleted.

24 changes: 24 additions & 0 deletions rust/crate/libc/0.2.169/.buckconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[cells]
root = .
prelude = prelude
toolchains = toolchains
none = none

[cell_aliases]
config = prelude
ovr_config = prelude
fbcode = none
fbsource = none
fbcode_macros = none
buck = none

# Uses a copy of the prelude bundled with the buck2 binary. You can alternatively delete this
# section and vendor a copy of the prelude to the `prelude` directory of your project.
[external_cells]
prelude = bundled

[parser]
target_platform_detector_spec = target:root//...->prelude//platforms:default

[build]
execution_platforms = prelude//platforms:default
1 change: 1 addition & 0 deletions rust/crate/libc/0.2.169/.cargo-checksum.json

Large diffs are not rendered by default.

47 changes: 47 additions & 0 deletions rust/crate/libc/0.2.169/BUCK
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
load("@prelude//rust:cargo_package.bzl", "cargo")

genrule(
name = "static_rustc_flags",
srcs = [],
out = "rustc_flags.txt",
cmd = "echo '--cfg=libc_const_extern_fn\n--cfg=freebsd11' > $OUT",
visibility = ["PUBLIC"],
)

cargo.rust_library(
name = "libc",
srcs = glob(["src/**/*.rs"]),
edition = "2021",
rustc_flags = ["@$(location :static_rustc_flags)"],
crate_root = "src/lib.rs",
visibility = ["PUBLIC"],
)

[
cargo.rust_binary(
name = "libc_" + path[8:-3].replace("/", "_"),
srcs = [path],
crate_root = path,
edition = "2021",
deps = [":libc"],
rustc_flags = ["@$(location :static_rustc_flags)"],
visibility = ["PUBLIC"],
)
for path in glob(["src/bin/*.rs"])
]

genrule(
name = "ci_rustc_flags",
srcs = [],
out = "ci_flags.txt",
cmd = "echo '--cfg=libc_const_extern_fn\n--cfg=freebsd11\n--cfg=libc_deny_warnings' > $OUT",
visibility = ["PUBLIC"],
)

genrule(
name = "std_rustc_flags",
srcs = [],
out = "std_flags.txt",
cmd = "echo '--cfg=libc_const_extern_fn\n--cfg=freebsd12\n--cfg=libc_thread_local' > $OUT",
visibility = ["PUBLIC"],
)
Loading
Loading