~jojo/Carth

c7e73559239a1c292baaa33795523974f80a1ff3 — JoJo 6 months ago 2d5e5be
Rename foreign-core to std-rs
7 files changed, 18 insertions(+), 18 deletions(-)

M Makefile
M guix.scm
R foreign-core/.gitignore => std-rs/.gitignore
R foreign-core/Cargo.lock => std-rs/Cargo.lock
R foreign-core/Cargo.toml => std-rs/Cargo.toml
R foreign-core/src/ffi.rs => std-rs/src/ffi.rs
R foreign-core/src/lib.rs => std-rs/src/lib.rs
M Makefile => Makefile +8 -8
@@ 3,26 3,26 @@ lib_dir=~/.local/lib
mod_dir=~/.carth/mod

.PHONY: all
all: carth-bin foreign-core
all: carth-bin std-rs

.PHONY: install
install: install-bin install-lib install-mods

.PHONY: carth-bin
carth-bin: foreign-core
carth-bin: std-rs
	stack build

.PHONY: foreign-core
foreign-core:
	cd foreign-core && cargo build --release
.PHONY: std-rs
std-rs:
	cd std-rs && cargo build --release

.PHONY: install-bin
install-bin: carth-bin
	mkdir -p $(bin_dir) && stack install --local-bin-path $(bin_dir)

.PHONY: install-lib
install-lib: foreign-core
	mkdir -p $(lib_dir) && cp foreign-core/target/release/libcarth_foreign_core.a $(lib_dir)
install-lib: std-rs
	mkdir -p $(lib_dir) && cp std-rs/target/release/libcarth_foreign_core.a $(lib_dir)

.PHONY: install-mods
install-mods:


@@ 31,4 31,4 @@ install-mods:
.PHONY: clean
clean:
	stack clean --full && rm carth.cabal
	cd foreign-core && cargo clean
	cd std-rs && cargo clean

M guix.scm => guix.scm +8 -8
@@ 13,14 13,14 @@
                     crates-io
                     libsigsegv)

(define carth-foreign-core
(define carth-std-rs
  (package
    (name "carth-foreign-core")
    (name "carth-std-rs")
    (version "0.4.0")
    (source
     (file-union name
                 `(("Cargo.toml" ,(local-file "foreign-core/Cargo.toml"))
                   ("src" ,(local-file "foreign-core/src" #:recursive? #t)))))
                 `(("Cargo.toml" ,(local-file "std-rs/Cargo.toml"))
                   ("src" ,(local-file "std-rs/src" #:recursive? #t)))))
    (build-system cargo-build-system)
    (inputs `(("libsigsegv" ,libsigsegv)))
    (arguments


@@ 70,11 70,11 @@ programming language with Scheme-like syntax. Work in progress.")
     ;;   (add-before 'configure 'patch-runtime-lib-paths
     ;;     (lambda* (#:key inputs outputs #:allow-other-keys)
     ;;       (let* ((sigsegv (assoc-ref inputs "libsigsegv"))
     ;;              (foreign-core (assoc-ref inputs "carth-foreign-core"))
     ;;              (std-rs (assoc-ref inputs "carth-std-rs"))
     ;;              (sigsegv-a (string-append sigsegv "/lib/libsigsegv.a"))
     ;;              (sigsegv-so (string-append sigsegv "/lib/libsigsegv.so"))
     ;;              (foreign-a (string-append foreign-core "/lib/libcarth_foreign_core.a"))
     ;;              (foreign-so (string-append foreign-core "/lib/libcarth_foreign_core.so")))
     ;;              (foreign-a (string-append std-rs "/lib/libcarth_foreign_core.a"))
     ;;              (foreign-so (string-append std-rs "/lib/libcarth_foreign_core.so")))
     ;;         (invoke "ls" "-la" "src/Compile.hs")
     ;;         (invoke "cat" "/etc/passwd")
     ;;         (chmod "src/Compile.hs" #o755)


@@ 91,7 91,7 @@ programming language with Scheme-like syntax. Work in progress.")
     ("ghc-llvm-hs" ,ghc-llvm-hs)
     ("ghc-utf8-string" ,ghc-utf8-string)))
  (propagated-inputs
   `(("carth-foreign-core" ,carth-foreign-core)
   `(("carth-std-rs" ,carth-std-rs)
     ("libsigsegv" ,libsigsegv)))
  (home-page "https://github.com/bryal/carth")
  (synopsis "The Carth compiler")

R foreign-core/.gitignore => std-rs/.gitignore +0 -0
R foreign-core/Cargo.lock => std-rs/Cargo.lock +1 -1
@@ 1,7 1,7 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
[[package]]
name = "carth-foreign-core"
name = "carth-std-rs"
version = "0.3.1"
dependencies = [
 "libc",

R foreign-core/Cargo.toml => std-rs/Cargo.toml +1 -1
@@ 1,5 1,5 @@
[package]
name = "carth-foreign-core"
name = "carth-std-rs"
version = "0.3.1"
authors = ["JoJo <jo@jo.zone>"]
edition = "2018"

R foreign-core/src/ffi.rs => std-rs/src/ffi.rs +0 -0
R foreign-core/src/lib.rs => std-rs/src/lib.rs +0 -0