Skip to content
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
10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[package]
name = "shared_memory"
name = "shared_memory_extended"
description = "A user friendly crate that allows you to share memory between processes"
version = "0.12.5"
version = "0.13.0"
authors = ["ElasT0ny <elast0ny00@gmail.com>"]
license = "MIT OR Apache-2.0"
edition = "2018"

#Extra fields for crates.io
readme = "README.md"
documentation = "https://docs.rs/shared_memory"
repository = "https://github.com/elast0ny/shared_memory-rs"
documentation = "https://docs.rs/shared_memory_extended"
repository = "https://github.com/phil-opp/shared_memory"
keywords = ["shmem", "shared", "memory", "inter-process", "process"]
categories = [
"os::unix-apis",
Expand Down Expand Up @@ -39,5 +39,5 @@ win-sys = "0.3"

[dev-dependencies]
raw_sync = "0.1"
clap = {version = "4", features = ["derive"]}
clap = { version = "4", features = ["derive"] }
env_logger = "0"
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
# shared_memory
[![Build Status](https://github.com/elast0ny/shared_memory-rs/workflows/build/badge.svg)](https://github.com/elast0ny/shared_memory-rs/actions?query=workflow%3Abuild)
# shared_memory_extended
[![Build Status](https://github.com/phil-opp/shared_memory/workflows/build/badge.svg)](https://github.com/phil-opp/shared_memory/actions?query=workflow%3Abuild)
[![crates.io](https://img.shields.io/crates/v/shared_memory.svg)](https://crates.io/crates/shared_memory)
[![mio](https://docs.rs/shared_memory/badge.svg)](https://docs.rs/shared_memory/)
[![Lines of Code](https://tokei.rs/b1/github/elast0ny/shared_memory-rs?category=code)](https://tokei.rs/b1/github/elast0ny/shared_memory-rs?category=code)
[![Lines of Code](https://tokei.rs/b1/github/phil-opp/shared_memory?category=code)](https://tokei.rs/b1/github/phil-opp/shared_memory?category=code)

A crate that allows you to share memory between __processes__.
A crate that allows you to share memory between __processes__. Fork of [elast0ny/shared_memory](https://github.com/elast0ny/shared_memory).

This crate provides lightweight wrappers around shared memory APIs in an OS agnostic way. It is intended to be used with it's sister crate [raw_sync](https://github.com/elast0ny/raw_sync-rs) which provide simple primitves to synchronize access to the shared memory (Mutex, RwLock, Events, etc...).

| raw_sync |
|----|
|[![crates.io](https://img.shields.io/crates/v/raw_sync.svg)](https://crates.io/crates/raw_sync) [![docs.rs](https://docs.rs/raw_sync/badge.svg)](https://docs.rs/raw_sync/)|
| raw_sync |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [![crates.io](https://img.shields.io/crates/v/raw_sync.svg)](https://crates.io/crates/raw_sync) [![docs.rs](https://docs.rs/raw_sync/badge.svg)](https://docs.rs/raw_sync/) |

## Usage

For usage examples, see code located in [examples/](examples/) :

| Examples | Description |
|----------|-------------|
|[event](examples/event.rs)| Shows the use of shared events through shared memory|
|[mutex](examples/mutex.rs)| Shows the use of a shared mutex through shared memory|
| Examples | Description |
| -------------------------- | ----------------------------------------------------- |
| [event](examples/event.rs) | Shows the use of shared events through shared memory |
| [mutex](examples/mutex.rs) | Shows the use of a shared mutex through shared memory |

## License

Expand Down
7 changes: 6 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

# 0.13.0

- Create crate as fork of `shared_memory` crate
- Add support for read-only mapping

# 0.12.5
- Update dependencies
- Use minimal features for `nix` on unix systems
Expand All @@ -21,4 +26,4 @@
# __0.11.X__
This release breaks backwards compatibility and removes a bunch of previous features which hid many unsafe behaviors (automatically casting shared memory to Rust types).

The release also marks the split between `shared_memory` and its synchronization primitives into a seperate crate `raw_sync`.
The release also marks the split between `shared_memory` and its synchronization primitives into a seperate crate `raw_sync`.
2 changes: 1 addition & 1 deletion examples/basic.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::thread;

use clap::Parser;
use shared_memory::*;
use shared_memory_extended::*;

/// Spawns N threads that increment a value to 100
#[derive(Parser)]
Expand Down
2 changes: 1 addition & 1 deletion examples/event.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use raw_sync::{events::*, Timeout};
use shared_memory::*;
use shared_memory_extended::*;

fn main() -> Result<(), Box<dyn std::error::Error>> {
env_logger::init();
Expand Down
2 changes: 1 addition & 1 deletion examples/mutex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::thread;

use clap::Parser;
use raw_sync::locks::*;
use shared_memory::*;
use shared_memory_extended::*;

/// Spawns N threads that increment a value to 10 using a mutex
#[derive(Parser)]
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! A thin wrapper around shared memory system calls
//!
//! For help on how to get started, take a look at the [examples](https://github.com/elast0ny/shared_memory-rs/tree/master/examples) !
//! For help on how to get started, take a look at the [examples](https://github.com/phil-opp/shared_memory/tree/master/examples) !

use std::fs::{File, OpenOptions};
use std::io::{ErrorKind, Read, Write};
Expand Down
2 changes: 1 addition & 1 deletion tests/general.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::path::Path;

use shared_memory::ShmemConf;
use shared_memory_extended::ShmemConf;

#[test]
fn create_new() {
Expand Down
2 changes: 1 addition & 1 deletion tests/posix_semantics.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use shared_memory::ShmemConf;
use shared_memory_extended::ShmemConf;
use std::sync::mpsc::channel;
use std::thread;

Expand Down