mirror of
https://github.com/urbit/ares.git
synced 2024-11-22 15:08:54 +03:00
urcrypt
builds
This commit is contained in:
parent
6b7e21ba48
commit
ef382a8090
15
.github/workflows/ares-shared.yml
vendored
15
.github/workflows/ares-shared.yml
vendored
@ -22,6 +22,21 @@ jobs:
|
||||
- name: Format
|
||||
run: cargo fmt --check
|
||||
|
||||
# Install third-party dependencies
|
||||
#
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get install -y \
|
||||
libcrypto++-dev \
|
||||
openssl \
|
||||
cmake \
|
||||
libsecp256k1-dev &&
|
||||
git clone https://github.com/dfoxfranke/libaes_siv.git &&
|
||||
cd libaes_siv &&
|
||||
cmake . &&
|
||||
make &&
|
||||
sudo make install
|
||||
|
||||
# See clippy linter docs: https://github.com/rust-lang/rust-clippy
|
||||
#
|
||||
# First linter is set to fail for all warnings, then ignored warnings are
|
||||
|
@ -3,3 +3,10 @@
|
||||
A redesigned Mars for the Urth/Mars Urbit runtime. Currently WIP.
|
||||
|
||||
Read the [proposal](docs/proposal/proposal-nock-performance.md) and [hypotheses](docs/proposal/hypotheses.md) for an overview. Before branching or opening a PR please review the [contribution guidelines](CONTRIBUTING.md).
|
||||
|
||||
## Installation
|
||||
|
||||
Dependencies:
|
||||
* [`libaes_siv`](https://github.com/dfoxfranke/libaes_siv)
|
||||
* [`openssl`](https://github.com/openssl/openssl)
|
||||
* [`libsecp256k1`](https://github.com/bitcoin-core/secp256k1)
|
||||
|
@ -1,11 +1,10 @@
|
||||
use autotools;
|
||||
|
||||
fn main() {
|
||||
use std::env;
|
||||
let profile = env::var("PROFILE").unwrap();
|
||||
|
||||
println!("cargo:rerun-if-changed=build.rs");
|
||||
println!("cargo:rerun-if-changed=./src/pma");
|
||||
println!("cargo:rerun-if-changed=./src/urcrypt");
|
||||
|
||||
match profile.as_ref() {
|
||||
"debug" => debug(),
|
||||
@ -46,8 +45,9 @@ fn debug() {
|
||||
.compile("pma_malloc");
|
||||
|
||||
let _urcrypt = autotools::Config::new("./src/urcrypt")
|
||||
.reconf("-if")
|
||||
.enable_shared()
|
||||
.disable_static()
|
||||
.disable_shared()
|
||||
.build();
|
||||
}
|
||||
|
||||
|
4
rust/ares/src/urcrypt/.gitignore
vendored
4
rust/ares/src/urcrypt/.gitignore
vendored
@ -1,5 +1,6 @@
|
||||
*.pc
|
||||
config.h
|
||||
config.log
|
||||
config.status
|
||||
libtool
|
||||
|
||||
@ -27,10 +28,12 @@ build-aux/compile
|
||||
/config.cache
|
||||
build-aux/config.guess
|
||||
/config.h.in
|
||||
/config.h.in~
|
||||
build-aux/config.log
|
||||
build-aux/config.status
|
||||
build-aux/config.sub
|
||||
/configure
|
||||
/configure~
|
||||
/configure.scan
|
||||
build-aux/depcomp
|
||||
build-aux/install-sh
|
||||
@ -54,3 +57,4 @@ build-aux/m4/lt~obsolete.m4
|
||||
# can automatically generate from config.status script
|
||||
# (which is called by configure script))
|
||||
Makefile
|
||||
|
||||
|
@ -56,18 +56,21 @@ AC_PROG_CC
|
||||
|
||||
# Checks for pkg-config capable libraries
|
||||
PKG_CHECK_MODULES([LIBSECP256K1], [libsecp256k1])
|
||||
ac_save_CPPFLAGS=$CPPFLAGS
|
||||
CPPFLAGS="$CPPFLAGS $LIBSECP256K1_CFLAGS"
|
||||
AC_CHECK_HEADER([secp256k1_recovery.h], [],
|
||||
[AC_MSG_ERROR([libsecp256k1 must have recovery enabled.])])
|
||||
AC_CHECK_HEADER([secp256k1_schnorrsig.h], [],
|
||||
[AC_MSG_ERROR([libsecp256k1 must have Schnorr signatures enabled.])])
|
||||
CPPFLAGS=$ac_save_CPPFLAGS
|
||||
PKG_CHECK_MODULES([LIBCRYPTO], [libcrypto])
|
||||
|
||||
AS_IF([test "$enable_shared" == "yes"],
|
||||
[# ensure crypto will be shared for shared object (see README.md)
|
||||
save_LDFLAGS=$LDFLAGS
|
||||
save_CLAGS=$CFLAGS
|
||||
LDFLAGS=$LIBCRYPTO_LIBS
|
||||
CFLAGS=$LIBCRYPTO_CFLAGS
|
||||
save_LIBS=$LIBS
|
||||
save_CFLAGS=$CFLAGS
|
||||
LIBS="$LIBCRYPTO_LIBS $LIBS"
|
||||
CFLAGS="$LIBCRYPTO_CFLAGS $CFLAGS"
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <openssl/sha.h>],
|
||||
[[unsigned char sha[32];
|
||||
SHA256("hello", 5, sha);]])],
|
||||
@ -79,7 +82,7 @@ AS_IF([test "$enable_shared" == "yes"],
|
||||
[AC_MSG_RESULT([yes])],
|
||||
[AC_MSG_ERROR([cannot find shared object for libcrypto.])])],
|
||||
[AC_MSG_ERROR([unable to link libcrypto.])])
|
||||
LDFLAGS=$save_LDFLAGS
|
||||
LIBS=$save_LIBS
|
||||
CFLAGS=$save_CFLAGS])
|
||||
|
||||
# Checks for non pkg-config libraries
|
||||
|
Loading…
Reference in New Issue
Block a user