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

Implement in Rust #4

Merged
merged 6 commits into from
Jun 1, 2024
Merged

Implement in Rust #4

merged 6 commits into from
Jun 1, 2024

Conversation

erikreinert
Copy link
Member

@erikreinert erikreinert commented May 28, 2024

Overview

This refactors the original POC into Rust while including the new gRPC standardization.

Tasks

  • refactor existing logic into Rust language
  • implement gRPC standardization and services
  • implement "prepare" stage for upload to build service
  • extract "source" into store from builder service
  • create macOS specific sandbox with sandbox-exec

⚠️ WARNING
This PR is WIP and only accepting logic improvements. Design changes will not be accepted.

@erikreinert erikreinert self-assigned this May 28, 2024
- Added `_start` command to `justfile` for running profiles with `nix`.
- Introduced `start` and `start-build` commands in `justfile`.
- Modified `prepare` function in `package/mod.rs` to set directory and tar file permissions.
- Updated `service/mod.rs` to set permissions for source tar and directory.
- Implemented `set_files_permissions` function in `store/mod.rs` to handle file permissions.
- Ensured file and directory permissions are set to read-only or executable as needed.
… verification

- Added `ahash`, `base64ct`, `byteorder`, `const-oid`, `der`, `fallible-iterator`, `fallible-streaming-iterator`, `hashlink`, `lazy_static`, `libm`, `libsqlite3-sys`, `num-bigint-dig`, `num-integer`, `num-iter`, `num-traits`, `pem-rfc7468`, `pkcs1`, `pkcs8`, `pkg-config`, `rsa`, `rusqlite`, `signature`, `smallvec`, `spin`, `spki`, `subtle`, `vcpkg`, `zerocopy`, `zerocopy-derive`, `zeroize` dependencies.
- Updated `Cargo.toml` to include `rand`, `rsa`, and `rusqlite` dependencies.
- Modified `package.proto` to include `source_signature` in `PrepareRequest`.
- Updated `flake.nix` to include `openssl` and `pkg-config`.
- Enhanced `main.rs` to initialize directories, generate keys, and set up the database.
- Created `database` module for SQLite operations.
- Created `notary` module for RSA key generation and retrieval.
- Updated `package` module to sign source tar and send signature in `PrepareRequest`.
- Enhanced `service` module to verify source signature and store source information in the database.
- Updated `store` module to manage directory paths and key file paths.
@erikreinert erikreinert merged commit d7e12b8 into main Jun 1, 2024
2 checks passed
@erikreinert erikreinert deleted the feature/poc-rust branch June 1, 2024 02:20
@erikreinert erikreinert added this to the 0.1.0 milestone Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant