rust 1.65 updates for wasm target

This commit is contained in:
Anton-4 2023-01-17 20:11:38 +01:00
parent 73f46b6613
commit 4b929cfdb3
No known key found for this signature in database
GPG key ID: 0971D718C0A9B937
3 changed files with 14 additions and 10 deletions

View file

@ -37,9 +37,7 @@ use roc_mono::ir::{
use roc_mono::layout::{
GlobalLayoutInterner, LambdaName, Layout, LayoutCache, LayoutProblem, Niche, STLayoutInterner,
};
use roc_packaging::cache::{self, RocCacheDir};
#[cfg(not(target_family = "wasm"))]
use roc_packaging::https::PackageMetadata;
use roc_packaging::cache::RocCacheDir;
use roc_parse::ast::{
self, CommentOrNewline, Defs, ExtractSpaces, Spaced, StrLiteral, TypeAnnotation,
};
@ -67,6 +65,11 @@ use std::path::{Path, PathBuf};
use std::str::from_utf8_unchecked;
use std::sync::Arc;
use std::{env, fs};
#[cfg(not(target_family = "wasm"))]
use {
roc_packaging::cache::{self},
roc_packaging::https::PackageMetadata,
};
pub use crate::work::Phase;
use crate::work::{DepCycle, Dependencies};

View file

@ -59,7 +59,7 @@ pub fn pretty_print_ir_symbols() -> bool {
roc_error_macros::assert_sizeof_wasm!(Literal, 24);
roc_error_macros::assert_sizeof_wasm!(Expr, 48);
roc_error_macros::assert_sizeof_wasm!(Stmt, 72);
roc_error_macros::assert_sizeof_wasm!(Stmt, 64);
roc_error_macros::assert_sizeof_wasm!(ProcLayout, 20);
roc_error_macros::assert_sizeof_wasm!(Call, 44);
roc_error_macros::assert_sizeof_wasm!(CallType, 36);

View file

@ -1,13 +1,14 @@
#[cfg(not(target_family = "wasm"))]
use crate::https::{self, PackageMetadata, Problem};
use roc_error_macros::internal_error;
use std::{
fs,
path::{Path, PathBuf},
use {
crate::https::{self, PackageMetadata, Problem},
roc_error_macros::internal_error,
std::fs,
};
#[cfg(not(target_family = "wasm"))]
const MAX_DOWNLOAD_BYTES: u64 = 32 * 1_000_000_000; // GB
use std::path::{Path, PathBuf};
#[derive(Copy, Clone, Debug)]
pub enum RocCacheDir<'a> {
/// Normal scenario: reading from the user's cache dir on disk