Ludovic Chenut
b42daf41d8
Replace unsafeAddr by baseAddr ( #32 )
...
* Replace unsafeAddr xxx[0] by baseAddr(xxx)
* Fix styleCheck:usages
* Update CI conf
* Fix charsToBytes
* Fix outputs write
* Add test
2022-11-24 12:55:42 +01:00
Jacek Sieka
5ec974ed1a
Normalise nimble ( #36 )
...
* normalise nimble file, ci / deprecation fixes
* other deprecations
2022-11-23 16:27:20 +01:00
Dustin Brody
38c83660fa
consumedTo becomes negative to indicate delayed writes, so use type that allows for that
2022-03-17 09:31:24 +00:00
Dustin Brody
07184af965
use ptr byte cast
2022-03-17 09:30:44 +00:00
Dustin Brody
e238632e57
don't even notionally access element 0 of 0-length openArray
2022-03-17 09:30:13 +00:00
Zahary Karadjov
37a183153c
Fix the CI; Improve docs
2022-01-22 20:01:20 +02:00
Zahary Karadjov
5a7d1d196f
Add OutputStream.getWritableBytes(n)
2022-01-22 19:02:41 +02:00
Zahary Karadjov
94fa3fab8c
Review 371e60b17c and apply fixes
2022-01-22 16:19:56 +02:00
Zahary Karadjov
1eef0ec19c
Obtain a fresh span after flushing
2022-01-22 13:00:50 +02:00
Zahary Karadjov
03975dadf6
Fix the build with -d:asyncBackend=none
2022-01-20 23:56:22 +02:00
Zahary Karadjov
02d120b7f6
allowAsyncOps applies to async file flushing as well
2022-01-20 18:39:31 +02:00
Zahary Karadjov
e2e83fa27b
Fix a naming mistake
2022-01-20 18:29:01 +02:00
Zahary Karadjov
bf72054fe3
Allow the user to enable async operations over fileOutputs
2022-01-20 18:26:50 +02:00
Zahary Karadjov
a3dfcb3c77
Handle page extension properly in readInto
2022-01-20 18:24:35 +02:00
Ivan Yonchovski
eb2ad0c441
Added overload for fileInput
...
- Make it symetrical to `fileOutput`
2022-01-18 17:57:49 +02:00
Ivan Yonchovski
e56e9c71e1
Few minor improvements
...
- Remove the reference to non-existing `createPipeline` from the docs.
- Added check whether async_backend is set when `asynctools_adapters `is
imported. Without this change the compile error is very unclear (Future not
defined).
2022-01-15 09:58:04 +02:00
Ștefan Talpalaru
371e60b17c
CI: test with multiple Nim versions ( #23 )
...
* CI: test with multiple Nim versions
* fix readIntoExImpl() when premature EOF is triggered on some Windows versions
* also fix some unrelated pointer math
2022-01-05 23:22:53 +01:00
Zahary Karadjov
c653d05f27
Follow https://nim-lang.org/docs/asyncdispatch.html\#multiple-async-backend-support precisely
2021-12-08 16:59:12 +02:00
Jacek Sieka
1f62235d4f
Enable --styleCheck:usages
2021-12-07 00:32:45 +02:00
Zahary Karadjov
1b561a9e71
Add support for writing cstrings
2021-11-04 11:54:55 +02:00
Jacek Sieka
3a0ab42573
Don't import/export chronos by default ( #20 )
...
Chronos support is optional and should not have to be imported in order
to use faststreams for non-async use cases, as doing so pollutes the
global namespace and slows down compilation.
`async` support must now explicitly be enabled with
-d:async_backend=chronos|asyncdispatch
2021-08-20 14:10:26 +03:00
Zahary Karadjov
99e89eb1e5
Allow calling stream.read(0)
2021-02-18 23:15:59 +02:00
andri lim
367cb55eef
fix memFileInput.pos return negative value ( #16 )
2021-02-18 17:56:17 +02:00
jangko
91d119fdb0
fixes broken test
2021-01-07 12:12:55 +07:00
Zahary Karadjov
92205d608b
Fix #14 (don't use alloca)
2021-01-06 21:20:27 +02:00
Zahary Karadjov
4f6c874c10
Add a helper for initializing fsStdOut in threads
2020-11-27 19:35:36 +02:00
Zahary Karadjov
65f82f2f2d
Turn the consumeOutputs templates into procs to reduce code bloat
2020-11-27 19:35:31 +02:00
Zahary Karadjov
87309f3120
Don't raise OSError from memFileInput()
2020-08-02 20:16:47 +03:00
Zahary Karadjov
5df69fc696
Add asynctools adapter
2020-06-08 22:37:45 +03:00
Zahary Karadjov
81c24860e2
Bugfix: totalUnconsumedBytes works properly within withReadableRange blocks
2020-05-29 16:08:14 +03:00
Zahary Karadjov
5d7cad792f
Add tests for delayed var-size writes
2020-05-25 11:33:56 +03:00
Zahary Karadjov
4c5464a7e0
Allow withReadableRange(0)
2020-05-25 04:04:25 +03:00
Zahary Karadjov
5437bba3ce
Another fix for unsafe streams
2020-05-25 03:59:31 +03:00
Zahary Karadjov
0ca39dcd33
Quick fix for using withReadableRange with unsafe inputs
2020-05-25 03:57:18 +03:00
Zahary Karadjov
f43214d177
Remove unused variables
2020-05-25 02:31:30 +03:00
Zahary Karadjov
442ad53b00
Implement the full behavior of withReadableRange; close #12
2020-05-25 02:26:18 +03:00
John Dupuy
d3ef34b325
Removed unneeded conversion
2020-05-15 19:48:28 +03:00
John Dupuy
5e17ffae3a
Fixed output for writeText(s,float) and added unit test
2020-05-15 19:48:28 +03:00
John Dupuy
2c32157fd3
writeText for float rewritten to re-use Nim's call to sprintf
2020-05-15 19:48:28 +03:00
John Dupuy
9bbbf376d0
Added 3 more methods of streaming floats; doing time tests.
2020-05-15 19:48:28 +03:00
John Dupuy
d2deafbd78
First pass at three methods of streaming floats
2020-05-15 19:48:28 +03:00
Zahary Karadjov
dd63bbfd1c
Better name and docs for the 'nonBlockingReads' facility
2020-05-07 12:12:46 +03:00
Zahary Karadjov
8b863f7798
Slightly more flexible pipelines (to be documented)
2020-05-07 01:18:58 +03:00
Zahary Karadjov
ec5c3af313
Implement InputStream.nonBlockingReads and document it
2020-05-07 00:17:09 +03:00
Zahary Karadjov
fc76250d02
Implement timeoutToNextByte
2020-05-06 23:12:12 +03:00
Zahary Karadjov
e9f50bc847
Bugfix: Fix an invalid Defect detection when a cursor is creater right at a page boundary
2020-05-06 15:09:01 +03:00
Zahary Karadjov
65b43d9e38
Move stuff around; Add some missing overloads
2020-05-05 23:57:27 +03:00
Zahary Karadjov
0d90e444c2
Tweak the inlining of stream.write
2020-05-05 20:21:44 +03:00
Zahary Karadjov
18f9488bee
Expand the documentation; Clean up debugging code; Enable all tests
2020-05-05 19:20:25 +03:00
Zahary Karadjov
cb36a6d4db
Implement the async pipelines and fsMultiSync
2020-05-05 02:49:39 +03:00