Skip to content

Commit

Permalink
Merge pull request #878 from genedna/main
Browse files Browse the repository at this point in the history
Update DevContainer and add crates into third-party
  • Loading branch information
genedna authored Feb 28, 2025
2 parents 035895e + 3782abe commit 2082ae1
Show file tree
Hide file tree
Showing 205 changed files with 126,625 additions and 96 deletions.
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

1 comment on commit 2082ae1

@vercel
Copy link

@vercel vercel bot commented on 2082ae1 Feb 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

mega – ./

mega-gitmono.vercel.app
mega-git-main-gitmono.vercel.app
www.gitmega.dev
gitmega.dev

Please sign in to comment.