{"id":13822683,"url":"https://github.com/frozolotl/noak","last_synced_at":"2025-03-16T09:33:09.157Z","repository":{"id":151647240,"uuid":"208643167","full_name":"frozolotl/noak","owner":"frozolotl","description":"A java bytecode decoding and encoding library written in rust. Mirror of https://gitlab.com/frozo/noak","archived":false,"fork":false,"pushed_at":"2024-06-14T18:06:50.000Z","size":799,"stargazers_count":39,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-16T00:41:29.861Z","etag":null,"topics":["bytecode","bytecode-manipulation","bytecode-parser","bytecode-reading","java","rust"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/frozolotl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-09-15T19:05:29.000Z","updated_at":"2025-03-07T17:04:40.000Z","dependencies_parsed_at":"2024-06-14T19:24:16.401Z","dependency_job_id":"3e3ca5f1-9807-49b3-9f2f-03dbed9b441e","html_url":"https://github.com/frozolotl/noak","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frozolotl%2Fnoak","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frozolotl%2Fnoak/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frozolotl%2Fnoak/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frozolotl%2Fnoak/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frozolotl","download_url":"https://codeload.github.com/frozolotl/noak/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243852432,"owners_count":20358268,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bytecode","bytecode-manipulation","bytecode-parser","bytecode-reading","java","rust"],"created_at":"2024-08-04T08:02:12.482Z","updated_at":"2025-03-16T09:33:08.831Z","avatar_url":"https://github.com/frozolotl.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# Noak\nA library for reading and writing java class files.\n\n## Example\n```rust\nuse noak::reader::Class;\n\nlet mut class = Class::new(\u0026bytes)?;\n\nprintln!(\"Major Version: {}\", class.version().major);\nprintln!(\" Access Flags: {:?}\", class.access_flags()?);\nprintln!(\"   Class Name: {}\", class.this_class_name()?.display()?);\n```\n\n## Why should you use noak?\n- Reading:\n  - You want to parse class files without losing information.\n  - You don't want to parse the entire class file.\n  - Any valid class file is accepted by noak. Many invalid class files are accepted as well (this can be useful for reading heavily obfuscated code).\n- Writing:\n  - You want to write your own class files (limitations apply; see below).\n\n## Why wouldn't you use noak?\nMany of these issues are in the process of being resolved, but that may take some time.\n- You want more than just a low-level class file reader and writer.\n- Noak makes heavy use of the type system and macros. This can cause problems with your IDE or make some aspects hard to understand.\n- Documentation is virtually non-existent.\n- The API is very unstable.\n- The code is not heavily tested.\n- Reading:\n  - Some code may be repetitive (e.g. retrieving values from the constant pool).\n- Writing:\n  - Modifying existing class files can be very tedious.\n  - Not every attribute can be written at the moment ([related issue](https://gitlab.com/frozo/noak/-/issues/4))\n  - Jumps above 65535 bytes may fail to be written.\n  - The builder API isn't flexible enough for your use case.\n  - Custom errors are quite restricted.\n  - Stack Map Frames are not automatically generated.\n\n## Alternatives\nThis is not an exhaustive list. The statements below may not accurately reflect reality.\n\nLibraries written in Rust:\n- [cafebabe](https://github.com/staktrace/cafebabe)\n  - Parses the entire file at once.\n  - Accesses the constant pool during parsing. No explicit retrieval from the user side required.\n- [classreader-rs](https://github.com/Alfriadox/classreader-rs)\n  - Parses the entire file at once.\n  - Only supports parsing.\n  - Does not support any attributes from version 53.0 and above.\n  - Does not parse strings containing unpaired surrogates.\n- [jbcrs](https://github.com/orasunis/jbcrs)\n  - Parses the entire file at once.\n  - Only supports parsing.\n  - Does not support any attributes from version 53.0 and above.\n  - Does not parse files containing UTF-8 constants with unpaired surrogates.\n- [frappe/classfile](https://github.com/tjdetwiler/frappe)\n  - Parses the entire file at once.\n  - Only supports parsing.\n  - Does not support any attributes from version 53.0 and above.\n  - Does not parse files containing UTF-8 constants with surrogates.\n- [classfile-rs](https://github.com/x4e/classfile-rs)\n  - Seems to be very incomplete.\n  - Supports writing as well as parsing.\n  - Parses the entire file at once.\n  - Reads UTF-8 constants lossily.\n- [classfile-parser](https://github.com/palmr/classfile-parser)\n  - Seems to be very incomplete.\n  - Parses the entire file at once.\n  - Only supports parsing.\n- [classfmt](https://github.com/chickenbreeder/classfmt)\n  - Seems to be very incomplete.\n  - Parses the entire file at once.\n  - Only supports parsing.\n- [javabc](https://github.com/dylanmckay/javabc)\n  - Seems to be very incomplete.\n  - Parses the entire file at once.\n  - Only supports parsing.\n\nA small fraction of libraries written in languages that are not Rust:\n- [ASM](https://asm.ow2.io/) (Java)\n  - The most comprehensive and best supported class file manipulation and analysis framework.\n  - Use this if noak does not suit your requirements and probably even if it does suit them.\n- [javassist](https://github.com/jboss-javassist/javassist) (Java)\n  - A high-level bytecode library.\n- [BCEL](https://commons.apache.org/proper/commons-bcel/) (Java)\n\n## License\nThis project is licensed under the [MIT](https://gitlab.com/frozo/noak/-/blob/master/LICENSE) license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrozolotl%2Fnoak","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrozolotl%2Fnoak","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrozolotl%2Fnoak/lists"}