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

Create a safe SVC module #99

Closed
Meziu opened this issue Mar 14, 2023 · 4 comments
Closed

Create a safe SVC module #99

Meziu opened this issue Mar 14, 2023 · 4 comments

Comments

@Meziu
Copy link
Member

Meziu commented Mar 14, 2023

svc is one of the most unsafe and dangerous interfaces of the 3DS' system. However, thanks to the current state of thing in the Rust ecosystem, we could do great things by implementing the svc wrapper to use Rust's async/awaitsyntax.

This has the potential become one of the strong points of our toolchain. Nontheless, development is impaired by the lack of threading support.

@DeltaF1
Copy link
Contributor

DeltaF1 commented May 15, 2023

(I'm assuming the async/await stuff you're talking about would be wrapping over services/IPC. Sorry if this is the wrong place to ask about this)

I've been reading 3dbrew trying to learn about how IPC works, and looking at some example code online. It looks like getThreadCommandBuffer is necessary for constructing IPC commands but is not exposed in ctru-sys. How are things included/excluded from the bindings?

@Meziu
Copy link
Member Author

Meziu commented May 15, 2023

(I'm assuming the async/await stuff you're talking about would be wrapping over services/IPC. Sorry if this is the wrong place to ask about this)

It is the wrong place (no worries though). I was talking specifically about the srv module.

I've been reading 3dbrew trying to learn about how IPC works, and looking at some example code online. It looks like getThreadCommandBuffer is necessary for constructing IPC commands but is not exposed in ctru-sys. How are things included/excluded from the bindings?

It seems the ctru-sys currently in master was built with a bindgen older than this PR, so static inline functions (like getThreadCommandBuffer) weren't included. We should update ctru-sys.

@DeltaF1
Copy link
Contributor

DeltaF1 commented Jul 10, 2023

Could you elaborate more about your vision for this? I'm still confused about which parts of svc you're thinking of.

@Meziu
Copy link
Member Author

Meziu commented Aug 15, 2023

After further research, this issue seems mostly impossible/out-of-scope/still to determine/unnecessary. If I find the right inspiration and ideas about something similar I'll open a more specific PR.

@Meziu Meziu closed this as completed Aug 15, 2023
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