upb
macOS-Simple-KVM
upb | macOS-Simple-KVM | |
---|---|---|
6 | 135 | |
1,503 | 13,501 | |
0.3% | - | |
8.3 | 0.0 | |
about 1 month ago | about 1 month ago | |
C | Shell | |
GNU General Public License v3.0 or later | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
upb
-
C and C++ Prioritize Performance over Correctness
> There are undeniably power users for whom every last bit of performance translates to very large sums of money, and I don’t claim to know how to satisfy them otherwise.
That is the key, right there.
In 1970, C may have been considered a general-purpose programming langauge. Today, given the landscape of languages currently available, C and C++ have a much more niche role. They are appropriate for the "power users" described above, who need every last bit of performance, at the cost of more development effort.
When I'm working in C, I'm frequently watching the assembly language output closely, making sure that I'm getting the optimizations I expect. I frequently find missed optimization bugs in compilers. In these scenarios, undefined behavior is a tool that can actually help achieve my goal. The question I'm always asking myself is: what do I have to write in C to get the assembly language output I expect? Here is an example of such a journey: https://blog.reverberate.org/2021/04/21/musttail-efficient-i...
I created the https://github.com/protocolbuffers/upb project a long time ago. It's written in C, and over the years I have gotten it to a state where the speed and code size are pretty compelling. Both speed and code size are very important to the use cases where it is being used. It's a relatively small code base also. I think focused, performance-oriented kernels are the area where C makes the most sense.
-
Cap'n Proto 1.0
More and more languages are being built on top of the "upb" C library for protobuf (https://github.com/protocolbuffers/upb) which is designed around arenas to avoid this very problem.
Currently Ruby, PHP, and Python are backed by upb, but this list may expand in the future.
- Fast memcpy, A System Design
-
Implementing Hash Tables in C
Lua uses "chained scatter" (linked list, but links point to other entries in the same table, to maintain locality): https://github.com/lua/lua/blob/master/ltable.c
This is a good visual depiction of chained scatter: https://book.huihoo.com/data-structures-and-algorithms-with-...
Inspired by Lua, I did the same for upb (https://github.com/protocolbuffers/upb). I recently benchmarked upb's table vs SwissTable for a string-keyed table and found I was beating it in both insert and lookup (in insert upb is beating SwissTable by 2x).
-
Asahi Linux progress report, August 2021
> But yes, the serialized dict-of-arrays-of-dicts type stuff can be approached in a few ways, none of which are particularly beautiful.
For what it's worth, this sounds somewhat similar to protobuf (which also supports dicts, arrays, etc).
After spending many years trying to figure out the smallest, fastest, and simplest way to implement protobuf in https://github.com/protocolbuffers/upb, the single best improvement I found was to make the entire memory management model arena-based.
When you parse an incoming request, all the little objects (messages, arrays, maps, etc) are allocated on the arena. When you are done with it, you just free the arena.
In my experience this results in code that is both simpler and faster than trying to memory-manage all of the sub-objects independently. It also integrates nicely with existing memory-management schemes: I've been able to adapt the arena model to both Ruby (tracing GC) and PHP (refcounting) runtimes. You just have to make sure that the arena itself outlives any reference to any of the objects within.
-
Don't Use Protobuf for Telemetry
> Google's implementations, at least C++ and Java, are a bunch of bloated crap (or maybe they're very good, but for a use case that I haven't yet encountered).
As someone who has been working on protobuf-related things for >10 years, including creating a size-focused implementation (https://github.com/protocolbuffers/upb), and has been working on the protobuf team for >5 years, I have a few thoughts on this.
I think it is true that protobuf C++ could be a lot more lean than it currently is. That's why I created upb (above) to begin with. But there's also a bit more to this story.
The protobuf core runtime is split into two parts, "lite" and "full". Basically the full runtime contains reflection support, while the lite runtime omits it. The full runtime is much larger than the lite runtime. If you don't need runtime reflection for your protos, it's better to use "lite" by using "option optimize_for = LITE_RUNTIME" in your .proto file (https://developers.google.com/protocol-buffers/docs/proto#op...). That will cut out a huge amount of overhead in your binary. On the downside, you won't get functionality that requires reflection, including text format, JSON, or DebugString().
In addition to this, even the lite runtime can get "lighter" if you compile your binary to statically link the runtime and strip unused symbols with -ffunction-sections/-fdata-sections and gc-sections in the linker. Some parts of the lite runtime are only used in unusual situations, like ExtensionSet which is only used if your protos use proto2 extensions (https://developers.google.com/protocol-buffers/docs/proto#ex...). If you avoid this stuff, the lite runtime is quite light.
However, there is also the issue of the generated code size. The size of the generated code is generally quite large, even for lite. You are getting a generated parser, serializer, CopyFrom(), MergeFrom(), etc for every message you define. If your schema is of any size, this quickly adds up and can dwarf the size of the actual runtime. For this reason, C++ also supports "option optimize_for = CODE_SIZE" which does everything reflectively instead of generating code. This means you pay the fixed size hit from the full runtime, but the generated code size is much smaller. On the downside, "optimize_for = CODE_SIZE" has a severe speed penalty.
I have long had the goal of making https://github.com/protocolbuffers/upb competitive with protobuf C++ in speed while achieving much smaller code size. With the benefit of 10 years of hindsight and many wrong turns, upb is meeting and even surpassing these goals. It is an order of magnitude smaller, both in the core runtime and the generated code, and after some recent experiments it is beginning to significantly surpass it in speed also (I want to publish these results soon, but the code is on this branch: https://github.com/protocolbuffers/upb/pull/310).
upb has downsides that prevent it from being fully "user ready" yet: the API is still not 100% stable, there is no C++ API for the generated code yet (and C APIs for protobuf are relatively verbose and painful), it has a bunch of legacy APIs sitting around that I am just on the verge of being able to finally delete, and it doesn't support proto2 extensions yet. On the upside, it is 100% conformant on every other protobuf feature, it has full binary and JSON support, it supports reflection if you want it but also lets you omit it for code size savings.
I hope 2021 is a year when I'll be able to publish more about these results, and when upb will be a more viable choice for users who want a smaller protobuf implementation.
macOS-Simple-KVM
-
Darling: Run macOS Software on Linux
I'm a 30 year linux veteran and windows free for over 22. I di d have a windows vm for some time because I have some music stuff that doesn't work with linux, like a nord keyboard and some guitar stuff.
But i burnt the vm with fire when I found https://github.com/foxlet/macOS-Simple-KVM
-
What are the current best methods for virtualizing MacOS on Linux?
I've heard a lot of buzz for MacOS-Simple-KVM but I see there hasb't been an update in 3 years.
-
MAC vs. PC : + Does any M1 or M2 MacBook Air / Pro support nested virtualisation?
You could always get a regular PC laptop, install linux on it and run your macos/windows vms via https://github.com/foxlet/macOS-Simple-KVM qemu kvm, supports full hardware acceleration and should be able to do nested vms just fine, i run a macos vm on my desktop for work and a hardware accelerated windows vm for gaming
- I am at my wit's end (Installation)
-
Beginner Questions about QEMU
Then, i came across this tool https://github.com/foxlet/macOS-Simple-KVM. However, it seems like it's asking me to install a different package for QEMU. sudo apt-get install qemu-system qemu-utils python3 python3-pip. Thankfully, I was able to create a Mac VM with this tool.
- Anyone have this problem before?
-
Error comes While starting MacOS from Vert Manager
His github project " https://github.com/foxlet/macOS-Simple-KVM "
-
Error in /Var/lib/libvirt/images/
git clone https://github.com/foxlet/macOS-Simple-KVM.git /home/Downloads
-
What’s the easiest way to test my game on linux and mac if I only have a windows machine?
You can virtualize mac os, but I would call it easy
-
MacOS KVM GPU Passthrough Hangs
I did the Windows passthrough with some problems but I got it to work and then I attempted MacOS for fun and it went down hill from there. Following this guide https://github.com/kholia/OSX-KVM I installed it no problem without passthrough then realised my 3060ti wouldn't work so I installed an old RX580 laying around and decided to passthrough that, when I did it hung, tried blacklisting the AMD drivers on host, amongst other things and I couldn't get it to work. I then switched to this guide using clover https://github.com/foxlet/macOS-Simple-KVM as I heard that might work and nope it hung again.
What are some alternatives?
idevicerestore - Restore/upgrade firmware of iOS devices
OSX-KVM - Run macOS on QEMU/KVM. With OpenCore + Monterey + Ventura + Sonoma support now! Only commercial (paid) support is available now to avoid spammy issues. No Mac system is required.
Protobuf.NET - Protocol Buffers library for idiomatic .NET
Single-GPU-Passthrough
mbp-2016-linux - State of Linux on the MacBook Pro 2016 & 2017
KVM-Opencore - OpenCore disk image for running macOS VMs on Proxmox/QEMU
bloaty - Bloaty: a size profiler for binaries
quickemu - Quickly create and run optimised Windows, macOS and Linux desktop virtual machines.
Protobuf - Protocol Buffers - Google's data interchange format
Docker-OSX - Run macOS VM in a Docker! Run near native OSX-KVM in Docker! X11 Forwarding! CI/CD for OS X Security Research! Docker mac Containers.
test-infra - Test infrastructure for the Kubernetes project.
macos-virtualbox - Push-button installer of macOS Catalina, Mojave, and High Sierra guests in Virtualbox on x86 CPUs for Windows, Linux, and macOS