Skip to content

Commit a323bb4

Browse files
authored
Merge branch 'master' into claudio/issue-5708
2 parents 3d563c4 + 470c027 commit a323bb4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+447
-452
lines changed

doc/docusaurus/package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

doc/md/12-base-core-migration.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ sidebar_position: 12
55
# Motoko `base` to `core` migration guide
66

77
* [GitHub repository](https://github.com/dfinity/motoko-core)
8-
* [Documentation](https://internetcomputer.org/docs/motoko/core/)
8+
* [Documentation](./core/)
99

1010
The `core` package is a new and improved standard library for Motoko, focusing on:
1111
* AI-friendly design patterns.
@@ -40,7 +40,7 @@ When updating to the `core` package:
4040
- Hash-based data structures are no longer included in the standard library. It is encouraged to use ordered maps and sets for improved security.
4141
- In some cases, it won't be possible to fully migrate to `core` due to removal of some features in `base`. In these cases, you can continue using both packages side-by-side or search for [Mops packages](https://mops.one/) built by the community.
4242

43-
For details on function signatures, please refer to the official [documentation](https://internetcomputer.org/docs/motoko/core/).
43+
For details on function signatures, please refer to the official [documentation](./core/).
4444

4545
Also, feel free to ask for help by posting on the [ICP developer forum](https://forum.dfinity.org/c/developers) or opening a GitHub issue on the [`dfinity/motoko-core`](https://github.com/dfinity/motoko-core/issues) repository.
4646

@@ -120,7 +120,7 @@ The `core` package brings significant changes to data structures, making a clear
120120

121121
## Interface changes by module
122122

123-
### [`Array`](https://internetcomputer.org/docs/motoko/core/Array)
123+
### [`Array`](./core/Array)
124124

125125
#### Renamed functions
126126
- `append()``concat()`
@@ -158,7 +158,7 @@ The `core` package brings significant changes to data structures, making a clear
158158
- `sortInPlace()` - Use `VarArray.sortInPlace()` instead
159159
- `tabulateVar()` - Use `VarArray.tabulate()` instead
160160

161-
### [`Blob`](https://internetcomputer.org/docs/motoko/core/Blob)
161+
### [`Blob`](./core/Blob)
162162

163163
#### Modified functions
164164
- `fromArrayMut()``fromVarArray()`
@@ -170,7 +170,7 @@ The `core` package brings significant changes to data structures, making a clear
170170
- `isEmpty()` - Check if blob is empty
171171
- `size()` - Get number of bytes in a blob (equivalent to `blob.size()`)
172172

173-
### [`Bool`](https://internetcomputer.org/docs/motoko/core/Bool)
173+
### [`Bool`](./core/Bool)
174174

175175
#### Renamed functions
176176
- `logand()``logicalAnd()`
@@ -181,21 +181,21 @@ The `core` package brings significant changes to data structures, making a clear
181181
#### New functions
182182
- `allValues()` - Iterator over all boolean values
183183

184-
### [`Char`](https://internetcomputer.org/docs/motoko/core/Char)
184+
### [`Char`](./core/Char)
185185

186186
#### Renamed functions
187187
- `isLowercase()``isLower()`
188188
- `isUppercase()``isUpper()`
189189

190-
### [`Debug`](https://internetcomputer.org/docs/motoko/core/Debug)
190+
### [`Debug`](./core/Debug)
191191

192192
#### Added functions
193193
- `todo()` - Replaces `Prelude.nyi()`
194194

195195
#### Removed functions
196196
- `trap()` - Moved to `Runtime.trap()`
197197

198-
### [`Float`](https://internetcomputer.org/docs/motoko/core/Float)
198+
### [`Float`](./core/Float)
199199

200200
#### Modified functions
201201
- `equal()` - Now requires epsilon parameter
@@ -204,7 +204,7 @@ The `core` package brings significant changes to data structures, making a clear
204204
#### Removed functions
205205
- `equalWithin()`, `notEqualWithin()` - Use `equal()` and `notEqual()` with epsilon
206206

207-
### [`Iter`](https://internetcomputer.org/docs/motoko/core/Iter)
207+
### [`Iter`](./core/Iter)
208208

209209
`Iter.range()` has been removed in favor of type-specific range functions such as `Nat.range()`, `Int.range()`, `Nat32.range()`, etc. These functions have an **exclusive upper bound**, in contrast to the original inclusive upper bound of `Iter.range()`.
210210

@@ -229,7 +229,7 @@ persistent actor {
229229

230230
Helper functions have been added, such as `allValues()`, for each finite type in the `base` package.
231231

232-
### [`Int`](https://internetcomputer.org/docs/motoko/core/Int)
232+
### [`Int`](./core/Int)
233233

234234
#### New functions
235235
- `fromNat()` - Convert Nat to Int
@@ -247,7 +247,7 @@ Helper functions have been added, such as `allValues()`, for each finite type in
247247
- `hash()`
248248
- `hashAcc()`
249249

250-
### [`Nat`](https://internetcomputer.org/docs/motoko/core/Nat)
250+
### [`Nat`](./core/Nat)
251251

252252
#### New functions
253253
- `allValues()` - Iterator over all natural numbers
@@ -258,7 +258,7 @@ Helper functions have been added, such as `allValues()`, for each finite type in
258258
- `rangeBy()`, `rangeByInclusive()` - Range with step
259259
- `toInt()` - Convert to Int
260260

261-
### [`Int8`, `Int16`, `Int32`, `Int64`, `Nat8`, `Nat16`, `Nat32`, `Nat64`](https://internetcomputer.org/docs/motoko/core/)
261+
### [`Int8`, `Int16`, `Int32`, `Int64`, `Nat8`, `Nat16`, `Nat32`, `Nat64`](./core/)
262262

263263
#### Renamed fields
264264

@@ -270,7 +270,7 @@ Helper functions have been added, such as `allValues()`, for each finite type in
270270
- `range()`, `rangeInclusive()` - Range iterators (replaces `Iter.range()`)
271271
- `explode()` - Slice into constituent bytes (only for sizes `16`, `32`, `64`)
272272

273-
### [`Option`](https://internetcomputer.org/docs/motoko/core/Option)
273+
### [`Option`](./core/Option)
274274

275275
#### Renamed functions
276276
- `make()``some()` - Create option from value
@@ -284,12 +284,12 @@ Helper functions have been added, such as `allValues()`, for each finite type in
284284
- `assertNull()` - Removed in favor of pattern matching
285285
- `assertSome()` - Removed in favor of pattern matching
286286

287-
### [`Order`](https://internetcomputer.org/docs/motoko/core/Order)
287+
### [`Order`](./core/Order)
288288

289289
#### New functions
290290
- `allValues()` - Iterator over all order values (`#less`, `#equal`, `#greater`)
291291

292-
### [`Random`](https://internetcomputer.org/docs/motoko/core/Random)
292+
### [`Random`](./core/Random)
293293

294294
The `Random` module has been completely redesigned in the core package with a new API that provides better control over random number generation and supports both pseudo-random and cryptographic random number generation.
295295

@@ -328,7 +328,7 @@ persistent actor {
328328
- `crypto()` - Create cryptographic random generator using ICP entropy
329329
- `cryptoFromState()` - Create cryptographic generator from state
330330

331-
### [`Result`](https://internetcomputer.org/docs/motoko/core/Result)
331+
### [`Result`](./core/Result)
332332

333333
#### New functions
334334
- `all()` - Check all results in iterator
@@ -337,7 +337,7 @@ persistent actor {
337337
- `forErr()` - Apply function to `#err` value
338338
- `fromBool()` - Create Result from boolean
339339

340-
### [`Text`](https://internetcomputer.org/docs/motoko/core/Text)
340+
### [`Text`](./core/Text)
341341

342342
#### Renamed functions
343343
- `toLowercase()``toLower()`
@@ -967,4 +967,4 @@ If you experience issues with the migration pattern:
967967
2. Verify that all types referenced in the migration function are accessible (marked as `public` if needed)
968968
3. Test the migration incrementally by converting one data structure at a time
969969

970-
For additional help, visit the ICP [developer forum](https://forum.dfinity.org/c/developers) or [Discord community](https://discord.com/invite/e8Xr8A5pX3).
970+
For additional help, visit the ICP [developer forum](https://forum.dfinity.org/c/developers) or [Discord community](https://discord.internetcomputer.org).

doc/md/15-compiler-ref.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ sidebar_position: 15
44

55
# Compiler reference
66

7-
The Motoko compiler (`moc`) is the primary tool for compiling Motoko programs into executable WebAssembly (Wasm) modules. The compiler runs in the background when you build projects using the [IC SDK](https://internetcomputer.org/docs/current/developer-docs/setup/install). If you invoke the compiler directly on the command-line, you can press CTRL-C to exit.
7+
The Motoko compiler (`moc`) is the primary tool for compiling Motoko programs into executable WebAssembly (Wasm) modules. The compiler runs in the background when you build projects using the [IC SDK](https://github.com/dfinity/sdk). If you invoke the compiler directly on the command-line, you can press CTRL-C to exit.
88

99
This section provides compiler command-line reference information.
1010

@@ -67,7 +67,7 @@ You can use the following options with the `moc` command.
6767
| `--stable-types` | Compile binary and emit signature of stable types to `.most` file. |
6868
| `--stable-compatible <pre> <post>` | Test upgrade compatibility between stable-type signatures `<pre>` and `<post>`. |
6969
| `--rts-stack-pages <n>` | Set maximum number of pages available for runtime system stack (only supported with classical persistence, default 32). |
70-
| `--trap-on-call-error` | Trap, don't throw an [`Error`](https://internetcomputer.org/docs/motoko/core/Error), when an IC call fails due to destination queue full or freezing threshold is crossed. Emulates behavior of moc versions < 0.8.0. |
70+
| `--trap-on-call-error` | Trap, don't throw an [`Error`](./core/Error), when an IC call fails due to destination queue full or freezing threshold is crossed. Emulates behavior of moc versions < 0.8.0. |
7171
| `-t` | Activates tracing in interpreter. |
7272
| `-v` | Generates verbose output. |
7373
| `--version` | Displays version information. |

0 commit comments

Comments
 (0)