mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
rust 1.65 updates for wasm target
This commit is contained in:
parent
73f46b6613
commit
4b929cfdb3
3 changed files with 14 additions and 10 deletions
|
@ -37,9 +37,7 @@ use roc_mono::ir::{
|
||||||
use roc_mono::layout::{
|
use roc_mono::layout::{
|
||||||
GlobalLayoutInterner, LambdaName, Layout, LayoutCache, LayoutProblem, Niche, STLayoutInterner,
|
GlobalLayoutInterner, LambdaName, Layout, LayoutCache, LayoutProblem, Niche, STLayoutInterner,
|
||||||
};
|
};
|
||||||
use roc_packaging::cache::{self, RocCacheDir};
|
use roc_packaging::cache::RocCacheDir;
|
||||||
#[cfg(not(target_family = "wasm"))]
|
|
||||||
use roc_packaging::https::PackageMetadata;
|
|
||||||
use roc_parse::ast::{
|
use roc_parse::ast::{
|
||||||
self, CommentOrNewline, Defs, ExtractSpaces, Spaced, StrLiteral, TypeAnnotation,
|
self, CommentOrNewline, Defs, ExtractSpaces, Spaced, StrLiteral, TypeAnnotation,
|
||||||
};
|
};
|
||||||
|
@ -67,6 +65,11 @@ use std::path::{Path, PathBuf};
|
||||||
use std::str::from_utf8_unchecked;
|
use std::str::from_utf8_unchecked;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::{env, fs};
|
use std::{env, fs};
|
||||||
|
#[cfg(not(target_family = "wasm"))]
|
||||||
|
use {
|
||||||
|
roc_packaging::cache::{self},
|
||||||
|
roc_packaging::https::PackageMetadata,
|
||||||
|
};
|
||||||
|
|
||||||
pub use crate::work::Phase;
|
pub use crate::work::Phase;
|
||||||
use crate::work::{DepCycle, Dependencies};
|
use crate::work::{DepCycle, Dependencies};
|
||||||
|
|
|
@ -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!(Literal, 24);
|
||||||
roc_error_macros::assert_sizeof_wasm!(Expr, 48);
|
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!(ProcLayout, 20);
|
||||||
roc_error_macros::assert_sizeof_wasm!(Call, 44);
|
roc_error_macros::assert_sizeof_wasm!(Call, 44);
|
||||||
roc_error_macros::assert_sizeof_wasm!(CallType, 36);
|
roc_error_macros::assert_sizeof_wasm!(CallType, 36);
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
#[cfg(not(target_family = "wasm"))]
|
#[cfg(not(target_family = "wasm"))]
|
||||||
use crate::https::{self, PackageMetadata, Problem};
|
use {
|
||||||
use roc_error_macros::internal_error;
|
crate::https::{self, PackageMetadata, Problem},
|
||||||
use std::{
|
roc_error_macros::internal_error,
|
||||||
fs,
|
std::fs,
|
||||||
path::{Path, PathBuf},
|
|
||||||
};
|
};
|
||||||
|
#[cfg(not(target_family = "wasm"))]
|
||||||
const MAX_DOWNLOAD_BYTES: u64 = 32 * 1_000_000_000; // GB
|
const MAX_DOWNLOAD_BYTES: u64 = 32 * 1_000_000_000; // GB
|
||||||
|
|
||||||
|
use std::path::{Path, PathBuf};
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug)]
|
#[derive(Copy, Clone, Debug)]
|
||||||
pub enum RocCacheDir<'a> {
|
pub enum RocCacheDir<'a> {
|
||||||
/// Normal scenario: reading from the user's cache dir on disk
|
/// Normal scenario: reading from the user's cache dir on disk
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue