Ract for GenUI

TIP

You don't need to cd to the source project code directory, just cd to the GenUI project root directory

The GenUI project is a typical Rust Workspace project, and the project root directory is the Workspace directory

For example, you used ract create to build a workspace named quickstart at /Users/John/projects/gen_ui_project. You only need to cd to /Users/John/projects/gen_ui_project/quickstart. Then run ract run directly

create - Create a GenUI project

Ract will build the GenUI project template according to the configuration entered by the user

create will help you check the current environment status

1ract create

Interactive dialog example:

1❤️ WELOCME TO GENUI, ract is a build tool for you!
2
3> Which framework template do you want to create? gen_ui
4> Input the name of the workspace: quickstart
5============ Project1 ======================
6> Which underlayer you want to select? Makepad
7> Project name: start
8> Authors name: John
9> ...
10🎉 Your project has been created successfully!

run - Run the project

Run the GenUI project.

1ract run

add - add dev plugins

1# add gen_makepad_http for network http(s)
2ract add gen_makepad_http

wasm - Run WASM projects in the browser

Build and run WASM projects directly from the CLI.

1ract wasm

Interactive dialog example:

1🥳 Welcome to use ract wasm!
2
3🔸 Port for the web studio 8888
4📦 wasm is being packaged
5🚀 wasm is being started...
6Starting webserver on 127.0.0.1:8888

pkg - Package a Project

Package a project using cargo-packager.

1# cd the compiled package
2cd src_gen_0
3
4ract pkg

Interactive dialog example:

1🥳 Welcome to use ract packager!
2
3🔸 gpiler will check and install `cargo-packager` if not present.
4🔸 Basic packaging configuration is auto-generated.
5? Select how to package the project: init
6🎉 Package resources have been generated!