-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into pr/sivadeilra/190
- Loading branch information
Showing
224 changed files
with
49,768 additions
and
27,507 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# This Dockerfile should be run from this directory | ||
# `docker build . -t franziskus/libcrux-c` | ||
|
||
FROM ubuntu:24.04 | ||
LABEL maintainer="Franziskus Kiefer <[email protected]>" | ||
|
||
ENV SHELL /bin/bash | ||
ENV USER user | ||
ENV LOGNAME $USER | ||
ENV HOME /home/$USER | ||
ENV LANG en_US.UTF-8 | ||
ENV LC_ALL $LANG | ||
ENV PATH="$HOME/.cargo/bin:${PATH}" | ||
|
||
# Install dependencies. | ||
ADD setup.sh /tmp/setup.sh | ||
RUN bash /tmp/setup.sh | ||
|
||
WORKDIR $HOME | ||
USER $USER | ||
COPY --chown=$USER:$USER . $HOME/$USER | ||
|
||
# Setup & install. | ||
ADD install.sh /tmp/install.sh | ||
RUN bash /tmp/install.sh | ||
|
||
ENV FSTAR_HOME $HOME/fstar | ||
ENV HACL_HOME $HOME/hacl-star | ||
ENV KRML_HOME $HOME/karamel | ||
ENV EURYDICE_HOME $HOME/eurydice | ||
ENV CHARON_HOME $HOME/charon | ||
ENV PATH "${PATH}:$HOME/fstar/bin:$HOME/z3/bin" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -v -e -x | ||
|
||
curl https://sh.rustup.rs -sSf | bash -s -- -y | ||
|
||
# Prepare the sources | ||
opam init --bare --disable-sandboxing --shell-setup --yes | ||
opam switch create 4.14.1 | ||
|
||
# Get F*, HACL*, Charon, Karamel, Eurydice for running proofs and extraction | ||
curl -L https://github.com/FStarLang/FStar/releases/download/v2024.01.13/fstar_2024.01.13_Linux_x86_64.tar.gz \ | ||
--output Fstar.tar.gz | ||
tar --extract --file Fstar.tar.gz | ||
rm -f Fstar.tar.gz | ||
|
||
curl -L https://github.com/FStarLang/binaries/raw/master/z3-tested/z3-4.8.5-x64-ubuntu-16.04.zip --output z3.zip | ||
unzip z3.zip | ||
rm -rf z3.zip | ||
mv z3-4.8.5-x64-ubuntu-16.04/ z3 | ||
|
||
curl -L https://github.com/hacl-star/hacl-star/archive/443aed2deccfbee84f928fadc1f594f729c3aad4.zip \ | ||
--output hacl-star.zip | ||
unzip hacl-star.zip | ||
rm -rf hacl-star.zip | ||
mv hacl-star-443aed2deccfbee84f928fadc1f594f729c3aad4/ hacl-star | ||
|
||
curl -L https://github.com/AeneasVerif/charon/archive/89cecf5d1074fae7e8007be7f6cdf2f38e9782b1.zip \ | ||
--output charon.zip | ||
unzip charon.zip | ||
rm -rf charon.zip | ||
mv charon-89cecf5d1074fae7e8007be7f6cdf2f38e9782b1/ charon | ||
|
||
curl -L https://github.com/FStarLang/karamel/archive/08bfa78ae1df5639446e6c5897b07c9823fbf3b0.zip \ | ||
--output karamel.zip | ||
unzip karamel.zip | ||
rm -rf karamel.zip | ||
mv karamel-08bfa78ae1df5639446e6c5897b07c9823fbf3b0/ karamel | ||
|
||
curl -L https://github.com/AeneasVerif/eurydice/archive/7780d2b4c44c7811d02d7e05789b5611fd497480.zip \ | ||
--output eurydice.zip | ||
unzip eurydice.zip | ||
rm -rf eurydice.zip | ||
mv eurydice-7780d2b4c44c7811d02d7e05789b5611fd497480/ eurydice | ||
|
||
echo "export FSTAR_HOME=$HOME/fstar" >>$HOME/.profile | ||
echo "export HACL_HOME=$HOME/hacl-star" >>$HOME/.profile | ||
echo "export KRML_HOME=$HOME/karamel" >>$HOME/.profile | ||
echo "export EURYDICE_HOME=$HOME/eurydice" >>$HOME/.profile | ||
echo "export CHARON_HOME=$HOME/charon" >>$HOME/.profile | ||
echo "export HAX_HOME=$HOME/hax" >>$HOME/.profile | ||
echo "export PATH=\"${PATH}:$HOME/fstar/bin:$HOME/z3/bin\"" >>$HOME/.profile | ||
echo "[[ ! -r /home/$USER/.opam/opam-init/init.sh ]] || source /home/$USER/.opam/opam-init/init.sh > /dev/null 2> /dev/null" >>$HOME/.profile | ||
|
||
source $HOME/.profile | ||
opam install --yes ocamlfind visitors menhir ppx_deriving_yojson sedlex wasm fix process pprint zarith yaml easy_logging terminal | ||
eval $(opam env) | ||
|
||
# Build everything | ||
cd karamel | ||
make -j | ||
cd - | ||
|
||
cd charon | ||
make -j | ||
cd - | ||
|
||
cd eurydice/lib | ||
rm -f charon | ||
ln -s $CHARON_HOME/charon-ml charon | ||
rm -f krml | ||
ln -s $KRML_HOME/lib krml | ||
cd ../ | ||
make -j | ||
cd ../ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -v -e -x | ||
|
||
export DEBIAN_FRONTEND=noninteractive | ||
|
||
apt-get -y update | ||
apt-get install -y \ | ||
nodejs \ | ||
build-essential \ | ||
opam \ | ||
jq \ | ||
libgmp-dev \ | ||
locales \ | ||
curl | ||
curl -fsSL https://deb.nodesource.com/setup_21.x | bash - | ||
apt-get update | ||
apt-get install -y nodejs | ||
|
||
locale-gen $LANG | ||
DEBIAN_FRONTEND=noninteractive dpkg-reconfigure locales | ||
useradd -d $HOME -s $SHELL -m $USER | ||
echo "$USER:$USER" | chpasswd && adduser $USER sudo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
github.com/cloudflare/circl v1.3.3 h1:fE/Qz0QdIGqeWfnwq0RE0R7MI51s0M2E4Ga9kq5AEMs= | ||
github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= | ||
golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a h1:diz9pEYuTIuLMJLs3rGDkeaTsNyRs6duYdFyPAxzE/U= | ||
golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= | ||
golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ= | ||
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | ||
github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= | ||
github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= | ||
golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= | ||
golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= | ||
golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= | ||
golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.