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

separate guest import and export code #25

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

PradeepKiruvale
Copy link

@PradeepKiruvale PradeepKiruvale commented May 23, 2024

I have separated the guest import and export calls into separate files in this PR.
I also did some code formatting

Restructured the code as below

The directory strucutre is as below:

├── cpp_host (Native host code)
├── guest (Guest code)
├── guest_imported_fns.cpp ( host application imported calls)
├── main.cpp (Application)
└── wit (Wit file that is used for generating the code)

Added a native string rust code

0vygvn added 4 commits May 23, 2024 10:32
Signed-off-by: Pradeep Kumar K J <[email protected]>
Signed-off-by: Pradeep Kumar K J <[email protected]>
Signed-off-by: Pradeep Kumar K J <[email protected]>
Signed-off-by: Pradeep Kumar K J <[email protected]>
Signed-off-by: Pradeep Kumar K J <[email protected]>
@@ -15,7 +15,7 @@ fooX3AfooX2FstringsX23c(uint8_t *, size_t, uint8_t *, size_t);
extern "C" __attribute__((import_module("cabi_post_foo:foo/strings")))
__attribute__((import_name("c"))) void
cabi_post_fooX3AfooX2FstringsX23c(uint8_t *);
extern "C" void fooX3AfooX2FstringsX00a(uint8_t *arg0, size_t arg1) {
extern "C" void fooX3AfooX2FstringsX00a(uint8_t *arg0, size_t arg1) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adding trailing whitespace?

clean:
-rm *.o libstrings.so app-strings

run:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fear these targets don't make much sense for the guest directory


```

# Call-graph for a function
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for creating this!

Pradeep Kumar K J added 3 commits June 5, 2024 18:06
Signed-off-by: Pradeep Kumar K J <[email protected]>
Signed-off-by: Pradeep Kumar K J <[email protected]>
Signed-off-by: Pradeep Kumar K J <[email protected]>
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.

2 participants