Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: ability to compile from stdin #6

Closed
mbylstra opened this issue Nov 27, 2016 · 2 comments
Closed

feature request: ability to compile from stdin #6

mbylstra opened this issue Nov 27, 2016 · 2 comments

Comments

@mbylstra
Copy link

For example, I'd like to be able to do this:

faust < cat ./example.dsp

A bit of background:

  • I want to set up a REST server for generating SVG diagrams for Faust code
  • I want to use Docker for no-fuss deployments of the faust executable

At present the only way to read a file is to specify one or more files with file paths (in the current filesystem). Docker makes this awkward as by default it only has access to the container's filesystem (not the host's, where the file you want to compile will reside).

It can be done, but it is awkward. Eg:

docker run -v /home/:/home/ mbylstra/faust /home/michael/code/current/faust-docker/test.dsp

What this does is mount the host's /home/ directory as /home in the container. You then need to use full paths for the file you want to compile (~ or . won't work).

With stdin, you'd be able to do the following, which is nicer:

docker run mbylstra/faust < cat ./test.dsp

Has this been considered?

@gierschv
Copy link
Contributor

gierschv commented Nov 27, 2016

Hey @mbylstra,

You can do this:

docker run -i faust /dev/stdin < [path-on-your-host].dsp

For example:

docker run --rm -i faust /dev/stdin < ~/test.dsp

Cheers,
Vincent

@mbylstra
Copy link
Author

Great idea! Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants