make more standard libraries work with nimPreviewSlimSystem (#20343)

* make more standard libraries work with `nimPreviewSlimSystem`

* typo

* part two

* Delete specutils.nim

* fixes more tests

* more fixes

* fixes tests

* fixes three more tests

* add formatfloat import

* fix

* last
This commit is contained in:
ringabout
2022-09-28 02:06:23 +08:00
committed by GitHub
parent 98a717dda9
commit 3d2f0e2c7c
194 changed files with 299 additions and 54 deletions

View File

@@ -3,6 +3,9 @@
when not defined(js):
{.fatal: "Module jsbigints is designed to be used with the JavaScript backend.".}
when defined(nimPreviewSlimSystem):
import std/assertions
type JsBigIntImpl {.importjs: "bigint".} = int # https://github.com/nim-lang/Nim/pull/16606
type JsBigInt* = distinct JsBigIntImpl ## Arbitrary precision integer for JavaScript target.

View File

@@ -62,6 +62,9 @@ when not defined(js):
when defined(posix):
import posix
when defined(nimPreviewSlimSystem):
import std/assertions
const
batchImplOS = defined(freebsd) or defined(openbsd) or defined(zephyr) or (defined(macosx) and not defined(ios))
batchSize {.used.} = 256

View File

@@ -13,6 +13,9 @@
import std/[macros, isolation, typetraits]
import system/ansi_c
when defined(nimPreviewSlimSystem):
import std/assertions
export isolation

View File

@@ -19,6 +19,8 @@ See also:
import os, random
when defined(nimPreviewSlimSystem):
import std/syncio
const
maxRetry = 10000