分页: 1 / 2

#1 完了,Crowdstrike chose C++ over Rust

发表于 : 2024年 7月 19日 18:30
beijingren3
Experienced programmer figured out how Crowdstrike fucked up and broke the internet. His explanation is too long and big brain for most here, but you can read it if you like. For everyone else, they fucked up because they chose to code in C++ over Rust. Is C++ now dead as a language? Will devs only use modern and efficient languages going forward?



#2 Re: 完了,Crowdstrike chose C++ over Rust

发表于 : 2024年 7月 19日 18:31
fulvshou
西佳佳马工应该都抓起来逐一审查再上岗

#3 Re: 完了,Crowdstrike chose C++ over Rust

发表于 : 2024年 7月 19日 18:32
beijingren3
fulvshou 写了: 2024年 7月 19日 18:31 西佳佳马工应该都抓起来逐一审查再上岗
图片

#4 Re: 完了,Crowdstrike chose C++ over Rust

发表于 : 2024年 7月 19日 18:35
huangchong
beijingren3 写了: 2024年 7月 19日 18:32 图片
印度人发明的c加加?

#5 Re: 完了,Crowdstrike chose C++ over Rust

发表于 : 2024年 7月 19日 18:36
huangchong
我很好奇 给windows写组件 不用c++ 可行吗

#6 Re: 完了,Crowdstrike chose C++ over Rust

发表于 : 2024年 7月 19日 18:39
张雅婷粉58Red2
beijingren3 写了: 2024年 7月 19日 18:30 Experienced programmer figured out how Crowdstrike fucked up and broke the internet. His explanation is too long and big brain for most here, but you can read it if you like. For everyone else, they fucked up because they chose to code in C++ over Rust. Is C++ now dead as a language? Will devs only use modern and efficient languages going forward?


Rust能用来写kernel模块?

#7 Re: 完了,Crowdstrike chose C++ over Rust

发表于 : 2024年 7月 19日 18:39
GiantHawkID
哈哈
beijingren3 写了: 2024年 7月 19日 18:32 图片

#8 Re: 完了,Crowdstrike chose C++ over Rust

发表于 : 2024年 7月 19日 18:40
huangchong
huangchong 写了: 2024年 7月 19日 18:36 我很好奇 给windows写组件 不用c++ 可行吗
这个是我拿来改win11界面的软件, 拿c写的。看起来离开c++确实可行


https://github.com/valinet/ExplorerPatcher

#9 Re: 完了,Crowdstrike chose C++ over Rust

发表于 : 2024年 7月 19日 18:41
noid2
huangchong 写了: 2024年 7月 19日 18:36 我很好奇 给windows写组件 不用c++ 可行吗
可以用C

#10 Re: 完了,Crowdstrike chose C++ over Rust

发表于 : 2024年 7月 19日 18:44
huangchong
noid2 写了: 2024年 7月 19日 18:41可以用C
理论上 能用c就应该能用rust吧?

#11 Re: 完了,Crowdstrike chose C++ over Rust

发表于 : 2024年 7月 19日 19:05
bouncingball
fulvshou 写了: 2024年 7月 19日 18:31 西佳佳马工应该都抓起来逐一审查再上岗
可怜的西佳佳马工,一定是混用了c++11,c++14和c++17,c++17调用c++11的函数或者类,linux就木有问题,但是window下很多莫名其妙的问题,还debug不了,因为出问题是随机性的,嘿嘿!

#12 Re: 完了,Crowdstrike chose C++ over Rust

发表于 : 2024年 7月 19日 19:07
tfusion
尼玛C比C++更危险吧

#13 Re: 完了,Crowdstrike chose C++ over Rust

发表于 : 2024年 7月 19日 19:08
noid2
tfusion 写了: 2024年 7月 19日 19:07 尼玛C比C++更危险吧

#14 Re: 完了,Crowdstrike chose C++ over Rust

发表于 : 2024年 7月 19日 19:09
张雅婷粉58Red2
huangchong 写了: 2024年 7月 19日 18:44 理论上 能用c就应该能用rust吧?
While possible, writing a Windows kernel module in Rust presents some challenges:

* **No Official Support:** Microsoft doesn't officially support Rust for kernel driver development.
* **Limited Ecosystem:** The tooling and libraries for Rust kernel development in Windows are still under development.

However, there are resources available if you're interested in exploring further:

* **Experimental Framework:** Microsoft has an experimental framework called `windows-drivers-rs` that provides some basic functionalities for building Windows drivers in Rust [https://github.com/microsoft/Windows-ru ... er-samples](https://github.com/microsoft/Windows-ru ... er-samples).
* **Community Project:** Another project, `windows-kernel-rs`, offers safe abstractions on top of the Windows Kernel API for Rust [https://github.com/StephanvanSchaik/windows-kernel-rs](https://github.com/StephanvanSchaik/windows-kernel-rs).

Here are some things to consider before using Rust for Windows kernel modules:

* **Development Complexity:** Expect a steeper learning curve compared to using C or C++ due to the lack of official support and a less mature ecosystem.
* **Limited Debugging Tools:** Debugging kernel modules written in Rust might be more challenging compared to traditional languages.
* **Community Resources:** While there are community projects, they might have less documentation and support compared to established languages.

If you're new to kernel development or require a stable solution, using C or C++ might be a better option. But if you're comfortable with the challenges and want to explore Rust for kernel development, the resources mentioned above can be a starting point.

#15 Re: 完了,Crowdstrike chose C++ over Rust

发表于 : 2024年 7月 19日 19:11
huangchong
张雅婷粉58Red2 写了: 2024年 7月 19日 19:09 While possible, writing a Windows kernel module in Rust presents some challenges:

* **No Official Support:** Microsoft doesn't officially support Rust for kernel driver development.
* **Limited Ecosystem:** The tooling and libraries for Rust kernel development in Windows are still under development.

However, there are resources available if you're interested in exploring further:

* **Experimental Framework:** Microsoft has an experimental framework called `windows-drivers-rs` that provides some basic functionalities for building Windows drivers in Rust [https://github.com/microsoft/Windows-ru ... er-samples](https://github.com/microsoft/Windows-ru ... er-samples).
* **Community Project:** Another project, `windows-kernel-rs`, offers safe abstractions on top of the Windows Kernel API for Rust [https://github.com/StephanvanSchaik/windows-kernel-rs](https://github.com/StephanvanSchaik/windows-kernel-rs).

Here are some things to consider before using Rust for Windows kernel modules:

* **Development Complexity:** Expect a steeper learning curve compared to using C or C++ due to the lack of official support and a less mature ecosystem.
* **Limited Debugging Tools:** Debugging kernel modules written in Rust might be more challenging compared to traditional languages.
* **Community Resources:** While there are community projects, they might have less documentation and support compared to established languages.

If you're new to kernel development or require a stable solution, using C or C++ might be a better option. But if you're comfortable with the challenges and want to explore Rust for kernel development, the resources mentioned above can be a starting point.
感觉属于一种自虐行为

#16 Re: 完了,Crowdstrike chose C++ over Rust

发表于 : 2024年 7月 19日 19:17
Knifer
有谁能贴出这行代码的作者,就牛逼了

#17 Re: 完了,Crowdstrike chose C++ over Rust

发表于 : 2024年 7月 19日 19:27
Caravel
这玩意归根接地是测试不够

bug总会有的,但是你要是有充分的测试,

先是内部自动测试,再是内部用户测试,一步步扩大范围

#18 Re: 完了,Crowdstrike chose C++ over Rust

发表于 : 2024年 7月 19日 19:30
noid2
Knifer 写了: 2024年 7月 19日 19:17 有谁能贴出这行代码的作者,就牛逼了
你这么说话纯属外行。

#19 Re: 完了,Crowdstrike chose C++ over Rust

发表于 : 2024年 7月 19日 19:49
beijingren3

#20 Re: 完了,Crowdstrike chose C++ over Rust

发表于 : 2024年 7月 19日 19:49
beijingren3