Skip to content

Template project with Rust, Typescript and Internet Identity. Powered by Dfinity

License

Notifications You must be signed in to change notification settings

3cL1p5e7/rust-identity-template

Repository files navigation

Rust + Typescript + Internet Identity template example. Powered by Dfinity

This repository is a customized example for Dfinity, Typescript and Rust development. Not quite optimal, not quite pretty, but working. Just take and use.

You can easily deploy a local network and log in through the Internet identity.

Special thanks to Dfinity/CanCan

Quickstart

sh -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)"
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

./run.sh

Quickstop :)

dfx stop

Quickstart with explaination

Initialize Internet Identity submodule

git submodule init
git submodule update

Install requirements such as internet-computer SDK and rust (with wasm support)

sh -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)"
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup target add wasm32-unknown-unknown

To start network with internet-identity (first launch will be long ~ 10min)

./run.sh

To stop network

dfx stop

If backend canister updated

dfx deploy backend

Local development

Start network

./run.sh

Start frontend and open http://localhost:3000

npm run dev

Technical area

Manual start internet identity

cd internet-identity
II_ENV=development dfx deploy --no-wallet --argument '(null)'
echo "http://localhost:8000?canisterId=$(dfx canister id internet_identity)"

Find process by error "Address in use"

ps aux | grep dfx

About

Template project with Rust, Typescript and Internet Identity. Powered by Dfinity

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published