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

Initial Rust support #488

Merged
merged 293 commits into from
Oct 18, 2021
Merged

Initial Rust support #488

merged 293 commits into from
Oct 18, 2021

Conversation

oowekyala
Copy link
Collaborator

@oowekyala oowekyala commented Sep 8, 2021

What this initial version of the rust target supports is described in this file. Most things work for simple examples, but there are still some problems that should be fixed in the runtime. That checklist is also WIP and I'll expand it to make each bullet point covered by a test case

Note: when checking out the branch for the first time, you might have to run git submodule update --init to clone the rust runtime submodule.

This is a draft until

  • the failing tests are fixed
  • the CI workflow for rust-test is setup
  • Question: the tests (and ci workflow) link against the rust-reactor submodule instead of fetching https://github.com/lf-lang/reactor-rust. Is this the correct thing to do? I think this way, updates to the runtime need to be approved also here by updating the submodule, which is nice. However, programs generated by LFC link against the (latest version of the) git repo, and not the submodule... Maybe there is a way to make the revision number of the submodule accessible from java? This way lfc could make programs link against that specific revision fetched from the upstream repo
  • Allow empty target properties block #551 is merged
  • [ ] Add gradle task to run a single test from command line #555 is merged

TODOs

Note that some changes conflict with #535. Whatever the actual order of merges I'll follow up to fix the conflicts.

intellij-rust doesn't like it and it's not really necessary
Also update runtime crate name to reactor_rt
Now we use an ssh connection to access the github repo.
Be aware that you need a credentials helper for this to
work as the repo is private and cargo will not prompt for
a password.

rust-lang/cargo#1851
Model supports nested instantiations now, but
parameter handling is still todo
TODO is declaring connections somehow. But we should at least support calling startup reactions
For now, connections are not supported. But we already
have logic to trigger startup recursively
This way you don't have to push and delete your lock
files to use a change in the rt library
PortComposition test runs fine
@oowekyala
Copy link
Collaborator Author

@lhstrh I've tried to improve the comment situation. I'd also like to split RustEmitter into several classes to improve code quality, however, I can't do this in this PR as it would cause too many conflicts with my follow up branch.

@lhstrh
Copy link
Member

lhstrh commented Oct 17, 2021

Perhaps you could factor the discussion about test/Rust/src/CompositionInitializationOrder.lf into an issue and then we just go ahead and merge this in?

@cmnrd cmnrd merged commit 3bca053 into master Oct 18, 2021
@cmnrd cmnrd deleted the rust-dev branch October 18, 2021 14:50
oowekyala added a commit that referenced this pull request Oct 18, 2021
Tests are still failing on windows
oowekyala added a commit that referenced this pull request Oct 19, 2021
@oowekyala oowekyala mentioned this pull request Oct 19, 2021
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

Successfully merging this pull request may close these issues.

None yet

4 participants