Skip to content

Commit 1edde60

Browse files
zrr1999Copilot
andcommitted
✨ feat(layout): migrate basic-cli package layout
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 8b148c5 commit 1edde60

11 files changed

Lines changed: 37 additions & 18 deletions

File tree

.github/workflows/ci-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959

6060
- name: Format Spore files
6161
run: |
62-
paths=(examples platform)
62+
paths=(examples src)
6363
if [ -d tests ]; then
6464
paths+=(tests)
6565
fi
@@ -68,15 +68,15 @@ jobs:
6868
6969
- name: Check Spore files
7070
run: |
71-
paths=(examples platform)
71+
paths=(examples src)
7272
if [ -d tests ]; then
7373
paths+=(tests)
7474
fi
7575
find "${paths[@]}" -name '*.sp' -type f | sort | xargs -n 1 _spore/target/release/spore check
7676
7777
- name: Build Spore files
7878
run: |
79-
paths=(examples platform)
79+
paths=(examples src)
8080
if [ -d tests ]; then
8181
paths+=(tests)
8282
fi

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Build artifacts
22
target/
33
host/target/
4+
/.spore-store
45

56
# OS
67
.DS_Store

README.md

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ Operating System
2020

2121
| Module | Capabilities | Description |
2222
|--------|-------------|-------------|
23-
| `Stdout` | `uses [Console]` | Standard output |
24-
| `Stdin` | `uses [Console]` | Standard input |
25-
| `File` | `uses [FileRead]` or `uses [FileWrite]` | File system operations |
26-
| `Dir` | `uses [FileRead]` or `uses [FileWrite]` | Directory listing and creation |
27-
| `Env` | `uses [Env]` | Environment variables |
28-
| `Cmd` | `uses [Spawn]` | Process execution |
23+
| `basic_cli.stdout` | `uses [Console]` | Standard output |
24+
| `basic_cli.stdin` | `uses [Console]` | Standard input |
25+
| `basic_cli.file` | `uses [FileRead]` or `uses [FileWrite]` | File system operations |
26+
| `basic_cli.dir` | `uses [FileRead]` or `uses [FileWrite]` | Directory listing and creation |
27+
| `basic_cli.env` | `uses [Env]` | Environment variables |
28+
| `basic_cli.cmd` | `uses [Spawn]` | Process execution |
2929

3030
## Quick Start
3131

@@ -43,19 +43,21 @@ spore run examples/hello.sp
4343
```
4444

4545
This repository currently keeps `examples/` limited to files that PR CI validates today.
46-
It also intentionally keeps the current loose `.sp` file layout for now; the manifest/package-layout migration is deferred to a follow-up change.
4746

4847
## Project Structure
4948

5049
```
5150
basic-cli/
52-
├── platform/ # Spore API modules (.sp files), checked and built in CI
53-
│ ├── Stdout.sp # Standard output operations
54-
│ ├── Stdin.sp # Standard input operations
55-
│ ├── File.sp # File read/write operations
56-
│ ├── Dir.sp # Directory operations
57-
│ ├── Env.sp # Environment variable access
58-
│ ├── Cmd.sp # Process execution
51+
├── spore.toml # Platform manifest
52+
├── src/
53+
│ ├── host.sp # Default platform entry point
54+
│ └── basic_cli/ # Spore API modules, checked and built in CI
55+
│ ├── stdout.sp # Standard output operations
56+
│ ├── stdin.sp # Standard input operations
57+
│ ├── file.sp # File read/write operations
58+
│ ├── dir.sp # Directory operations
59+
│ ├── env.sp # Environment variable access
60+
│ └── cmd.sp # Process execution
5961
├── host/ # Rust host implementation
6062
│ ├── Cargo.toml
6163
│ └── src/
@@ -66,7 +68,7 @@ basic-cli/
6668
## Tutorial Contract
6769

6870
- `examples/` is for truthful, CI-validated examples only.
69-
- `platform/` is the API surface for the platform modules themselves.
71+
- `src/basic_cli/` is the API surface for the platform modules themselves.
7072
- Only add `tests/` when the repo has real Spore-side regression coverage worth running with `spore test`.
7173

7274
If you want to add a new tutorial/example, treat this as the bar:

spore.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[package]
2+
name = "basic-cli"
3+
version = "0.1.0"
4+
type = "platform"
5+
spore-version = ">=0.1.0"
6+
7+
[capabilities]
8+
allow = ["Compute"]
9+
10+
[dependencies]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)