Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
phil-opp
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
41 ms
·
1.
▲
by
phil-opp
6y ago
Location: Karlsruhe, Germany Remote: yes Willing to relocate: no Technologies: Rust, systems programming, operating systems, embedded, open-source software Resume: https://www.linkedin.com/in/phil-opp/ Email: job@
2.
▲
by
phil-opp
6y ago
Great to hear that! I also found the official documentation a bit short on background information, so I decided to write my own explanation rather than link to something existing. Given that the async/await implementation is still quit
3.
▲
Writing an OS in Rust: Async/Await
(os.phil-opp.com)
410 points
by
phil-opp
6y ago
|
103 comments
4.
▲
by
phil-opp
7y ago
For single threaded programs you can e.g. use a Mutex implementation that only disables interrupts for the critical section ( https://docs.rust-embedded.org/book/concurrency/#mutexes ). Rust does not forbid you from
5.
▲
by
phil-opp
7y ago
Thanks! I created them using draw.io ( https://about.draw.io/ ).
6.
▲
by
phil-opp
7y ago
> I'll prepare an update to fix this. Update in https://github.com/phil-opp/blog_os/pull/738 and https://github.com/phil-opp/blog_os/pull/739
7.
▲
by
phil-opp
7y ago
On the other hand, these strict requirements make sure that the global allocator is thread-safe. Also, I only count two compiler errors mentioned in this post and both have a valid reason (you can't modify values behind an immutable re
8.
▲
by
phil-opp
7y ago
> The overflow scenario should be treated the same as the out-of-memory scenario and also return null. Good point! I'll prepare an update to fix this. > It can do better, in `dealloc` you can use `ptr` and `layout` to check if th
9.
▲
by
phil-opp
7y ago
Thanks so much! Yes, I'm eagerly awaiting https://github.com/rust-lang/rust/pull/58457 and your follow-up https://github.com/rust-lang/rust/pull/60703 . AFAIK, a global all
10.
▲
Writing an OS in Rust: Heap Allocation
(os.phil-opp.com)
68 points
by
phil-opp
7y ago
|
2 comments
11.
▲
by
phil-opp
7y ago
An interesting fact about this is that the author is on the Microsoft docs team, which uses a similar system for docs.microsoft.com [1]. So I don't think that GitHub has a problem with this approach. For an example of Microsoft's
12.
▲
by
phil-opp
7y ago
The try_reserve method is exposed on all collection types, e.g. [1],but it is still unstable. [1]: https://doc.rust-lang.org/std/vec/struct.Vec.html#method.try... I did not write my own stdlib since I didn't
13.
▲
by
phil-opp
7y ago
There is some minimal support for fallible allocation through the try_reserve method on various collections. See https://github.com/rust-lang/rust/issues/48043 for more information. Other than that, there is
14.
▲
by
phil-opp
7y ago
Great to hear that!
15.
▲
by
phil-opp
7y ago
It's the first time that I hear about Rust on medical devices. Sounds really interesting! I'm glad to hear that my blog was useful to you! > I have been trying to hack at the utest crate and get on-device integration tests runn
16.
▲
by
phil-opp
7y ago
Author here. This post is a rewrite of the previous Unit Testing [1] and Integration Tests [2] posts. It creates a custom test framework that runs test functions inside QEMU, so that they run in a realistic environment (compared to running
17.
▲
by
phil-opp
8y ago
Thanks for the detailed reply! I don't like the traditional GRUB approach because it leaves so much work for the kernel (assembly entry point, stack setup, creation of new page tables, etc). Why not treat the kernel like any normal app
18.
▲
by
phil-opp
8y ago
It is possible to access other address spaces, it is just a bit more complicated: - Set the recursive entry of the active level 4 table to the (recursive) level 4 table of the other address space. - Now the recursive addresses point to the
19.
▲
by
phil-opp
8y ago
Thanks for the feedback! I chose recursive page tables because the underlying mapping is very simple as it only requires to map a single level 4 page table entry. Thus, the bootloader does not need to force any address space layout on the k
20.
▲
by
phil-opp
8y ago
I assume backwards compatibility. It's a much smaller change to existing operating systems than to create a completely new page table format.
21.
▲
by
phil-opp
8y ago
Thanks! Fixed in https://github.com/phil-opp/blog_os/commit/f423c068fec803725...
22.
▲
by
phil-opp
8y ago
They were created with draw.io ( https://about.draw.io/ ).
23.
▲
Writing an OS in Rust: Integration Tests
(os.phil-opp.com)
4 points
by
phil-opp
8y ago
|
0 comments
24.
▲
Writing an OS in pure Rust
(os.phil-opp.com)
36 points
by
phil-opp
9y ago
|
0 comments
25.
▲
Utterances – A lightweight comments widget using GitHub issues
(utteranc.es)
3 points
by
phil-opp
9y ago
|
1 comments
26.
▲
by
phil-opp
9y ago
No worries! Thanks for correcting it.
27.
▲
by
phil-opp
9y ago
Why is this marked as dupe? Yes, there were already posts about exception handling ( "Catching Exceptions" [1]), "Better Exception Messages" [2], and "Returning from Exceptions" [3]). These posts used naked fun
28.
▲
Writing an OS in Rust: Double Faults
(os.phil-opp.com)
5 points
by
phil-opp
10y ago
|
0 comments
29.
▲
Exploring ARM inline assembly in Rust
(embed.rs)
8 points
by
phil-opp
10y ago
|
0 comments
30.
▲
by
phil-opp
10y ago
I have some vague ideas for the next posts, but no overarching design. At our current level, there aren't many design choices anyway. It will get much more intesting when we create a threading/concurrency model in the future.
More ›