Git Product home page Git Product logo

classfile-parser's People

Contributors

george-hopkins avatar kulp avatar mackieloeffel avatar minusgix avatar palmr avatar vcfxb avatar vexedpanda avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

classfile-parser's Issues

Reorganise code structure

Currently almost everything is public, which isn't great.

The only way to parse your own byte array requires calling the parsing code yourself and dealing with the result from nom, which leaks parsing implementation details outside of the crate.

There should probably be some more top level functions in lib for parsing from paths, jars, byte arrays etc.
Structs for the public data types should be together rather than scattered about.

Parsers should be together and non-public.

Test all opcodes

At the moment, the code parser is not tested against all opcodes. Ideally, we can reuse an existing corpus of opcodes to test our implementation.

Dead?

Hey is this project dead?

I want to use it in my project to write a full virtual machine (with cranelift backend) in rust.
But I need all features in README.md.

Handling of unpaired Unicode surrogates

Now that the parsing of valid Java strings works as expected (thanks!), I discovered an other issue: Java supports unpaired surrogates (U+D800 to U+DFFF). They aren't officially allowed, which is why Rust does not support them. However, some Java libraries use them to encode binary data (e.g. libgcj). At the moment, class_parser is unable to handle such classes because the decoding error is propagated back to it.

Possible solutions:

  • keep as is
  • change utf8_string to Result<String, Vec<u8>> and let the user decide (e.g. apply String::from_utf8_lossy)
  • apply String::from_utf8_lossy ourselves
  • ...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.