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

Add no_std once primitive for stdlib deserialization #1463

Merged
merged 23 commits into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

- [BREAKING] Wrapped `MastForest`s in `Program` and `Library` structs in `Arc` (#1465).
- `MastForestBuilder`: use `MastNodeId` instead of MAST root to uniquely identify procedures (#1473)
- Added `miden_core::utils::sync::racy_lock` module (#1463).
- Updated `miden_core::utils` to re-export `std::sync::LazyLock` and `racy_lock::RacyLock as LazyLock` for std and no_std environments, respectively (#1463).

#### Fixes

Expand Down
4 changes: 4 additions & 0 deletions core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ This crate contains core components used by Miden VM. These components include:

## License
This project is [MIT licensed](../LICENSE).

## Acknowledgements

The `racy_lock` module found under `core/src/utils/sync` is based on the [once_cell](https://crates.io/crates/once_cell) crate's implementation of `race::OnceBox`.
313 changes: 0 additions & 313 deletions core/src/utils/sync.rs

This file was deleted.

12 changes: 12 additions & 0 deletions core/src/utils/sync/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
pub mod racy_lock;
pub mod rw_lock;

#[cfg(feature = "std")]
pub use std::sync::LazyLock;

#[cfg(feature = "std")]
pub use parking_lot::{RwLock, RwLockReadGuard, RwLockWriteGuard};
#[cfg(not(feature = "std"))]
pub use racy_lock::RacyLock as LazyLock;
#[cfg(not(feature = "std"))]
pub use rw_lock::{RwLock, RwLockReadGuard, RwLockWriteGuard};
Loading
Loading