Skip to content

Commit

Permalink
Release vere-v3.0 (#619)
Browse files Browse the repository at this point in the history
  • Loading branch information
pkova authored Mar 11, 2024
2 parents b553e93 + 65ae693 commit 954fd0b
Show file tree
Hide file tree
Showing 153 changed files with 7,884 additions and 4,638 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/docker-shared.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ jobs:
- name: Install toolchains
if: steps.build-cache.outputs.cache-hit != 'true'
run: bazel run //bazel/toolchain:x86_64-linux-musl-gcc
run: |
bazel run //bazel/toolchain:x86_64-linux-musl-gcc
- name: Install dependencies
run: sudo apt-get install -y autoconf-archive

- name: Set pace
run: echo "${{ inputs.pace }}" > ./PACE
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,3 @@ jobs:
upload: true
next: ${{ github.ref_name }}
secrets: inherit

docker:
uses: ./.github/workflows/docker-shared.yml
secrets: inherit
9 changes: 6 additions & 3 deletions .github/workflows/shared.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
# runner with BuildJet instead.
- { target: linux-aarch64, runner: buildjet-2vcpu-ubuntu-2204-arm }
- { target: linux-x86_64, runner: ubuntu-22.04 }
# GitHub doesn't provide macOS machines with Apple Silicon, so we
# GitHub doesn't provide macOS machines with Apple Silicon, so we
# self-host a runner with MacStadium instead.
- { target: macos-aarch64, runner: [self-hosted, macos, ARM64] }
- { target: macos-x86_64, runner: macos-12 }
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
/private/var/tmp/_bazel_$(whoami)
# Cache musl libc toolchains.
/usr/local/*-musl
- name: chown /usr/local/*-musl
if: ${{ matrix.target == 'linux-x86_64' || matrix.target == 'linux-aarch64'}}
run: |
Expand Down Expand Up @@ -113,17 +113,20 @@ jobs:
run: |
case "${{ matrix.target }}" in
"linux-aarch64")
sudo apt-get -y install autoconf-archive
bazel run //bazel/toolchain:aarch64-linux-musl-gcc
;;
"linux-x86_64")
sudo apt-get -y install autoconf-archive
bazel run //bazel/toolchain:x86_64-linux-musl-gcc
;;
"macos-aarch64")
brew install pkg-config autoconf-archive
;;
"macos-x86_64")
# Switch Xcode path to match the path specified in our bazel toolchain.
sudo xcode-select --switch /Library/Developer/CommandLineTools
brew install automake libtool llvm@15
brew install automake autoconf-archive libtool llvm@15
;;
*)
echo "Unsupported target: ${{ matrix.target }}"
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# IDEs.
/.vscode
/.idea

# Bazel.
/.user.bazelrc
/bazel-*
Expand Down
4 changes: 2 additions & 2 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ config_setting(
# Version flag for clang.
string_flag(
name = "clang_version",
# macOS uses `clang-14.0.3` by default.
build_setting_default = "14.0.3",
# macOS uses `clang-15.0.0` by default.
build_setting_default = "15.0.0",
visibility = ["//visibility:public"],
)

Expand Down
2 changes: 1 addition & 1 deletion INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ This will take a few minutes.

### macOS

After installing `automake` and `libtool`, you're ready to build Vere.
After installing `automake`, `autoconf-archive`, `pkg-config`, and `libtool`, you're ready to build Vere.

## Build Commands

Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ defined in its own package:

- [`pkg/c3`](pkg/c3): A set of basic utilities for writing Urbit's style of C.
- [`pkg/ent`](pkg/ent): A cross-platform wrapper for `getentropy(2)`.
- [`pkg/urcrypt`](pkg/urcrypt): A standardized interface for calling various
cryptographic functions used in the Urbit runtime.
- [`pkg/ur`](pkg/ur): An implementation of [jam][jam] and [cue][cue], Urbit's
bitwise noun serialization and deserialization algorithms, respectively.
- [`pkg/noun`](pkg/noun): The Nock virtual machine and snapshotting system.
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.12
3.0
74 changes: 35 additions & 39 deletions WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,12 @@ versioned_http_archive(
)

versioned_http_archive(
name = "argon2",
build_file = "//bazel/third_party/argon2:argon2.BUILD",
sha256 = "40850e6e6324be10f14228d17b617ad2074bb926eeddd6fe40ad5df833833949",
strip_prefix = "argon2-{version}",
url = "https://github.com/urbit/argon2/archive/{version}.tar.gz",
version = "a4c1e3f7138c2e577376beb99f964cf71e1c8b1b",
name = "avahi",
build_file = "//bazel/third_party/avahi:avahi.BUILD",
sha256 = "060309d7a333d38d951bc27598c677af1796934dbd98e1024e7ad8de798fedda",
strip_prefix = "avahi-{version}",
url = "https://github.com/lathiat/avahi/releases/download/v{version}/avahi-{version}.tar.gz",
version = "0.8",
)

versioned_http_archive(
Expand Down Expand Up @@ -155,12 +155,22 @@ versioned_http_archive(
)

versioned_http_archive(
name = "ed25519",
build_file = "//bazel/third_party/ed25519:ed25519.BUILD",
sha256 = "373923c85f61276e3cad2c0ae7a5d5cd4809ffe46c5abc1dc8276683a55782a0",
strip_prefix = "ed25519-{version}",
url = "https://github.com/orlp/ed25519/archive/{version}.tar.gz",
version = "7fa6712ef5d581a6981ec2b08ee623314cd1d1c4",
name = "dbus",
build_file = "//bazel/third_party/dbus:dbus.BUILD",
sha256 = "a6bd5bac5cf19f0c3c594bdae2565a095696980a683a0ef37cb6212e093bde35",
strip_prefix = "dbus-{version}",
url = "https://src.fedoraproject.org/repo/pkgs/dbus/dbus-{version}.tar.xz/sha512/f3dfc73da28cbe20449d15bbe4166c3574f0e551dfd15fca7cce2b8c71e778360ed2dd391ee5c414a7a47ff4b958727b26ef4cabfee70564f8d0a34bf5ad2386/dbus-1.14.8.tar.xz",
version = "1.14.8",
)

versioned_http_archive(
name = "expat",
build_file = "//bazel/third_party/expat:expat.BUILD",
strip_prefix = "expat-{version}",
sha256 = "ef2420f0232c087801abf705e89ae65f6257df6b7931d37846a193ef2e8cdcbe",
# TODO: fix the R_2_5_0 nonsense
url = "https://github.com/libexpat/libexpat/releases/download/R_2_5_0/expat-{version}.tar.xz",
version = "2.5.0",
)

versioned_http_archive(
Expand Down Expand Up @@ -195,9 +205,9 @@ versioned_http_archive(

versioned_http_archive(
name = "io_bazel_rules_go",
sha256 = "f2dcd210c7095febe54b804bb1cd3a58fe8435a909db2ec04e31542631cf715c",
sha256 = "d6ab6b57e48c09523e93050f13698f708428cfd5e619252e369d377af6597707",
url = "https://github.com/bazelbuild/rules_go/releases/download/v{version}/rules_go-v{version}.zip",
version = "0.31.0",
version = "0.43.0",
)

versioned_http_file(
Expand All @@ -214,17 +224,6 @@ versioned_http_file(
version = "255fb1ca8206072f1d09425f0db61ecfe7ff5b17",
)

versioned_http_archive(
name = "keccak_tiny",
build_file = "//bazel/third_party/keccak_tiny:keccak_tiny.BUILD",
patch_args = ["-p1"],
patches = ["//bazel/third_party/keccak_tiny:{version}.patch"],
sha256 = "6d4717f96b84805886c74bad89e911076664d992f197634fd7cdfca2ac0f62ef",
strip_prefix = "keccak-tiny-{version}",
url = "https://github.com/coruus/keccak-tiny/archive/{version}.tar.gz",
version = "64b6647514212b76ae7bca0dea9b7b197d1d8186",
)

versioned_http_archive(
name = "lmdb",
build_file = "//bazel/third_party/lmdb:lmdb.BUILD",
Expand Down Expand Up @@ -272,18 +271,6 @@ versioned_http_archive(
version = "67108d883061043e55d0fb13961ac1b6fc8a485c",
)

versioned_http_archive(
name = "scrypt",
build_file = "//bazel/third_party/scrypt:scrypt.BUILD",
sha256 = "df681fb19b653b1a12970ebb6091bb2b58411b9e7baf01143870f6be3f099541",
strip_prefix = "libscrypt-{version}",
url = "https://github.com/technion/libscrypt/archive/{version}.tar.gz",
# When bumping the version, compare `Makefile` in the `scrypt` repo to
# {build_file} and confirm that {build_file} remains an accurate description
# of the scrypt build process.
version = "60e585cdd752262b22ed4113eca41c0461a61608",
)

versioned_http_archive(
name = "secp256k1",
build_file = "//bazel/third_party/secp256k1:secp256k1.BUILD",
Expand Down Expand Up @@ -337,6 +324,15 @@ versioned_http_file(
version = "ea8fee3aa0434d4bdf1bf785e5ec346c7ecba7fd",
)

versioned_http_archive(
name = "urcrypt",
build_file = "//bazel/third_party/urcrypt:urcrypt.BUILD",
sha256 = "afc1182e10eeebaeb2a111c2bd889747792d255e26aba7fdcd6751d0d3c2bb35",
strip_prefix = "urcrypt-{version}",
url = "https://github.com/urbit/urcrypt/archive/{version}.tar.gz",
version = "43479c3262a11e20da5f6218f3b0b3d63931ceea",
)

versioned_http_archive(
name = "uv",
build_file = "//bazel/third_party/uv:uv.BUILD",
Expand All @@ -358,10 +354,10 @@ versioned_http_archive(
versioned_http_archive(
name = "zlib",
build_file = "//bazel/third_party/zlib:zlib.BUILD",
sha256 = "ff0ba4c292013dbc27530b3a81e1f9a813cd39de01ca5e0f8bf355702efa593e",
sha256 = "9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23",
strip_prefix = "zlib-{version}",
url = "https://www.zlib.net/zlib-{version}.tar.gz",
version = "1.3",
version = "1.3.1",
)

#
Expand Down
3 changes: 1 addition & 2 deletions bazel/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@ refresh_compile_commands(
"//pkg/ent",
"//pkg/noun",
"//pkg/ur",
"//pkg/urcrypt",
"//pkg/vere:urbit",
],
# No need to add flags already in .bazelrc. They're automatically picked up.
# If you don't need flags, a list of targets is also okay, as is a single target string.
# Wildcard patterns, like //... for everything, *are* allowed here, just like a build.
# As are additional targets (+) and subtractions (-), like in bazel query https://docs.bazel.build/versions/main/query.html#expressions
# And if you're working on a header-only library, specify a test or binary target that compiles it.
)
)
Empty file.
30 changes: 30 additions & 0 deletions bazel/third_party/avahi/avahi.BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
load("@rules_foreign_cc//foreign_cc:defs.bzl", "configure_make")

filegroup(
name = "all",
srcs = glob(["**"]),
)

cc_library(
name = "dns-sd",
hdrs = ["dns_sd.h"],
visibility = ["//visibility:public"],
)

configure_make(
name = "avahi",
args = select({
"@platforms//os:macos": ["--jobs=`sysctl -n hw.logicalcpu`"],
"//conditions:default": ["--jobs=`nproc`"],
}),
configure_options = ["--with-dbus-system-address='unix:path=/var/run/dbus/system_bus_socket' --with-xml=none --disable-libevent --disable-glib --disable-gobject --disable-gdbm --disable-qt3 --disable-qt4 --disable-qt5 --disable-gtk --disable-gtk3 --disable-mono --disable-monodoc --disable-python --disable-libdaemon --enable-compat-libdns_sd --disable-rpath"],
lib_source = ":all",
# out_include_dir = "avahi-compat-libdns_sd",
deps = ["@dbus"],
configure_in_place = True,
autogen = True,
autoconf = True,
autogen_command = "bootstrap.sh",
out_static_libs = ["libdns_sd.a", "libavahi-client.a", "libavahi-common.a"],
visibility = ["//visibility:public"],
)
Empty file.
21 changes: 21 additions & 0 deletions bazel/third_party/dbus/dbus.BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
load("@rules_foreign_cc//foreign_cc:defs.bzl", "configure_make")

filegroup(
name = "all",
srcs = glob(["**"]),
)

configure_make(
name = "dbus",
lib_name = "libdbus-1",
args = select({
"@platforms//os:macos": ["--jobs=`sysctl -n hw.logicalcpu`"],
"//conditions:default": ["--jobs=`nproc`"],
}),
copts = ["-O3"],
configure_options = ["--disable-selinux --without-x --disable-tests"],
lib_source = ":all",
configure_in_place = True,
deps = ["@expat"],
visibility = ["//visibility:public"],
)
Empty file.
18 changes: 18 additions & 0 deletions bazel/third_party/expat/expat.BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
load("@rules_foreign_cc//foreign_cc:defs.bzl", "configure_make")

filegroup(
name = "all",
srcs = glob(["**"]),
)

configure_make(
name = "expat",
args = select({
"@platforms//os:macos": ["--jobs=`sysctl -n hw.logicalcpu`"],
"//conditions:default": ["--jobs=`nproc`"],
}),
copts = ["-O3"],
lib_source = ":all",
out_static_libs = ["libexpat.a"],
visibility = ["//visibility:public"],
)
Empty file.
28 changes: 28 additions & 0 deletions bazel/third_party/urcrypt/urcrypt.BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
load("@rules_foreign_cc//foreign_cc:defs.bzl", "configure_make")

filegroup(
name = "all",
srcs = glob(["**"]),
)

configure_make(
name = "urcrypt",
autogen = True,
configure_in_place = True,
configure_options = [
"--disable-shared",
],
copts = [
"-Wall",
"-g",
"-O3",
],
deps = [
"@aes_siv",
"@openssl",
"@secp256k1"
],
lib_source = ":all",
out_static_libs = ["liburcrypt.a"],
visibility = ["//visibility:public"],
)
2 changes: 2 additions & 0 deletions pkg/c3/defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@
mkdir(a, b);})
# define c3_rmdir(a) ({ \
rmdir(a);})
# define c3_link(a, b) ({ \
link(a, b);})
# define c3_unlink(a) ({ \
unlink(a);})
# define c3_fopen(a, b) ({ \
Expand Down
3 changes: 3 additions & 0 deletions pkg/c3/motes.h
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@
# define c3__deep c3_s4('d','e','e','p')
# define c3__defn c3_s4('d','e','f','n')
# define c3__del c3_s3('d','e','l')
# define c3__dear c3_s4('d','e','a','r')
# define c3__delc c3_s4('d','e','l','c')
# define c3__delt c3_s4('d','e','l','t')
# define c3__dept c3_s4('d','e','p','t')
Expand Down Expand Up @@ -998,6 +999,7 @@
# define c3__sard c3_s4('s','a','r','d')
# define c3__sav c3_s3('s','a','v')
# define c3__save c3_s4('s','a','v','e')
# define c3__saxo c3_s4('s','a','x','o')
# define c3__scam c3_s4('s','c','a','m')
# define c3__scan c3_s4('s','c','a','n')
# define c3__scry c3_s4('s','c','r','y')
Expand Down Expand Up @@ -1111,6 +1113,7 @@
# define c3__ston c3_s4('s','t','o','n')
# define c3__stop c3_s4('s','t','o','p')
# define c3__stub c3_s4('s','t','u','b')
# define c3__stun c3_s4('s','t','u','n')
# define c3__stur c3_s4('s','t','u','r')
# define c3__sub c3_s3('s','u','b')
# define c3__sunt c3_s4('s','u','n','t')
Expand Down
Loading

0 comments on commit 954fd0b

Please sign in to comment.