daas workshop
  • Hands-On experience building a Data as a Service Platform
  • Set Up
    • Creating a Workstation
    • Installing Tools
    • Starting Kafka
    • Congratulations
  • Module I - Overview of the DaaS Pattern
    • Section I - The Overall Pattern
    • Section II - Data Sourcing
    • Section III - Data Provisioning
    • Section IV - Data Consumption
  • Module II - Building a Rust Project
    • Section I - Create a Package
    • Section II - Creating a Library
    • Section III - Creating an Executable
    • Section IV - Creating a Hello World RESTful Endpoint
      • Section IV - manifest
      • Section IV - library
      • Section IV - module
      • Section IV - integrated testing
      • Section IV - executable
  • Module III - Building a RESTful Endpoint for Sourcing Data
    • Section I - Overview
    • Section II - manifest
    • Section III - executable
    • Section IV - starting the service
    • Section V - service testing
  • Module IV - Building a Genesis Microservice for Processing the Sourced Data
    • Section I - Overview
    • Section II - manifest
    • Section III - executable
    • Section IV - starting the service
    • Section V - service testing
  • Module V - Building a Provisioning Microservice
    • Section I - Overview
    • Section II - manifest
    • Section III - executable
    • Section IV - starting the service
    • Section V - adding the business logic
    • Section VI - testing the service
  • Module VI - Building a RESTful Endpoint for Publishing Reporting Data
    • Section I - Overview
    • Section II - manifest
    • Section III - executable
    • Section IV - starting the service
    • Section V - adding the business logic
    • Section VI - testing the service
  • Privacy Design Strategies
  • Further Exploration
Powered by GitBook
On this page

Was this helpful?

  1. Module III - Building a RESTful Endpoint for Sourcing Data

Section II - manifest

PreviousSection I - OverviewNextSection III - executable

Last updated 3 years ago

Was this helpful?

Let's begin by declaring a new executable for the service that will act as the data sourcing RESTful endpoint. We will do this by adding a [[bin]] section to our Cargo.tomlmanifest file.

[[bin]]
name = "myapp_sourcing"
path = "src/bin/sourcing.rs"

Next, we need to include the dependent crates into the project. Add the following lines to the [dependencies] section in the Cargo.toml file

serde ="1.0"
serde_derive = "1.0"
serde_json = "1.0"
daas = "0.2.1"
pbd = "0.4.0"

The Cargo.toml file should now look like this:

[package]
name = "rust-daas"
version = "0.1.0"
authors = ["dsietz <davidsietz@yahoo.com>"]
edition = "2018"

[lib]
name = "myapp"
path = "src/lib.rs"

[[bin]]
name = "hello_world"
path = "src/bin/hello-world.rs"

[[bin]]
name = "myapp_sourcing"
path = "src/bin/sourcing.rs"

[dependencies]
log = "0.4"
env_logger = "0.8"
actix-web = "3"
serde ="1.0"
serde_derive = "1.0"
serde_json = "1.0"
daas = "0.2.1"
pbd = "0.4.0"

[dev-dependencies]
actix-rt = "1.1"
Cargo.toml