Coder Social home page Coder Social logo

madflojo / tarmac Goto Github PK

View Code? Open in Web Editor NEW
317.0 8.0 16.0 7.18 MB

Write as Functions, Deploy as a Monolith or Microservice with WebAssembly

Home Page: https://tarmac.gitbook.io/tarmac-framework/

License: Apache License 2.0

Dockerfile 0.42% Makefile 1.52% Go 97.62% Shell 0.19% Rust 0.25%
wasm microservice-framework golang functions-as-a-service serverless wasi hacktoberfest

tarmac's People

Contributors

colineberhardt avatar dependabot[bot] avatar madflojo avatar odonnellryan32 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tarmac's Issues

Add ARM support

Hi! I tried to use Tarmac but had some issues due to the lack of ARM support in the official docker image. I noticed you're already using QEMU and buildx as steps in the pipeline, so I believe just a platforms: linux/amd64,linux/arm64 in the push-action could add this?

WASI Module not instantiated error when running example

Running on WSL2 Ubuntu
Docker version 20.10.14, build a224086

The source was cloned and the example build instructions were followed

$ cd example/tac/go
$ make build
make build
mkdir -p functions
## Run TinyGo build via Docker because waPC requires a <0.18.0 version of TinyGo to work right
docker run -v `pwd`/:/build -w /build tinygo/tinygo:0.17.0 tinygo build -o /build/functions/tarmac.wasm -target wasi /build/main.go
go: downloading github.com/wapc/wapc-guest-tinygo v0.3.0

The tarmac wasm file is generated after running the build command:

$ ls -l functions/
total 220
-rwxr-xr-x 1 root root 221650 Jul 18 11:21 tarmac.wasm

Running the tarmac container:

docker run -p 8080:8080  \
    -e "APP_ENABLE_TLS=false" \
    -e "APP_LISTEN_ADDR=0.0.0.0:8080" \
    -v $(pwd)/functions:/functions madflojo/tarmac

time="2022-07-18T15:00:33Z" level=warning msg="No Config file found, loaded config from Environment - Default path ./conf"
time="2022-07-18T15:00:33Z" level=info msg="KV Store not configured, skipping"
time="2022-07-18T15:00:33Z" level=info msg="SQL DB not configured, skipping"
time="2022-07-18T15:00:33Z" level=fatal msg="Service stopped - unable to create module pool for wasm file /functions/tarmac.wasm - module[wasi_unstable] not instantiated"

Auth - authz

As far as I can see there is not any auth or authz in tarmac.

i generally use NATS for rerouting events into tarmac . Nats just wants a jwt to control Auth and Authz.
But even without NATS , Tarnac needs to assert who can do what.

https://github.com/pocketbase/pocketbase looks like a nice solution to this.
.Or at least to use as one way to add auth / authz. It’s probable that others might want a different solution and that’s why jwt is loose coupled.

the cool thing about pocketbaae is that it’s real time and simple.

have a look

GGO free wasm runner

Wazero is faster than the others due to less overhead

https://wazero.io/

It can run within envoy or alone
Config can be file based or off envoy.

It can also run wasi and wasm compiled golang .

Multiple Init Functions and Scheduled Functions not working

When multiple init functions are defined, or scheduled tasks are defined within the configuration file during execution, only the last function defined will be executed. This appears to be due to a scoping issue with the closures and the for loop they are defined within.

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.