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

refacotr: remove all c files #1131

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Godones
Copy link
Contributor

@Godones Godones commented Apr 10, 2025

Use Rust to implement the symbol table generator.
Delete unused header files and c files
Adjust the makefile in the debug directory

Use Rust to implement the symbol table generator.
Delete unused header files and c files
Adjust the makefile in the debug directory

Signed-off-by: Godones <[email protected]>
@github-actions github-actions bot added the ambiguous The title of PR/issue doesn't match the format label Apr 10, 2025
@Godones Godones requested a review from Copilot April 10, 2025 09:32
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 64 out of 67 changed files in this pull request and generated no comments.

Files not reviewed (3)
  • .vscode/settings.json: Language not supported
  • kernel/src/Makefile: Language not supported
  • kernel/src/arch/riscv64/asm/head.S: Language not supported
Comments suppressed due to low confidence (2)

build-scripts/kernel_build/src/lib.rs:12

  • Confirm that the removal of the bindings generation call does not break any build workflows; update documentation or build instructions accordingly if dependent processes exist.
crate::bindgen::generate_bindings();

build-scripts/kernel_build/src/cfiles/mod.rs:67

  • Verify that removing the call to setup_common_files does not prevent necessary file inclusion for the build; if all C files are obsolete, ensure related directories are also cleaned up.
common::setup_common_files(&mut files);

@fslongjin
Copy link
Member

我在想,gen_kallsyms要不独立成一个crate,放到build-scripts目录里面吧。这样的话其实方便管理(不会出现一个crate里面混着一个独立的rs文件这种情况)

还有就是,内核有些地方是extern “C”了 rs_xxxx的函数的,这些感觉也可以check一下是否可以删了。这些一般是当时为了导出给C用的。

move gen_kallsyms.rs to build-scripts

Signed-off-by: Godones <[email protected]>
@Godones
Copy link
Contributor Author

Godones commented Apr 12, 2025

ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ambiguous The title of PR/issue doesn't match the format
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants