Skip to content

Commit

Permalink
Move crates into a subfolder (#287)
Browse files Browse the repository at this point in the history
It is becoming increasingly clear to me that the number of crates in this repo will basically just continue to grow, so let's move crates into a subfolder to make things easier to navigate.
  • Loading branch information
madsmtm authored Nov 10, 2022
1 parent 26ec63e commit b8f03db
Show file tree
Hide file tree
Showing 295 changed files with 110 additions and 118 deletions.
12 changes: 2 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
[workspace]
members = [
"objc2",
"objc-sys",
"objc2-encode",
"objc2-proc-macros",
"block2",
"block-sys",
"tests",
"test-assembly",
"test-assembly/crates/*",
"test-ui",
"crates/*",
"crates/test-assembly/crates/*",
]
resolver = "2"

Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# [![Rust + \[Obj-C\]](assets/logo-small.png)](https://github.com/madsmtm/objc2) <br> Objective-C in Rust

[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt)
[![License](https://badgen.net/badge/license/MIT/blue)](./LICENSE.txt)
[![CI](https://github.com/madsmtm/objc2/actions/workflows/ci.yml/badge.svg)](https://github.com/madsmtm/objc2/actions/workflows/ci.yml)

# DISCLAIMER! These crates are work in progress, and should not be used in production environments. Use the battle-tested `objc` family instead!
Expand All @@ -25,11 +25,11 @@ separate crate to help people cutting down on unneeded dependencies.
[`objc-sys`] and [`block-sys`] contain raw bindings to the underlying C
runtime libraries.

[`objc2`]: ./objc2
[`block2`]: ./block2
[`objc2-encode`]: ./objc2-encode
[`objc-sys`]: ./objc-sys
[`block-sys`]: ./block-sys
[`objc2`]: ./crates/objc2
[`block2`]: ./crates/block2
[`objc2-encode`]: ./crates/objc2-encode
[`objc-sys`]: ./crates/objc-sys
[`block-sys`]: ./crates/block-sys


## Migrating from original crates
Expand All @@ -49,7 +49,7 @@ objc = { package = "objc2", version = "0.2.7" }

Afterwards, you can upgrade to the next release, in this case
`v0.3.0-alpha.0`, and make the required changes to your code (the
[changelog](objc/CHANGELOG.m) contains recommendations for this). And so on,
[changelog](crates/objc2/CHANGELOG.md) contains recommendations for this). And so on,
with every following release.


Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion block-sys/README.md → crates/block-sys/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# `block-sys`

[![Latest version](https://badgen.net/crates/v/block-sys)](https://crates.io/crates/block-sys)
[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt)
[![License](https://badgen.net/badge/license/MIT/blue)](https://github.com/madsmtm/objc2/blob/master/LICENSE.txt)
[![Documentation](https://docs.rs/block-sys/badge.svg)](https://docs.rs/block-sys/)
[![CI](https://github.com/madsmtm/objc2/actions/workflows/ci.yml/badge.svg)](https://github.com/madsmtm/objc2/actions/workflows/ci.yml)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion block2/README.md → crates/block2/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# `block2`

[![Latest version](https://badgen.net/crates/v/block2)](https://crates.io/crates/block2)
[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt)
[![License](https://badgen.net/badge/license/MIT/blue)](https://github.com/madsmtm/objc2/blob/master/LICENSE.txt)
[![Documentation](https://docs.rs/block2/badge.svg)](https://docs.rs/block2/)
[![CI](https://github.com/madsmtm/objc2/actions/workflows/ci.yml/badge.svg)](https://github.com/madsmtm/objc2/actions/workflows/ci.yml)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion objc-sys/README.md → crates/objc-sys/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# `objc-sys`

[![Latest version](https://badgen.net/crates/v/objc-sys)](https://crates.io/crates/objc-sys)
[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt)
[![License](https://badgen.net/badge/license/MIT/blue)](https://github.com/madsmtm/objc2/blob/master/LICENSE.txt)
[![Documentation](https://docs.rs/objc-sys/badge.svg)](https://docs.rs/objc-sys/)
[![CI](https://github.com/madsmtm/objc2/actions/workflows/ci.yml/badge.svg)](https://github.com/madsmtm/objc2/actions/workflows/ci.yml)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion objc2-encode/README.md → crates/objc2-encode/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# `objc2-encode`

[![Latest version](https://badgen.net/crates/v/objc2-encode)](https://crates.io/crates/objc2-encode)
[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt)
[![License](https://badgen.net/badge/license/MIT/blue)](https://github.com/madsmtm/objc2/blob/master/LICENSE.txt)
[![Documentation](https://docs.rs/objc2-encode/badge.svg)](https://docs.rs/objc2-encode/)
[![CI](https://github.com/madsmtm/objc2/actions/workflows/ci.yml/badge.svg)](https://github.com/madsmtm/objc2/actions/workflows/ci.yml)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion objc2-encode/src/lib.rs → crates/objc2-encode/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
//!
//! See the [`examples`] folder for more complex usage.
//!
//! [`examples`]: https://github.com/madsmtm/objc2/tree/master/objc2-encode/examples
//! [`examples`]: https://github.com/madsmtm/objc2/tree/master/crates/objc2-encode/examples
//!
//!
//! ## Caveats
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# `objc2-proc-macros`

[![Latest version](https://badgen.net/crates/v/objc2-proc-macros)](https://crates.io/crates/objc2-proc-macros)
[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt)
[![License](https://badgen.net/badge/license/MIT/blue)](https://github.com/madsmtm/objc2/blob/master/LICENSE.txt)
[![Documentation](https://docs.rs/objc2-proc-macros/badge.svg)](https://docs.rs/objc2-proc-macros/)
[![CI](https://github.com/madsmtm/objc2/actions/workflows/ci.yml/badge.svg)](https://github.com/madsmtm/objc2/actions/workflows/ci.yml)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions objc2/README.md → crates/objc2/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# `objc2`

[![Latest version](https://badgen.net/crates/v/objc2)](https://crates.io/crates/objc2)
[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt)
[![License](https://badgen.net/badge/license/MIT/blue)](https://github.com/madsmtm/objc2/blob/master/LICENSE.txt)
[![Documentation](https://docs.rs/objc2/badge.svg)](https://docs.rs/objc2/)
[![CI](https://github.com/madsmtm/objc2/actions/workflows/ci.yml/badge.svg)](https://github.com/madsmtm/objc2/actions/workflows/ci.yml)

Expand Down Expand Up @@ -32,4 +32,4 @@ right into the [examples].
This crate is part of the [`objc2` project](https://github.com/madsmtm/objc2),
see that for related crates.

[examples]: https://github.com/madsmtm/objc2/tree/master/objc2/examples
[examples]: https://github.com/madsmtm/objc2/tree/master/crates/objc2/examples
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion objc2/src/lib.rs → crates/objc2/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
//! This crate exports several optional cargo features, see [`Cargo.toml`] for
//! an overview and description of these.
//!
//! [`Cargo.toml`]: https://github.com/madsmtm/objc2/blob/master/objc2/Cargo.toml
//! [`Cargo.toml`]: https://github.com/madsmtm/objc2/blob/master/crates/objc2/Cargo.toml
//!
//!
//! ## Support for other Operating Systems
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -182,32 +182,32 @@ Lloh9:

.section __TEXT,__const
l_anon.[ID].0:
.ascii "$DIR/lib.rs"
.ascii "crates/$DIR/lib.rs"

.section __DATA,__const
.p2align 3
l_anon.[ID].1:
.quad l_anon.[ID].0
.asciz ",\000\000\000\000\000\000\000\r\000\000\000\005\000\000"
.asciz "3\000\000\000\000\000\000\000\r\000\000\000\005\000\000"

.p2align 3
l_anon.[ID].2:
.quad l_anon.[ID].0
.asciz ",\000\000\000\000\000\000\000\027\000\000\000\005\000\000"
.asciz "3\000\000\000\000\000\000\000\027\000\000\000\005\000\000"

.p2align 3
l_anon.[ID].3:
.quad l_anon.[ID].0
.asciz ",\000\000\000\000\000\000\000!\000\000\000\005\000\000"
.asciz "3\000\000\000\000\000\000\000!\000\000\000\005\000\000"

.p2align 3
l_anon.[ID].4:
.quad l_anon.[ID].0
.asciz ",\000\000\000\000\000\000\000>\000\000\000\005\000\000"
.asciz "3\000\000\000\000\000\000\000>\000\000\000\005\000\000"

.p2align 3
l_anon.[ID].5:
.quad l_anon.[ID].0
.asciz ",\000\000\000\000\000\000\000H\000\000\000\005\000\000"
.asciz "3\000\000\000\000\000\000\000H\000\000\000\005\000\000"

.subsections_via_symbols
Original file line number Diff line number Diff line change
Expand Up @@ -179,32 +179,32 @@ LPC12_0:

.section __TEXT,__const
l_anon.[ID].0:
.ascii "$DIR/lib.rs"
.ascii "crates/$DIR/lib.rs"

.section __DATA,__const
.p2align 2
l_anon.[ID].1:
.long l_anon.[ID].0
.asciz ",\000\000\000\r\000\000\000\005\000\000"
.asciz "3\000\000\000\r\000\000\000\005\000\000"

.p2align 2
l_anon.[ID].2:
.long l_anon.[ID].0
.asciz ",\000\000\000\027\000\000\000\005\000\000"
.asciz "3\000\000\000\027\000\000\000\005\000\000"

.p2align 2
l_anon.[ID].3:
.long l_anon.[ID].0
.asciz ",\000\000\000!\000\000\000\005\000\000"
.asciz "3\000\000\000!\000\000\000\005\000\000"

.p2align 2
l_anon.[ID].4:
.long l_anon.[ID].0
.asciz ",\000\000\000>\000\000\000\005\000\000"
.asciz "3\000\000\000>\000\000\000\005\000\000"

.p2align 2
l_anon.[ID].5:
.long l_anon.[ID].0
.asciz ",\000\000\000H\000\000\000\005\000\000"
.asciz "3\000\000\000H\000\000\000\005\000\000"

.subsections_via_symbols
Original file line number Diff line number Diff line change
Expand Up @@ -191,32 +191,32 @@ LPC12_0:

.section __TEXT,__const
l_anon.[ID].0:
.ascii "$DIR/lib.rs"
.ascii "crates/$DIR/lib.rs"

.section __DATA,__const
.p2align 2
l_anon.[ID].1:
.long l_anon.[ID].0
.asciz ",\000\000\000\r\000\000\000\005\000\000"
.asciz "3\000\000\000\r\000\000\000\005\000\000"

.p2align 2
l_anon.[ID].2:
.long l_anon.[ID].0
.asciz ",\000\000\000\027\000\000\000\005\000\000"
.asciz "3\000\000\000\027\000\000\000\005\000\000"

.p2align 2
l_anon.[ID].3:
.long l_anon.[ID].0
.asciz ",\000\000\000!\000\000\000\005\000\000"
.asciz "3\000\000\000!\000\000\000\005\000\000"

.p2align 2
l_anon.[ID].4:
.long l_anon.[ID].0
.asciz ",\000\000\000>\000\000\000\005\000\000"
.asciz "3\000\000\000>\000\000\000\005\000\000"

.p2align 2
l_anon.[ID].5:
.long l_anon.[ID].0
.asciz ",\000\000\000H\000\000\000\005\000\000"
.asciz "3\000\000\000H\000\000\000\005\000\000"

.subsections_via_symbols
Original file line number Diff line number Diff line change
Expand Up @@ -292,32 +292,32 @@ LBB12_2:

.section __TEXT,__const
l_anon.[ID].0:
.ascii "$DIR/lib.rs"
.ascii "crates/$DIR/lib.rs"

.section __DATA,__const
.p2align 2
l_anon.[ID].1:
.long l_anon.[ID].0
.asciz ",\000\000\000\r\000\000\000\005\000\000"
.asciz "3\000\000\000\r\000\000\000\005\000\000"

.p2align 2
l_anon.[ID].2:
.long l_anon.[ID].0
.asciz ",\000\000\000\027\000\000\000\005\000\000"
.asciz "3\000\000\000\027\000\000\000\005\000\000"

.p2align 2
l_anon.[ID].3:
.long l_anon.[ID].0
.asciz ",\000\000\000!\000\000\000\005\000\000"
.asciz "3\000\000\000!\000\000\000\005\000\000"

.p2align 2
l_anon.[ID].4:
.long l_anon.[ID].0
.asciz ",\000\000\000>\000\000\000\005\000\000"
.asciz "3\000\000\000>\000\000\000\005\000\000"

.p2align 2
l_anon.[ID].5:
.long l_anon.[ID].0
.asciz ",\000\000\000H\000\000\000\005\000\000"
.asciz "3\000\000\000H\000\000\000\005\000\000"

.subsections_via_symbols
Original file line number Diff line number Diff line change
Expand Up @@ -203,32 +203,32 @@ LBB12_2:

.section __TEXT,__const
l_anon.[ID].0:
.ascii "$DIR/lib.rs"
.ascii "crates/$DIR/lib.rs"

.section __DATA,__const
.p2align 3
l_anon.[ID].1:
.quad l_anon.[ID].0
.asciz ",\000\000\000\000\000\000\000\r\000\000\000\005\000\000"
.asciz "3\000\000\000\000\000\000\000\r\000\000\000\005\000\000"

.p2align 3
l_anon.[ID].2:
.quad l_anon.[ID].0
.asciz ",\000\000\000\000\000\000\000\027\000\000\000\005\000\000"
.asciz "3\000\000\000\000\000\000\000\027\000\000\000\005\000\000"

.p2align 3
l_anon.[ID].3:
.quad l_anon.[ID].0
.asciz ",\000\000\000\000\000\000\000!\000\000\000\005\000\000"
.asciz "3\000\000\000\000\000\000\000!\000\000\000\005\000\000"

.p2align 3
l_anon.[ID].4:
.quad l_anon.[ID].0
.asciz ",\000\000\000\000\000\000\000>\000\000\000\005\000\000"
.asciz "3\000\000\000\000\000\000\000>\000\000\000\005\000\000"

.p2align 3
l_anon.[ID].5:
.quad l_anon.[ID].0
.asciz ",\000\000\000\000\000\000\000H\000\000\000\005\000\000"
.asciz "3\000\000\000\000\000\000\000H\000\000\000\005\000\000"

.subsections_via_symbols
Original file line number Diff line number Diff line change
Expand Up @@ -505,47 +505,47 @@ handle_autoreleased_fallible:
.type .Lanon.[ID].0,@object
.section .rodata..Lanon.[ID].0,"a",@progbits
.Lanon.[ID].0:
.ascii "$DIR/lib.rs"
.size .Lanon.[ID].0, 44
.ascii "crates/$DIR/lib.rs"
.size .Lanon.[ID].0, 51

.type .Lanon.[ID].1,@object
.section .data.rel.ro..Lanon.[ID].1,"aw",@progbits
.p2align 2
.Lanon.[ID].1:
.long .Lanon.[ID].0
.asciz ",\000\000\000\r\000\000\000\005\000\000"
.asciz "3\000\000\000\r\000\000\000\005\000\000"
.size .Lanon.[ID].1, 16

.type .Lanon.[ID].2,@object
.section .data.rel.ro..Lanon.[ID].2,"aw",@progbits
.p2align 2
.Lanon.[ID].2:
.long .Lanon.[ID].0
.asciz ",\000\000\000\027\000\000\000\005\000\000"
.asciz "3\000\000\000\027\000\000\000\005\000\000"
.size .Lanon.[ID].2, 16

.type .Lanon.[ID].3,@object
.section .data.rel.ro..Lanon.[ID].3,"aw",@progbits
.p2align 2
.Lanon.[ID].3:
.long .Lanon.[ID].0
.asciz ",\000\000\000!\000\000\000\005\000\000"
.asciz "3\000\000\000!\000\000\000\005\000\000"
.size .Lanon.[ID].3, 16

.type .Lanon.[ID].4,@object
.section .data.rel.ro..Lanon.[ID].4,"aw",@progbits
.p2align 2
.Lanon.[ID].4:
.long .Lanon.[ID].0
.asciz ",\000\000\000>\000\000\000\005\000\000"
.asciz "3\000\000\000>\000\000\000\005\000\000"
.size .Lanon.[ID].4, 16

.type .Lanon.[ID].5,@object
.section .data.rel.ro..Lanon.[ID].5,"aw",@progbits
.p2align 2
.Lanon.[ID].5:
.long .Lanon.[ID].0
.asciz ",\000\000\000H\000\000\000\005\000\000"
.asciz "3\000\000\000H\000\000\000\005\000\000"
.size .Lanon.[ID].5, 16

.section ".note.GNU-stack","",@progbits
Loading

0 comments on commit b8f03db

Please sign in to comment.