Skip to content

How to include a shared code crate? #7

Open
@hassox

Description

@hassox

Hi there..

I'm new to rust and serverless. I've been trying to create a collection of functions using this template. One of the things that I would like to be able to do is have a common crate that's shared across all my functions.
I'm unsure how to structure the code so that I can include this shared crate so that it builds..

My current setup is

mycommon
  - src
myapp
 - serverless.yml
 - hello

  - Cargo.toml
   - src
     - main.rs
    - Cargo.toml
  - world
    -src
      - main.rs
   -  Cargo.toml

When the build tries to run the docker container can't find the files.

How do other folks deal with this? Any help here would be really appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions