33The following is a list of prerequisites required to start developing on Oasis
44Core:
55
6- * Linux (if you are not on Linux, you will need to either set up a VM with the
6+ - Linux (if you are not on Linux, you will need to either set up a VM with the
77 proper environment or, if Docker is available for your platform, use the
88 provided Docker image which does this for you,
99 [ see below] ( #using-the-development-docker-image ) ).
1010
11- * System packages:
12- * [ Bubblewrap] (at least version 0.3.3).
13- * [ GCC] (including C++ subpackage).
14- * [ Clang] (including development package).
15- * [ Protobuf] compiler.
16- * [ GNU Make] .
17- * [ CMake] .
18- * [ pkg-config] .
19- * [ OpenSSL] development package.
20- * [ libseccomp] development package.
11+ - System packages:
12+ - [ Bubblewrap] (at least version 0.3.3).
13+ - [ GCC] (including C++ subpackage).
14+ - [ Clang] (including development package).
15+ - [ Protobuf] compiler.
16+ - [ GNU Make] .
17+ - [ CMake] .
18+ - [ pkg-config] .
19+ - [ OpenSSL] development package.
20+ - [ libseccomp] development package.
2121
2222 _ NOTE: On Ubuntu/Debian systems, compiling [ mbedtls] crate when building the
2323 ` oasis-core-runtime ` binary requires having the ` gcc-multilib ` package
@@ -26,47 +26,52 @@ Core:
2626 On Fedora 29+, you can install all the above with:
2727
2828 <!-- markdownlint-disable line-length -->
29+
2930 ```
3031 sudo dnf install bubblewrap gcc gcc-c++ clang-devel clang protobuf-compiler make cmake openssl-devel libseccomp-devel pkg-config
3132 ```
33+
3234 <!-- markdownlint-enable line-length -->
3335
3436 On Ubuntu 18.10+ (18.04 LTS provides overly-old ` bubblewrap ` ), you can install
3537 all the above with:
3638
3739 <!-- markdownlint-disable line-length -->
40+
3841 ```
3942 sudo apt install bubblewrap gcc g++ gcc-multilib libclang-dev clang protobuf-compiler make cmake libssl-dev libseccomp-dev pkg-config
4043 ```
44+
4145 <!-- markdownlint-enable line-length -->
4246
43- * [ Go] (at least version 1.26.0 ).
47+ - [ Go] (at least version 1.26.3 ).
4448
4549 If your distribution provides a new-enough version of Go, just use that.
4650
4751 Please note that if you want to compile Oasis Core v22.1.9 or earlier,
4852 then go >=1.19 is not supported yet; you need to use 1.18.x.
4953
5054 Otherwise:
51- * install the Go version provided by your distribution,
52- * [ ensure ` $GOPATH/bin ` is in your ` PATH ` ] (
53- https://tip.golang.org/doc/code.html#GOPATH ),
54- * [ install the desired version of Go] (
55- https://golang.org/doc/install#extra_versions ), e.g. 1.26.0, with:
55+ - install the Go version provided by your distribution,
56+ - ensure ` $GOPATH/bin ` is in your
57+ [ ` PATH ` ] ( https://tip.golang.org/doc/code.html#GOPATH ) ,
58+ - install the desired
59+ [ version of Go] ( https://golang.org/doc/install#extra_versions ) ,
60+ e.g. 1.26.3, with:
5661
5762 ```
58- go install golang.org/dl/go1.26.0 @latest
59- go1.26.0 download
63+ go install golang.org/dl/go1.26.3 @latest
64+ go1.26.3 download
6065 ```
6166
62- * instruct the build system to use this particular version of Go by setting
67+ - instruct the build system to use this particular version of Go by setting
6368 the `OASIS_GO` environment variable in your `~/.bashrc`:
6469
6570 ```
66- export OASIS_GO=go1.26.0
71+ export OASIS_GO=go1.26.3
6772 ```
6873
69- * [Rust].
74+ - [Rust].
7075
7176 We follow [Rust upstream's recommendation][rust-upstream-rustup] on using
7277 [rustup] to install and manage Rust versions.
@@ -88,18 +93,20 @@ Core:
8893 This will run `rustup-init` which will download and install the latest stable
8994 version of Rust on your system.
9095
91- * [Fortanix Rust EDP] utilities.
96+ - [Fortanix Rust EDP] utilities.
9297
9398 Install the Fortanix Rust EDP utilities by running:
9499
95100 <!-- markdownlint-disable line-length -->
101+
96102 ```
97103 cargo install fortanix-sgx-tools
98104 cargo install sgxs-tools
99105 ```
106+
100107 <!-- markdownlint-enable line-length -->
101108
102- * Oasis Core's Rust toolchain version with Fortanix SGX target.
109+ - Oasis Core's Rust toolchain version with Fortanix SGX target.
103110
104111 The version of the Rust toolchain we use in Oasis Core is specified in the
105112 [`rust-toolchain.toml`] file.
@@ -129,7 +136,7 @@ Core:
129136 rustc 1.77.0-nightly (75c68cfd2 2024-01-07)
130137 ```
131138
132- * (**OPTIONAL**) [gofumpt] and [goimports].
139+ - (**OPTIONAL**) [gofumpt] and [goimports].
133140
134141 Required if you plan to change any of the Go code in order for automated code
135142 formatting (`make fmt`) to work.
@@ -141,7 +148,7 @@ Core:
141148 ${OASIS_GO:-go} install golang.org/x/tools/cmd/goimports@v0.36.0
142149 ```
143150
144- * (**OPTIONAL**) [golangci-lint].
151+ - (**OPTIONAL**) [golangci-lint].
145152
146153 Required if you plan to change any of the Go code in order for automated code
147154 linting (`make lint`) to work.
@@ -151,10 +158,10 @@ Core:
151158 ```
152159 curl -sSfL \
153160 https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh \
154- | sh -s -- -b $(${OASIS_GO:-go} env GOPATH)/bin v2.10.1
161+ | sh -s -- -b $(${OASIS_GO:-go} env GOPATH)/bin v2.12.2
155162 ```
156163
157- * (**OPTIONAL**) [protoc-gen-go].
164+ - (**OPTIONAL**) [protoc-gen-go].
158165
159166 Download and install it with:
160167
@@ -166,16 +173,18 @@ Core:
166173 `protoc-gen-go` to `/usr/local/bin` (which is in `$PATH`) with:_
167174
168175 <!-- markdownlint-disable line-length -->
176+
169177 ```
170178 sudo GOBIN=/usr/local/bin ${OASIS_GO:-go} install google.golang.org/protobuf/cmd/protoc-gen-go@v1.21.0
171179 ```
180+
172181 <!-- markdownlint-enable line-length -->
173182
174183 _NOTE: The repository has the most up-to-date files generated by protoc-gen-go
175- committed for convenience. Installing protoc-gen-go is only required if you
184+ committed for convenience. Installing protoc-gen-go is only required if you
176185 are a developer making changes to protobuf definitions used by Go._
177186
178- * (**OPTIONAL**) [jemalloc] (version 5.2.1, built with `'je_'` jemalloc-prefix)
187+ - (**OPTIONAL**) [jemalloc] (version 5.2.1, built with `'je_'` jemalloc-prefix)
179188
180189 Alternatively set `OASIS_BADGER_NO_JEMALLOC=1` environment variable when
181190 building `oasis-node` code, to build [BadgerDB] without `jemalloc` support.
@@ -214,6 +223,7 @@ In the following instructions, the top-level directory is the directory
214223where the code has been checked out.
215224
216225<!-- markdownlint-disable line-length -->
226+
217227[Bubblewrap]: https://github.com/projectatomic/bubblewrap
218228[GCC]: http://gcc.gnu.org/
219229[Clang]: https://clang.llvm.org/
@@ -227,30 +237,27 @@ where the code has been checked out.
227237[Go]: https://golang.org
228238[rustup]: https://rustup.rs/
229239[rust-upstream-rustup]: https://www.rust-lang.org/tools/install
230- [download `rustup-init` executable for your platform]:
231- https://github.com/rust-lang/rustup#other-installation-methods
240+ [download `rustup-init` executable for your platform]: https://github.com/rust-lang/rustup#other-installation-methods
232241[Rust]: https://www.rust-lang.org/
233- [`rust-toolchain.toml`]:
234- https://github.com/oasisprotocol/oasis-core/tree/master/rust-toolchain.toml
235- [rust-toolchain-precedence]:
236- https://github.com/rust-lang/rustup/blob/master/README.md#override-precedence
242+ [`rust-toolchain.toml`]: https://github.com/oasisprotocol/oasis-core/tree/master/rust-toolchain.toml
243+ [rust-toolchain-precedence]: https://github.com/rust-lang/rustup/blob/master/README.md#override-precedence
237244[Fortanix Rust EDP]: https://edp.fortanix.com
238245[gofumpt]: https://github.com/mvdan/gofumpt
239246[goimports]: https://pkg.go.dev/golang.org/x/tools/cmd/goimports
240247[golangci-lint]: https://golangci-lint.run/
241248[protoc-gen-go]: https://github.com/golang/protobuf
242249[jemalloc]: https://github.com/jemalloc/jemalloc
243250[BadgerDB]: https://github.com/dgraph-io/badger/
244- [jemalloc-hardcode-path]:
245- https://github.com/dgraph-io/ristretto/blob/221ca9b2091d12e5d24aa5d7d56e49745fc175d8/z/calloc_jemalloc.go#L9-L13
251+ [jemalloc-hardcode-path]: https://github.com/dgraph-io/ristretto/blob/221ca9b2091d12e5d24aa5d7d56e49745fc175d8/z/calloc_jemalloc.go#L9-L13
252+
246253<!-- markdownlint-enable line-length -->
247254
248255## Using the Development Docker Image
249256
250257If for some reason you don't want or can't install the specified prerequisites
251- on the host system, you can use our development Docker image. This requires that
252- you have a [recent version of Docker installed](
253- https://docs.docker.com/install/).
258+ on the host system, you can use our development Docker image. This requires
259+ that you have a
260+ [recent version of Docker installed]( https://docs.docker.com/install/).
254261
255262Oasis development environment with all the dependencies preinstalled is
256263available in the `ghcr.io/oasisprotocol/oasis-core-dev:master` image.
0 commit comments