Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Immix GC #732

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ VIEW_TARGETS := $(patsubst views/%.ecr,static/views/%.html,$(VIEW_SOURCES))
VIEW_PARTIALS := $(wildcard views/partials/*.ecr)
JS := static/js/lib/chunks/helpers.segment.js static/js/lib/chart.js static/js/lib/amqp-websocket-client.mjs static/js/lib/amqp-websocket-client.mjs.map static/js/lib/luxon.js static/js/lib/chartjs-adapter-luxon.esm.js static/js/lib/elements-8.2.0.js static/js/lib/elements-8.2.0.css
CRYSTAL_FLAGS := --release --stats
override CRYSTAL_FLAGS += --error-on-warnings --link-flags=-pie
override CRYSTAL_FLAGS += --error-on-warnings --link-flags=-pie -Dgc_none

.DEFAULT_GOAL := all

@@ -46,7 +46,7 @@ bin/%-debug: src/%.cr $(SOURCES) lib $(JS) $(DOCS) | bin
crystal build $< -o $@ --debug $(CRYSTAL_FLAGS)

bin/lavinmqperf: src/lavinmqperf.cr lib | bin
crystal build $< -o $@ -Dpreview_mt $(CRYSTAL_FLAGS)
crystal build $< -o $@ $(CRYSTAL_FLAGS)

bin/lavinmqctl: src/lavinmqctl.cr lib | bin
crystal build $< -o $@ -Dgc_none $(CRYSTAL_FLAGS)
4 changes: 4 additions & 0 deletions shard.lock
Original file line number Diff line number Diff line change
@@ -12,6 +12,10 @@ shards:
git: https://github.com/cloudamqp/amqp-client.cr.git
version: 1.2.8

immix:
git: https://github.com/ysbaddaden/gc.git
version: 0.1.0+git.commit.47ae36012cdf436a2c18895c5bc00a91cee12149

lz4:
git: https://github.com/84codes/lz4.cr.git
version: 1.0.0+git.commit.96d714f7593c66ca7425872fd26c7b1286806d3d
3 changes: 3 additions & 0 deletions shard.yml
Original file line number Diff line number Diff line change
@@ -32,6 +32,9 @@ dependencies:
github: 84codes/systemd.cr
lz4:
github: 84codes/lz4.cr
immix:
github: ysbaddaden/gc
branch: master

development_dependencies:
ameba:
3 changes: 3 additions & 0 deletions src/lavinmq.cr
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{% if flag?(:gc_none) %}
require "immix"
{% end %}
require "./lavinmq/version"
require "./stdlib/*"
require "./lavinmq/config"
3 changes: 3 additions & 0 deletions src/lavinmqctl.cr
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{% if flag?(:gc_none) %}
require "immix"
{% end %}
require "./lavinmq/version"
require "./lavinmq/http/constants"
require "./lavinmq/definitions_generator"
3 changes: 3 additions & 0 deletions src/lavinmqperf.cr
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{% if flag?(:gc_none) %}
require "immix"
{% end %}
require "./lavinmq/version"
require "./stdlib/resource"
require "option_parser"