Giter Club home page Giter Club logo

pbkdf2_wasm's Introduction

hello_world Actor

This actor makes use of a single capability, wasmcloud:httpserver, in order to receive HTTP requests and respond with the classic "Hello, World!".

The implementation

To respond to http requests, the actor must implement the HttpResponse method of the HttpServer interface interface.

The implementation is in the file src/lib.rs

See it in action

  • To compile the actor and generate a signed Webassembly module, type wash build.
  • Run the wasmCloud host with wash up
  • In your browser at localhost:4000, in the Actors table, use the dropdown to start the actor From File and select the built and signed module from step 1
  • Start the HTTP server provider From Registry with OCI reference wasmcloud.azurecr.io/httpserver:0.17.0
  • Link your hello actor to the HTTP server provider with a link value of address=0.0.0.0:8080
  • curl localhost:8080 to see your response, or follow the browser instructions below

In a browser

Visit the url "http://localhost:8000" to see your response in the browser.

How do I customize this template to use other contracts & interfaces?

  • You can change what contracts this actor claims in wasmcloud.toml and the Makefile. In the future this will just be in wasmcloud.toml.
  • You will then need to change the dependencies in Cargo.toml to import the interfaces for the contracts you want. Delete the wasmcloud-interface-httpserver dep if you're not using that contract.
  • Finally, change the src/lib.rs file, changing/deleting the current interface import and impl block, while adding a new import & impl for any contracts you added!

Using the included Github Actions

The generated project include two GitHub actions: build.yml and release.yml under .github/workflows. The build action will automatically build, lint, and check formatting for your actor. The release action will automatically release a new version of your actor whenever code is pushed to main, or when you push a tag with the form vX.Y.Z.

These actions require 3 secrets

  1. WASH_ISSUER_KEY, which can be generated with wash keys gen issuer, then look for the 58 character Seed value
  2. WASH_SUBJECT_KEY, which can be generated with wash keys gen module, then look for the 58 character Seed value
  3. WASMCLOUD_PAT, which can be created by following the Github PAT instructions and ensuring the write:packages permission is enabled

pbkdf2_wasm's People

Watchers

Julien Teruel avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.