Skip to content

Commit

Permalink
Merge pull request #84 from byeongkeunahn/update-readme-dashu
Browse files Browse the repository at this point in the history
Update README.md: use dashu from crates.io
  • Loading branch information
kiwiyou authored Mar 6, 2024
2 parents 98f2d0b + b828fc7 commit 20a6388
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ macOS (AArch64) 환경에서 빌드하는 방법입니다.
그런 다음, Cargo.toml의 [dependencies] 항목에 다음을 추가합니다.

```
dashu = { git = "https://github.com/cmpute/dashu.git", rev = "22f3935", default-features = false, features = [] }
dashu = { version = "0.4.2", default-features = false }
```

basm/src/solution.rs를 다음과 같이 수정합니다.
Expand Down Expand Up @@ -286,7 +286,7 @@ chmod +x ./output-32

```
nom = { version = "7.1.3", default-features = false, features = ["alloc"] }
dashu = { git = "https://github.com/cmpute/dashu.git", rev = "22f3935", default-features = false, features = [] }
dashu = { version = "0.4.2", default-features = false }
```

basm/src/solution.rs를 다음과 같이 수정합니다.
Expand Down
6 changes: 6 additions & 0 deletions basm-std/src/platform/malloc/dlmalloc_linux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ impl System {
}
}

impl Default for System {
fn default() -> Self {
Self::new()
}
}

unsafe impl DlmallocAllocator for System {
fn alloc(&self, size: usize) -> (*mut u8, usize, u32) {
let addr = unsafe {
Expand Down
6 changes: 6 additions & 0 deletions basm-std/src/platform/malloc/dlmalloc_macos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ impl System {
}
}

impl Default for System {
fn default() -> Self {
Self::new()
}
}

unsafe impl DlmallocAllocator for System {
fn alloc(&self, size: usize) -> (*mut u8, usize, u32) {
let addr = unsafe {
Expand Down
6 changes: 6 additions & 0 deletions basm-std/src/platform/malloc/dlmalloc_wasm32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ impl System {
}
}

impl Default for System {
fn default() -> Self {
Self::new()
}
}

unsafe impl DlmallocAllocator for System {
fn alloc(&self, size: usize) -> (*mut u8, usize, u32) {
let pages = (size + 65535) >> 16;
Expand Down
6 changes: 6 additions & 0 deletions basm-std/src/platform/malloc/dlmalloc_windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ impl System {
}
}

impl Default for System {
fn default() -> Self {
Self::new()
}
}

unsafe impl DlmallocAllocator for System {
fn alloc(&self, size: usize) -> (*mut u8, usize, u32) {
let addr = unsafe {
Expand Down

0 comments on commit 20a6388

Please sign in to comment.