Age | Commit message (Collapse) | Author |
|
|
|
Instead of returning { nread: number, eof: bool }, read() returns EOF | number.
|
|
|
|
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: LE GOFF Vincent <g_n_s@hotmail.fr>
|
|
Using open/read/write
|
|
This patch contains a special hack that circumvents the current tokio
seek problem.
tokio `seek` is implemented to take ownership of the original File and
emit a new one in its future, which conflicts with the design of
ResourceTable.
To avoid the problem, the current hack makes the FsFile resource
an Option which we could `take` the value ownership out of it. We then
convert the tokio File into a Rust std File, perform the seek, and then
put it back into the resource.
This might be able to drop this hack after
https://github.com/tokio-rs/tokio/pull/785 lands.
|
|
|
|
|
|
Also Buffer.readFrom in fetch() to buffer response.
|
|
|
|
Because many Reader/Writer implementations (e.g. bufio) assume their
able to use subarray() with byte indexes and often ask for byte values,
it makes sense to simply restrict all implementations to Uint8Array.
|
|
|
|
|
|
This will improve the threshold benchmark. Using 32k because that's what
Go uses, but we should explore the value in the future.
https://github.com/golang/go/blob/a0d6420d8be2ae7164797051ec74fa2a2df466a1/src/io/io.go#L391
|
|
Adds deno.stdin, deno.stdout, deno.stderr, deno.open(), deno.write(),
deno.read(), deno.Reader, deno.Writer, deno.copy().
Fixes #721. tests/cat.ts works.
|