Skip to content

Commit 1915b03

Browse files
authored
Merge pull request #2 from phil-opp/fork
Fork crate as `shared_memory_extended`
2 parents d12ef21 + 2e4b5d1 commit 1915b03

9 files changed

Lines changed: 28 additions & 23 deletions

File tree

Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
[package]
2-
name = "shared_memory"
2+
name = "shared_memory_extended"
33
description = "A user friendly crate that allows you to share memory between processes"
4-
version = "0.12.5"
4+
version = "0.13.0"
55
authors = ["ElasT0ny <elast0ny00@gmail.com>"]
66
license = "MIT OR Apache-2.0"
77
edition = "2018"
88

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

4040
[dev-dependencies]
4141
raw_sync = "0.1"
42-
clap = {version = "4", features = ["derive"]}
42+
clap = { version = "4", features = ["derive"] }
4343
env_logger = "0"

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
# shared_memory
2-
[![Build Status](https://github.com/elast0ny/shared_memory-rs/workflows/build/badge.svg)](https://github.com/elast0ny/shared_memory-rs/actions?query=workflow%3Abuild)
1+
# shared_memory_extended
2+
[![Build Status](https://github.com/phil-opp/shared_memory/workflows/build/badge.svg)](https://github.com/phil-opp/shared_memory/actions?query=workflow%3Abuild)
33
[![crates.io](https://img.shields.io/crates/v/shared_memory.svg)](https://crates.io/crates/shared_memory)
44
[![mio](https://docs.rs/shared_memory/badge.svg)](https://docs.rs/shared_memory/)
5-
[![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)
5+
[![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)
66

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

99
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...).
1010

11-
| raw_sync |
12-
|----|
13-
|[![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/)|
11+
| raw_sync |
12+
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
13+
| [![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/) |
1414

1515
## Usage
1616

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

19-
| Examples | Description |
20-
|----------|-------------|
21-
|[event](examples/event.rs)| Shows the use of shared events through shared memory|
22-
|[mutex](examples/mutex.rs)| Shows the use of a shared mutex through shared memory|
19+
| Examples | Description |
20+
| -------------------------- | ----------------------------------------------------- |
21+
| [event](examples/event.rs) | Shows the use of shared events through shared memory |
22+
| [mutex](examples/mutex.rs) | Shows the use of a shared mutex through shared memory |
2323

2424
## License
2525

changelog.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
# 0.13.0
4+
5+
- Create crate as fork of `shared_memory` crate
6+
- Add support for read-only mapping
7+
38
# 0.12.5
49
- Update dependencies
510
- Use minimal features for `nix` on unix systems
@@ -21,4 +26,4 @@
2126
# __0.11.X__
2227
This release breaks backwards compatibility and removes a bunch of previous features which hid many unsafe behaviors (automatically casting shared memory to Rust types).
2328

24-
The release also marks the split between `shared_memory` and its synchronization primitives into a seperate crate `raw_sync`.
29+
The release also marks the split between `shared_memory` and its synchronization primitives into a seperate crate `raw_sync`.

examples/basic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use std::thread;
22

33
use clap::Parser;
4-
use shared_memory::*;
4+
use shared_memory_extended::*;
55

66
/// Spawns N threads that increment a value to 100
77
#[derive(Parser)]

examples/event.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use raw_sync::{events::*, Timeout};
2-
use shared_memory::*;
2+
use shared_memory_extended::*;
33

44
fn main() -> Result<(), Box<dyn std::error::Error>> {
55
env_logger::init();

examples/mutex.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use std::thread;
33

44
use clap::Parser;
55
use raw_sync::locks::*;
6-
use shared_memory::*;
6+
use shared_memory_extended::*;
77

88
/// Spawns N threads that increment a value to 10 using a mutex
99
#[derive(Parser)]

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! A thin wrapper around shared memory system calls
22
//!
3-
//! For help on how to get started, take a look at the [examples](https://github.com/elast0ny/shared_memory-rs/tree/master/examples) !
3+
//! For help on how to get started, take a look at the [examples](https://github.com/phil-opp/shared_memory/tree/master/examples) !
44
55
use std::fs::{File, OpenOptions};
66
use std::io::{ErrorKind, Read, Write};

tests/general.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::path::Path;
22

3-
use shared_memory::ShmemConf;
3+
use shared_memory_extended::ShmemConf;
44

55
#[test]
66
fn create_new() {

tests/posix_semantics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use shared_memory::ShmemConf;
1+
use shared_memory_extended::ShmemConf;
22
use std::sync::mpsc::channel;
33
use std::thread;
44

0 commit comments

Comments
 (0)