Skip to content

Commit d71ab84

Browse files
frasercrmckmodularbot
authored andcommitted
[mojo] Rename .mojopkg to .mojoc
This commit begins the process of renaming `.mojopkg` files to `.mojoc` files and referring to them as "precompiled files" where appropriate. The precompiled files do in practice still contain a binary Mojo package so some care must be taken, though in theory this change allows us to precompile modules into the same format so a loosening of the wording in certain places does make sense. This follows the proposal on the forums [1]. [1] - https://forum.modular.com/t/proposal-rename-mojo-package-and-mojopkg/3007/7 MODULAR_ORIG_COMMIT_REV_ID: 51fc46b0922ccc5b97382cd6451024ae195fd9d3
1 parent da552e1 commit d71ab84

5 files changed

Lines changed: 11 additions & 10 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ book/src/puzzle_*/media/*.gif
2222
.vercel
2323

2424
# Mojo artifacts
25+
*.mojoc
2526
*.mojopkg
2627

2728
# rules

book/i18n/ko/src/puzzle_17/puzzle_17.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,14 +266,14 @@ struct Conv1DCustomOp:
266266
커스텀 연산을 파이썬에서 사용하려면 먼저 패키징해야 합니다:
267267

268268
```bash
269-
mojo package op -o op.mojopkg
269+
mojo package op -o op.mojoc
270270
```
271271

272272
이 명령은:
273273

274274
1. Mojo 코드를 배포 가능한 패키지로 컴파일
275275
2. MAX 그래프가 연산을 이해하는 데 필요한 메타데이터 생성
276-
3. 파이썬에서 로드할 수 있는 바이너리 아티팩트(`op.mojopkg`)를 생성
276+
3. 파이썬에서 로드할 수 있는 바이너리 아티팩트(`op.mojoc`)를 생성
277277

278278
패키지는 MAX 그래프가 찾을 수 있는 위치에 배치해야 하며, 보통 파이썬 코드에서
279279
접근 가능한 디렉토리에 둡니다.

book/src/puzzle_17/puzzle_17.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,14 +271,14 @@ Key components of the registration:
271271
Before the custom operation can be used from Python, it needs to be packaged:
272272

273273
```bash
274-
mojo package op -o op.mojopkg
274+
mojo package op -o op.mojoc
275275
```
276276

277277
This command:
278278

279279
1. Compiles the Mojo code into a deployable package
280280
2. Creates the necessary metadata for MAX Graph to understand the operation
281-
3. Produces a binary artifact (`op.mojopkg`) that can be loaded by Python
281+
3. Produces a binary artifact (`op.mojoc`) that can be loaded by Python
282282

283283
The package must be placed in a location where MAX Graph can find it, typically
284284
in a directory accessible to the Python code.

pixi.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,13 @@ p16 = "mojo problems/p16/p16.mojo"
123123
viz16 = "cd book/src/puzzle_16 && python puzzle_16_viz.py"
124124
rooflineviz = "cd book/src/puzzle_16 && python roofline_viz.py"
125125

126-
p17 = "mojo package problems/p17/op -o problems/p17/op.mojopkg && python problems/p17/p17.py"
126+
p17 = "mojo package problems/p17/op -o problems/p17/op.mojoc && python problems/p17/p17.py"
127127

128-
p18-package = "mojo package problems/p18/op -o problems/p18/op.mojopkg"
128+
p18-package = "mojo package problems/p18/op -o problems/p18/op.mojoc"
129129
p18-test-kernels = { cmd = "mojo run -I problems/p18 problems/p18/test/test_softmax.mojo", depends-on = ["p18-package"] }
130130
p18 = { cmd = "python problems/p18/p18.py", depends-on = ["p18-package"] }
131131

132-
p19 = "mojo package problems/p19/op -o problems/p19/op.mojopkg && python problems/p19/p19.py"
132+
p19 = "mojo package problems/p19/op -o problems/p19/op.mojoc && python problems/p19/p19.py"
133133

134134
p20 = "python problems/p20/p20.py"
135135

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,16 +95,16 @@ p15 = "mojo problems/p15/p15.mojo"
9595
p16 = "mojo problems/p16/p16.mojo"
9696

9797
p17 = [
98-
{ cmd = "mojo package problems/p17/op -o problems/p17/op.mojopkg" },
98+
{ cmd = "mojo package problems/p17/op -o problems/p17/op.mojoc" },
9999
{ cmd = "python problems/p17/p17.py" }
100100
]
101101

102-
p18-package = "mojo package problems/p18/op -o problems/p18/op.mojopkg"
102+
p18-package = "mojo package problems/p18/op -o problems/p18/op.mojoc"
103103
p18-test-kernels = { cmd = "mojo run -I problems/p18 problems/p18/test/test_softmax.mojo", deps = ["p18-package"] }
104104
p18 = { cmd = "python problems/p18/p18.py", deps = ["p18-package"] }
105105

106106
p19 = [
107-
{ cmd = "mojo package problems/p19/op -o problems/p19/op.mojopkg" },
107+
{ cmd = "mojo package problems/p19/op -o problems/p19/op.mojoc" },
108108
{ cmd = "python problems/p19/p19.py" }
109109
]
110110

0 commit comments

Comments
 (0)