-
-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
106 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
cd ./apps/freenet-microblogging && make build && | ||
cd ../.. | ||
cd ./apps/freenet-email-app && make build && | ||
cd ../.. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,102 @@ | ||
# Build freenet from source On Linux: | ||
# Build freenet from source on Linux: | ||
|
||
There is a single line command to build all freenet on Linux. | ||
|
||
``` | ||
git clone https://github.com/freenet/freenet-core && .\build-all.sh | ||
``` | ||
|
||
then you could test it by building and deploying any web application: | ||
|
||
or | ||
``` | ||
.\build-examples.sh | ||
``` | ||
. | ||
|
||
|
||
# Build freenet from source on Linux from command line: | ||
|
||
You could also run this: | ||
|
||
```bash | ||
wget https://sh.rustup.rs ; sh index.html -y && source "$HOME/.cargo/env" && rustup default stable && rustup target add wasm32-unknown-unknown && (sh curl -L https://git.io/n-install | bash) ; ~/n/bin/n latest ; ~/n/bin/npm install -g typescript webpack && git clone https://github.com/freenet/freenet-core/ && cd freenet-core && git submodule update --init --recursive && export CARGO_TARGET_DIR="$(pwd)/target" && cd stdlib/typescript/ && npm run dev.package && cd ../.. && cargo install --path crates/core --force && cargo install --path crates/fdev --force && cd ./modules/identity-management/ && make build && cd ../antiflood-tokens/ && rm Cargo.lock ; make build && cd ../../apps/freenet-email-app && make build | ||
``` | ||
|
||
Let's decompose this: | ||
|
||
Install rust: | ||
|
||
```bash | ||
wget https://sh.rustup.rs ; sh index.html -y && source "$HOME/.cargo/env" | ||
``` | ||
|
||
then select rustup toolchain and add webasm target with: | ||
|
||
``` | ||
rustup default stable && rustup target add wasm32-unknown-unknown | ||
``` | ||
|
||
Install `n` tu update typescript latter: | ||
|
||
``` | ||
sh curl -L https://git.io/n-install | bash) | ||
``` | ||
|
||
Update `npm`. Warning: required! You must do that to have the latest npm packages. | ||
|
||
``` | ||
~/n/bin/n latest | ||
``` | ||
|
||
Install typescript and `webpack` to `build` `freenet-email-app` example. | ||
``` | ||
~/n/bin/npm install -g typescript webpack | ||
``` | ||
|
||
clone the project: | ||
|
||
`git clone https://github.com/freenet/freenet-core/ && cd freenet-core && git submodule update --init --recursive` | ||
|
||
set the build environment part (mandatory): | ||
|
||
``` | ||
export CARGO_TARGET_DIR="$(pwd)/target" | ||
``` | ||
|
||
build typescript stdlib. | ||
``` | ||
cd stdlib/typescript/ && npm run dev.package && cd ../.. | ||
``` | ||
|
||
Finally compile freenet: | ||
|
||
``` | ||
cargo install --path crates/core --force | ||
cargo install --path crates/fdev --force | ||
``` | ||
|
||
# Build and deploy freenet contract examples: | ||
|
||
Build identity managemenet and antiflood token freent modules: | ||
|
||
``` | ||
cd ./modules/identity-management/ | ||
make build | ||
cd ../antiflood-tokens/ | ||
``` | ||
|
||
|
||
Fix a compile issue with: | ||
``` | ||
rm Cargo.lock | ||
``` | ||
|
||
|
||
``` | ||
make build | ||
``` | ||
|
||
``` | ||
cd ../../apps/freenet-email-app | ||
make build | ||
``` |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.