Git Product home page Git Product logo

Comments (5)

frame-lang avatar frame-lang commented on May 20, 2024

@walkie I am actively investigating this now and interested in your perspective on how to handle this. I am thinking to follow the POSIX syntax:

I'm also thinking that -o could be used to specify a target file.

Thoughts? Also I am just looking into structopt now so if you have guidance on how this can be easily done LMK, otherwise I'll dig in (which isn't a bad thing).

Thanks!

from frame_transpiler.

walkie avatar walkie commented on May 20, 2024

For argument parsing, you should probably use clap instead of structopt since that seems to be the standard now. The structopt docs even have a note saying that it's now in maintence mode and to use clap instead.

I don't have any strong opinion on the syntax, but following a standard seems like a 👍 to me. The other option might just be to do whatever is most natural/easiest with clap, since that's likely to follow the most common practice. (Those two options might be the same, in which case, even better!)

from frame_transpiler.

frame-lang avatar frame-lang commented on May 20, 2024

@walkie So I now think the actual proper standard is that the absence of a filename is the indicator to read from stdin. However currently framec takes the language parameter as a positional parameter, just like the filename and therefore not really distinguishable (unless I'm missing some subtlety to this).

So I'm thinking to make the language a mandatory option with value so:

framec -l rust < Spec.frm

Would this break a lot of tooling on your side?

from frame_transpiler.

walkie avatar walkie commented on May 20, 2024

We're not using the CLI at all, so it won't impact us. We call Exe::run_file directly from a build.rs file.

Only tangentially related to the issue here, but we actually have several different build.rs files floating around for different projects that all do slight variants of the same thing. I'm currently abstracting the shared behavior out, and I plan to add it to the Frame repo as a new frame_build crate. I'll add a README to that describing our pattern for integrating Frame state machines into larger Rust projects, which might be helpful for others hoping to use Frame+Rust.

I'll let you merge the PR on that one since it adds a new crate to the repo.

from frame_transpiler.

frame-lang avatar frame-lang commented on May 20, 2024

from frame_transpiler.

Related Issues (20)

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.