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:
- Within the tauri binary for:
- a .rain string directly from an editor
- a .rain file
- In the ob cli for a .rain file
- 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";
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:
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: