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

add example for C lib interaction with FFI (socket) #27

Open
jyao1 opened this issue Sep 9, 2021 · 0 comments
Open

add example for C lib interaction with FFI (socket) #27

jyao1 opened this issue Sep 9, 2021 · 0 comments
Assignees

Comments

@jyao1
Copy link
Owner

jyao1 commented Sep 9, 2021

No description provided.

gaojiaqi7 added a commit to gaojiaqi7/rust-firmware that referenced this issue Sep 10, 2021
Socket interfaces such as socket(), bind(), accept() are realized in
vsock_lib.rs.

Signed-off-by: Jiaqi Gao <[email protected]>
gaojiaqi7 added a commit to gaojiaqi7/rust-firmware that referenced this issue Sep 10, 2021
build.rs is added to rust-vsock-payload to set location and name of
the C static library. Method to set these information is added to
vsock readme.md.

In vsock_c_lib/main.c, socket interfaces provided by rust is called
to implement a server and a client.

In main.rs of rust-vsock-payload, these two functions implemented by
C lib is called for a test.

Signed-off-by: Jiaqi Gao <[email protected]>
gaojiaqi7 added a commit to gaojiaqi7/rust-firmware that referenced this issue Sep 10, 2021
build.rs is added to rust-vsock-payload to set location and name of
the C static library. Method to set these information is added to
vsock readme.md.

In vsock_c_lib/main.c, socket interfaces provided by rust is called
to implement a server and a client.

In main.rs of rust-vsock-payload, these two functions implemented by
C lib is called for a test.

Signed-off-by: Jiaqi Gao <[email protected]>
jyao1 pushed a commit that referenced this issue Sep 12, 2021
Socket interfaces such as socket(), bind(), accept() are realized in
vsock_lib.rs.

Signed-off-by: Jiaqi Gao <[email protected]>
jyao1 pushed a commit that referenced this issue Sep 12, 2021
build.rs is added to rust-vsock-payload to set location and name of
the C static library. Method to set these information is added to
vsock readme.md.

In vsock_c_lib/main.c, socket interfaces provided by rust is called
to implement a server and a client.

In main.rs of rust-vsock-payload, these two functions implemented by
C lib is called for a test.

Signed-off-by: Jiaqi Gao <[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

No branches or pull requests

2 participants