Skip to content

Document instructions for running Enarx on server3 #2

@Yaxuan-w

Description

@Yaxuan-w

This issue documents the current working setup for building and running Enarx on server3.

Adjust rust toolchain

# Under /home/<usr>
rustup install nightly-2024-11-01
rustup override set nightly-2024-11-01

Install required targets

rustup target add wasm32-wasi x86_64-unknown-linux-musl x86_64-unknown-none --toolchain nightly-2024-11-01

Build and install Enarx

cd enarx/  # Navigate to the Enarx project directory
cargo install --locked --bin enarx --path ./

# Add Enarx binary to PATH
export PATH="$HOME/.cargo/bin:$PATH"

# Confirm installation
which enarx

Create test case

cd ../
cargo init --bin hello-world
cd hello-world/
echo 'fn main() { println!("Hello, Enarx!"); }' > src/main.rs
# Compile to regular wasm binary
cargo build --release --target=wasm32-wasi

Run

enarx run <absolute_path_of_executables>

Example:

enarx run /home/alice/hello-world/target/wasm32-wasi/release/hello-world.wasm

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions