Skip to content

Interfaces for .rain composition #56

Description

@hardyjosh

We need to decide on the interfaces for .rain composition, both in the crate itself and in the CLI.

Short term critical path usage looks like:

  1. Within the tauri binary for:
    • a .rain string directly from an editor
    • a .rain file
  2. In the ob cli for a .rain file
  3. In our foundry setups

For all three use cases we want to compose not compile. So the target is always a Rainlang string, not bytes or any other struct. This is because parsing Rainlang to bytecode is handled by the onchain parser contract. It's also an open question whether this repo should even hold code related to parsing Rainlang, or whether it should be in rainlanguage/rain.interpreter.

#1 and #2 will be via the crate's API. @rouzwelt can you add your proposed interface here?

#3 will be via CLI - we talked about outputting either as a string directly, or into a .sol file. Not sure how that would work with pragma, but I assume other than that it would just be something like:

string constant ENTRYPOINT_NAME = "rainlang string";

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions