Byte Buddy
brave-core
Our great sponsors
Byte Buddy | brave-core | |
---|---|---|
5 | 174 | |
6,006 | 2,303 | |
- | 1.7% | |
9.0 | 10.0 | |
6 days ago | 2 days ago | |
Java | HTML | |
Apache License 2.0 | Mozilla Public License 2.0 |
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.
Byte Buddy
-
Monkey-patching in Java
As seen above, the API exposes the user to low-level bytecode manipulation via byte arrays. It would be unwieldy to do it directly. Hence, real-life projects rely on bytecode manipulation libraries. ASM has been the traditional library for this, but it seems that Byte Buddy has superseded it. Note that Byte Buddy uses ASM but provides a higher-level abstraction.
-
Any news on the Classfile API?
Just a drive-by comment: ByteBuddy is worth a look https://bytebuddy.net/. It is built on top of ASM.
-
Proposed: A new CMake scripting language usable alongside existing one
> can you show an example of how you'd parse, say, a .java.in
The canonical way to do such a thing is through the java annotation processing api [1] and using a tool like java poet [2]. Before you did that, you'd probably decide if you wanted to instead use bytecode generation with a library like bytebuddy [3]
But, assuming for some reason, you wanted to torture yourself and actually consume a java.in file and apply a regex, then you'd probably pull out the "maven-replacer-plugin" [4] and configure that for the task at hand. (or use your favorite templating language plugin. There's a million of them).
Though, to be fair, this really isn't something that comes up in regular java programming due to the nature of the ecosystem. Anything you'd want to codegen likely already has a library and anything you didn't would receive (legitimate) push back.
[1] https://www.baeldung.com/java-annotation-processing-builder
[2] https://github.com/square/javapoet
[3] https://bytebuddy.net/
[4] https://github.com/beiliubei/maven-replacer-plugin
-
is rust the only language to have procedural macros?
Have a look at byte buddy.
-
Byte Buddy on Android made possible
If you've ever used libraries like https://github.com/JakeWharton/hugo or https://hibernate.org/ (if you've ever done some backend development) and wondered how do they seem to add some code/logic into your app just by adding some annotation to some method, or if you ever wondered how mocking frameworks like Mockito can change a class behavior for example, then most likely you're interested in a programming technique that allows to modify existing code, usually known as Aspect oriented programming (also known in Java as Bytecode instrumentation) which, even though it might sound intimidating at first, some really cool tools such as Byte Buddy or AspectJ make it quite easy to accomplish.
brave-core
- GitHub pull request support for Brave Leo
-
Brave's AI assistant now integrates with PDFs and Google Drive
Unrelated but about Brave and interesting to me: I recently found myself having a large upstream project that I need to maintain some custom patches for, and there's a need for deeper customizations and I worry that my rudimentary system of applying .patch files will turn into an unmaintainable nightmare of merge conflicts after every rebase. I was thinking about possible solutions, and it occurred to me that Brave being Chromium-based must have this same challenge but an order of magnitude more difficult, so I looked for their code to see how they solved this issue.
It's pretty interesting! They do basically the same thing for core Chromium, applying a (big) set of patches[1].
Incidentally, I'd be interested to hear any ideas/approaches to this problem. I'm guessing if there was something clearly better, Brave would be doing it, but it seems like there should be a better way even if I can't think of one.
[1] https://github.com/brave/brave-core/tree/master/patches
-
Brave browser simplifies its fingerprinting protections
https://github.com/brave/brave-core/pull/13737
(Incidentally, that PR number is not quite elite. :)
-
Brave appears to install VPN Services without user consent
I disagree that it's lip service Brave has a ton of engine level privacy patches https://github.com/brave/brave-core/tree/master/patches
To my understanding you can't match it with just js extensions.
Only firefox on the highest security mode comes close I think?
Or ungoogled chromium? (brave has most of their patches IIRC)
Are there other options that have this number of patches?
- With the merge of this pull request, Brave Browser disables WebEnvironmentIntegrity
-
Brave cuts ties with Bing to offer its own image and video search results
Chromium is not 100% Google's forever and always, though they do currently lead the way, and with the most used/backed fork.
https://github.com/brave/brave-core/pull/19476
- With merge of this pull request, Brave Browser disables WebEnvironmentIntegrity
-
Brave is a fork, not a Chromium reskinn
They have much more changes than just compile flags. Here's the repo where they maintain their patch set: https://github.com/brave/brave-core/tree/master/patches
-
Brave Ads are back? Even when they're turned off?
Brave Private Ads toggle controls just Push Notification ads at this time. So, if you are still seeing Push Notification ads, that would be incorrect. However, it's normal to still see New Tab Page image ads, and/or other ad formats. We are introducing a new UI that helps you better toggle on/off specific ad units, and removing the "Brave Private Ads" toggle that can be confusing: https://github.com/brave/brave-core/pull/18938
-
brave browser Dark mode in settings not saving on newest LinuxMint
Yes, being fixed. Github at https://github.com/brave/brave-core/pull/18922
What are some alternatives?
Javassist - Java bytecode engineering toolkit
ungoogled-chromium - Google Chromium, sans integration with Google
Byteman - Byteman Project main repo
uBlock - uBlock Origin - An efficient blocker for Chromium and Firefox. Fast and lean.
easydeviceinfo - :iphone: [Android Library] Get device information in a super easy way.
Vanadium - Privacy and security enhanced releases of Chromium for GrapheneOS. Vanadium provides the WebView and standard user-facing browser on GrapheneOS. It depends on hardening in other GrapheneOS repositories and doesn't include patches not relevant to the build targets used on GrapheneOS.
timber - A logger with a small, extensible API which provides utility on top of Android's normal Log class.
iceraven-browser - Iceraven Browser
joda-time-android - Joda-Time library with Android specialization
brave-browser - Brave browser for Android, iOS, Linux, macOS, Windows.
StatusBarUtil - A util for setting status bar style on Android App.
uBlock-issues - This is the community-maintained issue tracker for uBlock Origin