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

fix(rustic-babel-build-sentinel): align behaviour with other lang #9

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

CeleritasCelery
Copy link
Contributor

Original description from @ed9w2in6 in brotzeit/rustic#535 :

In an org file, the src block's code should be interpreted, OR the binary compiled from it SHOULD execute with PWD as default-directory of the org file.

Summary of changes:

  1. save the original default-directory then later restores it.
  2. supply --manifest-path option to cargo run to execute the target Cargo.toml binary compiled from the src block.

For reference:
Try to execute a C++, C, js (node), python block.
In particular, see implementation of org-babel-C-execute or org-babel-python-evaluate-external-process. May be we can re-write like them in the future.

fixes: brotzeit/rustic#509

In an org file, the src block's code should be interpreted, OR the binary compiled from it SHOULD execute with PWD as `default-directory` of the org file.

Summary of changes: 
1. save the original default-directory then later restores it.
2. supply `--manifest-path` option to `cargo run` to execute the target `Cargo.toml` binary compiled from the src block.

For reference:
Try to execute a C++, C, js (node), python block.
In particular, see implementation of `org-babel-C-execute` or `org-babel-python-evaluate-external-process`.  May be we can re-write like them in the future.

fixes: brotzeit/rustic#509
@psibi
Copy link
Member

psibi commented Aug 16, 2024

Probably this PR can be rebased and then merged if the CI passes ?

@CeleritasCelery
Copy link
Contributor Author

Yes, it should be able to merged if the conflicts can be resolved.

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.

Directory that binary executed from
3 participants