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

Added support for PlayStation Vita #90584

Closed
wants to merge 0 commits into from
Closed

Conversation

amgdev9
Copy link

@amgdev9 amgdev9 commented Nov 4, 2021

Just the compiler definitions for no-std projects. When merged I'll PR again with the std library adaptation.

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @oli-obk (or someone else) soon.

Please see the contribution instructions for more information.

@rust-highfive
Copy link
Collaborator

⚠️ Warning ⚠️

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 4, 2021
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@bjorn3
Copy link
Member

bjorn3 commented Nov 5, 2021

Please quote the requirements and questions from the tier 3 target policy and reply to them.

@amgdev9
Copy link
Author

amgdev9 commented Nov 5, 2021

A tier 3 target must have a designated developer or developers (the "target maintainers") on record to be CCed when issues arise regarding the target. (The mechanism to track and CC such developers may evolve over time.)

The target maintainer is just myself at the time of writing.

Targets must use naming consistent with any existing targets; for instance, a target for the same CPU or OS as an existing Rust target should use the same name for that CPU or OS. Targets should normally use the same names and naming conventions as used elsewhere in the broader ecosystem beyond Rust (such as in other toolchains), unless they have a very good reason to diverge. Changing the name of a target can be highly disruptive, especially once the target reaches a higher tier, so getting the name right is important even for a tier 3 target.

The target name is armv7-sony-vita-eabihf. I think it is descriptive enough.

The target must not introduce license incompatibilities.

VitaSDK toolchain and headers are under MIT license.

Anything added to the Rust repository must be under the standard Rust license (MIT OR Apache-2.0).

Support for this platform is licensed under MIT license as well.

The target must not cause the Rust tools or libraries built for any other host (even when supporting cross-compilation to the target) to depend on any new dependency less permissive than the Rust licensing policy. This applies whether the dependency is a Rust crate that would require adding new license exceptions (as specified by the tidy tool in the rust-lang/rust repository), or whether the dependency is a native library or binary. In other words, the introduction of the target must not cause a user installing or running a version of Rust or the Rust tools to be subject to any new license requirements.

The only dependencies needed are the libc used by the Vita SDK, licensed under GPL (I think there are no issues with that). It also needs a pthread implementation, which is under MIT license.

If the target supports building host tools (such as rustc or cargo), those host tools must not depend on proprietary (non-FOSS) libraries, other than ordinary runtime libraries supplied by the platform and commonly used by other binaries built for the target. For instance, rustc built for the target may depend on a common proprietary C runtime library or console output library, but must not depend on a proprietary code generation library or code optimization library. Rust's license permits such combinations, but the Rust project has no interest in maintaining such combinations within the scope of Rust itself, even at tier 3.

There is no intended support for building host tools.

Targets should not require proprietary (non-FOSS) components to link a functional binary or library.

I believe it is not the case.

Neither this policy nor any decisions made regarding targets shall create any binding agreement or estoppel by any party. If any member of an approving Rust team serves as one of the maintainers of a target, or has any legal or employment requirement (explicit or implicit) that might affect their decisions regarding a target, they must recuse themselves from any approval decisions regarding the target's tier status, though they may otherwise participate in discussions.

Understood.

Tier 3 targets should attempt to implement as much of the standard libraries as possible and appropriate (core for most targets, alloc for targets that can support dynamic memory allocation, std for targets with an operating system or equivalent layer of system-provided functionality), but may leave some code unimplemented (either unavailable or stubbed out as appropriate), whether because the target makes it impossible to implement or challenging to implement. The authors of pull requests are not obligated to avoid calling any portions of the standard library on the basis of a tier 3 target not implementing those portions.

At the moment only the core crate is supported, but I plan to PR the std crate adaptation soon. The std crate is fully functional except for the following:

  • UNIX sockets
  • Some filesystem features (getcwd...)

The target must provide documentation for the Rust community explaining how to build for the target, using cross-compilation if possible. If the target supports running tests (even if they do not pass), the documentation must explain how to run tests for the target, using emulation if possible or dedicated hardware if necessary.

I'd need some guidance with this. Tell me please where in the docs I must address these building instructions for the target. About test running support, it is not taken into account at the time of writing.

Tier 3 targets must not impose burden on the authors of pull requests, or other developers in the community, to maintain the target. In particular, do not post comments (automated or manual) on a PR that derail or suggest a block on the PR based on a tier 3 target. Do not send automated messages or notifications (via any medium, including via @) to a PR author or others involved with a PR regarding a tier 3 target, unless they have opted into such messages.

Understood.

Patches adding or updating tier 3 targets must not break any existing tier 2 or tier 1 target, and must not knowingly break another tier 3 target without approval of either the compiler team or the maintainers of the other tier 3 target.

Understood.

If a tier 3 target stops meeting these requirements, or the target maintainers no longer have interest or time, or the target shows no signs of activity and has not built for some time, or removing the target would improve the quality of the Rust codebase, we may post a PR to remove it; any such PR will be CCed to the target maintainers (and potentially other people who have previously worked on the target), to check potential interest in improving the situation.

I'm fine with it.

@wesleywiser
Copy link
Member

Hi @amg98, thanks for the PR!

We're having some discussions related to these kinds of targets in #88991 so I think we should wait for those discussions to be completed as well.

cc @skade

@wesleywiser wesleywiser added the S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. label Nov 5, 2021
@leo60228
Copy link
Contributor

leo60228 commented Nov 8, 2021

The PlayStation Vita is EoL, so I think the legal situation is more closely related to the existing 3DS and PSP targets.

@joshtriplett
Copy link
Member

@amg98

I'd need some guidance with this. Tell me please where in the docs I must address these building instructions for the target.

You should add a file in src/doc/rustc/src/platform-support/, and link it from your target's entry in platform-support.md. See other files in that directory for examples. (I'm currently working on adding a template for such documentation.)

@apiraino apiraino added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Nov 11, 2021
@JohnCSimon
Copy link
Member

JohnCSimon commented Dec 5, 2021

triage:
returning to author, @amg98 to address comment from joshtriplett

@rustbot label: +S-waiting-on-author -S-waiting-on-review

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 5, 2021
@wesleywiser
Copy link
Member

I think Josh's comment has been addressed but this is still blocked on policy discussions like #88991 is.

@wesleywiser wesleywiser removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Dec 6, 2021
@bors
Copy link
Contributor

bors commented Jan 23, 2022

☔ The latest upstream changes (presumably #93220) made this pull request unmergeable. Please resolve the merge conflicts.

@oli-obk oli-obk removed their assignment Jan 25, 2022
@wesleywiser wesleywiser removed the S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. label Sep 15, 2022
@wesleywiser wesleywiser self-assigned this Sep 15, 2022
@wesleywiser
Copy link
Member

Hi @amg98! I'm sorry this has taken so long to get sorted out but the policy decisions around this PR and related PRs like #88991 have been resolved and we believe there is no reason not to accept these new targets.

If you can rebase this PR and resolve the merge conflicts, we can go ahead and merge this. Thanks! 🙂

@Dylan-DPC Dylan-DPC added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Nov 7, 2022
@Dylan-DPC
Copy link
Member

@amg98 any updates on this?

@amgdev9
Copy link
Author

amgdev9 commented Dec 7, 2022

@Dylan-DPC Hi!! Sorry for the delay, I've been quite inactive in github recently. I'll try to get some time to solve the conflicts so we can merge this PR soon

@Dylan-DPC
Copy link
Member

@amg98 that's fine no worries.

@Dylan-DPC
Copy link
Member

I don't think you intended to close this and rebased wrongly?

@amgdev9
Copy link
Author

amgdev9 commented Dec 12, 2022

Yep, I messed that up, I reopened the PR here (#105606)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.