SmartModule Development Kit (SMDK)

Check out the SmartModule Development Kit page for more information.

SmartModule Development Kit utility

Usage: smdk <COMMAND>

Commands:
  build       Builds SmartModule into WASM
  generate    Generates a new SmartModule Project
  test        Test SmartModule
  load        Load SmartModule into Fluvio cluster
  publish     Publish SmartModule to Hub
  set-public  Set package as public
  version     Print smdk version information
  help        Print this message or the help of the given subcommand(s)

Options:
  -h, --help  Print help
 

smdk build

Builds SmartModule into WASM

Usage: smdk build [OPTIONS] [-- <EXTRA_ARGUMENTS>...]

Arguments:
  [EXTRA_ARGUMENTS]...  Extra arguments to be passed to cargo

Options:
      --release <RELEASE>            Release profile name [default: release-lto]
  -p, --package-name <PACKAGE_NAME>  Optional package/project name
  -h, --help                         Print help
 

smdk generate

Generates a new SmartModule Project

Usage: smdk generate [OPTIONS] [NAME]

Arguments:
  [NAME]
          SmartModule Project Name

Options:
      --project-group <GROUP>
          SmartModule Project Group Name. Default to Hub ID, if set. Overrides Hub ID if provided
          
          [env: SMDK_PROJECT_GROUP=]

      --destination <PATH>
          Local path to generate the SmartModule project. Default to directory with project name,
          created in current directory
          
          [env: SMDK_DESTINATION=]

      --silent
          Disable interactive prompt. Take all values from CLI flags. Fail if a value is missing

      --template-repo <GIT_URL>
          URL to git repo containing templates for generating SmartModule projects. Using this
          option is discouraged. The default value is recommended
          
          [env: SMDK_TEMPLATE_REPO=]

      --template-repo-branch <BRANCH>
          An optional git branch to use with `--template-repo`
          
          [env: SMDK_TEMPLATE_REPO_BRANCH=]

      --template-repo-tag <TAG>
          An optional git tag to use with `--template-repo`
          
          [env: SMDK_TEMPLATE_REPO_TAG=]

      --template-path <PATH>
          Local filepath containing templates for generating SmartModule projects. Using this option
          is discouraged. The default value is recommended
          
          [env: SMDK_TEMPLATE_PATH=]

      --sm-crate-repo <GIT_URL>
          URL of git repo to include in generated Cargo.toml. Repo used for `fluvio-smartmodule`
          dependency. Using this option is discouraged. The default value is recommended
          
          [env: SMDK_SM_CRATE_REPO=]

      --sm-repo-branch <BRANCH>
          An optional git branch to use with `--sm-crate-repo`
          
          [env: SMDK_SM_REPO_BRANCH=]

      --sm-repo-tag <TAG>
          An optional git tag to use with `--sm-crate-repo`
          
          [env: SMDK_SM_REPO_TAG=]

      --sm-repo-rev <GIT_SHA>
          An optional git rev to use with `--sm-crate-repo`
          
          [env: SMDK_SM_REPO_REV=]

      --sm-crate-path <PATH>
          Local filepath to include in generated Cargo.toml. Path used for fluvio-smartmodule
          dependency. Using this option is discouraged. The default value is recommended
          
          [env: SMDK_SM_CRATE_PATH=]

      --sm-crate-version <X.Y.Z>
          Public version of `fluvio-smartmodule` from crates.io. Defaults to latest. Using this
          option is discouraged. The default value is recommended
          
          [env: SMDK_SM_CRATE_VERSION=]

      --sm-type <TYPE>
          Type of SmartModule project to generate. Skip prompt if value given
          
          [env: SMDK_SM_TYPE=]
          [possible values: filter, map, array-map, aggregate, filter-map]

      --sm-public <PUBLIC>
          Visibility of SmartModule project to generate. Skip prompt if value given
          
          [env: SMDK_SM_PUBLIC=]
          [possible values: true, false]

      --with-params
          Include SmartModule input parameters in generated SmartModule project. Skip prompt if
          value given
          
          [env: SMDK_WITH_PARAMS=]

      --no-params
          No SmartModule input parameters in generated SmartModule project. Skip prompt if value
          given
          
          [env: SMDK_NO_PARAMS=]

      --hub-remote <HUB_REMOTE>
          Set the remote URL for the hub
          
          [env: SMDK_HUB_REMOTE=]

      --develop
          Using this option will always choose the Fluvio repo as source for templates and
          dependencies
          
          [env: SMDK_DEVELOP=]

  -h, --help
          Print help (see a summary with '-h')
 

smdk test

Test SmartModule

Usage: smdk test [OPTIONS] [KEY]

Arguments:
  [KEY]  Key to use with the test record(s)

Options:
      --text <TEXT>
          Provide test input with this flag
      --stdin
          Read the test input from the StdIn (e.g. Unix piping)
      --file <FILE>
          Path to test file. Default: Read file line by line
      --raw
          Read the file as single record
  -k, --key-value
          Print records in "[key] value" format, with "[null]" for no key
  -e, --params <PARAMS>
          (Optional) Extra input parameters passed to the smartmodule module. They should be passed
          using key=value format Eg. fluvio consume topic-name --filter filter.wasm -e foo=bar -e
          key=value -e one=1
      --transforms-file <TRANSFORMS_FILE>
          (Optional) File path to transformation specification
  -t, --transform <TRANSFORM>
          (Optional) Pass transformation specification as JSON formatted string. E.g. smdk test
          --text '{}'
          --transform='{"uses":"infinyon/jolt@0.1.0","with":{"spec":"[{\"operation\":\"default\",\"spec\":{\"source\":\"test\"}}]"}}'
  -v, --verbose
          verbose output
  -r, --record <RECORD>
          Records which act as existing in the topic before the SmartModule starts processing.
          Useful for testing `lookback`. Multiple values are allowed
  -l, --lookback-last <LOOKBACK_LAST>
          Sets the lookback parameter to the last N records
      --release <RELEASE>
          Release profile name [default: release-lto]
  -p, --package-name <PACKAGE_NAME>
          Optional package/project name
      --wasm-file <WASM_FILE>
          
  -h, --help
          Print help
 

smdk load

Load SmartModule into Fluvio cluster

Usage: smdk load [OPTIONS]

Options:
      --name <NAME>                  
      --package-path <PACKAGE_PATH>  Optional path to SmartModule package directory
      --release <RELEASE>            Release profile name [default: release-lto]
  -p, --package-name <PACKAGE_NAME>  Optional package/project name
      --wasm-file <WASM_FILE>        Optional wasm file path
  -c, --cluster <host:port>          Address of cluster
      --tls                          Enable TLS
      --enable-client-cert           TLS: use client cert
      --domain <DOMAIN>              Required if client cert is used
      --ca-cert <CA_CERT>            Path to TLS ca cert, required when client cert is enabled
      --client-cert <CLIENT_CERT>    Path to TLS client certificate
      --client-key <CLIENT_KEY>      Path to TLS client private key
  -P, --profile <profile>            
      --dry-run                      Validate package config files, and connection to cluster. Skip
                                     SmartModule load to cluster
  -h, --help                         Print help
 

smdk publish

Publish SmartModule to Hub

Usage: smdk publish [OPTIONS] [PACKAGE_META]

Arguments:
  [PACKAGE_META]
          

Options:
      --release <RELEASE>
          Release profile name
          
          [default: release-lto]

  -p, --package-name <PACKAGE_NAME>
          Optional package/project name

      --ipkg <IPKG>
          path to the ipkg file, used when --push is specified

      --public-yes
          don't ask for confirmation of public package publish

      --pack
          do only the pack portion

      --push
          given a packed file do only the push

      --remote <REMOTE>
          

  -h, --help
          Print help (see a summary with '-h')
 

smdk set-public

Set package as public

Usage: smdk set-public [OPTIONS]

Options:
      --release <RELEASE>            Release profile name [default: release-lto]
  -p, --package-name <PACKAGE_NAME>  Optional package/project name
  -h, --help                         Print help
 

smdk version

Print smdk version information

Usage: smdk version

Options:
  -h, --help  Print help