Skip to content

Commit f55b815

Browse files
authored
Merge pull request #49 from oralang/imports
show `ora init`
2 parents f36eb92 + 82ea640 commit f55b815

File tree

3 files changed

+28
-2
lines changed

3 files changed

+28
-2
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@ zig build test
7171

7272
## Using the compiler
7373

74+
Scaffold a new project:
75+
```bash
76+
./zig-out/bin/ora init my-project
77+
cd my-project
78+
```
79+
7480
Run the compiler directly:
7581
```bash
7682
./zig-out/bin/ora <file.ora>

website/docs/getting-started.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,18 @@ zig build test
5050
./zig-out/bin/ora emit-mlir ora-example/smoke.ora
5151
```
5252

53+
## Start a new project
54+
55+
```bash
56+
# Scaffold a project in a new directory
57+
./zig-out/bin/ora init my-project
58+
cd my-project
59+
```
60+
61+
This generates an `ora.toml`, `contracts/main.ora`, and a `README.md`. You can
62+
also run `ora init` in an existing empty directory or `ora init .` for the
63+
current directory.
64+
5365
## Try your first contract
5466

5567
```ora
@@ -66,10 +78,10 @@ contract SimpleStorage {
6678
}
6779
```
6880

69-
Parse and inspect:
81+
Build it:
7082

7183
```bash
72-
./zig-out/bin/ora parse simple_test.ora
84+
./zig-out/bin/ora build contracts/main.ora
7385
```
7486

7587
## Formatting

website/docs/imports.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,14 @@ The import resolver enforces:
153153

154154
## Project configuration with `ora.toml`
155155

156+
Scaffold a new project with `ora init`:
157+
158+
```bash
159+
ora init my-project
160+
```
161+
162+
This generates an `ora.toml`, `contracts/main.ora`, and a `README.md`.
163+
156164
Multi-file projects use `ora.toml` for target and path configuration:
157165

158166
```toml

0 commit comments

Comments
 (0)