Basic usage

NOTE

Whether it is Makepad or GenUI, the usage of init, check, install, config, run, wasm commands are the same

You only need to pay attention to: create, studio, pkg

And init, check, config are all automatic

init - Initialize Ract

Initialize or reset the CLI. Ract will generate:

  1. .env

  2. chain/

  • chain/env.toml
1ract init

Output:

1πŸš€ Start to init ract...
2βœ… Chain init successfully!
3πŸŽ‰ Init ract successfully!

check - Check the toolchain

Check if the required tools and dependencies are installed. Options include:

  • Basic: [cargo, rustc, git]
  • Underlayer: [makepad (gen_ui, makepad)]
  • All: Combines basic tools and low-level tools.
1ract check

Interactive dialog example:

1πŸ₯³ Welcome to use ract checker!
2? Which you need to check?
3> Basic
4Underlayer
5All

install - Install toolchain

Install tools and dependencies required for development. Available options:

  • Rust tools: rustc, cargo
  • Version control: git
  • Makepad-specific tools: Including components such as gen_components, wasm_build.
1ract install

Interactive dialog example:

1πŸ₯³ Welcome to use ract Install!
2
3πŸ”Έ Select the tools to install:
4- rustc
5- cargo
6- git
7- makepad tools (default or custom options)
8? What tools you want to (re)install?
9> [ ] rustc|cargo
10[ ] git
11[x] makepad

config - Configure the CLI

Set or update environment variables and CLI configuration.

TIP

In most cases, you don't need to configure anything unless you already have Ract-related dependencies and need to point to them

1ract config

Interactive dialog example:

1πŸ₯³ Welcome to use ract config!
2
3πŸ”Έ env: Set the `path` for the chain env.toml file
4πŸ”Έ chain_env_toml: Set the rust dependency for GenUI toolchain
5
6> Which env file do you want to config? chain_env_toml
7> Get or Set Config? set
8> Which one do you want to config? makepad-widgets
9> Path: /Users/shengyifei/projects/makepad/makepad
10πŸŽ‰ Config finish!