-
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* first jab at Rust bindings * stash C library and header generation * Create a single big library with multiple headers * remove ctt_pure, people will not call crypto proc twice with unchanged parameter and extra noise when reading header * fix MacOS and Windows builds * fix cross-lang ThinLTO, require LLD * Remove NimMain need, cleanup CPU features and detect them on library load
- Loading branch information
Showing
57 changed files
with
5,950 additions
and
2,283 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,3 @@ | ||
[build] | ||
# https://doc.rust-lang.org/rustc/linker-plugin-lto.html | ||
rustflags="-Clinker-plugin-lto -Clinker=clang -Clink-arg=-fuse-ld=lld" |
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,17 +1,47 @@ | ||
nimcache/ | ||
|
||
# Executables shall be put in an ignored build/ directory | ||
# Ignore dynamic, static libs and libtool archive files | ||
build/ | ||
*.so | ||
*.so.* | ||
*.dylib | ||
*.a | ||
*.la | ||
*.exe | ||
*.dll | ||
*.exe | ||
*.out | ||
|
||
# Nim | ||
# ----------------------------------------------------------------------------------------- | ||
nimcache/ | ||
|
||
# Rust | ||
# ----------------------------------------------------------------------------------------- | ||
|
||
# Generated by Cargo | ||
# will have compiled files and executables | ||
debug/ | ||
target/ | ||
|
||
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries | ||
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html | ||
Cargo.lock | ||
|
||
# These are backup files generated by rustfmt | ||
**/*.rs.bk | ||
|
||
# MSVC Windows builds of rustc generate these, which store debugging information | ||
*.pdb | ||
|
||
# Sage | ||
# ----------------------------------------------------------------------------------------- | ||
*.sage.py | ||
|
||
# Tests | ||
test_*.txt | ||
# Swap or debug | ||
# ----------------------------------------------------------------------------------------- | ||
*.swp | ||
*~ | ||
|
||
# Perf artifacts | ||
# ----------------------------------------------------------------------------------------- | ||
perf.data | ||
perf.data.old |
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 @@ | ||
[workspace] | ||
resolver = "2" | ||
members = [ | ||
"constantine-rust/constantine-sys", | ||
"constantine-rust/ctt-curve-bls12-381", | ||
"constantine-rust/ctt-curve-bn254-snarks", | ||
"constantine-rust/ctt-curve-pasta", | ||
"constantine-rust/ctt-proto-ethereum-bls-signatures", | ||
] | ||
|
||
# The Nim static library is compiled with ThinLTO, always enable it | ||
|
||
[profile.dev] | ||
lto = "thin" | ||
|
||
[profile.test] | ||
lto = "thin" | ||
|
||
[profile.release] | ||
lto = "thin" | ||
|
||
[profile.bench] | ||
lto = "thin" |
File renamed without changes.
File renamed without changes.
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,21 @@ | ||
# Constantine | ||
# Copyright (c) 2018-2019 Status Research & Development GmbH | ||
# Copyright (c) 2020-Present Mamy André-Ratsimbazafy | ||
# Licensed and distributed under either of | ||
# * MIT license (license terms in the root directory or at http://opensource.org/licenses/MIT). | ||
# * Apache v2 license (license terms in the root directory or at http://www.apache.org/licenses/LICENSE-2.0). | ||
# at your option. This file may not be copied, modified, or distributed except according to those terms. | ||
|
||
# ############################################################ | ||
# | ||
# Constantine library | ||
# | ||
# ############################################################ | ||
|
||
{.push warning[UnusedImport]: off.} | ||
|
||
import | ||
./lib_hashes, | ||
./lib_curves, | ||
# Protocols | ||
../constantine/ethereum_bls_signatures |
Oops, something went wrong.