BiagioFesta / ls-qpack-rs

QPACK Field Compression for HTTP/3 RFC 9204 in Rust based on ls-qpack
Apache License 2.0
6 stars 5 forks source link

Use the proper cast for lsxpack header platform independent #6

Closed BiagioFesta closed 1 year ago

BiagioFesta commented 1 year ago

Fixes: https://github.com/BiagioFesta/ls-qpack-rs/issues/5

MOZGIII commented 1 year ago
 Compiling ls-qpack v0.1.2 (https://github.com/BiagioFesta/ls-qpack-rs.git?branch=fix-cast#72e9410b)
error[E0412]: cannot find type `c_char` in this scope
   --> /home/mozgiii/.cargo/git/checkouts/ls-qpack-rs-8c1ccf7403e7ee19/72e9410/ls-qpack/src/decoder.rs:375:73
    |
375 |             this.header.buf = this.decoding_buffer.as_mut_ptr() as *mut c_char;
    |                                                                         ^^^^^^
    |
help: a builtin type with a similar name exists
    |
375 |             this.header.buf = this.decoding_buffer.as_mut_ptr() as *mut char;
    |                                                                         ~~~~
help: consider importing one of these items
    |
277 +     use core::ffi::c_char;
    |
277 +     use crate::decoder::c_char;
    |
277 +     use libc::c_char;
    |
277 +     use std::ffi::c_char;
    |
      and 1 other candidate

For more information about this error, try `rustc --explain E0412`.
error: could not compile `ls-qpack` (lib) due to previous error
warning: build failed, waiting for other jobs to finish...

Consider adding Github Actions for CI at the very least they'll show when the code doesn't compile.

BiagioFesta commented 1 year ago

Consider adding Github Actions for CI at the very least they'll show when the code doesn't compile.

Yeah, it's in the TODO: https://github.com/BiagioFesta/ls-qpack-rs/issues/7

MOZGIII commented 1 year ago

The code compiles now; need to test the actual runtime though, stay tuned.

hironichu commented 1 year ago

I've been able to try this patch with wtransport on multiple arm machines (Raspberry and Ampere servers on Oracle cloud) and this seems to be working super well !

BiagioFesta commented 1 year ago

Perfect thanks!