pd-rs / crankstart

A barely functional, wildly incomplete and basically undocumented Rust crate whose aim is to let you write Games for the Playdate handheld gaming system in Rust.
MIT License
235 stars 25 forks source link

crankstart cannot be included in a workspace as a git submodule #25

Open sgeos opened 1 year ago

sgeos commented 1 year ago

crankstart is workspace with one member. It cannot, therefore, be included in another Rust workspace as a git submodule. The workaround is to install crankstart and the user workspace in the same directory.

ideal directory structure

game_project_workspace/
game_project_workspace/crankstart/
game_project_workspace/game_core_library/
game_project_workspace/game_pc/
game_project_workspace/game_playdate/

workaround directory structure

crankstart/
game_project_workspace/
game_project_workspace/game_core_library/
game_project_workspace/game_pc/
game_project_workspace/game_playdate/

EDIT: Another workaround is probably to include crankstart as a git submodule and exclude it from the user workspace.

rtsuk commented 1 year ago

I'd imagined you'd use crankstart as a dependency from crates, so this would not be an issue.

What are you trying to do where you want to include crankstart in your workspace?

sgeos commented 1 year ago

I guess I wanted to put crankstart in the workspace because the instructions for using it include the following entries in Cargo.toml.

[dependencies]
crankstart = { path = "../crankstart" }
crankstart-sys = { path = "../crankstart/crankstart-sys" }

Dropping crankstart into the workspace would allow the above path to be used as is. At the time, crankstart and my project workspace were in completely different directories. Since I have a bunch of different things in my workspace, adding crankstart to the mix did not seem unreasonable. The directory structure is a lot like the one in my original post, only there are two libraries.

rtsuk commented 1 year ago

Not unreasonable, but I favor leaving it as-it in expectation that it might eventually end up being published to crates.io.

sgeos commented 1 year ago

Are there plans to publish to crates.io?

rtsuk commented 1 year ago

Nothing more solid than an expectation.

apollocatlin commented 1 year ago

Would you be open to help? I would love to assist.