Skip to content
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
17 changes: 17 additions & 0 deletions cryptoki-sys/Containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Simple ubuntu container that can be used to regenerate bindings with the provided script
# when one does not use ubuntu
#
# Instructions:
# $ podman build -t rust-cryptoki .
# $ podman run -v $PWD:/src:z rust-cryptoki
#
FROM ubuntu:latest
RUN export DEBIAN_FRONTEND=noninteractive; \
export DEBCONF_NONINTERACTIVE_SEEN=true; \
echo 'tzdata tzdata/Areas select Etc' | debconf-set-selections; \
echo 'tzdata tzdata/Zones/Etc select UTC' | debconf-set-selections; \
apt-get update -q && apt-get install -y rustup clang && rustup default stable

WORKDIR /src
ENV CARGO_TARGET_DIR /src/target
CMD [ "/bin/bash", "regenerate_bindings.sh" ]
18 changes: 18 additions & 0 deletions cryptoki-sys/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,22 @@ available, feel free to raise a Pull Request to add it or to use build-time
generation of bindings. All the committed bindings **MUST** be generated from
the library version found under the `vendor` submodule.

## Generate bindings in container

To simplify generating bindings, we provide a simple container that ca be
executed regardless of the operating system in use from the `cryptoki-sys`
directory.

To generate the bindings in container, just build the container from the
`Containerfile` in this directory:
```
$ podman build -t rust-cryptoki .
```
And then run it with the current working directory mounted in the container:
```
$ podman run -v $PWD:/src:z rust-cryptoki
```
It will download all the rust dependencies and regenerate all the binding
tiplets.

*Copyright 2021 Contributors to the Parsec project.*
Loading