edjx function build
Builds the sample function after using the function init command.
You must be in the function directory to execute this command, that is, the directory that contains the
edjx function build [flag]
--target-dir <directory-name> Optional. Directory to store all generated artifacts. Default directory is "target".
Set the organization ID associated with all EDJX operations.
root@edjx:~ # edjx config organization -i Use the arrow keys to navigate: ↓ ↑ → ← ? Select organization: ▸ Org2 (4ff1cbdd-ac7a-458a-9a89-619f283a5dda) DocsTesting (54fd5c4e-f48c-4579-8bcd-311355d37ca4)
If no organizations display, create one using the Console.
Create an application.
root@edjx:~ # edjx application create -n app-org2 Application created successfully... Application ID : 07f424e2-5d7e-4eb6-b1bf-332d64560f49
Set the application ID to be associated with any new functions.
root@edjx:~ # edjx config application -i
Create a function within the application.
If you already have the function code, skip to step 4b.
Create the directory and set the function parameters.
root@edjx:~ # edjx function init project Function Name: project01 ✔ WASM ✔ Rust ✔ HTTP ✔ 30 ✔ 64 Setting up project with starter files...... Project successfully initialized in project directory
Change to the function directory.
root@edjx:~ # cd project
Open VS Code.
root@edjx:~ # code .
VS Code displays the directory and files of your function.
Modify the code as desired.
Execute the build command to build the function based on the .wasm file you created.
root@edjx:~ # edjx function build Finished release [optimized] target(s) in 1.41s Project built and wasm file generated successfully at /home/username/project/target/wasm32-unknown-unknown/release/edjfunction_example_rust.wasm