Skip to content
This repository was archived by the owner on Apr 24, 2025. It is now read-only.

Commit 8fccc70

Browse files
Merge pull request #18 from franziskuskiefer/0.0.6
0.0.6
2 parents 79fffa7 + 6c731aa commit 8fccc70

File tree

8 files changed

+55
-14
lines changed

8 files changed

+55
-14
lines changed

.github/workflows/gh-pages.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Deploy Docs
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
rustdoc:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: hecrj/setup-rust-action@master
13+
- uses: actions/checkout@v2
14+
with:
15+
submodules: true
16+
- name: Build docs
17+
run: |
18+
cargo doc --all-features --no-deps
19+
touch target/doc/.nojekyll
20+
cat > target/doc/index.html <<EOF
21+
<!doctype html>
22+
<html><head>
23+
<meta http-equiv="refresh" content="0; URL='evercrypt/index.html'" />
24+
</head></html>
25+
EOF
26+
- name: Deploy to Github Pages
27+
uses: peaceiris/actions-gh-pages@v3
28+
with:
29+
github_token: ${{ secrets.GITHUB_TOKEN }}
30+
publish_dir: target/doc

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ This workspace holds the [evercrypt-sys](evercrypt-sys/) and high-level [evercry
1515

1616
## Crates
1717

18-
| Name | Crates.io | Docs |
19-
| :------------ | :-------------------------------------------------------------------------------------------------------- | :---: |
20-
| evercrypt-sys | [![crates.io](https://img.shields.io/crates/v/evercrypt-sys.svg)](https://crates.io/crates/evercrypt-sys) | |
21-
| evercrypt | [![crates.io](https://img.shields.io/crates/v/evercrypt.svg)](https://crates.io/crates/evercrypt) | |
18+
| Name | Crates.io | Docs |
19+
| :------------ | :-------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------: |
20+
| evercrypt-sys | [![crates.io](https://img.shields.io/crates/v/evercrypt-sys.svg)](https://crates.io/crates/evercrypt-sys) | [![Docs](https://img.shields.io/badge/docs-master-blue.svg)](https://www.franziskuskiefer.de/evercrypt-rust/evercrypt_sys/index.html) |
21+
| evercrypt | [![crates.io](https://img.shields.io/crates/v/evercrypt.svg)](https://crates.io/crates/evercrypt) | [![Docs](https://img.shields.io/badge/docs-master-blue.svg)](https://www.franziskuskiefer.de/evercrypt-rust/evercrypt/index.html) |
2222

2323
## Features
2424
By default the Evercrypt crate includes the `random` feature that allows generating random values (keys, nonces, etc.).

evercrypt-rs/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[package]
22
name = "evercrypt"
3-
version = "0.0.5"
3+
version = "0.0.6"
44
authors = ["Franziskus Kiefer <[email protected]>"]
55
edition = "2018"
66
license = "MPL-2.0"
7-
documentation = "https://docs.rs/evercrypt"
7+
documentation = "https://www.franziskuskiefer.de/evercrypt"
88
description = "Crypto library using formally verified code from HACL/Evercrypt"
99
readme = "README.md"
1010
repository = "https://github.com/franziskuskiefer/evercrypt-rust/"
@@ -22,7 +22,7 @@ random = ["rand", "rand_core"]
2222
serialization = ["serde", "serde_json"]
2323

2424
[dependencies]
25-
evercrypt-sys = { version = "0.0.5" }
25+
evercrypt-sys = { version = "0.0.6" }
2626
aes-gcm = { version = "0.8", optional = true }
2727
rand = { version = "0.7", optional = true }
2828
rand_core = { version = "0.5", optional = true }

evercrypt-rs/src/ecdh.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ use crate::x25519;
4949
pub enum Error {
5050
InvalidPoint,
5151
InvalidScalar,
52-
UnkownAlgorithm,
52+
UnknownAlgorithm,
5353
}
5454

5555
/// ECDH algorithm.

evercrypt-rs/src/signature.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use crate::p256;
88
#[derive(Debug, PartialEq)]
99
pub enum Error {
1010
InvalidPoint,
11-
UnkownAlgorithm,
11+
UnknownAlgorithm,
1212
NonceMissing,
1313
HashAlgorithmMissing,
1414
InvalidSignature,

evercrypt-sys/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
[package]
22
name = "evercrypt-sys"
3-
version = "0.0.5"
3+
version = "0.0.6"
44
authors = ["Franziskus Kiefer <[email protected]>"]
55
edition = "2018"
66
build = "build.rs"
77
categories = ["cryptography", "api-bindings"]
88
links = "evercrypt"
99
license = "MPL-2.0"
10-
documentation = "https://docs.rs/evercrypt-sys"
10+
documentation = "https://www.franziskuskiefer.de/evercrypt"
1111
description = "FFI binding to HACL/Evercrypt"
1212
readme = "README.md"
1313
repository = "https://github.com/franziskuskiefer/evercrypt-rust/"

evercrypt-sys/build.rs

+8
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ use std::{
1111

1212
#[cfg(windows)]
1313
fn build_hacl(lib_dir: &Path, build_config: &BuildConfig) {
14+
println!("Compiling hacl-star in {:?} with {:?}", lib_dir, build_config);
1415
let mut build_status = Command::new("cmd");
1516
build_status
1617
.args(&["/C", lib_dir.join("hacl-build.bat").to_str().unwrap()])
@@ -80,6 +81,7 @@ fn copy_hacl_to_out(out_dir: &Path, hacl_src_dir: &Path) {
8081
if !cp_status.success() {
8182
panic!("Failed to copy hacl-star to out_dir.")
8283
}
84+
println!("Copied hacl-star to {:?}", out_dir);
8385
let cp_status = Command::new("cp")
8486
.arg("hacl-build.bat")
8587
.arg(hacl_src_dir)
@@ -88,8 +90,10 @@ fn copy_hacl_to_out(out_dir: &Path, hacl_src_dir: &Path) {
8890
if !cp_status.success() {
8991
panic!("Failed to copy hacl-build.bat to out_dir.")
9092
}
93+
println!("Copied hacl-build.bat to {:?}", hacl_src_dir);
9194
}
9295

96+
#[derive(Debug)]
9397
struct BuildConfig {
9498
hacl_src_dir: &'static str,
9599
cross: bool,
@@ -299,6 +303,10 @@ fn main() {
299303
let hacl_src_path = hacl_dir.join("dist").join(build_config.hacl_src_dir);
300304
let hacl_src_path_str = hacl_src_path.to_str().unwrap();
301305

306+
println!("build_config: {:?}", build_config);
307+
println!("out_path: {:?}", out_path);
308+
println!("hacl_src_path: {:?}", hacl_src_path);
309+
302310
// Build hacl/evercrypt
303311
// Always rebuild on windows for now. TODO: fix rebuild check on Windows.
304312
if build_config.windows || rebuild(home_dir, &out_path) {

evercrypt-sys/hacl-build.bat

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
echo off
1+
@REM echo off
22
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" -host_arch=amd64 -arch=amd64
3-
@REM call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" -test
4-
cd %~dp0
3+
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" -test
4+
ls
5+
cd /d %~dp0
6+
echo "pwd: " %~dp0
7+
ls
58
cl *.c /I ../kremlin/include /I . /I ../kremlin/kremlib/dist/minimal /c || goto :error
69
for /F %%i in ('dir /b *-x86_64-msvc.asm') do (
710
ml64 /c %%i || goto :error

0 commit comments

Comments
 (0)