Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: implement reconstruct for leopard ffe8 #5

Merged
merged 5 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
20 changes: 20 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ jobs:
steps:
- uses: actions/checkout@v1

- name: Install Go
uses: actions/setup-go@v4
with:
go-version: '1.22.x'

- name: Install wasm Rust
uses: actions-rs/toolchain@v1
with:
Expand All @@ -31,6 +36,11 @@ jobs:
steps:
- uses: actions/checkout@v1

- name: Install Go
uses: actions/setup-go@v4
with:
go-version: '1.22.x'

- name: Run rustdoc check
env:
RUSTDOCFLAGS: -D warnings
Expand All @@ -50,6 +60,11 @@ jobs:
steps:
- uses: actions/checkout@v1

- name: Install Go
uses: actions/setup-go@v4
with:
go-version: '1.22.x'

- name: Set up cargo cache
uses: actions/cache@v3
with:
Expand All @@ -75,6 +90,11 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v3

- name: Install Go
uses: actions/setup-go@v4
with:
go-version: '1.22.x'

- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly

Expand Down
5 changes: 1 addition & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,5 @@ test-strategy = "0.3"
[workspace]
members = ["go-leopard"]

[profile.test.package.proptest]
opt-level = 3

[profile.test.package.rand_chacha]
[profile.test]
opt-level = 3
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ The 8-bit implementation should be used with up to 256 total shards and 16-bit w
shards are needed.

- [x] Encoding parity shards using 8-bit leopard algorithm
- [ ] Reconstructing shards using 8-bit leopard algorithm
- [x] Reconstructing shards using 8-bit leopard algorithm
- [ ] Encoding parity shards using 16-bit leopard algorithm
- [ ] Reconstructing shards using 16-bit leopard algorithm
2 changes: 1 addition & 1 deletion go-leopard/go/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/eigerco/leopard-codec

go 1.23
go 1.22.0

require (
github.com/klauspost/cpuid/v2 v2.2.6 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go-leopard/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Rust wrapper over Go's reedsolomon module

use std::ffi::c_uchar;
use std::{ffi::c_uchar, ops::DerefMut};

use thiserror::Error;

Expand All @@ -26,7 +26,7 @@ pub enum Error {

/// Encode the shards using the Go's reedsolomon module
pub fn encode(
shards: &mut [&mut [u8]],
shards: &mut [impl DerefMut<Target = [u8]>],
data_shards: usize,
shard_size: usize,
) -> Result<(), Error> {
Expand Down
Loading
Loading