Welcome to the Polkadot Workshop: Intro to Rust for Web3Cebu repository! This repo contains essential resources, documentation, and example scripts to guide you through the basics of Rust, focusing on building in the Web3 ecosystem with Polkadot.
The repo is organized into the following directories:
-
docs/
: Contains comprehensive documentation on Rust topics. These materials will help you understand core Rust concepts relevant to Polkadot development. -
examples/
: Contains practical example scripts demonstrating Rust code. These examples are designed to provide hands-on experience and reinforce the concepts discussed in thedocs/
section.
Before you begin, ensure the following tools are installed on your machine:
- Rust Toolchain: Install Rust via rustup.
- Polkadot.js: Install the Polkadot.js API if needed for Polkadot integration.
To clone this repository, use the following command:
git clone https://github.com/yourusername/rust-basics-web3-cebu-polkadot.git
To run the example scripts, follow these steps:
-
Navigate to the
examples/
directory:cd examples/
-
Use
cargo
to run the specific example script you want to execute:cargo run --example <example-name>
Replace
<example-name>
with the name of the example script you'd like to run. For example:cargo run --example hello_world
-
If additional dependencies or packages are required, you will be prompted to install them through
cargo
. Follow the on-screen instructions to complete installation.
The workshop covers the following Rust fundamentals:
- Basic Syntax
- Variables and Data Types
- Ownership and Borrowing
- Functions and Modules
- Error Handling
- Traits and Generics
- Rust for Web3 and Polkadot Development
We encourage contributions from the community! Here's how you can help:
-
Fork this repository by clicking the "Fork" button at the top right of this page.
-
Star the repository if you find it helpful and want to show your support!
-
Clone your forked version to your local machine:
git clone https://github.com/your-username/rust-basics-web3-cebu-polkadot.git
-
Create a new branch for your feature or fix:
git checkout -b feature-branch-name
-
Make your changes and commit them:
git commit -m "Add your commit message here"
-
Push your changes to your forked repository:
git push origin feature-branch-name
-
Submit a pull request (PR) to the original repository for review.
Feel free to open an issue if you find any bugs or have suggestions!
After making your contributions, test the example scripts again to ensure your changes work as expected:
-
Go to the
examples/
directory:cd examples/
-
Run the example scripts as before using
cargo
:cargo run --example <example-name>
Make sure your changes do not break any existing examples before submitting your pull request!
This project is licensed under the Apache 2.0 License. See the LICENSE file for more details.
For any questions or feedback, feel free to reach out to us via our community channels or open an issue in the repo.