Crates.io | pyra |
lib.rs | pyra |
version | 0.0.8 |
source | src |
created_at | 2019-09-25 11:25:36.686673 |
updated_at | 2019-11-24 08:53:49.664507 |
description | Pyra is a high-level distributed ledger development interface, written in Rust and capable of running on top of Substrate, Polkadot, and many more |
homepage | |
repository | https://github.com/parachain-tracker/pyra |
max_upload_size | |
id | 167535 |
size | 290,882 |
The toolbox you need for developing the next Web3.0
Pyra is a high-level Distributed Ledger CLI, written in Rust and aiming to capable of running on top of Substrate. As Keras team says, Being able to go from idea to result with the least possible delay is key to doing good research.
Use Pyra if you need a Distributed Ledger development interface that:
Cargo:
cargo install pyra
Update:
cargo install --force pyra
Right now, pyra has only one platform substrate to start your project. More is coming soon...
pyra init
You will then have to input name to register
After choosing your platform pyra will:
Navigate to the folder with
cd the-name-of-your-project
the-name-of-your-project
├── the-name-of-your-project-frontend # substrate-frontend-template
├── the-name-of-your-project-node # substrate-node-template
└── the-name-of-your-project-polkadotjs-apps # polkadot-js/apps
The frontend is from the substrate-frontend-template.
Navigate to the folder inside the project folder with
cd the-name-of-your-project-frontend
the-name-of-your-project-frontend
├── LICENSE
├── node_modules # Built with init command
├── package.json
├── public
├── README.md
├── src
└── yarn.lock
The node is from the substrate-node-template.
Navigate to the folder inside the project folder with
cd the-name-of-your-project-node
the-name-of-your-project-node
├── azure-pipeline.yml
├── build.rs
├── Cargo.lock
├── Cargo.toml
├── LICENSE
├── README.md
├── runtime
├── scripts
├── src
└── target # Built with init command
The polkadotjs-apps is from the polkadot-js/apps.
Navigate to the folder inside the project folder with
cd the-name-of-your-project-polkadot-js-apps
the-name-of-your-project-polkadotjs-apps
├── babel.config.js
├── BOUNTIES.md
├── CHANGELOG.md
├── CONTRIBUTING.md
├── deployment.extras.yml
├── deployment.template.yml
├── Dockerfile
├── gh-pages-refresh.sh
├── i18next-scanner.config.js
├── jest.config.js
├── lerna.json
├── LICENSE
├── node_modules # Built with init command
├── package.json
├── packages
├── postcss.config.js
├── README.md
├── scripts
├── test
├── tsconfig.eslint.json
├── tsconfig.json
├── types.json
└── yarn.lock
You can now open your current work with the editor on the command:
pyra open
You can also set editor to use with each project with the command:
pyra seteditor
If you want to remove the project, run:
pyra remove
and you can remove multiple projects with checklist feature.
After choosing the projects, pyra removes the project.
After you worked on the substrate runtime, run command:
pyra build --target runtime-or-node (default option is node)
Then pyra will ask which project to build runtime or node:
then it will cargo build
in the project directory
To run your node, run command:
pyra run
Then pyra will ask which project to run the node binary:
After choosing the project, pyra will inform pid of the node daemon to kill when not needed.
coming soon...react-script from frontend is bugging
To open up the frontend to interact with your running node daemon run command:
pyra interact --ui template-or-apps
Then Pyra will ask which project to run the frontend app:
After choosing the project, pyra will yarn start
in the fronend directory or yarn build
then open http server to host built binary from the project directory then open webbrowser corresponding to running address(e.g. localhost:3000
, localhost:8000
).
coming soon...need to determine what cloud platform to focus
To deploy the node to local/cloud environment, run command:
pyra deploy --env docker-or-cloud
Choosing docker will run docker-compose
command, but cloud will have selections. After selecting platform, it will get the terraform script or kubernetes config from separate package and run it.
coming soon...parachaintracker on development stage
Publish your node/runtime module with the command:
pyra publish --target runtime-or-node
Then pyra will ask which project to publish:
After choosing the project pyra will submit project data saved in package.json which was created on initialization to hosting website.
Rust
clap
indicatif
colored
Cargo
yarn
Jest: coming soon
terraform coming soon
docker coming soon
kubernetes coming soon
Manage projects
Map commands to operate
Deployment infrastructure
Package.json for project reinitialization
Modules(runtime)
Frontend
Apps
Parity Technologies, Web3 Foundation
for more platform support, please leave an issue or contact hskang9@gmail.com
When I tried to develop something on Parity substrate runtime module I had to locate to runtime module directory, run cargo build
, get back to project root directory, and find wasm file in target
directory. make this in cli commands:
cd substrate-node-template
cd runtime
cargo build # and wait for 5 mins
cd ..
cd ..
cd target
cd release
... and it goes on and on...
There were just too many commands for me 🐨.
Also, imagine when someone has to deploy the ledger on local/cloud environment. More commands with docker were expected, and there are bunch of commands for site reliability engineer to handle. Then, when will the general public will face the distributed up and running...? Every blockchain in the field has the undelying technologies which they cannot handle; docker, kubernetes, terraform, prometheus, grafana... the list goes on and on.
Eventually, I made the tool to do those in one command.
I wanted to make the name simple, I tried to go with sup(substrate-up), but there are other frameworks coming along(e.g. subsocial, kilt, etc) and substrate-up was limited to Parity substrate. Then I found pyra from pyra+mid and started to use it to call this thing.
Projectman by Saurabh Daware. This project started from the rust port of his brilliant idea and project.
Polkadot-deployer by Federico Gimenez for deployment reference
Substrate templates by Substrate developer hub. Pyra runs on top of the technology built by them.
Polkadot-js-apps by polkadot-js team for the apps which is the dummy-proof solution to interact with the node
The project currently is solely developed and managed by Hyungsuk Kang.
To contribute to this project:
report errors and improvement request in the issue
Make documentation for the generalized commands to build blockchain platform dev interface
Make commands for your blockchain platform in platform folder and submit it as PR
Use this software
Sponsor this project
Collaborations are welcome, please leave an issue here or