GithubHelp home page GithubHelp logo

runtools / run Goto Github PK

View Code? Open in Web Editor NEW
91.0 8.0 0.0 281.33 MB

⚡The resource runtime

Home Page: https://run.tools

License: MIT License

JavaScript 96.75% HTML 0.96% Shell 2.30%
tool-manager api cli terminal developer-tools command-line shell object-oriented rpc

run's People

Contributors

mvila 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

run's Issues

Bash Runtime Resource

This is fork 2 of 2 from #2.

Quoting @mvila. The goal is to create...

a "resource runtime" allowing to implement resource methods in Bash.

For example:

{
  "@runtime": "bash",
  "@implementation": "./main.sh",
  "compress": {
    "@type": "method",
    "@input": {
      "source": {
        "@type": "string",
        "@position": 0
      },
      "destination": {
        "@type": "string",
        "@position": 1
      }
    }
  },
  "uncompress": {
  }
}

Then, the implementation would be a bash script:

#!/bin/bash

compress ()
{
  gzip -c $1 > $2
}

uncompress ()
{
  # ...
}

A runtime for resources implemented in Bash is complicated,
and I am not sure that Bash can handle the whole resource specs.

Feature request: bash runtime

I like the idea of machine readable interoperability, but for legacy reasons I think there should be a bash runtime so that, for instance, a 'bzip' resource could be created to wrap the bzip command line. If you feel like a challenge, try building a 'javac' or 'gcc' resource.

EXDEV: cross-device link not permitted (on Linux)

Hiya, just gave run a go, ran (no pun intended) into an issue on Linux:

❯ run @registry
{ Error: EXDEV: cross-device link not permitted, rename '/tmp/8d44d3f1dc023f4de9ac635acc6eeb55' -> '/home/markus/.run/resdir-registry/resource-cache/resdir/registry-client/versions/0.1.27'
    at Error (native)
    at fs.renameSync (fs.js:811:18)
    at /Users/mvila/Projects/resdir/public/packages/resource-fetcher/src/index.js:222:7
    at next (native)
    at step (/usr/local/lib/node_modules/run-cli/node_modules/@resdir/resource-fetcher/dist/node/cjs/index.js:36:221)
    at _next (/usr/local/lib/node_modules/run-cli/node_modules/@resdir/resource-fetcher/dist/node/cjs/index.js:36:409)
    at /usr/local/lib/node_modules/run-cli/node_modules/@resdir/resource-fetcher/dist/node/cjs/index.js:36:477
    at /usr/local/lib/node_modules/run-cli/node_modules/@resdir/resource-fetcher/dist/node/cjs/index.js:36:97
    at ResourceFetcher._saveCachedResourceVersion (/Users/mvila/Projects/resdir/public/packages/resource-fetcher/src/index.js:213:89)
    at /Users/mvila/Projects/resdir/public/packages/resource-fetcher/src/index.js:90:23
  errno: -18,
  code: 'EXDEV',
  syscall: 'rename',
  path: '/tmp/8d44d3f1dc023f4de9ac635acc6eeb55',
  dest: '/home/markus/.run/resdir-registry/resource-cache/resdir/registry-client/versions/0.1.27',
  contextStack: 
   [ Resource {
       '$defaultAutoBoxing': false,
       '$defaultAutoUnboxing': false,
       '_$bases': [],
       '_$children': [],
       '_$currentDirectory': '/home/markus',
       '_$isInitializing': false,
       '_$listeners': {},
       '_$hasBeenInitialized': true } ] }

I don't really know much node, so maybe this is a known issue and my partition setup is at fault. But figured it can't hurt to log it...

Bash resource for method implementations

This is fork 1 of 2 from #2. The goal is to provide a resource so that bash commands can be used to implement methods, such as this implementation for a compress method powered by gzip, implemented by calling out through the command line.

{
  "compress": {
    "@type": "method",
    "@input": {
      "source": {
        "@type": "string",
        "@position": 0
      },
      "destination": {
        "@type": "string",
        "@position": 1
      }
    },
    "@run": "(@import shell/bash) run 'gzip -c ${source} > ${destination}'"
  },
  "uncompress": {
  }
}

Plan of attack is that I will create a resource named robertfischer/bash for @mvila to be review, and we will move that into script/bash once it looks good.

Feature Request: Stack Resource and Haskell Runtime

I do most of my development in Haskell, which is a nontrivial environment to manage. I'm excited about the possibility of using Run resources to manage them, since the dominant alternative (the Nix package manager) gives me a sad.

There are two pieces that I think we would need for this: first, a resource for supporting stack builds; and second, a runtime resource that would execute a Haskell *.hs file (via stack runghc).

Two questions.

  1. Are you interested in this?
  2. Any tips on how to build this, what to name the resources, etc., etc.?

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.