Skip to content

Commit

Permalink
Initial working Rust AEAD backend
Browse files Browse the repository at this point in the history
(working, but not particularly good; for some issues see [492])

[492]: mozilla/cbindgen#492
  • Loading branch information
chrysn committed Sep 4, 2022
1 parent 2cb2153 commit 9ef1bed
Show file tree
Hide file tree
Showing 9 changed files with 908 additions and 0 deletions.
158 changes: 158 additions & 0 deletions rust/liboscore-cryptobackend-aead-standalone/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions rust/liboscore-cryptobackend-aead-standalone/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[package]
name = "liboscore-cryptobackend-aead-standalone"
version = "0.1.0"
authors = ["chrysn <chrysn@fsfe.org>"]
edition = "2018"

[lib]
crate-type = ["staticlib"]

[dependencies]
liboscore-cryptobackend-aead = { path = "../liboscore-cryptobackend-aead", features = ["chacha20poly1305", "aes-ccm", "aes-gcm"] }
15 changes: 15 additions & 0 deletions rust/liboscore-cryptobackend-aead-standalone/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#![no_std]
#![feature(core_intrinsics)]
#![feature(lang_items)]

use core::panic::PanicInfo;

pub use liboscore_cryptobackend_aead::*;

#[panic_handler]
fn panic(_info: &PanicInfo) -> ! {
unsafe { core::intrinsics::abort() }
}

#[lang = "eh_personality"]
extern fn eh_personality() {}
Loading

0 comments on commit 9ef1bed

Please sign in to comment.