コンテンツにスキップ

インストール

Component要件
OSLinux, macOS, Windows
Rust1.95+
Memory4 GB RAM
Disk2 GB の空き容量
Component要件
Rust1.95+ (latest supported)
Memory8 GB RAM
CPUマルチコア processor

Rust がインストールされていない場合:

Terminal window
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

正しい toolchain version を設定します:

Terminal window
rustup default 1.95

component を build するための WASM target を追加します:

Terminal window
rustup target add wasm32-wasip2

まず gtc router をインストールし、その後 gtc install で Greentic companion tools をインストールします。通常利用では greentic-cli や個別の companion crates を直接インストールしないでください。gtc install が delegated binaries を router と揃えます。

Terminal window
cargo install cargo-binstall
cargo binstall gtc
gtc install
gtc doctor
Terminal window
gtc --version
gtc doctor

production の session persistence 向け:

Terminal window
docker run -d --name redis -p 6379:6379 redis:alpine

webhook ベースの provider (Telegram、Slack など) 向け:

Terminal window
# Install
brew install ngrok/ngrok/ngrok # macOS
# or download from https://ngrok.com/download
# Configure
ngrok config add-authtoken YOUR_TOKEN
# Run
ngrok http 8080

gtc router が使う delegated Greentic binaries をインストールまたは更新します:

Terminal window
gtc install

Install plan を確認するには gtc install --dry-run を使います。Controlled environments では toolchain を pin できます:

Terminal window
gtc install --release 1.0.15
gtc install --manifest ./greentic-toolchain.json

gtc install は standard companion tools をインストールします。Standalone component development では cargo-component も利用できます:

Terminal window
cargo binstall cargo-component

その後、delegated component surface を使います:

Terminal window
gtc dev component --help

すべてが正しく動作していることを確認するには、次を実行します:

Terminal window
# Check GTC CLI
gtc --help
# Check Rust WASM target
rustup target list --installed | grep wasm32-wasip2
# Create and run a test bundle
gtc wizard --dry-run

Error: “wasm32-wasip2 target not found”

Terminal window
rustup target add wasm32-wasip2

Error: “Permission denied”

Terminal window
# On Linux/macOS, ensure binary is executable
chmod +x /usr/local/bin/gtc