From 6186ae2f6dec5eabae84e1810b3d2041bf241f13 Mon Sep 17 00:00:00 2001 From: tersec Date: Sun, 25 Aug 2024 18:40:50 +0000 Subject: [PATCH] treat Nim 2.0 as targeted version; update former auditors guide link (#23) --- .github/workflows/ci.yml | 10 +++++----- src/00_introduction.md | 11 +++++++---- src/formatting.style.md | 2 +- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1b70771..93027dc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,15 +29,15 @@ jobs: include: - target: os: linux - builder: ubuntu-20.04 + builder: ubuntu-latest shell: bash - target: os: macos - builder: macos-11 + builder: macos-latest shell: bash - target: os: windows - builder: windows-2019 + builder: windows-latest shell: msys2 {0} defaults: @@ -52,7 +52,7 @@ jobs: with: toolchain: '${{matrix.target.rust}}' - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install build dependencies (Linux i386) if: runner.os == 'Linux' && matrix.target.cpu == 'i386' @@ -87,7 +87,7 @@ jobs: - name: Restore Nim DLLs dependencies (Windows) from cache if: runner.os == 'Windows' id: windows-dlls-cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: external/dlls-${{ matrix.target.cpu }} key: 'dlls-${{ matrix.target.cpu }}' diff --git a/src/00_introduction.md b/src/00_introduction.md index 06bbbfa..ac427c1 100644 --- a/src/00_introduction.md +++ b/src/00_introduction.md @@ -28,9 +28,9 @@ When in doubt: The latest version of this book can be found [online](https://status-im.github.io/nim-style-guide/) or on [GitHub](https://github.com/status-im/nim-style-guide/). -This guide currently targets Nim v1.6. +This guide currently targets Nim v2.0. -At the time of writing, v2.0 has been released but its new garbage collector is not yet stable enough for production use. It is advisable to test new code with both `--mm:gc` and `--mm:orc` (the default) in the transition period. +At the time of writing, v2.0 has been released but its new garbage collector is not yet stable enough for production use. It is advisable to test new code with both `--mm:refc` and `--mm:orc` (the default) in the transition period. @@ -58,8 +58,11 @@ In general, the guide will aim to prioritise: While this book covers Nim at Status in general, there are other resources available that partially may overlap with this guide: -* [Nim manual](https://nim-lang.org/docs/manual.html) - the authorative source for understanding the features of the language -* [The Nimbus auditor book](https://nimbus.guide/auditors-book/) - covers the security details of Nimbus itself and how it relates to the features of Nim +* [Nim language manual](https://nim-lang.org/docs/manual.html) - the authorative source for understanding the features of the language +* [Nim documentation](https://nim-lang.org/documentation.html) - other official Nim documentation, including its standard library and toolchain +* [Nim by Example](https://nim-by-example.github.io/getting_started/) - Nim tutorials to start with +* [Chronos guides](https://github.com/status-im/nim-chronos/blob/master/docs/src/SUMMARY.md) +* [nim-libp2p docs](https://vacp2p.github.io/nim-libp2p/docs/) ## Workflow diff --git a/src/formatting.style.md b/src/formatting.style.md index 292143e..2d8e8eb 100644 --- a/src/formatting.style.md +++ b/src/formatting.style.md @@ -22,7 +22,7 @@ func someLongFunctinName( ### Practical notes -* We do not use `nimpretty` - as of writing (Nim 1.6), it is not stable enough for daily use: +* We do not use `nimpretty` - as of writing (Nim 2.0), it is not stable enough for daily use: * Can break working code * Naive formatting algorithm * We do not make use of Nim's "flexible" identifier names - all uses of an identifier should match the declaration in capitalization and underscores