diff options
| author | ruki <[email protected]> | 2019-09-02 22:42:50 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-09-02 10:17:04 +0800 |
| commit | 7f3180689e0acb358fd3b44717580983f247d49e (patch) | |
| tree | 5c15b0e82839e23df588cff51cd6fb5d5559e322 /xmake/rules/rust/xmake.lua | |
| parent | fce34ce2b9b3d5f37e105ec3476f964641d2e554 (diff) | |
add rust rule
Diffstat (limited to 'xmake/rules/rust/xmake.lua')
| -rw-r--r-- | xmake/rules/rust/xmake.lua | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/xmake/rules/rust/xmake.lua b/xmake/rules/rust/xmake.lua new file mode 100644 index 000000000..9b6de4b8f --- /dev/null +++ b/xmake/rules/rust/xmake.lua @@ -0,0 +1,30 @@ +--!A cross-platform build utility based on Lua +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- +-- Copyright (C) 2015 - 2019, TBOOX Open Source Group. +-- +-- @author ruki +-- @file xmake.lua +-- + +-- define rule: rust.build +rule("rust.build") + set_extensions(".rs") + on_build_files(function (target, sourcebatch, opt) + import("build.target")(target, sourcebatch, opt) + end) + +-- define rule: cpp +rule("rust") + add_deps("rust.build") |
